<?php use yii\helpers\Html; use yii\helpers\ArrayHelper; use kartik\grid\GridView; use yii\bootstrap\Modal; use crm\mastercrm\models\DraftPlan; use crm\mastercrm\models\DraftPlanGroup; use ptrnov\salesforce\Jadwal; use kartik\widgets\Spinner; $ptr_spiner1 = Spinner::widget(['id' => 'spn-gv-maintain', 'preset' => 'large', 'align' => 'center', 'color' => 'blue', 'hidden' => false]); $actionClass = 'btn btn-info btn-xs'; $actionLabel = 'Update'; $attDinamik = []; /*GRIDVIEW ARRAY FIELD HEAD*/ $headColomn = [['ID' => 0, 'ATTR' => ['FIELD' => 'SCDL_GROUP', 'SIZE' => '10px', 'label' => 'AUTO GROUP', 'align' => 'left', 'warna' => '73, 162, 182, 1', 'grp' => true]], ['ID' => 1, 'ATTR' => ['FIELD' => 'TGL', 'SIZE' => '20px', 'label' => 'DATE', 'align' => 'center', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 2, 'ATTR' => ['FIELD' => 'dayofDate', 'SIZE' => '30px', 'label' => 'DAY.NM', 'align' => 'center', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 3, 'ATTR' => ['FIELD' => 'weekofDate', 'SIZE' => '20px', 'label' => 'WEEK', 'align' => 'center', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 4, 'ATTR' => ['FIELD' => 'custlayernm', 'SIZE' => '10px', 'label' => 'LAYER', 'align' => 'center', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 5, 'ATTR' => ['FIELD' => 'CUST_ID', 'SIZE' => '50px', 'label' => 'CUST.ID', 'align' => 'center', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 6, 'ATTR' => ['FIELD' => 'custNm', 'SIZE' => '200px', 'label' => 'CUSTOMER', 'align' => 'left', 'warna' => '73, 162, 182, 1', 'group' => true]], ['ID' => 7, 'ATTR' => ['FIELD' => 'SalesNm', 'SIZE' => '20px', 'label' => 'SALES.NM', 'align' => 'left', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 8, 'ATTR' => ['FIELD' => 'UseridNm', 'SIZE' => '20px', 'label' => 'USER.ID', 'align' => 'left', 'warna' => '73, 162, 182, 1', 'grp' => false]], ['ID' => 9, 'ATTR' => ['FIELD' => 'STATUS', 'SIZE' => '20px', 'label' => 'Status', 'align' => 'left', 'warna' => '73, 162, 182, 1', 'grp' => false]]]; $gvHeadColomnBT = ArrayHelper::map($headColomn, 'ID', 'ATTR'); $attDinamik[] = ['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(73, 162, 182, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]; $attDinamik[] = ['class' => '\\kartik\\grid\\CheckboxColumn', 'width' => '10px', 'checkboxOptions' => function ($model, $key, $index, $column) { $check_user = DraftPlanGroup::find()->where(['SCL_NM' => $model->SCDL_GROUP_NM])->one(); if ($check_user->USER_ID == "") { return ['checked' => '', 'hidden' => true]; } elseif ($model->STATUS == 1) { return ['checked' => '', 'hidden' => true]; } }, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(73, 162, 182, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]; /*GRIDVIEW ARRAY ROWS*/ foreach ($gvHeadColomnBT as $key => $value[]) { if ($value[$key]['FIELD'] == 'STATUS') { $attDinamik[] = ['attribute' => $value[$key]['FIELD'], 'label' => $value[$key]['label'], 'filterType' => GridView::FILTER_SELECT2, 'filter' => $valStt, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Pilih'], 'format' => 'raw', 'value' => function ($model) { if ($model->STATUS == 1) {
<?php //use yii\helpers\Html; use kartik\helpers\Html; //use yii\widgets\DetailView; use kartik\grid\GridView; use yii\helpers\Url; use yii\helpers\ArrayHelper; use yii\bootstrap\Modal; use yii\web\JsExpression; use yii\widgets\Pjax; use kartik\widgets\Spinner; $ptr_spinerActual = Spinner::widget(['id' => 'spn-actual', 'preset' => 'large', 'align' => 'center', 'color' => 'blue']); $JSCode = <<<EOF \tfunction(start, end) { \t\$("#set-out-case-id").attr("href","/mastercrm/draft-plan/set-out-case") \t} EOF; $JSDropEvent = <<<EOF \tfunction(date) { \t\talert("Dropped on " + date.format()); \t\tif (\$('#drop-remove').is(':checked')) { \t\t\t// if so, remove the element from the "Draggable Events" list \t\t\t\$(this).remove(); \t\t} \t} EOF; $JSEventClick = <<<EOF \tfunction(calEvent, jsEvent, view) { \t\tvar tgl = calEvent.start; \t\tvar tgl1 = new Date(tgl);
<?php //use yii\helpers\Html; use kartik\helpers\Html; //use yii\widgets\DetailView; use kartik\grid\GridView; use yii\helpers\Url; use yii\helpers\ArrayHelper; use yii\bootstrap\Modal; use yii\web\JsExpression; use yii\widgets\Pjax; use kartik\widgets\Spinner; $ptr_spiner = Spinner::widget(['id' => 'spn-plan', 'preset' => 'large', 'align' => 'center', 'color' => 'blue']); $JSCode = <<<EOF \tfunction(start, end) { \t\tvar title = prompt('Event Title:'); \t\tvar eventData; \t\tvar dateTime1 = new Date(start); \t\tvar dateTime2 = new Date(end); \t\ttgl1 = moment(dateTime1).format("YYYY-MM-DD HH:mm:ss"); \t\ttgl2 = moment(dateTime2).format("YYYY-MM-DD HH:mm:ss"); \t\tif (title) { \t\t\t\$.ajax({ \t\t\t\turl:'/sistem/personalia/jsoncalendar_add', \t\t\t\ttype: 'POST', \t\t\t\tdata:'title=' + title + '&start='+ tgl1 + '&end=' + tgl2, \t\t\t\tdataType:'json', \t\t\t\tsuccess: function(result){ \t\t\t//alert('ok') \t\t\t\t \$.pjax.reload({container:'#calendar-user'}); \t\t\t\t //\$.pjax.reload({container:'#gv-schedule-id'});