From: Marina Zozirova Date: Thu, 13 Jun 2024 11:32:36 +0000 (+0000) Subject: ERP-5 Доработать фактический план по сотрудникам X-Git-Tag: 1.2^2~1^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=209f9a579f726a4b7eea590ba1891798bccef12c;p=erp24_rep%2Fyii-erp24%2F.git ERP-5 Доработать фактический план по сотрудникам --- diff --git a/erp24/actions/timetable/StartShiftStepOneAction.php b/erp24/actions/timetable/StartShiftStepOneAction.php index 26ed5bee..116156ea 100755 --- a/erp24/actions/timetable/StartShiftStepOneAction.php +++ b/erp24/actions/timetable/StartShiftStepOneAction.php @@ -3,6 +3,7 @@ declare(strict_types=1); namespace yii_app\actions\timetable; +use app\records\TimetableFactModel; use yii\base\Action; use yii\helpers\ArrayHelper; use yii_app\records\Admin; @@ -49,11 +50,13 @@ class StartShiftStepOneAction extends Action if ($modelTypeId == AdminCheckin::TYPE_END) { $adminStores = CityStore::getNames([$lastCheckin->store_id]); + $lastCheckinFact = TimetableFactModel::findOne(['checkin_start_id' => $lastCheckin->id]); + $shiftArray = $lastCheckinFact ? ['id' => $lastCheckinFact->shift_id, 'name' => $lastCheckinFact->shift->name] : []; } else { $adminStores = ArrayHelper::map($userModel->getStores(), 'id', 'name'); + $shiftArray = ArrayHelper::map(Shift::find()->andWhere(['not in', 'id', [3, 4, 6]])->all(), 'id', 'name'); } - $shiftArray = ArrayHelper::map(Shift::find()->all(), 'id', 'name'); return $this->controller->render('/timetable/start_shift_step_one.php', [ 'userModel' => $userModel, diff --git a/erp24/records/AdminCheckin.php b/erp24/records/AdminCheckin.php index 8f11e0fe..1d7b0178 100755 --- a/erp24/records/AdminCheckin.php +++ b/erp24/records/AdminCheckin.php @@ -90,7 +90,7 @@ class AdminCheckin extends ActiveRecord [['lat', 'lon'], 'double'], [['comment', 'photo'], 'string'], [['date'], 'date', 'format' => 'yyyy-M-d'], - [['time'], 'date', 'format' => 'yyyy-M-d HH:mm:ss'], +// [['time'], 'date', 'format' => 'yyyy-M-d HH:mm:ss'], [['admin_id', 'type_id', 'status', 'date', 'time', 'device_id'], 'required'], ]; } diff --git a/erp24/views/timetable-fact/index.php b/erp24/views/timetable-fact/index.php index d76e5ee8..11ddd103 100644 --- a/erp24/views/timetable-fact/index.php +++ b/erp24/views/timetable-fact/index.php @@ -80,7 +80,7 @@ $this->params['breadcrumbs'][] = $this->title; 'format' => 'raw', 'value' => function ($model) { if (!empty($model->checkin_start_id)) { - return !empty($photo = $model->checkinStart->photo) ? Html::img($photo, ['alt' => 'selfie', 'height' => '100px']) : null; + return !empty($photo = $model->checkinStart->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'height' => '100px']) : null; }; }, ], @@ -89,7 +89,7 @@ $this->params['breadcrumbs'][] = $this->title; 'format' => 'raw', 'value' => function ($model) { if (!empty($model->checkin_end_id)) { - return !empty($photo = $model->checkinEnd->photo) ? Html::img($photo, ['alt' => 'selfie', 'height' => '100px']) : null; + return !empty($photo = $model->checkinEnd->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'height' => '100px']) : null; }; }, ], diff --git a/erp24/views/timetable-fact/view.php b/erp24/views/timetable-fact/view.php index 22084db9..9b151402 100644 --- a/erp24/views/timetable-fact/view.php +++ b/erp24/views/timetable-fact/view.php @@ -149,7 +149,7 @@ $this->title = "Фактический табель #$model->id"; 'format' => 'raw', 'value' => function ($model) { if (!empty($model->checkin_start_id)) { - return !empty($photo = $model->checkinStart->photo) ? Html::img($photo, ['alt' => 'selfie', 'height' => '100px']) : null; + return !empty($photo = $model->checkinStart->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'height' => '100px']) : null; }; }, ], @@ -158,7 +158,7 @@ $this->title = "Фактический табель #$model->id"; 'format' => 'raw', 'value' => function ($model) { if (!empty($model->checkin_end_id)) { - return !empty($photo = $model->checkinEnd->photo) ? Html::img($photo, ['alt' => 'selfie', 'height' => '100px']) : null; + return !empty($photo = $model->checkinEnd->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'height' => '100px']) : null; }; }, ] diff --git a/erp24/views/timetable/start_shift_step_one.php b/erp24/views/timetable/start_shift_step_one.php index 598e345a..ad702cfd 100644 --- a/erp24/views/timetable/start_shift_step_one.php +++ b/erp24/views/timetable/start_shift_step_one.php @@ -117,14 +117,23 @@ use yii_app\forms\timetable\StartForm; -
-
Тип смены
- "form-select", - 'aria-label' => "Пример выбора по умолчанию", - ]) ?> -
-
+
+
Тип смены
+ type_id) || $lastCheckin->isEnd() || $userModel->adminGroup->isRoaming()) { + echo Html::dropDownList('shift_id', null, $shiftArray, [ + 'class' => "form-select", + 'aria-label' => "Пример выбора по умолчанию", + ]); + } else { + echo $shiftArray['name']; + echo Html::hiddenInput('shift_id', $shiftArray['id']); + } + + ?> + +
+
'btn btn-bd-primary ps-3 pe-3 mt-2']); ?> diff --git a/erp24/web/images/Bell.png b/erp24/web/images/Bell.png new file mode 100644 index 00000000..133f3309 Binary files /dev/null and b/erp24/web/images/Bell.png differ diff --git a/erp24/web/images/Bell.svg b/erp24/web/images/Bell.svg new file mode 100644 index 00000000..0f9317c0 --- /dev/null +++ b/erp24/web/images/Bell.svg @@ -0,0 +1,3 @@ + + + diff --git a/erp24/web/images/close.png b/erp24/web/images/close.png new file mode 100644 index 00000000..20baa1db Binary files /dev/null and b/erp24/web/images/close.png differ diff --git a/erp24/web/images/components.png b/erp24/web/images/components.png new file mode 100644 index 00000000..c6c30a8a Binary files /dev/null and b/erp24/web/images/components.png differ diff --git a/erp24/web/images/flower-closure.png b/erp24/web/images/flower-closure.png new file mode 100644 index 00000000..b2ee4dbf Binary files /dev/null and b/erp24/web/images/flower-closure.png differ diff --git a/erp24/web/images/icon-time.png b/erp24/web/images/icon-time.png new file mode 100644 index 00000000..3351a0fb Binary files /dev/null and b/erp24/web/images/icon-time.png differ diff --git a/erp24/web/images/icon-time.svg b/erp24/web/images/icon-time.svg new file mode 100644 index 00000000..14eef4c2 --- /dev/null +++ b/erp24/web/images/icon-time.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/erp24/web/images/left-arrow.png b/erp24/web/images/left-arrow.png new file mode 100644 index 00000000..0c0aa0bc Binary files /dev/null and b/erp24/web/images/left-arrow.png differ diff --git a/erp24/web/images/left-arrow.svg b/erp24/web/images/left-arrow.svg new file mode 100644 index 00000000..60a16e12 --- /dev/null +++ b/erp24/web/images/left-arrow.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/erp24/web/images/loading.gif b/erp24/web/images/loading.gif new file mode 100644 index 00000000..5087c2a6 Binary files /dev/null and b/erp24/web/images/loading.gif differ diff --git a/erp24/web/images/next.png b/erp24/web/images/next.png new file mode 100644 index 00000000..08365ac8 Binary files /dev/null and b/erp24/web/images/next.png differ diff --git a/erp24/web/images/opening-flower.jpg b/erp24/web/images/opening-flower.jpg new file mode 100644 index 00000000..1275c986 Binary files /dev/null and b/erp24/web/images/opening-flower.jpg differ diff --git a/erp24/web/images/prev.png b/erp24/web/images/prev.png new file mode 100644 index 00000000..329fa986 Binary files /dev/null and b/erp24/web/images/prev.png differ diff --git a/erp24/web/images/smile.jpg b/erp24/web/images/smile.jpg new file mode 100644 index 00000000..70b43883 Binary files /dev/null and b/erp24/web/images/smile.jpg differ diff --git a/erp24/web/images/smile.png b/erp24/web/images/smile.png new file mode 100644 index 00000000..c5b32607 Binary files /dev/null and b/erp24/web/images/smile.png differ