update gán lịch trình cho nhân viên

This commit is contained in:
2020-10-14 14:00:01 +07:00
parent 620dfc75c2
commit ed061f5994
16 changed files with 2626 additions and 100 deletions

View File

@@ -86,7 +86,7 @@ class DepartmentController extends Controller {
$oldCode = $model->code;
$model->name = $data["Name"];
$model->code = $data["Code"];
$model->pid = $data["Pid"];
$model->pid = $data["Pid"] !== "" ? $data["Pid"] : 0;
$model->modified_at = time();
if ($model->save()) {
Department::updateAll(["pid" => $data["Code"]], ["pid" => $oldCode]);