wip
This commit is contained in:
@@ -178,22 +178,20 @@ class LoanOrderMobileFieldsForDetail
|
||||
|
||||
Text::make(__('Guarantor Patronic name'), 'guarantor_patronic_name'),
|
||||
|
||||
Number::make(__('Card number'), 'guarantor_card_number'),
|
||||
Text::make(__('Passport'), fn ($model) => sprintf(
|
||||
'<strong>%s %s<strong>',
|
||||
$model->guarantor_passport_serie,
|
||||
$model->guarantor_passport_id,
|
||||
))->asHtml(),
|
||||
|
||||
Text::make(__('Name on card'), 'guarantor_card_name'),
|
||||
|
||||
Select::make(__('Expiration month'), 'guarantor_card_month')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::monthsAsNumber()),
|
||||
|
||||
Select::make(__('Expiration year'), 'guarantor_card_year')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::yearsUntil()),
|
||||
|
||||
Text::make(__('Ortaça zähmen haky'), 'guarantor_note')
|
||||
Text::make(__('Ortaça zähmet haky'), 'guarantor_note')
|
||||
->canSeeWhen('systemUser', $resource),
|
||||
|
||||
NovaCustomHtml::make(__('Data'), 'card_name')
|
||||
->html(view('orders.loan.mobile.card-gurantor-history', [
|
||||
'resource' => $resource,
|
||||
])->render())
|
||||
->fillUsing(NovaForm::fillEmpty()),
|
||||
]),
|
||||
|
||||
new Panel('2. '.__('Guarantor'), [
|
||||
@@ -201,21 +199,20 @@ class LoanOrderMobileFieldsForDetail
|
||||
Text::make(__('Guarantor Surname'), 'guarantor_2_surname'),
|
||||
Text::make(__('Guarantor Patronic name'), 'guarantor_2_patronic_name'),
|
||||
|
||||
Number::make(__('Card number'), 'guarantor_2_card_number'),
|
||||
Text::make(__('Name on card'), 'guarantor_2_card_name'),
|
||||
Text::make(__('Passport'), fn ($model) => sprintf(
|
||||
'<strong>%s %s<strong>',
|
||||
$model->guarantor_2_passport_serie,
|
||||
$model->guarantor_2_passport_id,
|
||||
))->asHtml(),
|
||||
|
||||
Select::make(__('Expiration month'), 'guarantor_2_card_month')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::monthsAsNumber()),
|
||||
|
||||
Select::make(__('Expiration year'), 'guarantor_2_card_year')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::yearsUntil()),
|
||||
|
||||
Text::make(__('Ortaça zähmen haky'), 'guarantor_2_note')
|
||||
Text::make(__('Ortaça zähmet haky'), 'guarantor_2_note')
|
||||
->canSeeWhen('systemUser', $resource),
|
||||
|
||||
NovaCustomHtml::make(__('Data'), 'card_name')
|
||||
->html(view('orders.loan.mobile.card-gurantor-2-history', [
|
||||
'resource' => $resource,
|
||||
])->render())
|
||||
->fillUsing(NovaForm::fillEmpty()),
|
||||
]),
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
@if ($resource->guarantor_2_card_month)
|
||||
@php
|
||||
$months = App\Modules\DateHelper\Repositories\DateHelperRepository::monthsAsNumber();
|
||||
$years = App\Modules\DateHelper\Repositories\DateHelperRepository::yearsUntil();
|
||||
|
||||
$card_month = array_key_exists($resource->guarantor_2_card_month, $months) ? $months[$resource->guarantor_2_card_month] : '-';
|
||||
$card_year = array_key_exists($resource->guarantor_2_card_year, $years) ? $years[$resource->guarantor_2_card_year] : '-';
|
||||
@endphp
|
||||
|
||||
<style>
|
||||
.credit-card-container {
|
||||
display: grid;
|
||||
grid-template-columns: 35% 1fr;
|
||||
}
|
||||
.credit-card {
|
||||
width: 300px;
|
||||
height: 180px;
|
||||
border-radius: 15px;
|
||||
background-color: transparent;
|
||||
padding: 20px;
|
||||
color: #2b3e50;
|
||||
font-family: Arial, sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-number {
|
||||
font-size: 18px;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 40px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.expiry-container {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-holder {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.expiry-date {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
:is(.dark .dark\:border-white) {
|
||||
border: 2px solid #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="credit-card-container">
|
||||
<div class="credit-card border-2 dark:border-white">
|
||||
<div
|
||||
class="card-number dark:text-white cursor-pointer"
|
||||
onclick="fetchCardHistory(
|
||||
'{{ $resource->guarantor_2_passport_serie }}',
|
||||
'{{ $resource->guarantor_2_passport_id }}',
|
||||
'{{ str($resource->guarantor_2_card_number)->mask('*', 6, 6) }}',
|
||||
'{{ $card_month }}/{{ substr($card_year, 2) }}',
|
||||
)"
|
||||
>{{ $resource->guarantor_2_card_number }}</div>
|
||||
<div class="expiry-container">
|
||||
<div class="card-holder dark:text-white">{{ $resource->guarantor_2_card_name }}</div>
|
||||
<div class="expiry-date dark:text-white">{{ $card_month }}/{{ $card_year }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-history-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -0,0 +1,73 @@
|
||||
@php
|
||||
$months = App\Modules\DateHelper\Repositories\DateHelperRepository::monthsAsNumber();
|
||||
$years = App\Modules\DateHelper\Repositories\DateHelperRepository::yearsUntil();
|
||||
|
||||
$card_month = array_key_exists($resource->guarantor_card_month, $months) ? $months[$resource->guarantor_card_month] : '-';
|
||||
$card_year = array_key_exists($resource->guarantor_card_year, $years) ? $years[$resource->guarantor_card_year] : '-';
|
||||
@endphp
|
||||
|
||||
<style>
|
||||
.credit-card-container {
|
||||
display: grid;
|
||||
grid-template-columns: 35% 1fr;
|
||||
}
|
||||
.credit-card {
|
||||
width: 300px;
|
||||
height: 180px;
|
||||
border-radius: 15px;
|
||||
background-color: transparent;
|
||||
padding: 20px;
|
||||
color: #2b3e50;
|
||||
font-family: Arial, sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-number {
|
||||
font-size: 18px;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 40px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.expiry-container {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-holder {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.expiry-date {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
:is(.dark .dark\:border-white) {
|
||||
border: 2px solid #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="credit-card-container">
|
||||
<div class="credit-card border-2 dark:border-white">
|
||||
<div
|
||||
class="card-number dark:text-white cursor-pointer"
|
||||
onclick="fetchCardHistory(
|
||||
'{{ $resource->guarantor_passport_serie }}',
|
||||
'{{ $resource->guarantor_passport_id }}',
|
||||
'{{ str($resource->guarantor_card_number)->mask('*', 6, 6) }}',
|
||||
'{{ $card_month }}/{{ substr($card_year, 2) }}',
|
||||
)"
|
||||
>{{ $resource->guarantor_card_number }}</div>
|
||||
<div class="expiry-container">
|
||||
<div class="card-holder dark:text-white">{{ $resource->guarantor_card_name }}</div>
|
||||
<div class="expiry-date dark:text-white">{{ $card_month }}/{{ $card_year }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card-history-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user