2021-12-24 01:14:01 +00:00
|
|
|
<!-- $o = Supplier::class -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h3>Supplier Details</h3>
|
|
|
|
<hr>
|
|
|
|
@if(session()->has('success'))
|
|
|
|
<span class="ml-3 pt-0 pb-0 pr-1 pl-1 btn btn-outline-success"><small>{{ session()->get('success') }}</small></span>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<form class="g-0 needs-validation" method="POST" enctype="multipart/form-data" role="form">
|
|
|
|
@csrf
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<div class="row">
|
|
|
|
<!-- Supplier Name -->
|
|
|
|
<div class="col-9">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="name">Supplier Name</label>
|
|
|
|
<input type="text" class="form-control form-control-border @error('name') is-invalid @enderror" id="name" name="name" placeholder="Supplier Name" value="{{ old('name',$o->name) }}" required>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('name')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@else
|
|
|
|
Supplier Name required.
|
2022-04-01 22:28:43 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-04-02 07:06:34 +00:00
|
|
|
<!-- Supplier Active -->
|
2021-12-24 01:14:01 +00:00
|
|
|
<div class="col-3">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
|
|
|
|
<input type="checkbox" class="custom-control-input" id="active" name="active" {{ old('active',$o->active) ? 'checked' : '' }}>
|
|
|
|
<label class="custom-control-label" for="active">Active</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- Address Lines -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="address1">Address Lines</label>
|
|
|
|
<input type="text" class="form-control form-control-border @error('address1') is-invalid @enderror" id="address1" name="address1" placeholder="Address1" value="{{ old('address1',$o->address1) }}" required>
|
|
|
|
<input type="text" class="form-control form-control-border" id="address2" name="address2" placeholder="Address2" value="{{ old('address2',$o->address2) }}">
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('address1')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@else
|
|
|
|
Atleast 1 address line required.
|
2022-04-01 22:28:43 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- City -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="city">City</label>
|
|
|
|
<input type="text" class="form-control form-control-border @error('city') is-invalid @enderror" id="city" name="city" placeholder="City" value="{{ old('city',$o->city) }}">
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('city')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@else
|
|
|
|
City is required.
|
2022-04-01 22:28:43 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- State -->
|
|
|
|
<div class="col-9">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="state">State</label>
|
|
|
|
<input type="text" class="form-control form-control-border @error('state') is-invalid @enderror" id="state" name="state" placeholder="State" value="{{ old('state',$o->state) }}">
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('state')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@else
|
|
|
|
State is required.
|
2022-04-01 22:28:43 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Postal Code -->
|
|
|
|
<div class="col-3">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="postcode">Postal Code</label>
|
|
|
|
<input type="text" class="form-control form-control-border @error('postcode') is-invalid @enderror" id="postcode" name="postcode" placeholder="Postal Code" value="{{ old('postcode',$o->postcode) }}">
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('postcode')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@else
|
|
|
|
Postcode is required.
|
2022-04-01 22:28:43 +00:00
|
|
|
@enderror
|
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="offset-1 col-4">
|
|
|
|
<div class="row">
|
|
|
|
<!-- Accounts Email -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="accounts">Accounts Email</label>
|
2022-04-02 07:06:34 +00:00
|
|
|
<input type="text" class="form-control form-control-border @error('supplier_details.accounts') is-invalid @enderror" id="accounts" name="supplier_details[accounts]" placeholder="Accounts Email" value="{{ old('supplier_details.accounts',($o->detail ? $o->detail->accounts : '')) }}">
|
2021-12-24 01:14:01 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('supplier_details.accounts')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@enderror
|
2022-04-01 22:28:43 +00:00
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- Support Email -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="support">Support Email</label>
|
2022-04-02 07:06:34 +00:00
|
|
|
<input type="text" class="form-control form-control-border @error('supplier_details.support') is-invalid @enderror" id="support" name="supplier_details[support]" placeholder="Support Email" value="{{ old('supplier_details.support',($o->detail ? $o->detail->support : '')) }}">
|
2021-12-24 01:14:01 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('supplier_details.support')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@enderror
|
2022-04-01 22:28:43 +00:00
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- Payment Details -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="payments">Payment Details</label>
|
2022-04-02 07:06:34 +00:00
|
|
|
<input type="text" class="form-control form-control-border @error('supplier_details.payments') is-invalid @enderror" id="payments" name="supplier_details[payments]" placeholder="Payment Details" value="{{ old('supplier_details.payments',($o->detail ? $o->detail->payments : '')) }}">
|
2021-12-24 01:14:01 +00:00
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('supplier_details.payments')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@enderror
|
2022-04-01 22:28:43 +00:00
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- Notes -->
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="notes">Notes</label>
|
|
|
|
<textarea class="form-control @error('supplier_details.notes') is-invalid @enderror" id="notes" name="supplier_details[notes]" placeholder="Notes...">{{ old('supplier_details.notes',($o->detail ? $o->detail->notes : '')) }}</textarea>
|
|
|
|
<span class="input-helper">Notes.</span>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
2022-04-01 22:28:43 +00:00
|
|
|
@error('supplier_details.notes')
|
|
|
|
{{ $message }}
|
2021-12-24 01:14:01 +00:00
|
|
|
@enderror
|
2022-04-01 22:28:43 +00:00
|
|
|
</span>
|
2021-12-24 01:14:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- Buttons -->
|
|
|
|
<div class="col-12">
|
|
|
|
<a href="{{ url('/home') }}" class="btn btn-danger">Cancel</a>
|
|
|
|
@can('wholesaler')
|
|
|
|
<button type="submit" name="submit" class="btn btn-success mr-0 float-right">@if ($o->exists)Save @else Add @endif</button>
|
|
|
|
@endcan
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|