Enable editing of address for phone/broadband, fix billing start for phone

This commit is contained in:
Deon George 2022-09-29 17:45:43 +10:00
parent ec99a5ff75
commit 15a3b11d2e
6 changed files with 34 additions and 10 deletions

View File

@ -93,6 +93,7 @@ class Broadband extends Type implements ServiceUsage
{
return [
'service_number' => 'nullable|string|min:10|max:10',
'service_address' => 'nullable|string|min:3',
'service_username' => 'nullable|string',
'service_password' => 'nullable|string',
'connect_at' => 'nullable|date',

View File

@ -60,6 +60,7 @@ class Phone extends Type
{
return [
'service_number' => 'nullable|string|min:10|max:10',
'service_address' => 'nullable|string|min:3',
'service_username' => 'nullable|string',
'service_password' => 'nullable|string',
'connect_at' => 'nullable|date',

View File

@ -10,6 +10,17 @@
'value'=>$o->service_number ?? '',
])
</div>
<div class="col-12 col-sm-9 col-md-6 col-xl-7">
@include('adminlte::widget.form_text',[
'label'=>'Service Address',
'icon'=>'fas fa-map',
'id'=>'service_address',
'old'=>'broadband.service_address',
'name'=>'broadband[service_address]',
'value'=>$o->service_address ?? '',
])
</div>
</div>
<div class="row">

View File

@ -10,6 +10,17 @@
'value'=>$o->service_number ?? '',
])
</div>
<div class="col-12 col-sm-9 col-md-6 col-xl-7">
@include('adminlte::widget.form_text',[
'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 class="row">
@ -53,10 +64,10 @@
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
@include('adminlte::widget.form_date',[
'label'=>'Billing Start Date',
'id'=>'start_at',
'old'=>'phone.start_at',
'name'=>'phone[start_at]',
'value'=>$o->start_at ? $o->start_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->format('Y-m-d') : ''),
'id'=>'invoice_next_at',
'old'=>'invoice_next_at',
'name'=>'invoice_next_at',
'value'=>$o->service->invoice_next_at ? $o->service->invoice_next_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->format('Y-m-d') : ''),
])
</div>
</div>