add updates
This commit is contained in:
@@ -146,7 +146,7 @@ class CardOrder extends Resource
|
||||
*/
|
||||
public static function redirectAfterCreate(NovaRequest $request, $resource): URL|string
|
||||
{
|
||||
$payment = (new OnlinePaymentRepo())->payCardOrder($resource);
|
||||
$payment = (new OnlinePaymentRepo)->payCardOrder($resource);
|
||||
|
||||
return $payment['status'] === 'success'
|
||||
? URL::remote($payment['url'])
|
||||
@@ -246,19 +246,19 @@ class CardOrder extends Resource
|
||||
new Panel(__('Personal data'), [
|
||||
Text::make(__('Name'), 'customer_name')
|
||||
->size('w-1/3')
|
||||
->rules('required', 'string', new OnlyLetters(), 'max:255'),
|
||||
->rules('required', 'string', new OnlyLetters, 'max:255'),
|
||||
|
||||
Text::make(__('Surname'), 'customer_surname')
|
||||
->size('w-1/3')
|
||||
->rules('required', 'string', new OnlyLetters(), 'max:255'),
|
||||
->rules('required', 'string', new OnlyLetters, 'max:255'),
|
||||
|
||||
Text::make(__('Patronic name'), 'customer_patronic_name')
|
||||
->size('w-1/3')
|
||||
->rules('nullable', 'string', new OnlyLetters(), 'max:255'),
|
||||
->rules('nullable', 'string', new OnlyLetters, 'max:255'),
|
||||
|
||||
Text::make(__('Old surname (if changed)'), 'old_surname')
|
||||
->size('w-1/2')
|
||||
->rules('nullable', 'string', new OnlyLetters(), 'max:255'),
|
||||
->rules('nullable', 'string', new OnlyLetters, 'max:255'),
|
||||
|
||||
Date::make(__('Date of birth'), 'born_at')
|
||||
->size('w-1/2')
|
||||
@@ -286,15 +286,15 @@ class CardOrder extends Resource
|
||||
|
||||
Text::make(__('Residence (passport)'), 'passport_address')
|
||||
->size('w-1/2')
|
||||
->rules('required', 'string', new DowranAgaAllowed(), 'max:255'),
|
||||
->rules('required', 'string', new DowranAgaAllowed, 'max:255'),
|
||||
|
||||
Text::make(__('Current Residence'), 'real_address')
|
||||
->size('w-1/2')
|
||||
->rules('required', 'string', new DowranAgaAllowed(), 'max:255'),
|
||||
->rules('required', 'string', new DowranAgaAllowed, 'max:255'),
|
||||
|
||||
Text::make(__('Work location and your position'), 'job_location')
|
||||
->size('w-full')
|
||||
->rules('required', 'string', new DowranAgaAllowed(), 'max:255'),
|
||||
->rules('required', 'string', new DowranAgaAllowed, 'max:255'),
|
||||
]),
|
||||
|
||||
new Panel(__('Passport'), [
|
||||
@@ -315,11 +315,11 @@ class CardOrder extends Resource
|
||||
|
||||
Text::make(__('Passport given by'), 'passport_given_by')
|
||||
->size('w-1/2')
|
||||
->rules('required', 'string', new DowranAgaAllowed(), 'max:255'),
|
||||
->rules('required', 'string', new DowranAgaAllowed, 'max:255'),
|
||||
|
||||
Text::make(__('Born place (passport)'), 'born_place')
|
||||
->size('w-1/2')
|
||||
->rules('required', 'string', new DowranAgaAllowed(), 'max:255'),
|
||||
->rules('required', 'string', new DowranAgaAllowed, 'max:255'),
|
||||
]),
|
||||
|
||||
new Panel(__('Passport files'), [
|
||||
@@ -375,7 +375,7 @@ class CardOrder extends Resource
|
||||
RegionFilter::make()
|
||||
->canSee(fn () => Gate::allows('isAdmin', auth()->user())),
|
||||
|
||||
new StatusFilter(),
|
||||
new StatusFilter,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user