first commit
This commit is contained in:
0
Modules/Office/app/Http/Controllers/.gitkeep
Normal file
0
Modules/Office/app/Http/Controllers/.gitkeep
Normal file
107
Modules/Office/app/Http/Controllers/ContractController.php
Normal file
107
Modules/Office/app/Http/Controllers/ContractController.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Office\Repositories\ContractInterface;
|
||||
use Modules\Office\Repositories\ContractRepository;
|
||||
|
||||
class ContractController extends Controller
|
||||
{
|
||||
private $contractRepository;
|
||||
|
||||
public function __construct(ContractInterface $contractRepository)
|
||||
{
|
||||
$this->contractRepository = $contractRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = "Contract Lists";
|
||||
$data['contractLists'] = $this->contractRepository->findAll();
|
||||
return view('office::contracts.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = "Create Contract";
|
||||
$data['editable'] = false;
|
||||
return view('office::contracts.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->contractRepository->create($request->all());
|
||||
toastr()->success('Contract Created Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('contract.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::contracts.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = "Edit Contract";
|
||||
$data['editable'] = true;
|
||||
$data['contract'] = $this->contractRepository->getContractById($id);
|
||||
return view('office::contracts.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->contractRepository->update($id, $request->except(['_token', '_method']));
|
||||
toastr()->success('Contract Updated Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
|
||||
return redirect()->route('contract.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->contractRepository->delete($id);
|
||||
toastr()->success('Contract deleted successfully.');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('contract.index');
|
||||
}
|
||||
}
|
107
Modules/Office/app/Http/Controllers/DepositController.php
Normal file
107
Modules/Office/app/Http/Controllers/DepositController.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Office\Repositories\DepositInterface;
|
||||
use Modules\Office\Repositories\DepositRepository;
|
||||
|
||||
class DepositController extends Controller
|
||||
{
|
||||
private $depositRepository;
|
||||
|
||||
public function __construct(DepositInterface $depositRepository)
|
||||
{
|
||||
$this->depositRepository = $depositRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = "Deposit Lists";
|
||||
$data['depositLists'] = $this->depositRepository->findAll();
|
||||
return view('office::deposits.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = "Create Deposit";
|
||||
$data['editable'] = false;
|
||||
return view('office::deposits.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->depositRepository->create($request->all());
|
||||
toastr()->success('Deposit Created Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('deposit.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::deposits.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = "Edit Deposit";
|
||||
$data['editable'] = true;
|
||||
$data['deposit'] = $this->depositRepository->getDepositById($id);
|
||||
return view('office::deposits.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->depositRepository->update($id, $request->except(['_token', '_method']));
|
||||
toastr()->success('Deposit Updated Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
|
||||
// return redirect()->route('deposit.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->depositRepository->delete($id);
|
||||
toastr()->success('Deposit deleted successfully.');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('deposit.index');
|
||||
}
|
||||
}
|
107
Modules/Office/app/Http/Controllers/GeneratorController.php
Normal file
107
Modules/Office/app/Http/Controllers/GeneratorController.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Office\Repositories\GeneratorInterface;
|
||||
use Modules\Office\Repositories\GeneratorRepository;
|
||||
|
||||
class GeneratorController extends Controller
|
||||
{
|
||||
private $generatorRepository;
|
||||
|
||||
public function __construct(GeneratorInterface $generatorRepository)
|
||||
{
|
||||
$this->generatorRepository = $generatorRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = "Generator Lists";
|
||||
$data['generatorLists'] = $this->generatorRepository->findAll();
|
||||
return view('office::generators.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = "Create Generator";
|
||||
$data['editable'] = false;
|
||||
return view('office::generators.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->generatorRepository->create($request->all());
|
||||
toastr()->success('Generator Created Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('generator.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::generators.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = "Edit Generator";
|
||||
$data['editable'] = true;
|
||||
$data['generator'] = $this->generatorRepository->getGeneratorById($id);
|
||||
return view('office::generators.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->generatorRepository->update($id, $request->all());
|
||||
toastr()->success('Generator Updated Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
|
||||
return redirect()->route('generator.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->generatorRepository->delete($id);
|
||||
toastr()->success('Generator deleted successfully.');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('generator.index');
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Office\Repositories\GeneratorLogBookInterface;
|
||||
use Modules\Office\Repositories\GeneratorLogBookRepository;
|
||||
use Modules\Office\Repositories\GeneratorRepository;
|
||||
|
||||
class GeneratorLogBookController extends Controller
|
||||
{
|
||||
private $generatorLogBookRepository;
|
||||
private $generatorRepository;
|
||||
|
||||
public function __construct(GeneratorLogBookInterface $generatorLogBookRepository,GeneratorLogBookInterface $generatorRepository)
|
||||
{
|
||||
$this->generatorLogBookRepository = $generatorLogBookRepository;
|
||||
$this->generatorRepository = $generatorRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = "GeneratorLogBook Lists";
|
||||
$data['generatorLogBookLists'] = $this->generatorLogBookRepository->findAll();
|
||||
return view('office::generatorlogbooks.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = "Create GeneratorLogBook";
|
||||
$data['editable'] = false;
|
||||
$data['generatorLists'] = $this->generatorRepository->pluck();
|
||||
return view('office::generatorlogbooks.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->generatorLogBookRepository->create($request->all());
|
||||
toastr()->success('GeneratorLogBook Created Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('generatorLogBook.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::generatorlogbooks.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = "Edit GeneratorLogBook";
|
||||
$data['editable'] = true;
|
||||
$data['generatorLogBook'] = $this->generatorLogBookRepository->getGeneratorLogBookById($id);
|
||||
$data['generatorLists'] = $this->generatorRepository->pluck();
|
||||
return view('office::generatorlogbooks.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->generatorLogBookRepository->update($id, $request->all());
|
||||
toastr()->success('GeneratorLogBook Updated Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
|
||||
return redirect()->route('generatorLogBook.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->generatorLogBookRepository->delete($id);
|
||||
toastr()->success('GeneratorLogBook deleted successfully.');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('generatorLogBook.index');
|
||||
}
|
||||
}
|
67
Modules/Office/app/Http/Controllers/OfficeController.php
Normal file
67
Modules/Office/app/Http/Controllers/OfficeController.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class OfficeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('office::index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('office::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('office::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Office\Repositories\PurchaseServiceInterface;
|
||||
use Modules\Office\Repositories\PurchaseServiceRepository;
|
||||
|
||||
class PurchaseServiceController extends Controller
|
||||
{
|
||||
private $purchaseServiceRepository;
|
||||
|
||||
public function __construct(PurchaseServiceInterface $purchaseServiceRepository)
|
||||
{
|
||||
$this->purchaseServiceRepository = $purchaseServiceRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = "PurchaseService Lists";
|
||||
$data['purchaseServiceLists'] = $this->purchaseServiceRepository->findAll();
|
||||
return view('office::purchaseservices.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = "Create PurchaseService";
|
||||
$data['editable'] = false;
|
||||
return view('office::purchaseservices.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->purchaseServiceRepository->create($request->all());
|
||||
toastr()->success('PurchaseService Created Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('purchaseService.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('office::purchaseservices.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = "Edit PurchaseService";
|
||||
$data['editable'] = true;
|
||||
$data['purchaseService'] = $this->purchaseServiceRepository->getPurchaseServiceById($id);
|
||||
return view('office::purchaseservices.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->purchaseServiceRepository->update($id, $request->except(['_token', '_method']));
|
||||
toastr()->success('PurchaseService Updated Successfully.');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
|
||||
// return redirect()->route('purchaseService.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->purchaseServiceRepository->delete($id);
|
||||
toastr()->success('PurchaseService deleted successfully.');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('purchaseService.index');
|
||||
}
|
||||
}
|
0
Modules/Office/app/Http/Requests/.gitkeep
Normal file
0
Modules/Office/app/Http/Requests/.gitkeep
Normal file
0
Modules/Office/app/Models/.gitkeep
Normal file
0
Modules/Office/app/Models/.gitkeep
Normal file
31
Modules/Office/app/Models/Contract.php
Normal file
31
Modules/Office/app/Models/Contract.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Office\Database\factories\ContractFactory;
|
||||
|
||||
class Contract extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_contracts';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'party',
|
||||
'contract_date',
|
||||
'expiry_date',
|
||||
'document',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
43
Modules/Office/app/Models/Deposit.php
Normal file
43
Modules/Office/app/Models/Deposit.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Office\Database\factories\DepositFactory;
|
||||
|
||||
class Deposit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "tbl_deposits";
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'party',
|
||||
'total_amount',
|
||||
'amount_in_words',
|
||||
'thousand',
|
||||
'five_hundred',
|
||||
'hundred',
|
||||
'fifty',
|
||||
'twenty',
|
||||
'ten',
|
||||
'five',
|
||||
'two',
|
||||
'one',
|
||||
'deposited_date',
|
||||
'account_no',
|
||||
'received_by',
|
||||
'deposited_by',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
}
|
42
Modules/Office/app/Models/Generator.php
Normal file
42
Modules/Office/app/Models/Generator.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Office\Database\factories\GeneratorFactory;
|
||||
|
||||
class Generator extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_generators';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'model',
|
||||
'manufacturer',
|
||||
'serial_number',
|
||||
'fuel_type',
|
||||
'fuel_tank_capacity',
|
||||
'capacity',
|
||||
'warranty_expiry_date',
|
||||
'location',
|
||||
'installation_date',
|
||||
'last_maintenance_date',
|
||||
'next_maintenance_due',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
const FUEL_TYPE = [
|
||||
'petrol' => 'Petrol',
|
||||
'diesel' => 'Diesel',
|
||||
];
|
||||
}
|
41
Modules/Office/app/Models/GeneratorLogBook.php
Normal file
41
Modules/Office/app/Models/GeneratorLogBook.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Office\Database\factories\GeneratorLogBookFactory;
|
||||
|
||||
class GeneratorLogBook extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "tbl_generator_log_books";
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'generator_id',
|
||||
'log_type',
|
||||
'from',
|
||||
'to',
|
||||
'servicing_date',
|
||||
'fee',
|
||||
'by',
|
||||
'diesel_consumed',
|
||||
'mobile_consumed',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
const LOG_TYPE = [
|
||||
'usage' => 'Usage',
|
||||
'service' => 'Service',
|
||||
'other' => 'Other'
|
||||
];
|
||||
|
||||
}
|
37
Modules/Office/app/Models/PurchaseService.php
Normal file
37
Modules/Office/app/Models/PurchaseService.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Office\Database\factories\PurchaseServiceFactory;
|
||||
|
||||
class PurchaseService extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "tbl_purchase_services";
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'purchase_name',
|
||||
'party',
|
||||
'contract_name',
|
||||
'contract_validity',
|
||||
'purchased_date',
|
||||
'reference_no',
|
||||
'vat_no',
|
||||
'contact_no',
|
||||
'address',
|
||||
'quantity',
|
||||
'rate',
|
||||
'total_amount',
|
||||
'description',
|
||||
'remarks',
|
||||
'status',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
0
Modules/Office/app/Observers/.gitkeep
Normal file
0
Modules/Office/app/Observers/.gitkeep
Normal file
0
Modules/Office/app/Providers/.gitkeep
Normal file
0
Modules/Office/app/Providers/.gitkeep
Normal file
131
Modules/Office/app/Providers/OfficeServiceProvider.php
Normal file
131
Modules/Office/app/Providers/OfficeServiceProvider.php
Normal file
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\Office\Models\Deposit;
|
||||
use Modules\Office\Repositories\ContractInterface;
|
||||
use Modules\Office\Repositories\ContractRepository;
|
||||
use Modules\Office\Repositories\DepositInterface;
|
||||
use Modules\Office\Repositories\DepositRepository;
|
||||
use Modules\Office\Repositories\GeneratorInterface;
|
||||
use Modules\Office\Repositories\GeneratorLogBookInterface;
|
||||
use Modules\Office\Repositories\GeneratorLogBookRepository;
|
||||
use Modules\Office\Repositories\GeneratorRepository;
|
||||
use Modules\Office\Repositories\PurchaseServiceInterface;
|
||||
use Modules\Office\Repositories\PurchaseServiceRepository;
|
||||
|
||||
class OfficeServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected string $moduleName = 'Office';
|
||||
|
||||
protected string $moduleNameLower = 'office';
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
$this->registerCommands();
|
||||
$this->registerCommandSchedules();
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->register(RouteServiceProvider::class);
|
||||
$this->app->bind(ContractInterface::class, ContractRepository::class);
|
||||
$this->app->bind(DepositInterface::class, DepositRepository::class);
|
||||
$this->app->bind(GeneratorInterface::class, GeneratorRepository::class);
|
||||
$this->app->bind(PurchaseServiceInterface::class, PurchaseServiceRepository::class);
|
||||
$this->app->bind(GeneratorLogBookInterface::class, GeneratorLogBookRepository::class);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register commands in the format of Command::class
|
||||
*/
|
||||
protected function registerCommands(): void
|
||||
{
|
||||
// $this->commands([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register command Schedules.
|
||||
*/
|
||||
protected function registerCommandSchedules(): void
|
||||
{
|
||||
// $this->app->booted(function () {
|
||||
// $schedule = $this->app->make(Schedule::class);
|
||||
// $schedule->command('inspire')->hourly();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*/
|
||||
public function registerTranslations(): void
|
||||
{
|
||||
$langPath = resource_path('lang/modules/'.$this->moduleNameLower);
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom($langPath);
|
||||
} else {
|
||||
$this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*/
|
||||
protected function registerConfig(): void
|
||||
{
|
||||
$this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config');
|
||||
$this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*/
|
||||
public function registerViews(): void
|
||||
{
|
||||
$viewPath = resource_path('views/modules/'.$this->moduleNameLower);
|
||||
$sourcePath = module_path($this->moduleName, 'resources/views');
|
||||
|
||||
$this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']);
|
||||
|
||||
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
|
||||
|
||||
$componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.ltrim(config('modules.paths.generator.component-class.path'), config('modules.paths.app_folder','')));
|
||||
Blade::componentNamespace($componentNamespace, $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*/
|
||||
public function provides(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getPublishableViewPaths(): array
|
||||
{
|
||||
$paths = [];
|
||||
foreach (config('view.paths') as $path) {
|
||||
if (is_dir($path.'/modules/'.$this->moduleNameLower)) {
|
||||
$paths[] = $path.'/modules/'.$this->moduleNameLower;
|
||||
}
|
||||
}
|
||||
|
||||
return $paths;
|
||||
}
|
||||
}
|
49
Modules/Office/app/Providers/RouteServiceProvider.php
Normal file
49
Modules/Office/app/Providers/RouteServiceProvider.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*/
|
||||
public function map(): void
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*/
|
||||
protected function mapWebRoutes(): void
|
||||
{
|
||||
Route::middleware('web')->group(module_path('Office', '/routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*/
|
||||
protected function mapApiRoutes(): void
|
||||
{
|
||||
Route::middleware('api')->prefix('api')->name('api.')->group(module_path('Office', '/routes/api.php'));
|
||||
}
|
||||
}
|
0
Modules/Office/app/Repositories/.gitkeep
Normal file
0
Modules/Office/app/Repositories/.gitkeep
Normal file
13
Modules/Office/app/Repositories/ContractInterface.php
Normal file
13
Modules/Office/app/Repositories/ContractInterface.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
interface ContractInterface
|
||||
{
|
||||
public function pluck();
|
||||
public function findAll();
|
||||
public function getContractById($contractId);
|
||||
public function delete($contractId);
|
||||
public function create(array $contractDetails);
|
||||
public function update($contractId, array $newDetails);
|
||||
}
|
38
Modules/Office/app/Repositories/ContractRepository.php
Normal file
38
Modules/Office/app/Repositories/ContractRepository.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\Contract;
|
||||
|
||||
|
||||
class ContractRepository implements ContractInterface
|
||||
{
|
||||
public function pluck(){
|
||||
return Contract::pluck('name','id');
|
||||
}
|
||||
public function findAll()
|
||||
{
|
||||
return Contract::get();
|
||||
}
|
||||
|
||||
public function getContractById($contractId)
|
||||
{
|
||||
return Contract::findOrFail($contractId);
|
||||
}
|
||||
|
||||
public function delete($contractId)
|
||||
{
|
||||
Contract::destroy($contractId);
|
||||
}
|
||||
|
||||
public function create(array $contractDetails)
|
||||
{
|
||||
return Contract::create($contractDetails);
|
||||
}
|
||||
|
||||
public function update($contractId, array $newDetails)
|
||||
{
|
||||
return Contract::where('id', $contractId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
12
Modules/Office/app/Repositories/DepositInterface.php
Normal file
12
Modules/Office/app/Repositories/DepositInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
interface DepositInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getDepositById($depositId);
|
||||
public function delete($depositId);
|
||||
public function create(array $depositDetails);
|
||||
public function update($depositId, array $newDetails);
|
||||
}
|
35
Modules/Office/app/Repositories/DepositRepository.php
Normal file
35
Modules/Office/app/Repositories/DepositRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\Deposit;
|
||||
|
||||
|
||||
class DepositRepository implements DepositInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Deposit::get();
|
||||
}
|
||||
|
||||
public function getDepositById($depositId)
|
||||
{
|
||||
return Deposit::findOrFail($depositId);
|
||||
}
|
||||
|
||||
public function delete($depositId)
|
||||
{
|
||||
Deposit::destroy($depositId);
|
||||
}
|
||||
|
||||
public function create(array $depositDetails)
|
||||
{
|
||||
return Deposit::create($depositDetails);
|
||||
}
|
||||
|
||||
public function update($depositId, array $newDetails)
|
||||
{
|
||||
return Deposit::where('id', $depositId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
13
Modules/Office/app/Repositories/GeneratorInterface.php
Normal file
13
Modules/Office/app/Repositories/GeneratorInterface.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
interface GeneratorInterface
|
||||
{
|
||||
public function pluck();
|
||||
public function findAll();
|
||||
public function getGeneratorById($generatorId);
|
||||
public function delete($generatorId);
|
||||
public function create(array $generatorDetails);
|
||||
public function update($generatorId, array $newDetails);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
interface GeneratorLogBookInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getGeneratorLogBookById($generatorLogBookId);
|
||||
public function delete($generatorLogBookId);
|
||||
public function create(array $generatorLogBookDetails);
|
||||
public function update($generatorLogBookId, array $newDetails);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\GeneratorLogBook;
|
||||
|
||||
|
||||
class GeneratorLogBookRepository implements GeneratorLogBookInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return GeneratorLogBook::get();
|
||||
}
|
||||
|
||||
public function getGeneratorLogBookById($generatorLogBookId)
|
||||
{
|
||||
return GeneratorLogBook::findOrFail($generatorLogBookId);
|
||||
}
|
||||
|
||||
public function delete($generatorLogBookId)
|
||||
{
|
||||
GeneratorLogBook::destroy($generatorLogBookId);
|
||||
}
|
||||
|
||||
public function create(array $generatorLogBookDetails)
|
||||
{
|
||||
return GeneratorLogBook::create($generatorLogBookDetails);
|
||||
}
|
||||
|
||||
public function update($generatorLogBookId, array $newDetails)
|
||||
{
|
||||
return GeneratorLogBook::where('id', $generatorLogBookId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
38
Modules/Office/app/Repositories/GeneratorRepository.php
Normal file
38
Modules/Office/app/Repositories/GeneratorRepository.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\Generator;
|
||||
|
||||
|
||||
class GeneratorRepository implements GeneratorInterface
|
||||
{
|
||||
public function pluck(){
|
||||
return Generator::pluck('name','id');
|
||||
}
|
||||
public function findAll()
|
||||
{
|
||||
return Generator::get();
|
||||
}
|
||||
|
||||
public function getGeneratorById($generatorId)
|
||||
{
|
||||
return Generator::findOrFail($generatorId);
|
||||
}
|
||||
|
||||
public function delete($generatorId)
|
||||
{
|
||||
Generator::destroy($generatorId);
|
||||
}
|
||||
|
||||
public function create(array $generatorDetails)
|
||||
{
|
||||
return Generator::create($generatorDetails);
|
||||
}
|
||||
|
||||
public function update($generatorId, array $newDetails)
|
||||
{
|
||||
return Generator::where('id', $generatorId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
12
Modules/Office/app/Repositories/PurchaseServiceInterface.php
Normal file
12
Modules/Office/app/Repositories/PurchaseServiceInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
interface PurchaseServiceInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getPurchaseServiceById($purchaseServiceId);
|
||||
public function delete($purchaseServiceId);
|
||||
public function create(array $purchaseServiceDetails);
|
||||
public function update($purchaseServiceId, array $newDetails);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\PurchaseService;
|
||||
|
||||
|
||||
class PurchaseServiceRepository implements PurchaseServiceInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return PurchaseService::get();
|
||||
}
|
||||
|
||||
public function getPurchaseServiceById($purchaseServiceId)
|
||||
{
|
||||
return PurchaseService::findOrFail($purchaseServiceId);
|
||||
}
|
||||
|
||||
public function delete($purchaseServiceId)
|
||||
{
|
||||
PurchaseService::destroy($purchaseServiceId);
|
||||
}
|
||||
|
||||
public function create(array $purchaseServiceDetails)
|
||||
{
|
||||
return PurchaseService::create($purchaseServiceDetails);
|
||||
}
|
||||
|
||||
public function update($purchaseServiceId, array $newDetails)
|
||||
{
|
||||
return PurchaseService::where('id', $purchaseServiceId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
30
Modules/Office/composer.json
Normal file
30
Modules/Office/composer.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "nwidart/office",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Widart",
|
||||
"email": "n.widart@gmail.com"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [],
|
||||
"aliases": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\Office\\": "app/",
|
||||
"Modules\\Office\\Database\\Factories\\": "database/factories/",
|
||||
"Modules\\Office\\Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Modules\\Office\\Tests\\": "tests/"
|
||||
}
|
||||
}
|
||||
}
|
0
Modules/Office/config/.gitkeep
Normal file
0
Modules/Office/config/.gitkeep
Normal file
5
Modules/Office/config/config.php
Normal file
5
Modules/Office/config/config.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'Office',
|
||||
];
|
0
Modules/Office/database/factories/.gitkeep
Normal file
0
Modules/Office/database/factories/.gitkeep
Normal file
0
Modules/Office/database/migrations/.gitkeep
Normal file
0
Modules/Office/database/migrations/.gitkeep
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_generators', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('model')->nullable();
|
||||
$table->string('location')->nullable();
|
||||
$table->string('manufacturer')->nullable();
|
||||
$table->float('capacity')->nullable();
|
||||
$table->string('serial_number')->nullable();
|
||||
$table->string('fuel_type')->nullable();
|
||||
$table->date('installation_date')->nullable();
|
||||
$table->date('last_maintenance_date')->nullable();
|
||||
$table->date('next_maintenance_due')->nullable();
|
||||
$table->date('warranty_expiry_date')->nullable();
|
||||
$table->float('fuel_tank_capacity')->nullable();
|
||||
$table->integer('status')->default(11);
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_generators');
|
||||
}
|
||||
};
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_generator_log_books', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('generator_id')->nullable();
|
||||
$table->string('log_type')->nullable();
|
||||
$table->date('from')->nullable();
|
||||
$table->date('to')->nullable();
|
||||
$table->date('servicing_date')->nullable();
|
||||
$table->decimal('fee')->nullable();
|
||||
$table->string('by')->nullable();
|
||||
$table->string('diesel_consumed')->nullable();
|
||||
$table->string('mobile_consumed')->nullable();
|
||||
$table->integer('status')->default(11);
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_generator_log_books');
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_contracts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('party')->nullable();
|
||||
$table->date('contract_date')->nullable();
|
||||
$table->date('expiry_date')->nullable();
|
||||
$table->text('document')->nullable();
|
||||
$table->integer('status')->default(11);
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_contracts');
|
||||
}
|
||||
};
|
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_deposits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('title')->nullable();
|
||||
$table->unsignedDouble('total_amount')->nullable();
|
||||
$table->text('amount_in_words')->nullable();
|
||||
$table->text('voucher')->nullable();
|
||||
$table->unsignedInteger('thousand')->nullable();
|
||||
$table->unsignedInteger('five_hundred')->nullable();
|
||||
$table->unsignedInteger('hundred')->nullable();
|
||||
$table->unsignedInteger('fifty')->nullable();
|
||||
$table->unsignedInteger('twenty')->nullable();
|
||||
$table->unsignedInteger('ten')->nullable();
|
||||
$table->unsignedInteger('five')->nullable();
|
||||
$table->unsignedInteger('two')->nullable();
|
||||
$table->unsignedInteger('one')->nullable();
|
||||
$table->date('deposited_date')->nullable();
|
||||
$table->string('account_no')->nullable();
|
||||
$table->string('party')->nullable();
|
||||
$table->string('received_by')->nullable();
|
||||
$table->string('deposited_by')->nullable();
|
||||
$table->integer('status')->default(11);
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_deposits');
|
||||
}
|
||||
};
|
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_purchase_services', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('purchase_name')->nullable();
|
||||
$table->string('party')->nullable();
|
||||
$table->string('contract_name')->nullable();
|
||||
$table->date('contract_validity')->nullable();
|
||||
$table->date('purchased_date')->nullable();
|
||||
$table->string('reference_no')->nullable();
|
||||
$table->string('vat_no')->nullable();
|
||||
$table->string('contact_no')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->float('rate')->nullable();
|
||||
$table->double('total_amount')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_purchase_services');
|
||||
}
|
||||
};
|
0
Modules/Office/database/seeders/.gitkeep
Normal file
0
Modules/Office/database/seeders/.gitkeep
Normal file
16
Modules/Office/database/seeders/OfficeDatabaseSeeder.php
Normal file
16
Modules/Office/database/seeders/OfficeDatabaseSeeder.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\database\seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class OfficeDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
}
|
||||
}
|
11
Modules/Office/module.json
Normal file
11
Modules/Office/module.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Office",
|
||||
"alias": "office",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"priority": 0,
|
||||
"providers": [
|
||||
"Modules\\Office\\Providers\\OfficeServiceProvider"
|
||||
],
|
||||
"files": []
|
||||
}
|
15
Modules/Office/package.json
Normal file
15
Modules/Office/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^1.1.2",
|
||||
"laravel-vite-plugin": "^0.7.5",
|
||||
"sass": "^1.69.5",
|
||||
"postcss": "^8.3.7",
|
||||
"vite": "^4.0.0"
|
||||
}
|
||||
}
|
0
Modules/Office/resources/assets/.gitkeep
Normal file
0
Modules/Office/resources/assets/.gitkeep
Normal file
0
Modules/Office/resources/assets/js/app.js
Normal file
0
Modules/Office/resources/assets/js/app.js
Normal file
0
Modules/Office/resources/assets/sass/app.scss
Normal file
0
Modules/Office/resources/assets/sass/app.scss
Normal file
0
Modules/Office/resources/views/.gitkeep
Normal file
0
Modules/Office/resources/views/.gitkeep
Normal file
18
Modules/Office/resources/views/contracts/create.blade.php
Normal file
18
Modules/Office/resources/views/contracts/create.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@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 -->
|
||||
{{ html()->form('POST')->route('contract.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::contracts.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
23
Modules/Office/resources/views/contracts/edit.blade.php
Normal file
23
Modules/Office/resources/views/contracts/edit.blade.php
Normal 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($contract, 'PUT')->route('contract.update', $contract->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::contracts.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
90
Modules/Office/resources/views/contracts/index.blade.php
Normal file
90
Modules/Office/resources/views/contracts/index.blade.php
Normal file
@ -0,0 +1,90 @@
|
||||
@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('contract.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Contract</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">Document</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Contract Name</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Party</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Contract Date</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Expiry Date</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 ($contractLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->document }}</td>
|
||||
<td class="tb-col">{{ $item->name }}</td>
|
||||
<td class="tb-col">{{ $item->party }}</td>
|
||||
<td class="tb-col">{{ $item->contract_date }}</td>
|
||||
|
||||
<td class="tb-col">
|
||||
|
||||
{{ $item->expiry_date }}
|
||||
@if ($item->expiry_date >= now())
|
||||
<span class="text-success small">(Valid)</span>
|
||||
@else
|
||||
<span class="text-danger small">(Expired)</span>
|
||||
@endif
|
||||
|
||||
</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('contract.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('contract.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('contract.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
|
@ -0,0 +1,72 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class='card'>
|
||||
|
||||
<div class='card-body'>
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Contract Name')->class('form-label') }}
|
||||
{{ html()->text('name')->class('form-control')->placeholder('Contract Name')->required() }}
|
||||
{{ html()->div('Please Fill Contract Name')->class('invalid-feedback') }}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Party Name')->class('form-label') }}
|
||||
{{ html()->text('party')->class('form-control')->placeholder('Party Name')->required() }}
|
||||
{{ html()->div('Please fill party name')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Contract Date')->class('form-label') }}
|
||||
{{ html()->date('contract_date')->class('form-control')->placeholder('Contract Date')->required()}}
|
||||
{{ html()->div('Please fill contract date')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Expiry Date')->class('form-label') }}
|
||||
{{ html()->date('expiry_date')->class('form-control')->placeholder('Expiry Date')->required() }}
|
||||
{{ html()->div('Please Fill expiry 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')->placeholder('Contract Description')->attributes(['rows' => 3])}}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<x-form-buttons :editable="$editable" label="Add Contract" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0">Document</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input name="document" type="file" class="dropify" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
48
Modules/Office/resources/views/contracts/show.blade.php
Normal file
48
Modules/Office/resources/views/contracts/show.blade.php
Normal 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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
18
Modules/Office/resources/views/deposits/create.blade.php
Normal file
18
Modules/Office/resources/views/deposits/create.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@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 -->
|
||||
{{ html()->form('POST')->route('deposit.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::deposits.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
23
Modules/Office/resources/views/deposits/edit.blade.php
Normal file
23
Modules/Office/resources/views/deposits/edit.blade.php
Normal 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($deposit, 'PUT')->route('deposit.update', $deposit->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::deposits.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
81
Modules/Office/resources/views/deposits/index.blade.php
Normal file
81
Modules/Office/resources/views/deposits/index.blade.php
Normal file
@ -0,0 +1,81 @@
|
||||
@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('deposit.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Deposit</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">Voucher</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Deposit Title</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Party</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Amount</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Deposit Date</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Deposit By</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 ($depositLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->voucher }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">{{ $item->party }}</td>
|
||||
<td class="tb-col">{{ $item->total_amount }}</td>
|
||||
<td class="tb-col">{{ $item->deposited_date }}</td>
|
||||
<td class="tb-col">{{ $item->deposited_by }}</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('deposit.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('deposit.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('deposit.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
|
@ -0,0 +1,257 @@
|
||||
<div class="row gy-2">
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class='card'>
|
||||
|
||||
<div class='card-body'>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="row gy-3">
|
||||
<div class="col-lg-8 col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Title')->required()}}
|
||||
{{ html()->div('Please Fill Title')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Deposit Date')->class('form-label') }}
|
||||
{{ html()->date('deposited_date')->class('form-control')->placeholder('Deposit Date')->required() }}
|
||||
{{ html()->div('Please Fill deposited date')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Account Number')->class('form-label') }}
|
||||
{{ html()->text('account_no')->class('form-control')->placeholder('Account Number')->required() }}
|
||||
{{ html()->div('Please Fill Account Number')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Amount')->class('form-label') }}
|
||||
{{ html()->number('total_amount')->class('form-control')->placeholder('Total Amount in Rs')->required() }}
|
||||
{{ html()->div('Please Fill total amount')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Amount in Words')->class('form-label') }}
|
||||
{{ html()->text('amount_in_words')->class('form-control')->placeholder('Amount in words')->required() }}
|
||||
{{ html()->div('Please fill amount in words')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Deposited By')->class('form-label') }}
|
||||
{{ html()->text('deposited_by')->class('form-control')->placeholder('Deposited By')->required()}}
|
||||
{{ html()->div('Please fill deposited by')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Party Name')->class('form-label') }}
|
||||
{{ html()->text('party')->class('form-control')->placeholder('Party Name')->required() }}
|
||||
{{ html()->div('Please fill party name')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Received By (In any)')->class('form-label') }}
|
||||
{{ html()->text('received_by')->class('form-control')->placeholder('Check/Cash Received By')->required() }}
|
||||
{{ html()->div('Please fill received by')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->placeholder('Purpose of Deposit')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<table class="table table-bordered rounded-2">
|
||||
<thead>
|
||||
<tr class="table-dark text-white text-center">
|
||||
<th colspan="2">Cash Deposit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1000 x</td>
|
||||
<td width=60% >
|
||||
{{html()->number('thousand')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('five_hundred')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>100 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('hundred')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>50 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('fifty')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>20 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('twenty')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>10 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('ten')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('five')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('two')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('one')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
{{-- <div class="card">
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr class="table-dark text-white text-center">
|
||||
<th colspan="2">Cash Deposit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1000 x</td>
|
||||
<td width=60% >
|
||||
{{html()->number('thousand')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('five_hundred')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>100 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('hundred')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>50 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('fifty')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>20 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('twenty')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>10 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('ten')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('five')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('two')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>1 x</td>
|
||||
<td width=60%>
|
||||
{{html()->number('one')->class('form-control form-control-sm')}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0">Document</h6>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input name="voucher" type="file" class="dropify" />
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<x-form-buttons :editable="$editable" label="Add Deposit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
48
Modules/Office/resources/views/deposits/show.blade.php
Normal file
48
Modules/Office/resources/views/deposits/show.blade.php
Normal 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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -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('generatorLogBook.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::generatorlogbooks.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -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($generatorLogBook, 'PUT')->route('generatorLogBook.update', $generatorLogBook->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::generatorlogbooks.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,73 @@
|
||||
@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('generatorLogBook.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create GeneratorLogBook</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">Generator</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Log Type</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 ($generatorLogBookLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->name }}</td>
|
||||
<td class="tb-col">{{ $item->log_type }}</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('generatorLogBook.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('generatorLogBook.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('generatorLogBook.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
|
@ -0,0 +1,56 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Generator')->class('form-label') }}
|
||||
{{ html()->select('generator_id', $generatorLists)->class('form-select')->placeholder('Generator Name') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Log Type')->class('form-label') }}
|
||||
{{ html()->select('log_type', \Modules\Office\Models\GeneratorLogBook::LOG_TYPE)->class('form-select')->placeholder('Log Type') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('From')->class('form-label') }}
|
||||
{{ html()->date('from')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('To')->class('form-label') }}
|
||||
{{ html()->date('to')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Diesel Consumed')->class('form-label') }}
|
||||
{{ html()->text('diesel_consumed')->class('form-control')->placeholder('Total Diesel Consumed') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Mobile Consumed')->class('form-label') }}
|
||||
{{ html()->text('mobile_consumed')->class('form-control')->placeholder('Total Mobile Consumed') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Servicing Date')->class('form-label') }}
|
||||
{{ html()->date('servicing_date')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('By')->class('form-label') }}
|
||||
{{ html()->text('by')->class('form-control')->placeholder('Full Name') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Fee Charged')->class('form-label') }}
|
||||
{{ html()->number('fee')->class('form-control')->placeholder('Fee Charged') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add LogBook', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
23
Modules/Office/resources/views/generators/create.blade.php
Normal file
23
Modules/Office/resources/views/generators/create.blade.php
Normal 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
|
23
Modules/Office/resources/views/generators/edit.blade.php
Normal file
23
Modules/Office/resources/views/generators/edit.blade.php
Normal 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
|
88
Modules/Office/resources/views/generators/index.blade.php
Normal file
88
Modules/Office/resources/views/generators/index.blade.php
Normal 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
|
@ -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
|
48
Modules/Office/resources/views/generators/show.blade.php
Normal file
48
Modules/Office/resources/views/generators/show.blade.php
Normal 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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
7
Modules/Office/resources/views/index.blade.php
Normal file
7
Modules/Office/resources/views/index.blade.php
Normal file
@ -0,0 +1,7 @@
|
||||
@extends('office::layouts.master')
|
||||
|
||||
@section('content')
|
||||
<h1>Hello World</h1>
|
||||
|
||||
<p>Module: {!! config('office.name') !!}</p>
|
||||
@endsection
|
29
Modules/Office/resources/views/layouts/master.blade.php
Normal file
29
Modules/Office/resources/views/layouts/master.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<title>Office Module - {{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<meta name="description" content="{{ $description ?? '' }}">
|
||||
<meta name="keywords" content="{{ $keywords ?? '' }}">
|
||||
<meta name="author" content="{{ $author ?? '' }}">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
{{-- Vite CSS --}}
|
||||
{{-- {{ module_vite('build-office', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-office', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
@ -0,0 +1,18 @@
|
||||
@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 -->
|
||||
{{ html()->form('POST')->route('purchaseService.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::purchaseservices.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
@ -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($purchaseService, 'PUT')->route('purchaseService.update', $purchaseService->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('office::purchaseservices.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,89 @@
|
||||
@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('purchaseService.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create PurchaseService</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">Service</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Party</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Purchased Date</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Contract Name</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Contract Validity</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 ($purchaseServiceLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->name }}</td>
|
||||
<td class="tb-col">{{ $item->party }}</td>
|
||||
<td class="tb-col">{{ $item->purchased_date }}</td>
|
||||
<td class="tb-col">{{ $item->contract_name }}</td>
|
||||
<td class="tb-col">
|
||||
{{ $item->contract_validity }}
|
||||
@if ($item->contract_validity >= now())
|
||||
<span class="text-success small">(Valid)</span>
|
||||
@else
|
||||
<span class="text-danger small">(Expired)</span>
|
||||
@endif
|
||||
</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('purchaseService.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('purchaseService.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('purchaseService.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
|
@ -0,0 +1,99 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class='card'>
|
||||
|
||||
<div class='card-body'>
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Service Name')->class('form-label') }}
|
||||
{{ html()->text('purchase_name')->class('form-control')->placeholder('Service Name') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Purchased Date')->class('form-label') }}
|
||||
{{ html()->date('purchased_date')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Reference Number')->class('form-label') }}
|
||||
{{ html()->text('reference_no')->class('form-control')->placeholder('Reference Number') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('VAT Number')->class('form-label') }}
|
||||
{{ html()->text('vat_no')->class('form-control')->placeholder('VAT Number') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Contract Name')->class('form-label') }}
|
||||
{{ html()->text('contract_name')->class('form-control')->placeholder('Contract Name') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Contract Validity')->class('form-label') }}
|
||||
{{ html()->date('contract_validity')->class('form-control')->placeholder('Contract Validity') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Party Name')->class('form-label') }}
|
||||
{{ html()->text('party')->class('form-control')->placeholder('Party Name') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Contact Number')->class('form-label') }}
|
||||
{{ html()->text('contact_no')->class('form-control')->placeholder('Contact Number') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Address')->class('form-label') }}
|
||||
{{ html()->text('address')->class('form-control')->placeholder('Address') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Quantity')->class('form-label') }}
|
||||
{{ html()->number('quantity')->class('form-control')->placeholder('Quantity') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Rate')->class('form-label') }}
|
||||
{{ html()->number('rate')->class('form-control')->placeholder('Rate') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Total Amount')->class('form-label') }}
|
||||
{{ html()->number('total_amount')->class('form-control')->placeholder('Total Amount in Rs') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->placeholder('Contract Description')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0">Document</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input name="document" type="file" class="dropify" disabled />
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<x-form-buttons :editable="$editable" label="Add" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
0
Modules/Office/routes/.gitkeep
Normal file
0
Modules/Office/routes/.gitkeep
Normal file
19
Modules/Office/routes/api.php
Normal file
19
Modules/Office/routes/api.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Office\Http\Controllers\OfficeController;
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------------------
|
||||
* API Routes
|
||||
*--------------------------------------------------------------------------
|
||||
*
|
||||
* Here is where you can register API routes for your application. These
|
||||
* routes are loaded by the RouteServiceProvider within a group which
|
||||
* is assigned the "api" middleware group. Enjoy building your API!
|
||||
*
|
||||
*/
|
||||
|
||||
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
|
||||
Route::apiResource('office', OfficeController::class)->names('office');
|
||||
});
|
29
Modules/Office/routes/web.php
Normal file
29
Modules/Office/routes/web.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Office\Http\Controllers\ContractController;
|
||||
use Modules\Office\Http\Controllers\DepositController;
|
||||
use Modules\Office\Http\Controllers\GeneratorController;
|
||||
use Modules\Office\Http\Controllers\GeneratorLogBookController;
|
||||
use Modules\Office\Http\Controllers\OfficeController;
|
||||
use Modules\Office\Http\Controllers\PurchaseServiceController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::group([], function () {
|
||||
Route::resource('office', OfficeController::class)->names('office');
|
||||
Route::resource('generator', GeneratorController::class)->names('generator');
|
||||
Route::resource('contract', ContractController::class)->names('contract');
|
||||
Route::resource('deposit', DepositController::class)->names('deposit');
|
||||
Route::resource('generator-log-book', GeneratorLogBookController::class)->names('generatorLogBook');
|
||||
Route::resource('purchase-service', PurchaseServiceController::class)->names('purchaseService');
|
||||
});
|
26
Modules/Office/vite.config.js
Normal file
26
Modules/Office/vite.config.js
Normal file
@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: '../../public/build-office',
|
||||
emptyOutDir: true,
|
||||
manifest: true,
|
||||
},
|
||||
plugins: [
|
||||
laravel({
|
||||
publicDirectory: '../../public',
|
||||
buildDirectory: 'build-office',
|
||||
input: [
|
||||
__dirname + '/resources/assets/sass/app.scss',
|
||||
__dirname + '/resources/assets/js/app.js'
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
//export const paths = [
|
||||
// 'Modules/Office/resources/assets/sass/app.scss',
|
||||
// 'Modules/Office/resources/assets/js/app.js',
|
||||
//];
|
Reference in New Issue
Block a user