public function mount(): void
{
$this->form->fill(['customer_code' => Auth::user()->customer->code]);
}
public function form(Form $form): Form
{
return $form
->schema(
[
Select::make('customer_code')
->hiddenLabel()
->required()
->markAsRequired(false)
->selectablePlaceholder(false)
->searchable()
->placeholder('Select')
->searchPrompt('Search')
->live()
->options(
[
'Active' => Customer::withoutTrashed()->pluck('code')->toArray(),
'Inactive' => Customer::onlyTrashed()->pluck('code')->toArray(),
]
),
]
)
;
}
public function mount(): void
{
$this->form->fill(['customer_code' => Auth::user()->customer->code]);
}
public function form(Form $form): Form
{
return $form
->schema(
[
Select::make('customer_code')
->hiddenLabel()
->required()
->markAsRequired(false)
->selectablePlaceholder(false)
->searchable()
->placeholder('Select')
->searchPrompt('Search')
->live()
->options(
[
'Active' => Customer::withoutTrashed()->pluck('code')->toArray(),
'Inactive' => Customer::onlyTrashed()->pluck('code')->toArray(),
]
),
]
)
;
}