<x-filament-panels::page> <div wire:loading.class="opacity-50" wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage" class="relative"> {{ $this->table }} <div wire:loading wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage" class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" style="left: 50%;"> <x-filament::loading-indicator class="h-10 w-10 text-primary-500"/> </div> </div></x-filament-panels::page>
->colors([ 'primary' => Color::Amber, ])
ExportColumn::make('id') ->exists(['posts' => fn (Builder $query) => $query->where('type', 'image')]) ->label('Has images')
->getSearchResultsUsing(static function ( ?string $search, Forms\Components\Select $component, Forms\Get $get, ) use($supplierId) { $attribute = $get('attribute'); if ($attribute) { if (!str_contains($search, ',')) { return static::filterSearchValues($get, $supplierId, search: $search); } $searchArray = array_map('trim', explode(',', $search)); $filters = static::filterSearchValues( $get, $supplierId, array_filter($searchArray, function($value) { return $value !== ''; }) ); $component->state([ ...array_keys($filters->toArray()), ...$component->getState(), ]); return $filters; } return []; })
expandableLimitedList
applications
TextInputColumn::make('applications.screening_mark')
users
screening_mark
EditResource
protected function handleRecordUpdate(Model $record, array $data): Model { return parent::handleRecordUpdate($record, $data); // TODO: Change the autogenerated stub }
HasLocalPreference
/** * @return string|null */ public function preferredLocale(): ?string { return \App::getLocale(); }
public function mount( AppSettings $settings, int $lineItem, ): void { $this->record = static::$model::find($lineItem); $this->settings = $settings->toArray(); $data = []; foreach ($this->record->postOrderRequests as $postOrderRequest) { $request = $postOrderRequest->request; if (!$request->workflow->terminated) { if ($request->type === 'need_picture_request') { $data['response-' . $postOrderRequest->id] = [ 'image' => null, 'response' => null ]; } else { $data['response-' . $postOrderRequest->id] = null; } } } $this->form->fill($data); }