manager employee fix
This commit is contained in:
1 parent
b2f482e10b
commit
f9c7328529
10 files changed
+44
-56
No files matched your search
@@ -32,8 +32,8 @@ class ManagerEmployee extends \yii\db\ActiveRecord
|
||||
return [
|
||||
[['manager_id', 'employee_id'], 'required'],
|
||||
[['manager_id'], 'integer'],
|
||||
['employee_id', 'unique', 'targetAttribute' => ['manager_id', 'user_card_id'], 'message' => 'Этот сотрудник уже закреплён за менеджером'],
|
||||
[['employee_id'], 'exist', 'skipOnError' => true, 'targetClass' => UserCard::className(), 'targetAttribute' => ['user_card_id' => 'id']],
|
||||
['employee_id', 'unique', 'targetAttribute' => ['manager_id', 'employee_id'], 'message' => 'Этот сотрудник уже закреплён за менеджером'],
|
||||
[['employee_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['employee_id' => 'id']],
|
||||
[['manager_id'], 'exist', 'skipOnError' => true, 'targetClass' => Manager::className(), 'targetAttribute' => ['manager_id' => 'id']],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user