83 lines
4.8 KiB
PHP
83 lines
4.8 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('estimate.create')
|
|
<a href="{{ route('estimate.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 class="table-light">
|
|
<tr>
|
|
<th>S.N</th>
|
|
<th>Title</th>
|
|
<th>Date</th>
|
|
<th>Validity</th>
|
|
<th>Customer</th>
|
|
<th>Approver</th>
|
|
<th>Approved on</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($estimates as $key => $estimate)
|
|
<tr>
|
|
<td>{{ $key + 1 }}</td>
|
|
<td>{{ $estimate->title }}</td>
|
|
<td>{{ $estimate->date?->format('Y-m-d') }}</td>
|
|
<td>{{ $estimate->validity?->format('Y-m-d') }}</td>
|
|
<td>{{ $estimate->customer?->customer_name }}</td>
|
|
<td>{{ $estimate->approver?->customer_name ?? 'N/A' }}</td>
|
|
<td>{{ $estimate->approval_on?->format('Y-m-d') ?? 'N/A' }}</td>
|
|
<td>{{ $statusList[$estimate->approval_status] }}</td>
|
|
<td>
|
|
<div class="hstack flex-wrap gap-3">
|
|
@can('estimate.show')
|
|
<a href="{{ route('estimate.show', $estimate->id) }}"
|
|
class="link-info fs-15">
|
|
<i class="ri-eye-line"></i>
|
|
</a>
|
|
@endcan
|
|
@can('estimate.edit')
|
|
<a href="{{ route('estimate.edit', $estimate->id) }}"
|
|
class="link-success fs-15 edit-item-btn"><i
|
|
class="ri-edit-2-line"></i></a>
|
|
@endcan
|
|
@can('estimate.destroy')
|
|
<a href="javascript:void(0);"
|
|
data-link="{{ route('estimate.destroy', $estimate->id) }}"
|
|
data-id="{{ $estimate->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
|