672367 lte gte fxx3

This commit is contained in:
merdan 2022-12-07 14:40:36 +05:00
parent e8318f094b
commit f67f8958db
6 changed files with 17 additions and 17 deletions

View File

@ -43,7 +43,7 @@ public function create()
],422);
}
//validate legalization number exists
elseif(!$this->account->can_extend_legal_number){//eger srogyn gutarmagyna 1 ay galmadyk bolsa
elseif(!$this->account->can_apply && !$this->account->can_extend_legal_number){
$month = Config::get('settings.legalization_extend') ?? 1;
return response([
'success' => false,

View File

@ -9,6 +9,7 @@
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
class Account extends Model
{
@ -111,14 +112,13 @@ public function getCanApplyLegalNumberAttribute(){
public function getCanExtendLegalNumberAttribute()
{
$application = $this->last_application();
$month = Config::get('settings.legalization_extend') ?? 1;
if($application){
if($application = $this->last_application()){
Log::info($application);
return $application->state == 'approved' && $this->expires_at->gte(Carbon::now()->subMonths($month));
}
Log::info($this->expires_at->gte(Carbon::now()->subMonths($month)));
return !empty($this->legalization_number) && !empty( $this->expires_at) && $this->expires_at->gte(Carbon::now()->subMonths($month));
}

View File

@ -13,14 +13,14 @@
|
*/
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
'suspended' => 'Account with this email is suspended',
'not_verified' => 'Account email is not verified.',
'unauthorized' => 'Unauthorized',
'token_mismatch' => 'Tokens don\'t match',
'user_not_found' => 'User with provided email not found',
'token_expired' => 'Token expired',
'failed' => 'Эти учетные данные не соответствуют нашим записям.',
'password' => 'Предоставленный пароль неверный.',
'throttle' => 'Слишком много попыток входа. Повторите попытку через :seconds секунд.',
'suspended' => 'Аккаунт с данным e-mail заблокирован',
'not_verified' => 'Е-mail аккаунта не подтверждена.',
'unauthorized' => 'Неавторизованный',
'token_mismatch' => 'Токены не совпадают',
'user_not_found' => 'Пользователь с указанным e-mail не найден',
'token_expired' => 'Срок действия токена истек',
'sent_reset_code'=>'Код сброса пароля отправлен на ваш e-mail. Пожалуйста, проверьте свой e-mail'
];

View File

@ -3,7 +3,7 @@
@section('content')
<nav aria-label="breadcrumb" class="d-none d-lg-block">
<ol class="breadcrumb m-0 mb-3">
<li class="breadcrumb-item"><a href="{{backpack_url()}}">{{ trans('app.last_updates.admin_panel') }}</a></li>
<li class="breadcrumb-item"><a href="{{backpack_url()}}">{{ trans('app.dashboard.title') }}</a></li>
<li class="breadcrumb-item"><a href="{{backpack_url('account')}}">{{ trans('app.account.title') }}</a></li>
<li class="breadcrumb-item"><a href="#">{{ trans('app.client.title') }}</a></li>
</ol>

View File

@ -63,7 +63,7 @@
</style>
<nav aria-label="breadcrumb" class="d-none d-lg-block">
<ol class="breadcrumb bg-transparent p-0">
<li class="breadcrumb-item text-capitalize"><a href="{{backpack_url('dashboard')}}">{{ trans('app.last_updates.admin_panel') }}</a></li>
<li class="breadcrumb-item text-capitalize"><a href="{{backpack_url('dashboard')}}">{{ trans('app.dashboard.title') }}</a></li>
<li class="breadcrumb-item text-capitalize"><a href="{{backpack_url('ticket')}}">{{ trans('app.ticket.title') }}</a></li>
<li class="breadcrumb-item text-capitalize active" aria-current="page">{{ trans('app.last_updates.chat') }}</li>
</ol>

View File

@ -10,7 +10,7 @@
<nav aria-label="breadcrumb" class="d-none d-lg-block">
<ol class="breadcrumb m-0 mb-3">
<li class="breadcrumb-item"><a href="#">{{ trans('app.last_updates.admin') }}</a></li>
<li class="breadcrumb-item"><a href="#">{{ trans('app.dashboard.title') }}</a></li>
<li class="breadcrumb-item"><a href="{{backpack_url('account')}}">{{ trans('app.ticket.account') }}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ $account->id }}</li>
</ol>