StocksNew/Modules/Office/resources/views/generators/index.blade.php

89 lines
4.1 KiB
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
@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 -->
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
<div class="flex-shrink-0">
<a href="{{ route('generator.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Generator</a>
</div>
</div>
<div class="card-body">
<table id="buttons-datatables" class="display table-sm table-bordered table">
<thead class="table-light">
<tr>
<th class="tb-col"><span class="overline-title">S.N</span></th>
<th class="tb-col"><span class="overline-title">Name</span></th>
<th class="tb-col"><span class="overline-title">Model</span></th>
<th class="tb-col"><span class="overline-title">Fuel Type</span></th>
<th class="tb-col"><span class="overline-title">Installed Location</span></th>
<th class="tb-col"><span class="overline-title">Warranty</span></th>
<th class="tb-col"><span class="overline-title">Last Maintenance</span></th>
<th class="tb-col"><span class="overline-title">Next Maintenance</span></th>
<th class="tb-col"><span class="overline-title">Status</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($generatorLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->name }}</td>
<td class="tb-col">{{ $item->model }}</td>
<td class="tb-col">{{ $item->fuel_type }}</td>
<td class="tb-col">{{ $item->location }}</td>
<td class="tb-col">
@if ($item->warranty_expiry_date <= now())
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-danger">Expired</span>
@endif</td>
<td class="tb-col">{{ $item->last_maintenance_date }}</td>
<td class="tb-col">{{ $item->next_maintenance_due }}</td>
<td class="tb-col">{{ $item->status }}</td>
<td class="tb-col">
<div class="dropdown d-inline-block">
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="ri-more-fill align-middle"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a href="{{ route('generator.show', [$item->id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('generator.edit', [$item->id]) }}"
class="dropdown-item edit-item-btn"><i
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
Edit</a>
</li>
<li>
<a href="{{ route('appreciation.destroy', [$item->id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection