wip
This commit is contained in:
@@ -19,7 +19,7 @@ class LoanOrderFieldsForIndex
|
||||
/**
|
||||
* Loan Order fields for "create"
|
||||
*/
|
||||
public static function make(): array
|
||||
public static function make($resource): array
|
||||
{
|
||||
return [
|
||||
ID::make()->hide(),
|
||||
@@ -32,11 +32,11 @@ class LoanOrderFieldsForIndex
|
||||
Select::make(__('Region'), 'region')
|
||||
->displayUsingLabels()
|
||||
->options(RegionRepo::values())
|
||||
->canSeeWhen('isAdmin', $this)
|
||||
->canSeeWhen('isAdmin', $resource)
|
||||
->sortable(),
|
||||
|
||||
BelongsTo::make(__('Branch'), 'branch', Branch::class)
|
||||
->canSeeWhen('isAdmin', $this)
|
||||
->canSeeWhen('isAdmin', $resource)
|
||||
->sortable(),
|
||||
|
||||
Text::make(__('Name'), 'customer_name'),
|
||||
|
||||
@@ -129,7 +129,7 @@ class LoanOrder extends Resource
|
||||
*/
|
||||
public function fieldsForIndex(NovaRequest $request): array
|
||||
{
|
||||
return LoanOrderFieldsForIndex::make();
|
||||
return LoanOrderFieldsForIndex::make($this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user