Laon orders wip
This commit is contained in:
@@ -58,14 +58,10 @@ class LoanOrderFieldsForDetail
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
new Panel(__('Personal data'), [
|
new Panel(__('Personal data'), [
|
||||||
Text::make(__('Name'), 'customer_name')
|
Text::make(
|
||||||
->size('w-1/3'),
|
__('Full Name'),
|
||||||
|
fn ($model) => sprintf('%s %s %s', $model->customer_name, $model->customer_surname, $model->customer_patronic_name)
|
||||||
Text::make(__('Surname'), 'customer_surname')
|
),
|
||||||
->size('w-1/3'),
|
|
||||||
|
|
||||||
Text::make(__('Patronic name'), 'customer_patronic_name')
|
|
||||||
->size('w-1/3'),
|
|
||||||
|
|
||||||
Select::make(__('Education'), 'education')
|
Select::make(__('Education'), 'education')
|
||||||
->displayUsingLabels()
|
->displayUsingLabels()
|
||||||
@@ -78,7 +74,8 @@ class LoanOrderFieldsForDetail
|
|||||||
->size('w-1/3'),
|
->size('w-1/3'),
|
||||||
|
|
||||||
Date::make(__('Date of birth'), 'born_at')
|
Date::make(__('Date of birth'), 'born_at')
|
||||||
->size('w-1/3'),
|
->size('w-1/3')
|
||||||
|
->toTurkmenFormat(),
|
||||||
|
|
||||||
Text::make(__('Residence (passport)'), 'passport_address')
|
Text::make(__('Residence (passport)'), 'passport_address')
|
||||||
->size('w-1/2'),
|
->size('w-1/2'),
|
||||||
@@ -87,25 +84,6 @@ class LoanOrderFieldsForDetail
|
|||||||
->size('w-1/2'),
|
->size('w-1/2'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
new Panel(__('Passport'), [
|
|
||||||
Select::make(__('Passport serie'), 'passport_serie')
|
|
||||||
->displayUsingLabels()
|
|
||||||
->options(PassportRepo::values())
|
|
||||||
->size('w-1/3'),
|
|
||||||
|
|
||||||
Number::make(__('Passport id'), 'passport_id')
|
|
||||||
->size('w-1/3'),
|
|
||||||
|
|
||||||
Date::make(__('Passport date of issue'), 'passport_given_at')
|
|
||||||
->size('w-1/3'),
|
|
||||||
|
|
||||||
Text::make(__('Passport given by'), 'passport_given_by')
|
|
||||||
->size('w-1/2'),
|
|
||||||
|
|
||||||
Text::make(__('Born place (passport)'), 'born_place')
|
|
||||||
->size('w-1/2'),
|
|
||||||
]),
|
|
||||||
|
|
||||||
new Panel(__('Contact data'), [
|
new Panel(__('Contact data'), [
|
||||||
Email::make(__('Email'), 'email')
|
Email::make(__('Email'), 'email')
|
||||||
->size('w-1/4'),
|
->size('w-1/4'),
|
||||||
@@ -148,10 +126,24 @@ class LoanOrderFieldsForDetail
|
|||||||
->size('w-1/4'),
|
->size('w-1/4'),
|
||||||
|
|
||||||
Date::make(__('Work started at'), 'work_started_at')
|
Date::make(__('Work started at'), 'work_started_at')
|
||||||
->size('w-1/4'),
|
->size('w-1/4')
|
||||||
|
->toTurkmenFormat(),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
new Panel(__('Passport'), [
|
new Panel(__('Passport'), [
|
||||||
|
Text::make(__('Passport'), fn ($model) => sprintf(
|
||||||
|
'%s %s, %sý',
|
||||||
|
$model->passport_serie,
|
||||||
|
$model->passport_id,
|
||||||
|
$model->passport_given_at?->format('d.m.Y')
|
||||||
|
)),
|
||||||
|
|
||||||
|
Text::make(__('Passport given by'), 'passport_given_by')
|
||||||
|
->size('w-1/2'),
|
||||||
|
|
||||||
|
Text::make(__('Born place (passport)'), 'born_place')
|
||||||
|
->size('w-1/2'),
|
||||||
|
|
||||||
Image::make(__('Passport (page 1)'), 'passport_one')
|
Image::make(__('Passport (page 1)'), 'passport_one')
|
||||||
->size('w-1/2'),
|
->size('w-1/2'),
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ use Eolica\NovaLocaleSwitcher\LocaleSwitcher;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Laravel\Nova\Events\ServingNova;
|
use Laravel\Nova\Events\ServingNova;
|
||||||
|
use Laravel\Nova\Fields\Date;
|
||||||
|
use Laravel\Nova\Fields\Field;
|
||||||
use Laravel\Nova\Menu\Menu;
|
use Laravel\Nova\Menu\Menu;
|
||||||
use Laravel\Nova\Menu\MenuGroup;
|
use Laravel\Nova\Menu\MenuGroup;
|
||||||
use Laravel\Nova\Menu\MenuItem;
|
use Laravel\Nova\Menu\MenuItem;
|
||||||
@@ -39,6 +41,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
|||||||
$this->setupUserNavigation();
|
$this->setupUserNavigation();
|
||||||
$this->setupUserSettings();
|
$this->setupUserSettings();
|
||||||
$this->setupAssets();
|
$this->setupAssets();
|
||||||
|
$this->setupFieldMacros();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -157,4 +160,14 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
|||||||
{
|
{
|
||||||
Nova::style('additional', resource_path('css/vendor/nova/css/additional.css'));
|
Nova::style('additional', resource_path('css/vendor/nova/css/additional.css'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup macros of fields
|
||||||
|
*/
|
||||||
|
public function setupFieldMacros(): void
|
||||||
|
{
|
||||||
|
Date::macro('toTurkmenFormat', function () {
|
||||||
|
return $this->displayUsing(fn ($value) => $value?->format('d.m.Y'));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,5 +205,6 @@
|
|||||||
"Work started at": "Işe başlan wagtyňyz",
|
"Work started at": "Işe başlan wagtyňyz",
|
||||||
"You are logged in!": "Sessiýa açdyňyz",
|
"You are logged in!": "Sessiýa açdyňyz",
|
||||||
"You are receiving this email because we received a password reset request for your account.": "Bu e-poçta alýarsyňyz, sebäbi hasabyňyz üçin paroly täzeden düzmek haýyşyny aldyk.",
|
"You are receiving this email because we received a password reset request for your account.": "Bu e-poçta alýarsyňyz, sebäbi hasabyňyz üçin paroly täzeden düzmek haýyşyny aldyk.",
|
||||||
"Write a correct data please": "Dogry maglumat girizmegiňizi Sizden haýyş edýäris."
|
"Write a correct data please": "Dogry maglumat girizmegiňizi Sizden haýyş edýäris.",
|
||||||
|
"Full Name": "Doly ady"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user