title = 'Tracking'; use yii\grid\GridView; use yii\helpers\Html; use kartik\icons\Icon; use yii\helpers\ArrayHelper; use common\models\ConstStatus; use yii\widgets\MaskedInput; use yii\widgets\Pjax; use yii\widgets\ActiveForm; ?>

title ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'class' => 'yii\grid\CheckboxColumn', 'checkboxOptions' => function($model) { return ['value' => $model->fish->id_case]; } ,'contentOptions' => ['class' => 'CheckboxColumn'], ], [ 'attribute' => 'fish.id_case', 'filter' => Html::activeTextInput($searchModel, 'search_id_case', ['class' => 'form-control']), 'format' => 'raw', 'value' => function($model){ return $model->fish->id_case.' '.Yii::$app->iop->getCaseDate($model->fish->id_case); } ], //'fish.id_case', //'fish.patient.name', [ 'attribute' => 'fish.patient.name', 'filter' => Html::activeTextInput($searchModel, 'search_name', ['class' => 'form-control']), ], [ 'attribute' => 'fish.patient.age', 'value' => function ($model) { return $model->fish->patient->age . ' ' . $model->fish->patient->age_unit; }, 'filter' => Html::activeTextInput($searchModel, 'search_age', ['class' => 'form-control']), ], [ 'attribute' => 'fish.block_no', 'filter' => Html::activeTextInput($searchModel, 'search_block_no', ['class' => 'form-control']), ], [ 'attribute' => 'fish.patient.hospital.name', 'filter' => Html::activeTextInput($searchModel, 'search_hospital', ['class' => 'form-control']), ], [ 'attribute' => 'fish.register_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'search_register_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'report_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'report_at', 'mask' => '99/99/9999' ]), ], [ 'label' => 'พยาธิแพทย์', 'attribute' => 'pathologist.realname', 'value' => function ($model) { return (isset($model->pathologist) && $model->pathologist->id > 1) ? $model->pathologist->realname : null; } ], //'fish.patient.hospital.name', //'fish.register_at', [ 'attribute' => 'status_id', 'value' => function ($model) { return $model['status']['status']; }, 'filter' => Html::activeDropDownList($searchModel, 'status_id', ArrayHelper::map(ConstStatus::find()->all(), 'id', 'status'), ['class' => 'form-control', 'prompt' => 'เลือกสถานะ']), ], 'fish.return_at', [ 'label' => 'Tracking', 'format' => 'raw', 'filter' => Html::activeTextInput($searchModel, 'search_track_no', ['class' => 'form-control']), 'value' => function($model){ return "".$model->fish->tracking.""; } ], [ 'label' => 'Track Name', 'attribute' => 'fish.track.realname', ], [ 'label' => 'Track At', 'attribute' => 'fish.tracking_at', ], /*[ 'label' => '', 'format' => 'raw', 'value' => function($model){ return $model['status_id'] == 1 ? Html::a('', ['/register/case-update/fish', 'id_case' => $model->fish->id_case], ['class' => 'btn btn-xs btn-warning', 'title' => 'แก้ไข', 'target' => '_blank', 'data-pjax' => 0]) : Html::a('', ['preview', 'id_case' => $model->fish->id_case], ['class' => 'btn btn-xs btn-info', 'title' => 'เปิดดู', 'target' => '_blank', 'data-pjax' => 0]); } ],*/ ] ]); echo "
".Html::label('Tracking', 'label')." ".Html::textInput('tracking','',['class' => 'form-control']); echo "
"; echo "

".Html::submitButton(' Save', ['class' => 'btn btn-success'])."
"; ?>