/** * Creates a new DraftPlanDetail model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new DraftPlanDetail(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->ID]); } else { return $this->render('create', ['model' => $model]); } }
/** * Change Schedule if succesful redirect index tab1 * place call function _gantijadwal * @author wawan * @since 1.1.0 **/ public function actionGantiJadwal() { $model = new DraftPlanDetail(); $model->scenario = 'approve'; //scenario approve same if ($model->load(Yii::$app->request->post())) { self::GantiDetailHeader($model->CUST_ID, $model->TGL); self::GantiJadwalPlan($model->CUST_ID, $model->TGL); return $this->redirect(['index?tab=1']); } else { return $this->renderAjax('_gantijadwal', ['model' => $model, 'year' => self::get_aryYearDetailJadwal()]); } }