'date' => $this->controller->request->get('date'),
'store_id' => $this->controller->request->get('storeId'),
];
+ /** @var Admin $admin */
+ $admin = Admin::find()->andWhere(['id'=>$row['admin_id']])->one();
+ if ($row['store_id'] == 'null') {
+ $row['store_id'] = $admin->store_id ?? null;
+ }
$slot = TimetablePlan::find()->andWhere($row)->one();
if (!$slot) {
$slot = new TimetablePlan($row);
- /** @var Admin $admin */
- $admin = Admin::find()->andWhere(['id'=>$row['admin_id']])->one();
$slot->store_id = $this->controller->request->get('storeId') ?? ($admin ? $admin->store_id : null);
if (