fix bug backup dữ liệu cũ khi cập nhật lịch trình ko thay đổi
This commit is contained in:
parent
3c8300c74b
commit
d8c061c73a
|
@ -94,7 +94,9 @@ class AssignController extends Controller {
|
|||
$lists = Staff::find()->andWhere(["IN", "id", $post["staffs"]])->all();
|
||||
foreach ($lists as $key => $value) {
|
||||
$value->schedule_id = $post["schedule"];
|
||||
if ($value->door_access !== json_encode($post["doors"])) {
|
||||
$value->door_access_old = $value->door_access;
|
||||
}
|
||||
$value->door_access = json_encode($post["doors"]);
|
||||
$value->save();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user