2024-08-15 22:20:58 +00:00
|
|
|
@use(App\Models\Product)
|
|
|
|
@use(App\Models\Product\Broadband)
|
2021-10-08 01:18:39 +00:00
|
|
|
|
2024-08-17 05:10:50 +00:00
|
|
|
<x-leenooks::form.select id="product_id" name="product_id" icon="fa-list" label="Product" :helper="$o->category_name" :choose="true"
|
|
|
|
:value="$o->service->product_id"
|
2024-08-18 04:02:03 +00:00
|
|
|
:options="Product::active()->get()->filter(fn($item)=>get_class($item->type) === Broadband::class)->sortBy('name')->sortByDesc('active')->map(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])" required/>
|
2024-08-15 22:20:58 +00:00
|
|
|
|
|
|
|
<strong>NOTE</strong>: A plan setup fee is normally not applicable to Broadband changes, but a plan change fee normally is.
|
2024-08-01 07:34:31 +00:00
|
|
|
|
2021-10-08 01:18:39 +00:00
|
|
|
@section('page-scripts')
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('select[name=product_id]').change(function() {
|
|
|
|
// If we select a blank, then dont continue
|
|
|
|
if (this.value == 0)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Send the request and update sub category dropdown
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
dataType: "html",
|
|
|
|
cache: true,
|
|
|
|
url: '{{ url('product_info') }}'+'/'+$(this).val(),
|
|
|
|
timeout: 5000,
|
|
|
|
error: function(x) {
|
|
|
|
alert("Failed to submit");
|
|
|
|
},
|
|
|
|
success: function(data) {
|
|
|
|
$("div[id=product_info]").empty().append(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|