This commit is contained in:
Sampanna Rimal
2024-09-11 12:32:15 +05:45
parent 82fab174dc
commit afb2c202d6
170 changed files with 3352 additions and 363 deletions

View File

@ -22,28 +22,23 @@
<thead>
<tr>
<th>S.N</th>
<th>Name</th>
<th>Price</th>
<th>Quantity</th>
<th>Category</th>
<th>Sub Category</th>
<th>Supplier</th>
<th>Warehouse</th>
<th>Title</th>
<th>Fabric Category</th>
<th>Product Category</th>
<th>Product Code</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($products as $key => $product)
{{-- @dd($product->fabricCategory) --}}
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $product->name }}</td>
<td>{{ $product->price }}</td>
<td>{{ $product->qty }}</td>
<td>{{ optional($product->fabricCategory)->title }}</td>
<td>{{ optional($product->category)->title }}</td>
<td>{{ optional($product->subCategory)->title }}</td>
<td>{{ optional($product->supplier)->supplier_name }}</td>
<td>{{ optional($product->warehouse)->title }}</td>
<td>{{ $product->code }}</td>
<td>{!! $product->status_name !!}</td>
<td>
<div class="hstack flex-wrap gap-3">

View File

@ -9,40 +9,30 @@
</div>
<div class="col-md-6">
{{ html()->label('Price')->class('form-label') }}
{{ html()->text('price')->class('form-control')->placeholder('Enter Price')->required() }}
{{ html()->label('Product Code')->class('form-label') }}
{{ html()->text('code')->class('form-control')->placeholder('Enter Product Code')->required() }}
</div>
<div class="col-md-6">
{{ html()->label('Quantity')->class('form-label') }}
{{ html()->text('qty')->class('form-control')->placeholder('Enter Quantity')->required() }}
{{ 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-4">
<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-4">
{{ html()->label('Sub Category')->class('form-label') }}
{{ html()->select('sub_category_id', $subCategory)->class('form-select select2')->placeholder('Select Sub Category')->id('sub_category_id') }}
</div>
<div class="col-md-4">
{{ html()->label('Supplier')->class('form-label') }}
{{ html()->select('supplier_id', $supplier)->class('form-select select2')->placeholder('Select Supplier') }}
</div>
<div class="col-md-4">
{{ html()->label('Warehouse')->class('form-label') }}
{{ html()->select('warehouse_id', $warehouse)->class('form-select select2')->placeholder('Select Warehouse') }}
</div>
<div class="col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('desc')->class('form-control')->placeholder('Enter Description')->required() }}
</div>
<div class="col-md-12">
{{ html()->label('Remarks')->class('form-label') }}
{{ html()->textarea('remarks')->class('form-control')->placeholder('Enter Remarks')->required() }}
</div>
</div>
<!-- end card -->
</div>
@ -73,14 +63,14 @@
</div>
@push('js')
<script>
{{-- <script>
$(document).on('change', '#category_id', function(e) {
e.preventDefault();
var category_id = $(this).val();
if (category_id) {
$.ajax({
type: "GET",
url: "{{ route('getSubCategories') }}",
url: "{{ route('getSubCategories') }}" ,
data: {
'category_id': category_id
},
@ -94,5 +84,5 @@
});
}
});
</script>
</script> --}}
@endpush

View File

@ -17,31 +17,23 @@
<td>{{ $product->name }}</td>
</tr>
<tr>
<th><span class="fw-medium">Price</span></th>
<td>{{ $product->price }}</td>
</tr>
<tr>
<th><span class="fw-medium">Quantity</span></th>
<td>{{ $product->qty }}</td>
<th><span class="fw-medium">Product Code</span></th>
<td>{{ $product->code }}</td>
</tr>
<tr>
<th><span class="fw-medium">Category</span></th>
<td>{{ optional($product->category)->title }}</td>
</tr>
<tr>
<th><span class="fw-medium">Sub Category</span></th>
<td>{{ optional($product->subCategory)->title }}</td>
<th><span class="fw-medium">Fabric Category</span></th>
<td>{{ optional($product->fabricCategory)->title }}</td>
</tr>
<tr>
<th><span class="fw-medium">Supplier</span></th>
<td>{{ optional($product->supplier)->supplier_name }}</td>
<th><span class="fw-medium">Description</span></th>
<td>{{ optional($product->desc) }}</td>
</tr>
<tr>
<th><span class="fw-medium">Warehouse</span></th>
<td>{{ optional($product->warehouse)->title }}</td>
</tr>
<tr>
<th><span class="fw-medium">Status</span></th>
<th><span class="fw-medium">Status</span></th>
<td>{{ $product->status }}</td>
</tr>
</tbody>