fix bug delete schedule

This commit is contained in:
dongpd 2020-10-22 11:52:43 +07:00
parent ad885eacd2
commit fbb8a80da8
2 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ class ScheduleController extends Controller {
if (Yii::$app->request->post()) {
$lists = Yii::$app->request->post("lists");
Schedule::deleteAll(["IN", "id", $lists]);
\app\models\Staff::updateAll(["schedule_id" => 0, ["IN", "id", $lists]]);
\app\models\Staff::updateAll(["schedule_id" => 0], ["IN", "id", $lists]);
}
}

View File

@ -38,7 +38,7 @@
'format' => 'raw',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'],
'value' => \app\helpers\CommonGrid::checkbox("schedule")
'value' => \app\helpers\CommonGrid::checkbox("schedule", false)
],
'name',
'description',