Update phone service update form to use form components
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-07-31 22:39:29 +10:00
parent 829574a542
commit b6236822ea

View File

@ -1,49 +1,21 @@
<!-- $o=Service\Phone::class --> <!-- $o=Service\Phone::class -->
<div class="row"> <div class="row">
<div class="col-12 col-sm-9 col-md-6 col-xl-5"> <div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_text',[ <x-leenooks::form.text id="service_number" name="phone[service_number]" icon="fa-phone" label="Service Number" old="phone.service_number" :value="$o->service_number"/>
'label'=>'Service Number',
'icon'=>'fas fa-phone',
'id'=>'service_number',
'old'=>'phone.service_number',
'name'=>'phone[service_number]',
'value'=>$o->service_number ?? '',
])
</div> </div>
<div class="col-12 col-sm-9 col-md-6 col-xl-7"> <div class="col-12 col-sm-9 col-md-6 col-xl-7">
@include('adminlte::widget.form_text',[ <x-leenooks::form.text id="service_address" name="phone[service_address]" icon="fa-map" label="Service Address" old="phone.service_address" :value="$o->service_address"/>
'label'=>'Service Address',
'icon'=>'fas fa-map',
'id'=>'service_address',
'old'=>'phone.service_address',
'name'=>'phone[service_address]',
'value'=>$o->service_address ?? '',
])
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-sm-9 col-md-12 col-xl-6"> <div class="col-12 col-sm-9 col-md-12 col-xl-6">
@include('adminlte::widget.form_text',[ <x-leenooks::form.text id="service_username" name="phone[service_username]" icon="fa-user" label="Service Username" old="phone.service_username" :value="$o->service_username"/>
'label'=>'Service Username',
'icon'=>'fas fa-user',
'id'=>'service_username',
'old'=>'phone.service_username',
'name'=>'phone[service_username]',
'value'=>$o->service_username ?? '',
])
</div> </div>
<div class="col-12 col-sm-9 col-md-5 col-xl-6"> <div class="col-12 col-sm-9 col-md-5 col-xl-6">
@include('adminlte::widget.form_text',[ <x-leenooks::form.text id="service_password" name="phone[service_password]" icon="fa-lock" label="Service Password" old="phone.service_password" :value="$o->service_password"/>
'label'=>'Service Password',
'icon'=>'fas fa-lock',
'id'=>'service_password',
'old'=>'phone.service_password',
'name'=>'phone[service_password]',
'value'=>$o->service_password ?? '',
])
</div> </div>
</div> </div>
@ -52,24 +24,10 @@
<div class="row"> <div class="row">
<div class="col-12 col-sm-9 col-md-6 col-xl-5"> <div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_date',[ <x-leenooks::form.date id="connect_at" name="phone[connect_at]" icon="fa-calendar" label="Connect Date" old="phone.connect_at" :value="$o->connect_at?->format('Y-m-d')"/>
'label'=>'Connect Date',
'icon'=>'fas fa-calendar',
'id'=>'connect_at',
'old'=>'phone.connect_at',
'name'=>'phone[connect_at]',
'value'=>$o->connect_at ? $o->connect_at->format('Y-m-d') : '',
])
</div> </div>
<div class="col-12 col-sm-9 col-md-6 col-xl-5"> <div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_date',[ <x-leenooks::form.date id="expire_at" name="phone[expire_at]" icon="fa-calendar" label="Contract End" old="phone.expire_at" :value="$o->expire_at?->format('Y-m-d') ?: ($o->connect_at?->addMonths($o->contract_term)->format('Y-m-d'))"/>
'label'=>'Contract End',
'icon'=>'fas fa-calendar',
'id'=>'expire_at',
'old'=>'phone.expire_at',
'name'=>'phone[expire_at]',
'value'=>$o->expire_at ? $o->expire_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->addMonths($o->contract_term)->format('Y-m-d') : ''),
])
</div> </div>
</div> </div>