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

@@ -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">
@@ -18,7 +29,7 @@
'label'=>'Service Username',
'icon'=>'fas fa-user',
'id'=>'service_username',
'old'=>'broadband.service_username',
'old'=>'broadband.service_username',
'name'=>'broadband[service_username]',
'value'=>$o->service_username ?? '',
])

View File

@@ -52,7 +52,7 @@
'id'=>'domain_registrar_id',
'old'=>'domain.domain_registrar_id',
'name'=>'domain[domain_registrar_id]',
'options'=>\App\Models\DomainRegistrar::active()->orderBy('name')->get()->transform(function($item) { return ['id'=>$item->id,'value'=>$item->name]; }),
'options'=>\App\Models\DomainRegistrar::active()->orderBy('name')->get()->transform(function($item) { return ['id'=>$item->id,'value'=>$item->name]; }),
'value'=>$o->domain_registrar_id ?? '',
])
</div>
@@ -77,7 +77,7 @@
'id'=>'registrar_ns',
'old'=>'domain.registrar_ns',
'name'=>'domain[registrar_ns]',
'options'=>\App\Models\Service\Domain::select('registrar_ns')->distinct()->orderBy('registrar_ns')->get()->transform(function($item) { return ['id'=>$item->registrar_ns,'value'=>$item->registrar_ns]; }),
'options'=>\App\Models\Service\Domain::select('registrar_ns')->distinct()->orderBy('registrar_ns')->get()->transform(function($item) { return ['id'=>$item->registrar_ns,'value'=>$item->registrar_ns]; }),
'value'=>$o->registrar_ns ?? '',
'addvalues'=>TRUE,
])
@@ -88,7 +88,7 @@
'label'=>'Registrar Username',
'icon'=>'fas fa-user',
'id'=>'registrar_username',
'old'=>'domain.registrar_username',
'old'=>'domain.registrar_username',
'name'=>'domain[registrar_username]',
'value'=>$o->registrar_username ?? '',
])

View File

@@ -65,7 +65,7 @@
'label'=>'Admin User',
'icon'=>'fas fa-user',
'id'=>'host_username',
'old'=>'host.host_username',
'old'=>'host.host_username',
'name'=>'host[host_username]',
'value'=>$o->host_username ?? '',
])

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">
@@ -18,7 +29,7 @@
'label'=>'Service Username',
'icon'=>'fas fa-user',
'id'=>'service_username',
'old'=>'phone.service_username',
'old'=>'phone.service_username',
'name'=>'phone[service_username]',
'value'=>$o->service_username ?? '',
])
@@ -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>