* @return string
* @throws NotFoundHttpException if the model cannot be found
*/
- public function actionView($year)
+ public function actionView($year = null)
{
$stores = CityStore::getNames();
$clusters = Cluster::getNames();
$years = array_combine(range(2023, 2030), range(2023, 2030));
$monthNames = PlanStore::$month_name;
+ if (empty($year)){
+ $year = date("Y");
+ }
+
$yearPost = $year;
$intervals = DateHelper::getIntervals($year);
}
}
+
$inputData = [];
foreach ($valuesArray as $key => $rowArray) {
$arrayRow = [];
$intervals[$store] = $storeDataRow;
}
+ // Yii::info($intervals, 'application');
$clusterHistory = [];
$clusterSetList = [];
];
}
}
-
+ //var_dump($clusterSetList);
if (!empty($clusterSetList)) {
ClusterCalendar::deleteAll(['year' => $yearPost]);
foreach ($clusterSetList as $item) {
}
}
+ //var_dump($yearPost);
// die('stop');
- return $this->redirect(['view', 'year' => $yearPost]);
- return $this->redirect('/cluster_link_store_edit/view', [
+ // return $this->redirect('view', ['year' => $yearPost]);
+ return $this->render('/cluster_link_store_edit/update', [
'model' => $model,
'years' => $years,
'year' => $yearPost,