forget(['selected_plant']); // session()->forget(['from_date']); // session()->forget(['to_date']); // $this->filtersForm->fill([ // 'plant' => null, // 'from_date' => null, // 'to_date' => null, // // 'success_status' => null // ]); // } // public function filtersForm(Form $form): Form // { // return $form // ->statePath('filters') // Store form state in 'filters' // ->schema([ // Select::make('plant') // ->label('Select Plant') // ->reactive() // // ->options(Plant::pluck('name', 'id')) // ->options(function (callable $get) { // $userHas = Filament::auth()->user()->plant_id; // return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray(); // }) // ->afterStateUpdated(function ($state,callable $set) { // session(['selected_plant' => $state]); // fixed typo // //$this->dispatch('cumulativeChart'); // custom Livewire event // // Reset success_status whenever plant changes // $set('success_status', null); // session()->forget('success_status'); // }), // // Select::make('success_status') // // ->label('Select Status') // // ->options([ // // 'Ok' => 'Ok', // // 'Not Ok' => 'Not Ok', // // ]) // // ->reactive() // // ->afterStateUpdated(function ($state) { // // session(['success_status' => $state]); // // }), // DatePicker::make('created_from') // ->label('Created From') // ->reactive() // ->afterStateUpdated(function ($state,callable $set) { // session(['from_date' => $state]); // }), // DatePicker::make('created_to') // ->label('Created To') // ->reactive() // ->afterStateUpdated(function ($state,callable $set) { // session(['to_date' => $state]); // }), // ]); // } // public static function getNavigationLabel(): string // { // return 'Production Line Count'; // } // public function getHeading(): string // { // return 'Production Line Count'; // } // public function getWidgets(): array // { // $widgets = []; // if (CumulativeChart::canView()) { // $widgets[] = CumulativeChart::class; // } // return $widgets; // } // public static function canAccess(): bool // { // return Auth::check() && Auth::user()->can('view production line count dashboard'); // } public function getHeading(): string { return ''; } public static function getNavigationLabel(): string { return 'Welcome'; } }