This commit is contained in:
2025-11-03 10:06:07 +05:00
parent 7119ae4cb7
commit fadda1f0d2

View File

@@ -266,27 +266,27 @@ class LoanOrderMobileForm
Tab::make(__('Salary card')) Tab::make(__('Salary card'))
->columns(6) ->columns(6)
->schema([ ->schema([
TextInput::make('number') TextInput::make('card_number')
->label(__('Card number')) ->label(__('Card number'))
->mask('9999 9999 9999 9999') ->mask('9999 9999 9999 9999')
->dehydrateStateUsing(fn ($state) => str_replace(' ', '', $state)) ->dehydrateStateUsing(fn ($state) => str_replace(' ', '', $state))
->columnSpan(2) ->columnSpan(2)
->required(), ->required(),
TextInput::make('name') TextInput::make('card_name')
->label(__('Card name')) ->label(__('Card name'))
->maxLength(255) ->maxLength(255)
->columnSpan(2) ->columnSpan(2)
->required(), ->required(),
Select::make('month') Select::make('card_month')
->label(__('Card month')) ->label(__('Card month'))
->options(DateHelper::staticNumberMonths()) ->options(DateHelper::staticNumberMonths())
->native(false) ->native(false)
->columnSpan(1) ->columnSpan(1)
->required(), ->required(),
Select::make('year') Select::make('card_year')
->label(__('Card year')) ->label(__('Card year'))
->options(DateHelper::staticNumberYears()) ->options(DateHelper::staticNumberYears())
->native(false) ->native(false)
@@ -381,16 +381,82 @@ class LoanOrderMobileForm
->columnSpan(1), ->columnSpan(1),
]), ]),
Tab::make(__('Guarantor'). ' 1') Tab::make(__('Guarantor'). ' 1')
->columns(4) ->columns(6)
->schema([ ->schema([
TextInput::make('guarantor_name')
->label(__('Guarantor').' '. __('Name'))
->columnSpan(2)
->required()
->maxLength(255),
TextInput::make('guarantor_surname')
->label(__('Guarantor').' '. __('Surname'))
->columnSpan(2)
->required()
->maxLength(255),
TextInput::make('guarantor_patronic_name')
->label(__('Guarantor').' '. __('Patronic name'))
->columnSpan(2)
->maxLength(255),
FusedGroup::make([
Select::make('guarantor_passport_serie')
->label(__('Passport serie'))
->options(TurkmenPassportRepository::values())
->native(false)
->required()
->columnSpan(1),
TextInput::make('guarantor_passport_id')
->label(__('Passport number'))
->required()
->columnSpan(1)
->mask('999999'),
])
->columnSpan(3)
->label(__('Passport serie and number'))
->columns(2),
TextInput::make('guarantor_card_number')
->label(__('Card number'))
->mask('9999 9999 9999 9999')
->dehydrateStateUsing(fn ($state) => str_replace(' ', '', $state))
->columnSpan(2)
->required(),
TextInput::make('guarantor_card_name')
->label(__('Card name'))
->maxLength(255)
->columnSpan(2)
->required(),
Select::make('guarantor_card_month')
->label(__('Card month'))
->options(DateHelper::staticNumberMonths())
->native(false)
->columnSpan(1)
->required(),
Select::make('guarantor_card_year')
->label(__('Card year'))
->options(DateHelper::staticNumberYears())
->native(false)
->columnSpan(1)
->required(),
TextInput::make('guarantor_note')
->label(__('Guarantor').' '. __('Salary'))
->columnSpan(2)
->required()
->maxLength(255),
]), ]),
Tab::make(__('Guarantor'). '2') Tab::make(__('Guarantor'). '2')
->columns(4) ->columns(4)
->hidden(function (Get $get): bool { ->hidden(function (Get $get): bool {
$loan_amount = $get('loan_amount'); $loan_amount = $get('loan_amount');
return $loan_amount && intval($loan_amount) > 20000; return ! ($loan_amount && intval($loan_amount) > 20000);
}) })
->schema([ ->schema([