--- /dev/null
+<?php
+
+namespace yii_app\actions\motivation;
+
+use Yii;
+use yii\base\Action;
+use yii\base\DynamicModel;
+use yii\helpers\ArrayHelper;
+use yii_app\records\CityStore;
+
+class IndexAction extends Action
+{
+ public function run() {
+ $model = DynamicModel::validateData([
+ 'store_id' => null, 'year' => null, 'month' => null
+ ], [
+ [['store_id', 'year', 'month'], 'safe']
+ ]);
+ $model->load(Yii::$app->request->get());
+
+ $stores = ArrayHelper::map(CityStore::find()->all(), 'id', 'name');
+
+ $years = [2023, 2024, 2025, 2026];
+ $months = ['Январь',' Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'];
+
+ return $this->controller->render('index',
+ compact('model', 'stores', 'years', 'months'));
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+namespace app\controllers;
+
+use yii\filters\AccessControl;
+use yii\web\Controller;
+
+class MotivationController extends Controller
+{
+ public function actions() {
+ return [
+ 'index' => \yii_app\actions\motivation\IndexAction::class,
+ ];
+ }
+
+ public function behaviors()
+ {
+ return [
+ 'access' => [
+ 'class' => AccessControl::class,
+ 'rules' => [
+ [
+ 'allow' => true,
+ 'permissions' => ['menu/motivation'],
+ ]
+ ]
+ ]
+ ];
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+use \yii\helpers\Html;
+use kartik\select2\Select2;
+use yii\widgets\ActiveForm;
+use yii\base\DynamicModel;
+
+/** @var $model DynamicModel */
+/** @var $stores array */
+/** @var $years array */
+/** @var $months array */
+
+?>
+
+<div class="motivationIndex m-5">
+
+ <?php $form = ActiveForm::begin(['method' => 'GET']) ?>
+
+ <div class="row">
+ <div class="col-4 d-flex justify-content-between align-items-center gap-4">
+ <div class="d-flex justify-content-around align-items-center gap-2">
+ <div class="mb-3">Магазин:</div>
+ <div style="display: inline-block"><?= $form->field($model, 'store_id')->widget(Select2::class, [
+ 'data' => $stores,
+ 'language' => 'ru',
+ 'options' => ['placeholder' => 'Магазин...'],
+ 'pluginOptions' => [
+ 'allowClear' => true
+ ],
+ ])->label(false) ?></div>
+ </div>
+ <div class="d-flex justify-content-around align-items-center gap-2">
+ <div class="mb-3">Год:</div>
+ <div style="display: inline-block"><?= $form->field($model, 'year')->widget(Select2::class, [
+ 'data' => $years,
+ 'language' => 'ru',
+ 'options' => ['placeholder' => 'Год...'],
+ 'pluginOptions' => [
+ 'allowClear' => true
+ ],
+ ])->label(false) ?></div>
+ </div>
+ <div class="d-flex justify-content-around align-items-center gap-2">
+ <div class="mb-3">Месяц:</div>
+ <div style="display: inline-block"><?= $form->field($model, 'month')->widget(Select2::class, [
+ 'data' => $months,
+ 'language' => 'ru',
+ 'options' => ['placeholder' => 'Месяц...'],
+ 'pluginOptions' => [
+ 'allowClear' => true
+ ],
+ ])->label(false) ?></div>
+ </div>
+ <div class="d-flex justify-content-around align-items-center gap-2">
+ <div class="mb-3"><?= Html::submitButton('Применить', ['class' => 'btn btn-secondary btn-sm'])?></div>
+ </div>
+ </div>
+ </div>
+
+ <?php ActiveForm::end() ?>
+
+</div>