Example #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;
 }
Example #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>
Example #3
0
 public function getJobgrade()
 {
     return $this->hasOne(Jobgrade::className(), ['JOBGRADE_ID' => 'JOBGRADE_ID']);
 }
Example #4
0
//use backend\assets\AppAsset; 	/* CLASS ASSET CSS/JS/THEME Author: -ptr.nov-*/
//AppAsset::register($this);		/* INDEPENDENT CSS/JS/THEME FOR PAGE  Author: -ptr.nov-*/
/*Title page Modul*/
$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 - List Data Employee');
/* title pada header page */
/*variable Dropdown*/
$Combo_Corp = ArrayHelper::map(Corp::find()->orderBy('SORT')->asArray()->all(), 'CORP_NM', 'CORP_NM');
$Combo_Dept = ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_NM', 'DEP_NM');
$Combo_SubDept = ArrayHelper::map(Deptsub::find()->orderBy('SORT')->asArray()->all(), 'DEP_SUB_NM', 'DEP_SUB_NM');
$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');
$Combo_Status = ArrayHelper::map(Status::find()->orderBy('SORT')->asArray()->all(), 'STS_NM', 'STS_NM');
//--EMPLOYE ACTIVED--
$tab_employe = GridView::widget(['id' => 'active', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'PIC', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@HRD_EMP_UploadUrl') . '/' . $data->EMP_IMG, ['width' => '40']);
}], 'EMP_ID', ['attribute' => 'EMP_NM'], 'EMP_NM_BLK', ['attribute' => 'corpOne.CORP_NM', 'filter' => $Combo_Corp], ['attribute' => 'deptOne.DEP_NM', 'filter' => $Combo_Dept], ['attribute' => 'deptsub.DEP_SUB_NM', 'filter' => $Combo_SubDept], ['attribute' => 'groupfunction.GF_NM', 'filter' => $Combo_GrpFnc], ['attribute' => 'groupseqmen.SEQ_NM', 'filter' => $Combo_Seq], ['attribute' => 'jobgrade.JOBGRADE_NM', 'filter' => $Combo_Jab], ['attribute' => 'sttOne.STS_NM', 'filter' => $Combo_Status], ['attribute' => 'EMP_JOIN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_JOIN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]], ['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:50px; height:50px">View </button>', ['/hrd/employe/view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]);
}]]], 'panel' => ['type' => GridView::TYPE_SUCCESS, 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Employe']), '/hrd/employe/create', ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'class' => 'btn btn-success'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'active'], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]]);
//---EMPLOYE RESIGN --
$tab_employe_resign = GridView::widget(['id' => 'resign', 'dataProvider' => $dataProvider1, 'filterModel' => $searchModel1, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}', 'header' => 'Action', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<button type="button" class="btn btn-danger btn-xs" style="width:50px; height:50px">View </button>', ['view', 'id' => $model->EMP_ID], ['data-toggle' => "modal", 'data-target' => "#activity-emp", 'data-title' => $model->EMP_ID]);
}]], ['attribute' => 'PIC', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@HRD_EMP_UploadUrl') . '/' . $data->EMP_IMG, ['width' => '40']);
}], 'EMP_ID', ['attribute' => 'EMP_NM'], 'EMP_NM_BLK', ['attribute' => 'corpOne.CORP_NM', 'filter' => $Combo_Corp], ['attribute' => 'deptOne.DEP_NM', 'filter' => $Combo_Dept], ['attribute' => 'deptsub.DEP_SUB_NM', 'filter' => $Combo_SubDept], ['attribute' => 'groupfunction.GF_NM', 'filter' => $Combo_GrpFnc], ['attribute' => 'groupseqmen.SEQ_NM', 'filter' => $Combo_Seq], ['attribute' => 'jobgrade.JOBGRADE_NM', 'filter' => $Combo_Jab], ['attribute' => 'sttOne.STS_NM', 'filter' => $Combo_Status], ['attribute' => 'EMP_JOIN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_JOIN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]], ['attribute' => 'EMP_RESIGN_DATE', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'EMP_RESIGN_DATE', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']]]], 'panel' => ['type' => GridView::TYPE_SUCCESS], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'resign']], 'hover' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]);
?>
Example #5
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\models\hrd\Groupfunction;
use lukisongroup\models\hrd\Groupseqmen;
use lukisongroup\models\hrd\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();
Example #6
0
 /**
  * Finds the Jobgrade model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $ID
  * @param string $JOBGRADE_ID
  * @return Jobgrade the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($ID, $JOBGRADE_ID)
 {
     if (($model = Jobgrade::findOne(['ID' => $ID, 'JOBGRADE_ID' => $JOBGRADE_ID])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #7
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) {