update Area + Device
This commit is contained in:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user