restaurant changes

This commit is contained in:
Sampanna Rimal
2024-09-19 18:33:08 +05:45
parent 0b438e302d
commit 2fa9d47a73
115 changed files with 3489 additions and 67 deletions

View File

@ -16,4 +16,12 @@
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
<script>
function validateNumericInput(input) {
// Allow only numbers and remove any non-numeric input
input.value = input.value.replace(/[^0-9.]/g, '');
input.value = input.value.replace(/(\..*)\./g, '$1');
input.value = input.value.replace(/^(\d+)(\.\d{0,2})?.*/, '$1$2');
}
</script>
@endpush

View File

@ -23,9 +23,9 @@
<tr>
<th>S.N</th>
<th>Title</th>
<th>Fabric Category</th>
<th>Product Category</th>
<th>Product Code</th>
<th>Price</th>
<th>Status</th>
<th>Action</th>
</tr>
@ -36,9 +36,9 @@
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $product->name }}</td>
<td>{{ optional($product->fabricCategory)->title }}</td>
<td>{{ optional($product->category)->title }}</td>
<td>{{ $product->code }}</td>
<td>{{ $product->price }}</td>
<td>{!! $product->status_name !!}</td>
<td>
<div class="hstack flex-wrap gap-3">

View File

@ -13,16 +13,17 @@
{{ html()->text('code')->class('form-control')->placeholder('Enter Product Code')->required() }}
</div>
<div class="col-md-6">
{{ html()->label('Fabric Category')->class('form-label') }}
{{ html()->select('fabriccategory_id', $fabricCategory)->class('form-select select2')->placeholder('Select Fabric Category')->id('fabric_category_id') }}
</div>
<div class="col-md-6">
{{ html()->label('Category')->class('form-label') }}
{{ html()->select('category_id', $category)->class('form-select select2')->placeholder('Select Category')->id('category_id') }}
</div>
<div class="col-md-6">
{{ html()->label('Price')->class('form-label') }}
{{ html()->text('price')->class('form-control product-price cleave-numeral rate~~')->placeholder('Enter Price')->attributes(['onkeyup' => 'validateNumericInput(this)'])->required() }}
</div>
<div class="col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('desc')->class('form-control')->placeholder('Enter Description') }}