diff --git a/app/Nova/Resources/Order/Card/CardType.php b/app/Nova/Resources/Order/Card/CardType.php index 0fd0479..5f93631 100644 --- a/app/Nova/Resources/Order/Card/CardType.php +++ b/app/Nova/Resources/Order/Card/CardType.php @@ -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), diff --git a/app/Providers/NovaServiceProvider.php b/app/Providers/NovaServiceProvider.php index 5d59676..be82d98 100644 --- a/app/Providers/NovaServiceProvider.php +++ b/app/Providers/NovaServiceProvider.php @@ -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'), [ diff --git a/lang/tk.json b/lang/tk.json index 94c1729..da21e7d 100644 --- a/lang/tk.json +++ b/lang/tk.json @@ -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" }