This commit is contained in:
2024-09-24 14:17:33 +05:00
parent 04d9b9ac7a
commit 5266e66760
5 changed files with 235 additions and 219 deletions

View File

@@ -9,7 +9,6 @@ use App\Modules\DateHelper\Repositories\DateHelperRepository;
use App\Nova\Filters\RegionFilter;
use App\Nova\Filters\StatusFilter;
use App\Nova\Resource;
use App\Nova\Resources\Order\Loan\Concerns\LoanOrderFieldsForDetail;
use App\Nova\Resources\Order\Loan\Concerns\LoanOrderFieldsForIndex;
use App\Repos\Order\Loan\LoanTypeRepo;
use App\Repos\Order\OrderRepo;
@@ -141,7 +140,7 @@ class LoanOrderMobile extends Resource
*/
public function fieldsForDetail(): array
{
return LoanOrderFieldsForDetail::make($this);
return LoanOrderMobileFieldsForDetail::make();
}
/**
@@ -260,14 +259,14 @@ class LoanOrderMobile extends Resource
->size('w-1/4')
->rules('required'),
Select::make(__('Card'). ' ' . __('Expiration month'), 'card_month')
Select::make(__('Card').' '.__('Expiration month'), 'card_month')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::monthsAsNumber())
->size('w-1/4')
->rules('required'),
Select::make(__('Card'). ' ' . __('Expiration year'), 'card_year')
Select::make(__('Card').' '.__('Expiration year'), 'card_year')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::yearsUntil())
@@ -394,7 +393,7 @@ class LoanOrderMobile extends Resource
->updateRules('nullable'),
]),
new Panel('1. ' . __('Guarantor'), [
new Panel('1. '.__('Guarantor'), [
Text::make(__('Guarantor name'), 'guarantor_name')
->fullWidth()
->size('w-1/3')
@@ -433,7 +432,7 @@ class LoanOrderMobile extends Resource
->rules('required'),
]),
new Panel('2. ' . __('Guarantor'), [
new Panel('2. '.__('Guarantor'), [
Text::make(__('Guarantor name'), 'guarantor_2_name')
->fullWidth()
->size('w-1/3')
@@ -482,7 +481,7 @@ class LoanOrderMobile extends Resource
}
}),
Select::make(__('Card') .' ' . __('Expiration month'), 'guarantor_2_card_month')
Select::make(__('Card').' '.__('Expiration month'), 'guarantor_2_card_month')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::monthsAsNumber())
@@ -495,7 +494,7 @@ class LoanOrderMobile extends Resource
}
}),
Select::make(__('Card') .' ' .__('Expiration year'), 'guarantor_2_card_year')
Select::make(__('Card').' '.__('Expiration year'), 'guarantor_2_card_year')
->displayUsingLabels()
->searchable()
->options(DateHelperRepository::yearsUntil())