card orders WIP
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
use Trin4ik\NovaSwitcher\NovaSwitcher;
|
||||
|
||||
class CardType extends Resource
|
||||
{
|
||||
@@ -34,6 +35,22 @@ class CardType extends Resource
|
||||
'name',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the displayable label of the resource.
|
||||
*/
|
||||
public static function label(): string
|
||||
{
|
||||
return __('Card types');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the displayable singular label of the resource.
|
||||
*/
|
||||
public static function singularLabel(): string
|
||||
{
|
||||
return __('Card type');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fields displayed by the resource.
|
||||
*/
|
||||
@@ -50,7 +67,7 @@ class CardType extends Resource
|
||||
->rules('nullable', 'numeric'),
|
||||
|
||||
Text::make(__('Notes'), 'notes')
|
||||
->rules('required', 'string', 'max:255'),
|
||||
->rules('nullable', 'string', 'max:255'),
|
||||
|
||||
NovaSwitcher::make(__('Active'), 'active')
|
||||
->default(true),
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Providers;
|
||||
use App\Nova\Dashboards\Main;
|
||||
use App\Nova\Resources\Branch\Branch;
|
||||
use App\Nova\Resources\Order\Card\CardState;
|
||||
use App\Nova\Resources\Order\Card\CardType;
|
||||
use App\Nova\Resources\Order\Loan\LoanOrder;
|
||||
use App\Nova\Resources\Order\Loan\LoanType;
|
||||
use App\Nova\Resources\System\Location\Province;
|
||||
@@ -134,6 +135,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
MenuGroup::make(__('Card'), [
|
||||
MenuItem::resource(CardState::class),
|
||||
MenuItem::resource(CardType::class),
|
||||
])->collapsable(),
|
||||
|
||||
MenuGroup::make(__('Location'), [
|
||||
|
||||
@@ -237,5 +237,7 @@
|
||||
"Reason for issuing the card": "Kartyň çykarylmagynyň sebäbi",
|
||||
"Card state": "Kartyň çykarylmagynyň sebäbi",
|
||||
"Card states": "Kartyň çykarylmagynyň sebäpleri",
|
||||
"Card": "Kart"
|
||||
"Card": "Kart",
|
||||
"Card type": "Kart görnüşi",
|
||||
"Card types": "Kart görnüşleri"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user