Add loan card
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class FetchCardHistoryController extends Controller
|
||||
{
|
||||
@@ -34,10 +33,10 @@ class FetchCardHistoryController extends Controller
|
||||
"cardMaskNumber": "%s",
|
||||
"expDate": "%s"
|
||||
}',
|
||||
$request->passport_serie,
|
||||
$request->passport_id,
|
||||
$request->card_number,
|
||||
$request->card_expiry_date,
|
||||
$request->passport_serie,
|
||||
$request->passport_id,
|
||||
$request->card_number,
|
||||
$request->card_expiry_date,
|
||||
),
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Accept: application/json',
|
||||
|
||||
@@ -182,6 +182,34 @@ class LoanOrderStoreRequest extends FormRequest
|
||||
*/
|
||||
'card_year' => ['required'],
|
||||
|
||||
/**
|
||||
* Card number
|
||||
*
|
||||
* @example 4434345434423442
|
||||
*/
|
||||
'loan_card_number' => ['required', 'digits:16'],
|
||||
|
||||
/**
|
||||
* Name on card
|
||||
*
|
||||
* @example 'Mahmyt Allaberdiyev'
|
||||
*/
|
||||
'loan_card_name' => ['required', 'string', 'max:255'],
|
||||
|
||||
/**
|
||||
* Card expiration month
|
||||
*
|
||||
* @example 06
|
||||
*/
|
||||
'loan_card_month' => ['required'],
|
||||
|
||||
/**
|
||||
* Card expiration year
|
||||
*
|
||||
* @example 2040
|
||||
*/
|
||||
'loan_card_year' => ['required'],
|
||||
|
||||
/**
|
||||
* Region (https://online.tbbank.gov.tm/api/base-app-enums)
|
||||
*/
|
||||
|
||||
@@ -112,7 +112,7 @@ class Branch extends Resource
|
||||
Text::make(__('Billing password (Visa/Master)'), 'billing_visa_master_password')
|
||||
->rules('nullable', 'string', 'max:255')
|
||||
->hideFromIndex(),
|
||||
])
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ class LoanOrderMobile extends Resource
|
||||
->canSeeWhen('systemUser', $this),
|
||||
]),
|
||||
|
||||
new Panel(__('Card'), [
|
||||
new Panel(sprintf('%s (%s)', __('Card'), __('Salary')), [
|
||||
Number::make(__('Card number'), 'card_number')
|
||||
->size('w-1/4')
|
||||
->rules('required', 'digits:16'),
|
||||
@@ -278,6 +278,30 @@ class LoanOrderMobile extends Resource
|
||||
->rules('required'),
|
||||
]),
|
||||
|
||||
new Panel(sprintf('%s (%s)', __('Loan Card'), __('Eger bar bolsa')), [
|
||||
Number::make(__('Card number'), 'loan_card_number')
|
||||
->size('w-1/4')
|
||||
->rules('nullable', 'digits:16'),
|
||||
|
||||
Text::make(__('Name on card'), 'loan_card_name')
|
||||
->size('w-1/4')
|
||||
->rules('nullable'),
|
||||
|
||||
Select::make(__('Card').' '.__('Expiration month'), 'loan_card_month')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::monthsAsNumber())
|
||||
->size('w-1/4')
|
||||
->rules('nullable'),
|
||||
|
||||
Select::make(__('Card').' '.__('Expiration year'), 'loan_card_year')
|
||||
->displayUsingLabels()
|
||||
->searchable()
|
||||
->options(DateHelperRepository::yearsUntil())
|
||||
->size('w-1/4')
|
||||
->rules('nullable'),
|
||||
]),
|
||||
|
||||
new Panel(__('Passport'), [
|
||||
Select::make(__('Passport serie'), 'passport_serie')
|
||||
->displayUsingLabels()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Nova\Resources\Order\Loan;
|
||||
|
||||
use App\Modules\DateHelper\Repositories\DateHelperRepository;
|
||||
use App\Nova\Forms\NovaForm;
|
||||
use App\Nova\Resources\Branch\Branch;
|
||||
use App\Nova\Resources\System\Location\Province;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('loan_orders', function (Blueprint $table) {
|
||||
$table->string('loan_card_number')->nullable();
|
||||
$table->string('loan_card_name')->nullable();
|
||||
$table->string('loan_card_month')->nullable();
|
||||
$table->string('loan_card_year')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('loan_orders', function (Blueprint $table) {
|
||||
$table->dropColumn('loan_card_number');
|
||||
$table->dropColumn('loan_card_name');
|
||||
$table->dropColumn('loan_card_month');
|
||||
$table->dropColumn('loan_card_year');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -168,7 +168,7 @@
|
||||
"Retry With": "Gaýtadan synanyşyň",
|
||||
"Role": "Rol",
|
||||
"Roles": "Rollar",
|
||||
"Salary": "Aýlygyň möçberi (TMT)",
|
||||
"Salary": "Zähmet haky",
|
||||
"School": "Orta bilim",
|
||||
"School drop out": "Gutarylmadyk orta bilim",
|
||||
"See Other": "Başgalaryna serediň",
|
||||
@@ -317,5 +317,6 @@
|
||||
"Unknown": "Näbelli",
|
||||
"Sber payments": "Sber tölegler",
|
||||
"Sber payment": "Sber töleg",
|
||||
"Select payment method": "Töleg görnüşini saýlaň"
|
||||
"Select payment method": "Töleg görnüşini saýlaň",
|
||||
"Loan Card": "Karz karty"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user