public function actionIndex() { $request = Yii::$app->request; $itemRepository = new ItemRepository(); $tourRepository = new TourRepository(); $kanbanRepository = new KanbanRepository(); $mat_id = $request->get('mi'); $num_tour = $request->get('nt'); //var_dump($num_tour); exit; $matiere = $kanbanRepository->getMatiere($mat_id); $items = $kanbanRepository->getOrderedKanbanItem($mat_id, $num_tour); return $this->render('index', ['title' => $matiere->nom . " : Tour n° {$num_tour}", 'matiere' => $matiere, 'items' => $items, 'numerodutour' => $num_tour]); }
public function actionItemkanbanstepto() { $kanbanRepsitory = new KanbanRepository(); $item_id = isset($_POST['item_id']) && $_POST['item_id'] != '' ? $_POST['item_id'] : -1; $kanban_id = isset($_POST['k_id']) && $_POST['k_id'] != '' ? $_POST['k_id'] : -1; $step_to = isset($_POST['step_to']) && $_POST['step_to'] != '' ? $_POST['step_to'] : -1; $num_tour = isset($_POST['num_tour']) && $_POST['num_tour'] != '' ? $_POST['num_tour'] : -1; if ($item_id != -1 && $kanban_id != -1 && $step_to != -1) { $kanbanRepsitory->StepTo($kanban_id, $item_id, $step_to); if ($step_to == 2) { $this->setItemDone($num_tour, $item_id); } } }