osb/resources/views/theme/backend/adminlte/supplier/home.blade.php

51 lines
1.3 KiB
PHP
Raw Normal View History

@use(App\Models\Supplier)
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-12 col-sm-9 col-md-6 col-xl-5">
<x-leenooks::form.select name="supplier_id" icon="fa-handshake" label="Supplier" choose="true" groupby="active" :options="$x=Supplier::orderBy('active','DESC')->orderBy(DB::Raw('UPPER(name)'))->get()->map(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])"/>
2021-12-20 03:25:43 +00:00
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('page-scripts')
<script type="text/javascript">
$(document).ready(function() {
$('#supplier_id')
2021-12-20 03:25:43 +00:00
.on('change',function(item) {
window.location.href = '{{ url('a/supplier/details') }}'+(item.target.value ? '/'+item.target.value : '');
2021-12-20 03:25:43 +00:00
});
});
</script>
@append