Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Jobgrade::find()->Where('u0003c.JOBGRADE_STS<>3');
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['ID' => $this->ID, 'SORT' => $this->SORT, 'JOBGRADE_STS' => $this->JOBGRADE_STS]);
     $query->andFilterWhere(['like', 'JOBGRADE_ID', $this->JOBGRADE_ID])->andFilterWhere(['like', 'JOBGRADE_NM', $this->JOBGRADE_NM])->andFilterWhere(['like', 'JOBGRADE_DCRP', $this->JOBGRADE_DCRP]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
    $Val_GF = $Gf_MDL->GF_NM;
}
/*GROUP-SEQUEN*/
if (count($GSeqmen_MDL) == 0) {
    $Val_SQMEN = 'none';
} else {
    $Val_SQMEN = $GSeqmen_MDL->SEQ_NM;
}
/*JOBGRADE*/
if (count($Grading_MDL) == 0) {
    $Val_GRADING = 'none';
} else {
    $Val_GRADING = $Grading_MDL->JOBGRADE_NM;
}
?>

<?php 
$attribute = [['label' => 'Group Function', 'attribute' => 'GF_ID', 'format' => 'raw', 'value' => Html::a($Val_GF, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id']]], ['label' => 'Group Seqmen', 'attribute' => 'SEQ_ID', 'format' => 'raw', 'value' => Html::a($Val_SQMEN, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id']]], ['label' => 'JobGrading', 'attribute' => 'JOBGRADE_ID', 'format' => 'raw', 'value' => Html::a($Val_GRADING, '#', ['class' => 'kv-author-link']), 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_ID', 'JOBGRADE_NM'), 'options' => ['id' => 'Grading-id']]], ['attribute' => 'SORT'], ['attribute' => 'JOBGRADE_DCRP', 'type' => DetailView::INPUT_TEXTAREA], ['attribute' => 'CREATED_BY', 'options' => ['readonly' => true]], ['attribute' => 'UPDATED_BY', 'options' => ['readonly' => true]], ['attribute' => 'UPDATED_TIME', 'options' => ['readonly' => true]]];
?>

<div class="container">
	<div class="col-sm-2"></div>
	<div class="col-sm-7">
		<?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
echo DetailView::widget(['model' => $model, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => 'FORMULA MODUL GRADING', 'type' => DetailView::TYPE_INFO], 'attributes' => $attribute, 'deleteOptions' => ['url' => ['deletestt', 'id' => $model->ID], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this record?'), 'method' => 'post']]]);
ActiveForm::end();
?>
	</div>
</div>
Ejemplo n.º 3
0
 public function actionCetakpdf($id)
 {
     # code...
     $data = Termcustomers::find()->where(['ID_TERM' => $id])->one();
     $datainternal = Jobgrade::find()->where(['JOBGRADE_ID' => $data['JOBGRADE_ID']])->asArray()->one();
     $datacus = Customers::find()->where(['CUST_KD' => $data->CUST_KD])->asArray()->one();
     // $term = Termgeneral::find()->where(['ID'=>$data['GENERAL_TERM']])->asArray()
     //                                                     ->one();
     $datadis = Distributor::find()->where(['KD_DISTRIBUTOR' => $data->DIST_KD])->asArray()->one();
     $datacorp = Corp::find()->where(['CORP_ID' => $data->PRINCIPAL_KD])->asArray()->one();
     $sql = "SELECT c.INVES_TYPE,c.ID_TERM,c.BUDGET_PLAN,c.BUDGET_ACTUAL,c.PERIODE_START,c.PERIODE_END,b.TARGET_VALUE from c0005 c LEFT JOIN c0003 b on c.ID_TERM = b.ID_TERM   where c.ID_TERM='" . $id . "'";
     $data1 = Termbudget::findBySql($sql)->all();
     $sqlsum = "SELECT SUM(BUDGET_PLAN) as BUDGET_PLAN,SUM(BUDGET_ACTUAL) as BUDGET_ACTUAL from c0005 where ID_TERM='" . $id . "'";
     $datasum = Termbudget::findBySql($sqlsum)->one();
     $dataProvider = new ArrayDataProvider(['key' => 'ID_TERM', 'allModels' => $data1, 'pagination' => ['pageSize' => 20]]);
     $content = $this->renderPartial('_pdf', ['data' => $data, 'datainternal' => $datainternal, 'datacus' => $datacus, 'datadis' => $datadis, 'datacorp' => $datacorp, 'datasum' => $datasum, 'dataProvider' => $dataProvider]);
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@lukisongroup/web/widget/pdf-asset/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:12px}', 'options' => ['title' => 'Term-Customers', 'subject' => 'Term'], 'methods' => ['SetHeader' => ['Copyright@LukisonGroup ' . date("r")], 'SetFooter' => ['{PAGENO}']]]);
     return $pdf->render();
 }
Ejemplo n.º 4
0
 private function aryJabID()
 {
     return ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_ID', 'JOBGRADE_NM');
 }
Ejemplo n.º 5
0
use kartik\grid\GridView;
use lukisongroup\hrd\models\Jobgrade;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Groupfunction;
use yii\helpers\ArrayHelper;
use kartik\editable\Editable;
use yii\widgets\Pjax;
$this->sideCorp = 'Modul HRM';
/* Title Select Company pada header pasa sidemenu/menu samping kiri */
$this->sideMenu = 'hrd_modul';
/* kd_menu untuk list menu pada sidemenu, get from table of database */
$this->title = Yii::t('app', 'Modul JobGrade');
/* title pada header page */
$Combo_GrpFnc = ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_NM', 'GF_NM');
$Combo_Seq = ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_NM', 'SEQ_NM');
$Combo_Jab = ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_NM', 'JOBGRADE_NM');
?>
<div class="jobgrademodul-index">
	<?php 
//Pjax::begin(['id'=>'pjax-users']);
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'Group Seqmen', 'attribute' => 'groupseqmen.SEQ_NM', 'filter' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_NM', 'SEQ_NM'), 'group' => true], ['label' => 'Group Function', 'attribute' => 'groupfunction.GF_NM', 'filter' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_NM', 'GF_NM'), 'group' => true], ['label' => 'Grading ID', 'attribute' => 'JOBGRADE_ID'], ['label' => 'Grading NM', 'attribute' => 'JOBGRADE_NM'], ['label' => 'Description', 'attribute' => 'JOBGRADE_DCRP'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {edit}', 'header' => 'Action', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<button type="button" class="btn btn-primary btn-xs" style="width:35px">View </button>', ['view', 'id' => $model->ID], ['data-toggle' => "modal", 'data-target' => "#activity-model-gradingmdl", 'data-title' => $model->ID]);
}]]], 'panel' => ['type' => GridView::TYPE_SUCCESS, 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Employe']), '/hrd/jobgrademodul/create', ['data-toggle' => "modal", 'data-target' => "#activity-model-gradingmdl", 'class' => 'btn btn-success'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'active']], 'hover' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]);
//Pjax::end();
$this->registerJs("\n\t\t    \$('#activity-model-gradingmdl').on('show.bs.modal', function (event) {\n\t\t        var button = \$(event.relatedTarget)\n\t\t        var modal = \$(this)\n\t\t        var title = button.data('title') \n\t\t        var href = button.attr('href') \n\t\t        //modal.find('.modal-title').html(title)\n\t\t        modal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t        \$.post(href)\n\t\t            .done(function( data ) {\n\t\t                modal.find('.modal-body').html(data)\n\t\t            });\n\t\t        })\n\t\t", $this::POS_READY);
//,$this::POS_END);
/*
//$this->registerJs("
 //   $(#activity-model-gradingmdl);
Ejemplo n.º 6
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use lukisongroup\hrd\models\Jobgrade;
use kartik\widgets\Select2;
use kartik\label\LabelInPlace;
/* @var $this yii\web\View */
/* @var $model lukisongroup\master\models\Termgeneral */
/* @var $form yii\widgets\ActiveForm */
$config = ['template' => "{input}\n{error}\n{hint}"];
$data = Jobgrade::find()->all();
$to = "JOBGRADE_ID";
$from = "JOBGRADE_NM";
?>

<div class="termgeneral-form">

    <?php 
$form = ActiveForm::begin(['id' => $model->formName()]);
?>


    <?php 
echo $form->field($model, 'PRINCIPAL_NM', $config)->widget(LabelInPlace::classname());
?>

    <?php 
echo $form->field($model, 'JOBGRADE_ID')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Jabatan ...'], 'data' => $model->data($data, $to, $from)]);
?>
Ejemplo n.º 7
0
<?php

use kartik\helpers\Html;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
use kartik\builder\FormGrid;
use yii\helpers\ArrayHelper;
use kartik\markdown\Markdown;
use lukisongroup\hrd\models\Groupfunction;
use lukisongroup\hrd\models\Groupseqmen;
use lukisongroup\hrd\models\Jobgrade;
$form = ActiveForm::begin(['id' => 'grading-form-id', 'type' => ActiveForm::TYPE_HORIZONTAL]);
$GradingInput = FormGrid::widget(['model' => $model, 'form' => $form, 'autoGenerateColumns' => true, 'rows' => [['columns' => 1, 'attributes' => ['GF_ID' => ['label' => 'GRP FUNCTION', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupfunction::find()->orderBy('SORT')->asArray()->all(), 'GF_ID', 'GF_NM'), 'options' => ['id' => 'Groupfnc-id'], 'hint' => 'Pilih Group Function', 'columnOptions' => ['colspan' => 6]], 'SEQ_ID' => ['label' => 'GRP SEQMEN', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Groupseqmen::find()->orderBy('SEQ_NM')->asArray()->all(), 'SEQ_ID', 'SEQ_NM'), 'options' => ['id' => 'Groupseq-id'], 'hint' => 'Pilih Group Sequen', 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_ID' => ['label' => 'GRADING', 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Jobgrade::find()->orderBy('SORT')->asArray()->all(), 'JOBGRADE_ID', 'JOBGRADE_NM'), 'options' => ['id' => 'grading-id'], 'hint' => 'Pilih Grading Karyawan', 'columnOptions' => ['colspan' => 6]], 'SORT' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter First Name...'], 'columnOptions' => ['colspan' => 6]], 'JOBGRADE_DCRP' => ['label' => 'DCRP', 'type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Last Name...'], 'columnOptions' => ['colspan' => 6]]]], ['columns' => 1, 'attributes' => ['actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="text-align: right; margin-top: 20px">' . Html::resetButton('Reset', ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Submit', ['class' => 'btn btn-primary']) . '</div>']]]]]);
/*Panel List Group*/
echo Html::listGroup([['content' => 'INPUT GRADING MODUL', 'url' => '#', 'badge' => '', 'active' => true], ['content' => $GradingInput]]);
ActiveForm::end();
Ejemplo n.º 8
0
$this->sideCorp = 'HRM - Data Employee';
/* Title Select Company pada header pasa sidemenu/menu samping kiri */
$this->sideMenu = 'hrd_personalia';
/* kd_menu untuk list menu pada sidemenu, get from table of database */
$this->title = Yii::t('app', 'Personalia - Detail & Edit Employee');
/* title pada header page */
?>


<?php 
$Corp_MDL = Corp::find()->where(['CORP_ID' => $model->EMP_CORP_ID])->orderBy('SORT')->one();
$Dept_MDL = Dept::find()->where(['DEP_ID' => $model->DEP_ID])->orderBy('SORT')->one();
$DeptSub_MDL = Deptsub::find()->where(['DEP_SUB_ID' => $model->DEP_SUB_ID])->orderBy('SORT')->one();
$Gf_MDL = Groupfunction::find()->where(['GF_ID' => $model->GF_ID])->orderBy('SORT')->one();
$GSeqmen_MDL = Groupseqmen::find()->where(['SEQ_ID' => $model->SEQ_ID])->one();
$Jabatan_MDL = Jobgrade::find()->where(['JOBGRADE_ID' => $model->JOBGRADE_ID])->orderBy('SORT')->one();
$Status_MDL = Status::find()->where(['STS_ID' => $model->EMP_STS])->orderBy('SORT')->one();
/*COORPORATE*/
if (count($Corp_MDL) == 0) {
    $Val_Corp = 'none';
} else {
    $Val_Corp = $Corp_MDL->CORP_NM;
}
/*DEPARTMENT*/
if (count($Dept_MDL) == 0) {
    $Val_Dept = 'none';
} else {
    $Val_Dept = $Dept_MDL->DEP_NM;
}
/*DEPARTMENT-SUB*/
if (count($DeptSub_MDL) == 0) {