title = 'New Request';
$this->params['breadcrumbs'][] = ['url' => '/fish/staining/index', 'label' => 'Staining'];
$this->params['breadcrumbs'][] = $this->title;
?>
=$this->render('/layouts/_menu')?>
=$this->title?>
= Html::beginForm(['new'], 'post') ?>
=Html::submitButton(' รับงาน', ['class' => 'btn btn-warning', 'data-confirm' => 'ยืนยันการรับงาน?'])?>
=GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
/*'tableOptions' => [
'class' => 'table-striped table-hover table-bordered table-condensed'
],*/
'columns' => [
[
'class' => 'yii\grid\CheckboxColumn',
'checkboxOptions' => function($model) {
return ['value' => $model->id_case];
}
],
['class' => 'yii\grid\SerialColumn'],
'id_case',
[
'attribute' => 'hospital',
'filter' => Select2::widget([
'model' => $searchModel,
'theme' => Select2::THEME_BOOTSTRAP,
'attribute' => 'hospital',
'data' => ArrayHelper::map(ConstHospital::find()->orderBy(['name' => SORT_ASC])->all(), 'name', 'name'),
'pluginOptions' => [
'placeholder' => 'ค้นหาโรงพยาบาล',
'allowClear' => true
]
]),
'value' => function ($model) {
return $model->hospital;
}
],
/*[
'attribute' => 'bex',
//'filter' => $model->block_ex,
'value' => function($model){
return isset($model->caseBlock) ? $model->caseBlock->block_ex : null;
}
],
[
'attribute' => 'bin',
//'filter' => $model->block_ex,
'value' => function($model){
return isset($model->caseBlock) ? $model->caseBlock->block_in : null;
}
],*/
'pathologist',
'in_at',
[
'attribute' => 'status_1',
'filter' => [1 => 'New', 2 => 'Staining', 3 => 'Sent'],
'value' => function($model){
return ImmunoComponent::getStatus1($model->status_1);
}
],
[
'label' => '',
'format' => 'raw',
'value' => function($model){
return Html::a(' Staining', ['get-staining', 'id_case' => $model['id_case']], ['class' => 'btn btn-xs btn-success', 'title' => 'Staining '.$model['id_case']]);
}
]
]
])?>
=Html::submitButton(' รับงาน', ['class' => 'btn btn-warning', 'data-confirm' => 'ยืนยันการรับงาน?'])?>
= Html::endForm() ?>