use yii\helpers\Html; //use yii\bootstrap\Html; //use yii\widgets\ActiveForm; use yii\bootstrap\ActiveForm; use app\models\LibBedtype; use yii\helpers\ArrayHelper; use app\models\LibPttype; use app\models\LibAdmit; use app\models\LibDisc; use app\models\WorkloadDoctor; use yii\helpers\Url; //use yii\widgets\Pjax; //use yii\bootstrap\Modal; use kartik\popover\PopoverX; $lib_admit = ArrayHelper::map(LibAdmit::find()->all(), 'code', 'name'); $lib_pttype = ArrayHelper::map(LibPttype::find()->all(), 'code', 'name'); $lib_disc = ArrayHelper::map(LibDisc::find()->all(), 'code', 'name'); $lib_bedtype = ArrayHelper::map(LibBedtype::find()->all(), 'code', 'name'); $lib_doctor = ArrayHelper::map(WorkloadDoctor::find()->byWard()->all(), 'ref', 'Fullname'); $lib_item = $model->getItem(); $lib_tube = $model->getTube(); //print_r($lib_doctor); //print_r($lib_bedtype2); /* @var $this yii\web\View */ /* @var $model app\models\WorkloadEvent2 */ /* @var $form yii\widgets\ActiveForm */ ?> <?php
if (isset($pv_data[$v->hn])) { $model->bed_no = $pv_data['bed_no'][$v->hn]; } echo $form->field($model, "[{$v->hn}]bed_no")->textInput()->label(false); echo '</td>'; echo '<td>'; echo $v->title . $v->name . '</br>' . $v->surname; echo '</td>'; echo '<td>'; if (isset($pv_data[$v->hn])) { $model->pt_type = $pv_data['pt_type'][$v->hn]; } echo $form->field($model, "[{$v->hn}]pt_type")->dropDownList(ArrayHelper::map(LibPttype::find()->all(), 'code', 'name'))->label(false); echo '</td>'; echo '<td>'; echo $form->field($model, "[{$v->hn}]admit_type")->dropDownList(ArrayHelper::map(LibAdmit::find()->all(), 'code', 'name'))->label(false); echo '</td>'; echo '<td>'; echo $form->field($model, "[{$v->hn}]disc_type")->dropDownList(ArrayHelper::map(LibDisc::find()->all(), 'code', 'name'))->label(false); echo '</td>'; echo '<td>'; if (isset($pv_data[$v->hn])) { $model->disability = $pv_data['disability'][$v->hn]; } echo $form->field($model, "[{$v->hn}]disability")->checkbox()->label(' '); echo '</td>'; if (isset($pv_data[$v->hn])) { $model->prepare = $pv_data['prepare'][$v->hn]; } echo '<td>'; echo $form->field($model, "[{$v->hn}]prepare")->checkbox()->label(' ');