first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

View File

@ -0,0 +1,23 @@
@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-body'>
{{ html()->form('POST')->route('generator.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('office::generators.partials.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@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-body'>
{{ html()->modelForm($generator, 'PUT')->route('generator.update', $generator->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('office::generators.partials.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,88 @@
@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

View File

@ -0,0 +1,101 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Name')->class('form-label') }}
{{ html()->text('name')->class('form-control')->placeholder('Generator Name')->required() }}
{{ html()->div('Please Fill the Field')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Model')->class('form-label') }}
{{ html()->text('model')->class('form-control')->placeholder('Model Number')->required() }}
{{ html()->div('Please Fill the model number')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Manufacturer')->class('form-label') }}
{{ html()->text('manufacturer')->class('form-control')->placeholder('Manufacturer')->required()}}
{{ html()->div('Please Fill the Field')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Serial Number')->class('form-label') }}
{{ html()->text('serial_number')->class('form-control')->placeholder('Serial Number')->required() }}
{{ html()->div('Please Fill Serial Number')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Fuel Type')->class('form-label') }}
{{ html()->select('fuel_type', \Modules\Office\Models\Generator::FUEL_TYPE)->class('form-select select2')->placeholder('Fuel Type')->required() }}
{{ html()->div('Please Fill the Fuel Type')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Fuel Tank Capacity')->class('form-label') }}
{{ html()->number('fuel_tank_capacity')->class('form-control')->placeholder('Capacity in Litre')->required() }}
{{ html()->div('Please Fill the Fuel Tank Capacity')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Producing Capacity')->class('form-label') }}
{{ html()->number('capacity')->class('form-control')->placeholder('Capacity in Kwh')->required() }}
{{ html()->div('Please Fill the producing capacity')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Warranty Expiry Date')->class('form-label') }}
{{ html()->date('warranty_expiry_date')->class('form-control')->placeholder('Warranty Expiry Date')->required() }}
{{ html()->div('Please Fill the warenty expirey date')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Installed Location')->class('form-label') }}
{{ html()->text('location')->class('form-control')->placeholder('Installed Location')->required() }}
{{ html()->div('Please Fill the location')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Installation Date')->class('form-label') }}
{{ html()->date('installation_date')->class('form-control')->placeholder('Installation Date')->required() }}
{{ html()->div('Please fill the installation date')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Last Maintenance Date')->class('form-label') }}
{{ html()->date('last_maintenance_date')->class('form-control')->placeholder('Last Maintenance Date')->required() }}
{{ html()->div('Please fill last maintenance date')->class('invalid-feedback') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Next Maintenance Due')->class('form-label') }}
{{ html()->date('next_maintenance_due')->class('form-control')->placeholder('Next Maintenance Due')->required() }}
{{ html()->div('Please Fill next maintanace date')->class('invalid-feedback') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 3])->required() }}
{{ html()->div('Please Fill the description')->class('invalid-feedback') }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Generator', 'submit')->class('btn btn-success') }}
</div>
</div>
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
@endpush

View File

@ -0,0 +1,48 @@
@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">View Detail</h5>
<div class="flex-shrink-0">
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
</div>
</div>
<div class='card-body'>
<p><b>Title :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->title }}</span></p>
<p><b>Alias :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->alias }}</span></p>
<p><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
</p>
<p><b>Remarks :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->remarks }}</span></p>
<p><b>Display Order :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->display_order }}</span></p>
<p><b>Createdby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->createdby }}</span></p>
<p><b>Updatedby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->updatedby }}</span></p>
<p><b>Job Description :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->job_description }}</span></p>
<p><b>Departments Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->departments_id }}</span></p>
<div class="d-flex justify-content-between">
<div>
<p><b>Created On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->created_at }}</span></p>
<p><b>Created By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->createdBy }}</span></p>
</div>
<div>
<p><b>Updated On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updated_at }}</span></p>
<p><b>Updated By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updatedBy }}</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
@endSection