This commit is contained in:
2023-04-12 13:14:37 +03:00
parent c65b7d10cc
commit 8bc601aa6a
43 changed files with 3005 additions and 795 deletions

View File

@ -261,6 +261,17 @@ class UserCard extends \yii\db\ActiveRecord
return ArrayHelper::map(self::find()->all(), 'id', 'fio');
}
public static function getListUserWithUserId($statusId = null)
{
$list = self::find();
if ($statusId){
$list->where(['status' => $statusId]);
}
return ArrayHelper::map($list->all(), 'id_user', 'fio');
}
public function getManager()
{
return $this->hasOne(Manager::class, ['user_card_id' => 'id']);