record->name; } protected function getHeaderActions(): array { return [ EditAction::make() ->label('Edit client') ->outlined(), ActionGroup::make([ ActionGroup::make([ Action::make('newInvoice') ->label('New invoice') ->icon('heroicon-m-document-plus') ->url(CreateInvoice::getUrl(['client' => $this->record->getKey()])), Action::make('newEstimate') ->label('New estimate') ->icon('heroicon-m-document-duplicate') ->url(CreateEstimate::getUrl(['client' => $this->record->getKey()])), Action::make('newRecurringInvoice') ->label('New recurring invoice') ->icon('heroicon-m-arrow-path') ->url(CreateRecurringInvoice::getUrl(['client' => $this->record->getKey()])), ])->dropdown(false), DeleteAction::make(), ]) ->label('Actions') ->button() ->outlined() ->dropdownPlacement('bottom-end') ->icon('heroicon-m-chevron-down') ->iconPosition(IconPosition::After), ]; } protected function getHeaderWidgets(): array { return [ ClientResource\Widgets\InvoiceOverview::class, ]; } public function infolist(Infolist $infolist): Infolist { return $infolist ->schema([ Section::make('General') ->columns() ->schema([ TextEntry::make('primaryContact.full_name') ->label('Primary contact'), TextEntry::make('primaryContact.email') ->label('Primary email'), TextEntry::make('primaryContact.first_available_phone') ->label('Primary phone'), TextEntry::make('website') ->label('Website') ->url(static fn ($state) => $state, true) ->link(), ]), Section::make('Additional Details') ->columns() ->schema([ TextEntry::make('billingAddress.address_string') ->label('Billing address') ->listWithLineBreaks(), TextEntry::make('shippingAddress.address_string') ->label('Shipping address') ->listWithLineBreaks(), TextEntry::make('notes') ->label('Delivery instructions'), ]), ]); } }