]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-360 Сборка страницы автопм
authormarina <m.zozirova@gmail.com>
Tue, 10 Jun 2025 10:20:58 +0000 (13:20 +0300)
committermarina <m.zozirova@gmail.com>
Tue, 10 Jun 2025 10:20:58 +0000 (13:20 +0300)
erp24/views/auto-plannogramma/index.php

index 5e992d71c3731344500a0fd8614755d000c6affe..64c2633793c6efe1f981b2694d4a24edaafee0e1 100644 (file)
@@ -34,8 +34,14 @@ $this->registerJsFile('/js/autoplannogramma/autoplannogramma.js', ['position' =>
                     <?= Select2::widget([
                         'name' => 'year-filter',
                         'data' => array_combine(range(date('Y') - 5, date('Y') + 5), range(date('Y') - 5, date('Y') + 5)),
-                        'options' => ['placeholder' => 'Год', 'id' => 'year'],
-                        'pluginOptions' => ['allowClear' => true],
+                        'value' => (string)date('Y'),
+                        'options' => [
+                            'placeholder' => 'Год',
+                            'id' => 'year',
+                        ],
+                        'pluginOptions' => [
+                            'allowClear' => true,
+                        ],
                     ]) ?>
                 </div>
                 <div class="col-md d-flex">
@@ -86,8 +92,14 @@ $this->registerJsFile('/js/autoplannogramma/autoplannogramma.js', ['position' =>
                     <?= Select2::widget([
                         'name' => 'week-filter',
                         'data' => array_combine(range(1, 53), range(1, 53)),
-                        'options' => ['placeholder' => 'Неделя', 'id' => 'week'],
-                        'pluginOptions' => ['allowClear' => true],
+                        'value' => (date('W') + 8) > 53 ? (date('W') + 8 - 53) : (date('W') + 8),
+                        'options' => [
+                            'placeholder' => 'Неделя',
+                            'id' => 'week',
+                        ],
+                        'pluginOptions' => [
+                            'allowClear' => true,
+                        ],
                     ]) ?>
                 </div>
                 <div class="col-md d-flex">