Changes to orders to stop existing services being submitted

This commit is contained in:
Deon George
2021-09-28 12:43:54 +10:00
parent 7277d7407a
commit 4cbe990ec1
12 changed files with 80 additions and 96 deletions

View File

@@ -29,12 +29,10 @@
<div id="accordion">
<!-- Reseller Choose Client -->
@if (Auth::user() AND Auth::user()->isReseller())
@if ($user && $user->isReseller())
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
Account
</h4>
<h4 class="panel-title">Account</h4>
</div>
<div class="panel-collapse">
@@ -43,12 +41,8 @@
<div class="col-6">
<ul class="nav nav-tabs">
<li class="active">
<a href="#account_exist" data-toggle="tab">Existing Account</a>
</li>
<li>
<a href="#client_new" data-toggle="tab">New Client</a>
</li>
<li class="active"><a href="#account_exist" data-toggle="tab">Existing Account</a></li>
<li><a href="#client_new" data-toggle="tab">New Client</a></li>
</ul>
<div class="tab-content">
@@ -77,7 +71,6 @@
</div>
<div class="row">
<div class="col-sm-2"><button class="btn btn-block btn-primary">Previous</button></div>
<div class="col-sm-2"><button class="btn btn-block btn-primary next">Next</button></div>
</div>
</div>
@@ -85,7 +78,7 @@
</div>
<!-- Non-Authed User -->
@elseif (Auth::user())
@elseif ($user)
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@@ -142,9 +135,6 @@
<!-- Non-Authed User -->
@else
@php
//dd($errors);
@endphp
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@@ -181,44 +171,48 @@
<div class="panel-collapse margin-bottom-20">
<div class="panel-body">
<div class="col-12">
<div class="control-group form-group col-sm-12 {{ $errors->has('product_options') ? 'has-error' : '' }}">
<span class="help-block">{{ $errors->first('product_options') }}</span>
<div class="row">
<div class="col-sm-6">
<div class="control-group form-group {{ $errors->has('product_options') ? 'has-error' : '' }}">
<span class="help-block">{{ $errors->first('product_options') }}</span>
</div>
<div class="control-group form-group {{ $errors->has('product_id') ? 'has-error' : '' }}">
<label for="product_id">Product</label>
<select class="form-control" id="product_id" name="product_id">
<option value="">&nbsp;</option>
@php
$po = $selected = NULL;
@endphp
@foreach (\App\Models\Product::active()->get()->sortBy('name') as $o)
@php
if ($o->id == old('product_id')) {
$selected = 'selected';
$po = $o;
} else {
$selected = NULL;
}
@endphp
<option value="{{ $o->id }}" {{ $selected }}>{{ $o->name }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('product_id') }}</span>
</div>
</div>
<div class="control-group form-group col-sm-6 {{ $errors->has('product_id') ? 'has-error' : '' }}">
<label for="product_id">Product</label>
<select class="form-control" id="product_id" name="product_id">
<option value="">&nbsp;</option>
@php
$po = $selected = NULL;
@endphp
@foreach (\App\Models\Product::active()->get()->sortBy('name') as $o)
@php
if ($o->id == old('product_id'))
{
$selected = 'selected';
$po = $o;
} else {
$selected = NULL;
}
@endphp
<option value="{{ $o->id }}" {{ $selected }}>{{ $o->name }}</option>
@endforeach
</select>
<span class="help-block">{{ $errors->first('product_id') }}</span>
</div>
<div class="col-sm-6" id="product_info">
@if (old('product_id'))
@include('widgets.product_description',['o'=>$po])
@include('order.widget.info',['o'=>$po])
@endif
</div>
</div>
<div class="col-12" id="product_order">
@if (old('product_id'))
@include('widgets.product_order',['o'=>$po])
@endif
<div class="row">
<div class="col-sm-12" id="product_order">
@if (old('product_id'))
@include('order.widget.order',['o'=>$po])
@endif
</div>
</div>
<div class="row">
@@ -241,7 +235,9 @@
<div class="col-12">
<div class="control-group form-group col-sm-12 {{ $errors->has('options.notes') ? 'has-error' : '' }}">
<label for="options.notes">Notes</label>
<textarea name="options[notes]" class="form-control" rows="4" placeholder="Enter any special instructions...">{{ old('options.notes') }}</textarea>
<textarea name="options[notes]" class="form-control" rows="4" placeholder="Enter any special instructions...
For new ADSL/VOIP services please include the physical address for the requested service.
DO NOT request making changes to an active service here, it will not be processed.">{{ old('options.notes') }}</textarea>
<span class="help-block">{{ $errors->first('options.notes') }}</span>
</div>
</div>
@@ -252,15 +248,11 @@
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="tab-pane" id="tab-2">
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,11 @@
@if(View::exists('order.widget.info.'.$o->category))
<div class="box box-primary">
<div class="box-body">
{{-- Return Category Requirements --}}
@include('order.widget.info.'.$o->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}
</div>
</div>
@endif

View File

@@ -0,0 +1,16 @@
@if(View::exists('order.widget.order.'.$o->category))
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Order Configuration</h3>
</div>
<div class="box-body">
{{-- Return Category Requirements --}}
@include('order.widget.order.'.$o->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}
</div>
</div>
@endif

View File

@@ -1,13 +0,0 @@
@if(View::exists('widgets.product.'.$o->category))
<div class="col-md-12">
<div class="box box-primary">
<div class="box-body">
{{-- Return Category Requirements --}}
@include('widgets.product.'.$o->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}
</div>
</div>
</div>
@endif

View File

@@ -1,18 +0,0 @@
@if(View::exists('widgets.order.'.$o->category))
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Order Configuration</h3>
</div>
<div class="box-body">
{{-- Return Category Requirements --}}
@include('widgets.order.'.$o->category)
{{-- Return Supplier Requirements --}}
{{-- Return Product Requirements --}}
</div>
</div>
</div>
@endif