restaurant changes
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
{{ html()->form('POST')->route('ingredient.store')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
|
||||
@include('ingredient::ingredient.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@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
|
30
Modules/Ingredient/resources/views/ingredient/edit.blade.php
Normal file
30
Modules/Ingredient/resources/views/ingredient/edit.blade.php
Normal file
@ -0,0 +1,30 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
|
||||
{{ html()->modelForm($ingredient, 'PUT')->route('ingredient.update', $ingredient->id)->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('ingredient::ingredient.partials.action')
|
||||
{{ html()->closeModelForm() }}
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@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
|
@ -0,0 +1,74 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
|
||||
<div class="mb-2 text-end">
|
||||
@can('ingredient.create')
|
||||
<a href="{{ route('ingredient.create') }}" class="btn btn-success btn-md waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Add</a>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Title</th>
|
||||
{{-- <th>Fabric Category</th> --}}
|
||||
<th>Ingredient Category</th>
|
||||
<th>Ingredient Code</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($ingredients as $key => $ingredient)
|
||||
{{-- @dd($ingredient->fabricCategory) --}}
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>{{ $ingredient->name }}</td>
|
||||
{{-- <td>{{ optional($ingredient->fabricCategory)->title }}</td> --}}
|
||||
<td>{{ optional($ingredient->category)->title }}</td>
|
||||
<td>{{ $ingredient->code }}</td>
|
||||
<td>{!! $ingredient->status_name !!}</td>
|
||||
<td>
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
@can('ingredient.show')
|
||||
<a href="{{ route('ingredient.show', $ingredient->id) }}" class="link-info fs-15">
|
||||
<i class="ri-eye-line"></i>
|
||||
</a>
|
||||
@endcan
|
||||
@can('ingredient.edit')
|
||||
<a href="{{ route('ingredient.edit', $ingredient->id) }}"
|
||||
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
|
||||
@endcan
|
||||
@can('ingredient.destroy')
|
||||
<a href="javascript:void(0);" data-link="{{ route('ingredient.destroy', $ingredient->id) }}"
|
||||
data-id="{{ $ingredient->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,89 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-1">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Ingredient Name')->class('form-label') }}
|
||||
{{ html()->text('name')->class('form-control')->placeholder('Enter Ingredient Name')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Ingredient Code')->class('form-label') }}
|
||||
{{ html()->text('code')->class('form-control')->placeholder('Enter Ingredient Code')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Category')->class('form-label') }}
|
||||
{{ html()->select('ingredient_category_id', $ingredientCategory)->class('form-select select2')->placeholder('Select Category')->id('ingredient_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') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->placeholder('Enter Remarks') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end card -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('ingredient.index') }}" class="btn btn-danger w-sm">Cancel</a>
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
<div class="col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-control')->placeholder('Select Status')->required() }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card -->
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
{{-- <script>
|
||||
$(document).on('change', '#category_id', function(e) {
|
||||
e.preventDefault();
|
||||
var category_id = $(this).val();
|
||||
if (category_id) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "{{ route('getSubCategories') }}" ,
|
||||
data: {
|
||||
'category_id': category_id
|
||||
},
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
$('#sub_category_id').html('<option value="#" selected disabled>Select Sub Category</option>');
|
||||
$.each(response.message, function(key, value) {
|
||||
$('#sub_category_id').append('<option value=' + value.id + '>' + value.title + '</option>');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script> --}}
|
||||
@endpush
|
57
Modules/Ingredient/resources/views/ingredient/show.blade.php
Normal file
57
Modules/Ingredient/resources/views/ingredient/show.blade.php
Normal file
@ -0,0 +1,57 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-body p-4">
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
<table class="table-borderless mb-0 table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Ingredient Name</span></th>
|
||||
<td>{{ $ingredient->name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Ingredient Code</span></th>
|
||||
<td>{{ $ingredient->code }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Category</span></th>
|
||||
<td>{{ optional($ingredient->category)->title }}</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<th><span class="fw-medium">Fabric Category</span></th>
|
||||
<td>{{ optional($ingredient->fabricCategory)->title }}</td>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<th><span class="fw-medium">Description</span></th>
|
||||
<td>{{ optional($ingredient->desc) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Status</span></th>
|
||||
<td>{{ $ingredient->status }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('ingredient.index') }}" class="btn btn-secondary w-sm">Back</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
Reference in New Issue
Block a user