osb/resources/views/theme/backend/adminlte/service/widget/update.blade.php

87 lines
2.4 KiB
PHP
Raw Normal View History

<div class="row">
<div class="col-12">
<h4>Update Service details</h4>
<form class="g-0 needs-validation" method="POST" action="{{ url('a/service/update',[$o->id]) }}">
@include('adminlte::widget.success')
@csrf
<div class="row">
<!-- External Billing -->
<div class="col-2">
@include('adminlte::widget.form_toggle',[
'label'=>'External Billing',
'id'=>'external_billing',
'old'=>'external_billing',
'name'=>'external_billing',
'value'=>$o->external_billing ?? '',
])
<!-- Suspend Billing -->
@include('adminlte::widget.form_toggle',[
'label'=>'Suspend Billing',
'id'=>'suspend_billing',
'old'=>'suspend_billing',
'name'=>'suspend_billing',
'value'=>$o->suspend_billing ?? '',
])
</div>
<div class="col-1"></div>
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_date',[
'label'=>'Billing Start Date',
'icon'=>'fas fa-calendar',
'id'=>'invoice_next_at',
'old'=>'invoice_next_at',
'name'=>'invoice_next_at',
'value'=>$o->invoice_next_at ? $o->invoice_next_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->format('Y-m-d') : ''),
])
</div>
<!-- Price -->
<div class="col-12 col-sm-9 col-md-12 col-xl-3">
@include('adminlte::widget.form_text',[
'label'=>'Price',
'icon'=>'fas fa-dollar-sign',
'id'=>'price',
'old'=>'price',
'name'=>'price',
'value'=>$o->price ?? '',
])
</div>
</div>
<div class="row">
<div class="col-3"></div>
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_select',[
'label'=>'Renew Term',
'icon'=>'fas fa-redo',
'id'=>'recur_schedule',
'old'=>'recur_schedule',
'name'=>'recur_schedule',
'options'=>collect(\App\Models\Invoice::billing_periods)->transform(function($item,$key) { return ['id'=>$key,'value'=>$item['name']]; }),
'value'=>$o->recur_schedule ?? '',
])
</div>
</div>
<hr>
@includeIf('service.widget.'.$o->product->category.'.update',['o'=>$o->type])
<div class="row">
<div class="col-12">
@can('wholesaler')
<button type="submit" name="submit" class="btn btn-success mr-0 float-right">@if ($site->exists)Save @else Add @endif</button>
@endcan
</div>
</div>
</form>
</div>
</div>