service->sectionData($pengurusBumdes)); } public function store(StoreRantaiNilaiBumdesRequest $request, PengurusBumdes $pengurusBumdes): RedirectResponse { $this->service->saveSection($pengurusBumdes, $request->validated(), 'rantai-nilai'); $nextSection = $request->validated('redirect_fragment'); $postharvestSection = in_array($nextSection, ['section-rantai-pengeringan', 'section-rantai-fermentasi', 'section-rantai-premium-harga'], true); $canContinue = $request->boolean($postharvestSection ? 'melakukan_pengolahan_pascapanen' : 'melakukan_jual_beli'); $nextSection = $canContinue ? $nextSection : null; return redirect()->to(route('bumdes.rantai-nilai.index', $pengurusBumdes).($nextSection ? '#'.$nextSection : '')) ->with('success', 'Data Rantai Nilai & Akses Pasar berhasil disimpan.'); } }