23-01-2026
This commit is contained in:
parent
a939cd51ef
commit
a8b395e20d
248 changed files with 29342 additions and 4805 deletions
|
|
@ -10,26 +10,27 @@
|
|||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
<input type="hidden" name="view" value="{{$data['view']}}">
|
||||
|
||||
@if($data['view'] !== 'admin' && ($user_abo->user_id != \Auth::user()->id && $user_abo->member_id != \Auth::user()->id))
|
||||
@if(!App\Services\AboHelper::canEditAbo($user_abo, $data['view']))
|
||||
<div class="alert alert-danger">
|
||||
Unauthorized action. Is not my abo
|
||||
</div>
|
||||
@else
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="abo_interval" class="form-label">{{ __('tables.abo_delivery_day') }}*</label>
|
||||
<select class="custom-select" name="abo_interval" id="abo_interval" required>
|
||||
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{--
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="abo_interval" class="form-label">{{ __('tables.abo_delivery_day') }}*</label>
|
||||
<select class="custom-select" name="abo_interval" id="abo_interval" required>
|
||||
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{{-- <div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="next_date" class="form-label">{{ __('tables.next_date') }} ({{ $user_abo->next_date }})</label>
|
||||
{!! Form::text('next_date', $user_abo->next_date, ['class'=>'form-control datepicker-base']) !!}
|
||||
|
|
@ -40,23 +41,44 @@
|
|||
</div>
|
||||
<hr>
|
||||
--}}
|
||||
|
||||
@php
|
||||
$canCancel = App\Services\AboHelper::canCancelAbo($user_abo, $data['view']);
|
||||
@endphp
|
||||
<hr>
|
||||
@if($canCancel || $data['view'] == 'admin')
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-12">
|
||||
<label class="switcher switcher-primary">
|
||||
<input type="checkbox" class="switcher-input" name="abo_is_active" value="true" @if($user_abo->active) checked @endif>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">{{ __('abo.abo_is_active') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_active') }}</i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-12">
|
||||
<label class="switcher switcher-primary">
|
||||
<input type="checkbox" class="switcher-input" name="abo_is_active" value="true" @if($user_abo->active) checked @endif>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">{{ __('abo.abo_is_active') }}</span>
|
||||
</label>
|
||||
@if($data['view'] !== 'admin')
|
||||
<div class="col-sm-12 mt-3">
|
||||
<button type="submit" name="abo_cancel" value="true" class="btn btn-danger btn-sm" onclick="return confirm('{{ __('abo.confirm_cancel') }}')">
|
||||
<i class="ion ion-ios-trash"></i> {{ __('abo.cancel_abo') }}
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_active') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<input type="hidden" name="abo_is_active" value="{{ $user_abo->active }}">
|
||||
<div class="mt-1">
|
||||
<div class="alert alert-warning">
|
||||
{{ __('abo.info_min_duration_orders_left', ['count' => App\Services\AboHelper::getAboMinDuration() - $user_abo->getCountPaidOrders()]) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue