public function form(Form $form): Form
{
return $form->schema([
Select::make('quickbooks_vendor_ref_id')
->label('Quickbooks Vendor')
->options(LocationVendors::get(SelectedLocation::get())->pluck('display_name', 'quickbooks_vendor_ref_id')->toArray())
->live()
->searchable()
->loadingMessage('Loading vendors...')
->suffixAction(
Action::make('refreshVendors')
->label('Refresh Vendors')
->icon('heroicon-o-arrow-path')
->action(fn () => LocationVendors::get(SelectedLocation::get(), true)->pluck('display_name', 'quickbooks_vendor_ref_id')->toArray())
),
...
}
public function form(Form $form): Form
{
return $form->schema([
Select::make('quickbooks_vendor_ref_id')
->label('Quickbooks Vendor')
->options(LocationVendors::get(SelectedLocation::get())->pluck('display_name', 'quickbooks_vendor_ref_id')->toArray())
->live()
->searchable()
->loadingMessage('Loading vendors...')
->suffixAction(
Action::make('refreshVendors')
->label('Refresh Vendors')
->icon('heroicon-o-arrow-path')
->action(fn () => LocationVendors::get(SelectedLocation::get(), true)->pluck('display_name', 'quickbooks_vendor_ref_id')->toArray())
),
...
}