update Area + Device

This commit is contained in:
2020-10-08 17:12:19 +07:00
parent 2d15fc1c14
commit 0273aa2179
31 changed files with 1475 additions and 557 deletions

View File

@@ -91,15 +91,10 @@ class Department extends \yii\db\ActiveRecord {
self::deleteDepartment($value->id);
}
$model->delete();
self::insertSystemLogs(["action" => "delete", "description" => "Xóa phòng ban: " . $model->name]);
common::insertSystemLogs(["action" => "delete", "description" => "Xóa phòng ban: " . $model->name, "type" => "department"]);
}
}
public static function insertSystemLogs($data) {
$model = new LogsDepartment();
return $model->create($data);
}
public function checkStatusImport($data) {
if ($this->findOne(["code" => $data["A"]]))
return ["status" => false, "description" => "Mã phòng ban đã tồn tại"];