wip on loan order

This commit is contained in:
nurmuhammet committed 2023-11-27 01:19:42 +05:00
1 parent 307f197d27
commit 0fcdedbcc7
6 files changed
+322 -9

No files matched your search

+18 -7
View File
@@ -9,12 +9,14 @@
use App\Nova\Resources\Order\Loan\Concerns\LoanOrderNovaRepo;
use App\Repos\Order\Loan\BranchRepo;
use App\Repos\Order\Loan\LoanTypeRepo;
use App\Repos\Order\OrderRepo;
use App\Repos\System\Settings\Legal\EducationRepo;
use App\Repos\System\Settings\Legal\MarriageRepo;
use App\Repos\System\Settings\Legal\PassportRepo;
use App\Repos\System\Settings\Location\RegionRepo;
use Illuminate\Http\Request;
use Konsulting\NovaTarget\NovaTarget;
use Laravel\Nova\Fields\Badge;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\Email;
use Laravel\Nova\Fields\File;
@@ -101,7 +103,7 @@ public function fieldsForIndex(NovaRequest $request): array
return [
ID::make()->hide(),
Text::make(__('Unique id'), 'unique_id')->sortable(),
Text::make(__('ID'), 'unique_id')->sortable(),
Select::make(__('Loan type'), 'loan_type')
->displayUsingLabels()
@@ -118,11 +120,20 @@ public function fieldsForIndex(NovaRequest $request): array
->options(BranchRepo::values())
->sortable(),
Text::make(__('Customer name'), 'customer_name'),
Text::make(__('Name'), 'customer_name'),
Text::make(__('Customer surname'), 'customer_surname'),
Text::make(__('Surname'), 'customer_surname'),
Text::make(__('Phone'), 'phone')
Text::make(__('Phone'), 'phone'),
Badge::make(__('Status'), 'status')
->map(OrderRepo::statusClasses())
->addTypes([
'primary' => 'dark:bg-gray-900 bg-gray-600 text-white',
])
->labels(OrderRepo::statusValues())
->withIcons()
->sortable(),
];
}
@@ -165,15 +176,15 @@ public function fields(NovaRequest $request): array
]),
new Panel(__('Personal data'), [
Text::make(__('Customer name'), 'customer_name')
Text::make(__('Name'), 'customer_name')
->size('w-1/3')
->rules('required', 'string', 'max:255'),
Text::make(__('Customer surname'), 'customer_surname')
Text::make(__('Surname'), 'customer_surname')
->size('w-1/3')
->rules('required', 'string', 'max:255'),
Text::make(__('Customer patronic name'), 'customer_patronic_name')
Text::make(__('Patronic name'), 'customer_patronic_name')
->size('w-1/3')
->rules('required', 'string', 'max:255'),
@@ -29,7 +29,7 @@ public static function values(): array
self::MIDDLE_SCHOOL => __('Middle school'),
self::UNFINISHED_HIGH_EDUCATION => __('Unfinished high education'),
self::HIGH_EDUCATION => __('High education'),
self::MASTERS => __('Masters'),
self::MASTERS => __('Masters ED'),
self::PHD => __('PHD'),
];
}