public function actionMonthGoal()
{
$request = Yii::$app->request;
-
- $month = $request->post('month', 5);
- $year = $request->post('year', 2025);
+ $post = $request->post();
+ $month = $post['DynamicModel']['month'] ?? 5;
+ $year = $post['DynamicModel']['year'] ?? 2025;
$model = DynamicModel::validateData(
['month' => $month, 'year' => $year],
<div class="month-goal-form col-4">
<?php $form = ActiveForm::begin([
- 'action' => Url::to(['your-controller/month-goal']),
+ 'action' => Url::to(['bouquet/month-goal']),
'method' => 'post',
]); ?>
'columns' => [
['attribute' => 'product_guid',
'value' => function ($model, $key, $index, $widget) {
- return \yii_app\records\Products1c::find()->where(['id' => $model['product_guid']])->one()->name;
+ return \yii_app\records\Products1c::find()->where(['id' => $model['product_guid']])->one()->name .
+ " (" . $model['product_guid'] . ")";
},
'label' => 'Product GUID'],
['attribute' => 'bouquet_id',
['attribute' => 'raw_calculation', 'label' => 'Базовый расчёт'],
['attribute' => 'rounded', 'label' => 'С наценкой за сборку'],
],
+// 'export' => [
+// 'fontAwesome' => true
+// ],
+// 'exportConfig' => [
+// 'html' => [],
+// 'csv' => [
+// 'label' => Yii::t('kvgrid', 'CSV'),
+// 'icon' => '',
+// 'iconOptions' => ['class' => 'text-primary'],
+// 'showHeader' => true,
+// 'showPageSummary' => true,
+// 'showFooter' => true,
+// 'showCaption' => true,
+// 'filename' => Yii::t('kvgrid', 'grid-export'),
+// 'alertMsg' => Yii::t('kvgrid', 'The CSV export file will be generated for download.'),
+// 'options' => ['title' => Yii::t('kvgrid', 'Comma Separated Values')],
+// 'mime' => 'application/csv',
+// 'config' => [
+// 'colDelimiter' => ",",
+// 'rowDelimiter' => "\r\n",
+// ],
+// ],
+// 'txt' => [],
+// 'xls' => [],
+// 'pdf' => [],
+// 'json' => [],
+// ],
+// 'panel' => [
+// 'after' => '',
+// 'heading' => Html::encode($storesMap[$storeId] ?? $storeId) ,
+// 'type' => 'primary',
+// 'before' => '',
+// ],
]) ?>
<?php endforeach; ?>
<?php endforeach; ?>