wip Laon order
This commit is contained in:
@@ -51,6 +51,7 @@ class LoanOrderFieldsForIndex
|
|||||||
])
|
])
|
||||||
->labels(OrderRepo::statusValues())
|
->labels(OrderRepo::statusValues())
|
||||||
->withIcons()
|
->withIcons()
|
||||||
|
->icons(OrderRepo::statusIcons())
|
||||||
->sortable(),
|
->sortable(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use App\Repos\System\Settings\Legal\MarriageRepo;
|
|||||||
use App\Repos\System\Settings\Legal\PassportRepo;
|
use App\Repos\System\Settings\Legal\PassportRepo;
|
||||||
use App\Repos\System\Settings\Location\RegionRepo;
|
use App\Repos\System\Settings\Location\RegionRepo;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Laravel\Nova\Fields\Badge;
|
||||||
use Laravel\Nova\Fields\Date;
|
use Laravel\Nova\Fields\Date;
|
||||||
use Laravel\Nova\Fields\Email;
|
use Laravel\Nova\Fields\Email;
|
||||||
use Laravel\Nova\Fields\ID;
|
use Laravel\Nova\Fields\ID;
|
||||||
@@ -107,6 +108,16 @@ class LoanOrder extends Resource
|
|||||||
return [
|
return [
|
||||||
ID::make()->sortable(),
|
ID::make()->sortable(),
|
||||||
|
|
||||||
|
Badge::make(__('Status'), 'status')
|
||||||
|
->map(OrderRepo::statusClasses())
|
||||||
|
->addTypes([
|
||||||
|
'primary' => 'dark:bg-gray-900 bg-gray-600 text-white',
|
||||||
|
])
|
||||||
|
->labels(OrderRepo::statusValues())
|
||||||
|
->withIcons()
|
||||||
|
->icons(OrderRepo::statusIcons())
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
Select::make(__('Status'), 'status')
|
Select::make(__('Status'), 'status')
|
||||||
->displayUsingLabels()
|
->displayUsingLabels()
|
||||||
->searchable()
|
->searchable()
|
||||||
|
|||||||
@@ -65,6 +65,20 @@ class OrderRepo
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status icons
|
||||||
|
*/
|
||||||
|
public static function statusIcons(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'success' => 'check-circle',
|
||||||
|
'info' => 'information-circle',
|
||||||
|
'primary' => 'clipboard-list',
|
||||||
|
'danger' => 'ban',
|
||||||
|
'warning' => 'exclamation-circle',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HEX Colors
|
* HEX Colors
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user