2021-12-20 03:25:43 +00:00
|
|
|
@extends('adminlte::layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
|
|
|
Supplier
|
|
|
|
@endsection
|
|
|
|
@section('page_title')
|
|
|
|
Supplier
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('contentheader_title')
|
|
|
|
Supplier
|
|
|
|
@endsection
|
|
|
|
@section('contentheader_description')
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('main-content')
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="card card-dark">
|
|
|
|
<div class="card-header">
|
|
|
|
<h1 class="card-title">Supplier Configuration</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
<form class="g-0 needs-validation" method="POST" enctype="multipart/form-data" role="form">
|
|
|
|
@csrf
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">
|
|
|
|
<div class="form-group has-validation">
|
|
|
|
<label for="name">Supplier Name</label>
|
|
|
|
<select class="form-control form-control-border" id="name" name="supplier_id">
|
|
|
|
<option value=""></option>
|
|
|
|
<option value="">Add New</option>
|
2022-06-28 13:20:56 +00:00
|
|
|
@foreach(\App\Models\Supplier::orderBy('active','DESC')->orderBy('name')->get()->groupBy('active') as $o)
|
|
|
|
<optgroup label="{{ $o->first()->active ? 'Active' : 'Not Active' }}">
|
|
|
|
@foreach($o as $oo)
|
|
|
|
<option value="{{ $oo->id }}">{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</optgroup>
|
2021-12-20 03:25:43 +00:00
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('name')
|
|
|
|
{{ $message }}
|
|
|
|
@else
|
|
|
|
Supplier Name is required.
|
|
|
|
@enderror
|
|
|
|
</span>
|
|
|
|
<span class="input-helper">Suppliers Name</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('page-scripts')
|
|
|
|
@css(select2)
|
|
|
|
@js(select2,autofocus)
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#name').select2()
|
|
|
|
.on('change',function(item) {
|
2022-06-28 13:20:56 +00:00
|
|
|
window.location.href = '{{ url('a/supplier/details') }}'+(item.target.value ? '/'+item.target.value : '');
|
2021-12-20 03:25:43 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endsection
|