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