80 lines
3.2 KiB
PHP
80 lines
3.2 KiB
PHP
@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('product.create')
|
|
<a href="{{ route('product.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>Name</th>
|
|
<th>Price</th>
|
|
<th>Quantity</th>
|
|
<th>Category</th>
|
|
<th>Sub Category</th>
|
|
<th>Supplier</th>
|
|
<th>Warehouse</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($products as $key => $product)
|
|
<tr>
|
|
<td>{{ $key + 1 }}</td>
|
|
<td>{{ $product->name }}</td>
|
|
<td>{{ $product->price }}</td>
|
|
<td>{{ $product->qty }}</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->status_name !!}</td>
|
|
<td>
|
|
<div class="hstack flex-wrap gap-3">
|
|
@can('product.show')
|
|
<a href="{{ route('product.show', $product->id) }}" class="link-info fs-15">
|
|
<i class="ri-eye-line"></i>
|
|
</a>
|
|
@endcan
|
|
@can('product.edit')
|
|
<a href="{{ route('product.edit', $product->id) }}"
|
|
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
|
|
@endcan
|
|
@can('product.destroy')
|
|
<a href="javascript:void(0);" data-link="{{ route('product.destroy', $product->id) }}"
|
|
data-id="{{ $product->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
|