added company company type into admin module

This commit is contained in:
Dharmaraj Shrestha 2024-04-15 13:47:40 +05:45
parent 158765a250
commit e9c62209d4
61 changed files with 2177 additions and 57 deletions

View File

@ -0,0 +1,114 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\Repositories\CompanyRepository;
use Modules\Admin\Services\AdminService;
class CompanyController extends Controller
{
private $companyRepository;
private $adminService;
public function __construct(CompanyRepository $companyRepository, AdminService $adminService)
{
$this->companyRepository = $companyRepository;
$this->adminService = $adminService;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Company Lists';
$data['companyLists'] = $this->companyRepository->findAll();
return view('admin::companies.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Companys';
$data['editable'] = false;
$data['companyTypeLists'] = $this->adminService->pluckCompanyTypes();
return view('admin::companies.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
try {
$this->companyRepository->create($request->all());
toastr()->success('Company Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('company.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::companies.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
try {
$data['title'] = 'Edit Company';
$data['editable'] = true;
$data['companyTypeLists'] = $this->adminService->pluckCompanyTypes();
$data['company'] = $this->companyRepository->getCompanyById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('admin::companies.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
try {
$this->companyRepository->update($id, $request->all());
toastr()->success('Company Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('company.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
try {
$this->companyRepository->delete($id);
toastr()->success('Company Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('company.index');
}
}

View File

@ -0,0 +1,109 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\Repositories\CompanyTypeRepository;
class CompanyTypeController extends Controller
{
private $companyTypeRepository;
public function __construct(CompanyTypeRepository $companyTypeRepository)
{
$this->companyTypeRepository = $companyTypeRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Company Type Lists';
$data['companyTypeLists'] = $this->companyTypeRepository->findAll();
return view('admin::companytypes.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Company Type';
$data['editable'] = false;
return view('admin::companytypes.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
try {
$this->companyTypeRepository->create($request->all());
toastr()->success('Company Type Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('companyType.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::companytypes.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
try {
$data['title'] = 'Edit Company Type';
$data['editable'] = true;
$data['companyType'] = $this->companyTypeRepository->getCompanyById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('admin::companytypes.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
try {
$this->companyTypeRepository->update($id, $request->all());
toastr()->success('Company Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('company.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
try {
$this->companyTypeRepository->delete($id);
toastr()->success('Company Type Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('companyType.index');
}
}

View File

@ -0,0 +1,109 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\Repositories\ComplaintRepository;
class ComplaintController extends Controller
{
private $complaintRepository;
public function __construct(ComplaintRepository $complaintRepository)
{
$this->complaintRepository = $complaintRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Complaint Lists';
$data['complaintLists'] = $this->complaintRepository->findAll();
return view('admin::complaints.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Complaints';
$data['editable'] = false;
return view('admin::complaints.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
try {
$this->complaintRepository->create($request->all());
toastr()->success('Complaint Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('complaint.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::complaints.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
try {
$data['title'] = 'Edit Complaints';
$data['editable'] = true;
$data['complaint'] = $this->complaintRepository->getComplaintById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('admin::complaints.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
try {
$this->complaintRepository->update($id, $request->all());
toastr()->success('Complaint Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('complaint.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
try {
$this->complaintRepository->delete($id);
toastr()->success('Complaint Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('complaint.index');
}
}

View File

@ -0,0 +1,109 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\Repositories\TransferRepository;
class TransferController extends Controller
{
private $transferRepository;
public function __construct(TransferRepository $transferRepository)
{
$this->transferRepository = $transferRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Transfer Lists';
$data['transferLists'] = $this->transferRepository->findAll();
return view('admin::transfers.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Transfers';
$data['editable'] = false;
return view('admin::transfers.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
try {
$this->transferRepository->create($request->all());
toastr()->success('Transfer Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('transfer.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::transfers.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
try {
$data['title'] = 'Edit Transfers';
$data['editable'] = true;
$data['transfer'] = $this->transferRepository->getTransferById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('admin::transfers.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
try {
$this->transferRepository->update($id, $request->all());
toastr()->success('Transfer Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('transfer.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
try {
$this->transferRepository->delete($id);
toastr()->success('Transfer Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('transfer.index');
}
}

View File

@ -0,0 +1,109 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\Repositories\WarningRepository;
class WarningController extends Controller
{
private $warningRepository;
public function __construct(WarningRepository $warningRepository)
{
$this->warningRepository = $warningRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Warning Lists';
$data['warningLists'] = $this->warningRepository->findAll();
return view('admin::warnings.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Warnings';
$data['editable'] = false;
return view('admin::warnings.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
try {
$this->warningRepository->create($request->all());
toastr()->success('Warning Created Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('warning.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::warnings.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
try {
$data['title'] = 'Edit Warnings';
$data['editable'] = true;
$data['warning'] = $this->warningRepository->getWarningById($id);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return view('admin::warnings.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
try {
$this->warningRepository->update($id, $request->all());
toastr()->success('Warning Updated Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('warning.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
try {
$this->warningRepository->delete($id);
toastr()->success('Warning Deleted Successfully');
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return redirect()->route('warning.index');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\CompanyFactory;
class Company extends Model
{
use HasFactory;
protected $table = 'tbl_companies';
protected $primaryKey = 'company_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'alias',
'company_type_id',
'status',
'description',
'remarks',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,28 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\CompanyTypeFactory;
class CompanyType extends Model
{
use HasFactory;
protected $table = 'tbl_company_types';
protected $primaryKey = 'company_type_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'alias',
'status',
'description',
'remarks',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,31 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\ComplaintFactory;
class Complaint extends Model
{
use HasFactory;
protected $table = 'tbl_complaints';
protected $primaryKey = 'complaint_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'complaint_id',
'employee_id',
'complaint_date',
'complaint_by',
'description',
'remarks',
'status',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,29 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\TransferFactory;
class Transfer extends Model
{
use HasFactory;
protected $table = 'tbl_transfers';
protected $primaryKey = 'transfer_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'old_department_id',
'new_department_id',
'status',
'transfer_date',
'description',
'remarks',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,28 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\WarningFactory;
class Warning extends Model
{
use HasFactory;
protected $table = 'tbl_warnings';
protected $primaryKey = 'warning_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'subject',
'warning_date',
'description',
'remarks',
'status',
'createdBy',
'updatedBy',
];
}

View File

@ -7,6 +7,6 @@ interface AppreciationInterface
public function findAll();
public function getAppreciationById($appreciationId);
public function delete($appreciationId);
public function create(array $AppreciationDetails);
public function create(array $appreciationDetails);
public function update($appreciationId, array $newDetails);
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface CompanyInterface
{
public function findAll();
public function getCompanyById($companyId);
public function delete($companyId);
public function create(array $companyDetails);
public function update($companyId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Company;
class CompanyRepository implements CompanyInterface
{
public function findAll()
{
return Company::get();
}
public function getCompanyById($companyId)
{
return Company::findOrFail($companyId);
}
public function delete($companyId)
{
Company::destroy($companyId);
}
public function create(array $companyDetails)
{
return Company::create($companyDetails);
}
public function update($companyId, array $newDetails)
{
return Company::where('company_id', $companyId)->update($newDetails);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface CompanyTypeInterface
{
public function findAll();
public function getCompanyTypeById($companyTypeId);
public function delete($companyTypeId);
public function create(array $companyTypeDetails);
public function update($companyTypeId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\CompanyType;
class CompanyTypeRepository implements CompanyTypeInterface
{
public function findAll()
{
return CompanyType::get();
}
public function getCompanyTypeById($companyTypeId)
{
return CompanyType::findOrFail($companyTypeId);
}
public function delete($companyTypeId)
{
CompanyType::destroy($companyTypeId);
}
public function create(array $companyTypeDetails)
{
return CompanyType::create($companyTypeDetails);
}
public function update($companyTypeId, array $newDetails)
{
return CompanyType::where('companyType_id', $companyTypeId)->update($newDetails);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface ComplaintInterface
{
public function findAll();
public function getComplaintById($complaintId);
public function delete($complaintId);
public function create(array $complaintDetails);
public function update($complaintId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Complaint;
class ComplaintRepository implements ComplaintInterface
{
public function findAll()
{
return Complaint::get();
}
public function getComplaintById($complaintId)
{
return Complaint::findOrFail($complaintId);
}
public function delete($complaintId)
{
Complaint::destroy($complaintId);
}
public function create(array $complaintDetails)
{
return Complaint::create($complaintDetails);
}
public function update($complaintId, array $newDetails)
{
return Complaint::where('complaint_id', $complaintId)->update($newDetails);
}
}

View File

@ -7,6 +7,6 @@ interface PromotionDemotionInterface
public function findAll();
public function getPromotionDemotionById($promotionDemotionId);
public function delete($promotionDemotionId);
public function create(array $PromotionDemotionDetails);
public function create(array $promotionDemotionDetails);
public function update($promotionDemotionId, array $newDetails);
}

View File

@ -7,6 +7,6 @@ interface ResignationInterface
public function findAll();
public function getResignationById($resignationId);
public function delete($resignationId);
public function create(array $ResignationDetails);
public function create(array $resignationDetails);
public function update($resignationId, array $newDetails);
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface TransferInterface
{
public function findAll();
public function getTransferById($transferId);
public function delete($transferId);
public function create(array $transferDetails);
public function update($transferId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Transfer;
class TransferRepository implements TransferInterface
{
public function findAll()
{
return Transfer::get();
}
public function getTransferById($transferId)
{
return Transfer::findOrFail($transferId);
}
public function delete($transferId)
{
Transfer::destroy($transferId);
}
public function create(array $transferDetails)
{
return Transfer::create($transferDetails);
}
public function update($transferId, array $newDetails)
{
return Transfer::where('transfer_id', $transferId)->update($newDetails);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface WarningInterface
{
public function findAll();
public function getWarningById($warningId);
public function delete($warningId);
public function create(array $warningDetails);
public function update($warningId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Warning;
class WarningRepository implements WarningInterface
{
public function findAll()
{
return Warning::get();
}
public function getWarningById($warningId)
{
return Warning::findOrFail($warningId);
}
public function delete($warningId)
{
Warning::destroy($warningId);
}
public function create(array $warningDetails)
{
return Warning::create($warningDetails);
}
public function update($warningId, array $newDetails)
{
return Warning::where('warning_id', $warningId)->update($newDetails);
}
}

View File

@ -3,6 +3,7 @@ namespace Modules\Admin\Services;
use Modules\Admin\Models\Castes;
use Modules\Admin\Models\Cities;
use Modules\Admin\Models\CompanyType;
use Modules\Admin\Models\Country;
use Modules\Admin\Models\Departments;
use Modules\Admin\Models\Designations;
@ -18,6 +19,11 @@ final class AdminService
return Country::pluck('title', 'country_id');
}
function pluckCompanyTypes()
{
return CompanyType::pluck('title', 'company_type_id');
}
function pluckProvinces()
{
return Province::pluck('title', 'province_id');

View File

@ -18,8 +18,8 @@ return new class extends Migration {
$table->unsignedBigInteger('old_designation_id')->nullable();
$table->unsignedBigInteger('new_designation_id')->nullable();
$table->unsignedBigInteger('type')->nullable();
$table->unsignedBigInteger('status')->nullable();
$table->date('date')->nullable();
$table->integer('status')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->unsignedBigInteger('createdBy')->nullable();

View File

@ -18,7 +18,7 @@ return new class extends Migration {
$table->unsignedBigInteger('employee_id')->nullable();
$table->unsignedBigInteger('appreciated_by')->nullable();
$table->date('appreciated_date')->nullable();
$table->unsignedBigInteger('status')->nullable();
$table->integer('status')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->unsignedBigInteger('createdBy')->nullable();

View File

@ -18,7 +18,7 @@ return new class extends Migration {
$table->unsignedBigInteger('approved_by')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->unsignedBigInteger('status')->nullable();
$table->integer('status')->nullable();
$table->unsignedBigInteger('createdBy')->nullable();
$table->unsignedBigInteger('updatedBy')->nullable();
$table->timestamps();

View File

@ -0,0 +1,34 @@
<?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_complaints', function (Blueprint $table) {
$table->tinyInteger('complaint_id')->unsigned()->autoIncrement();
$table->unsignedBigInteger('employee_id')->nullable();
$table->date('complaint_date')->nullable();
$table->unsignedBigInteger('complaint_by')->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_complaints');
}
};

View File

@ -0,0 +1,35 @@
<?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_transfers', function (Blueprint $table) {
$table->tinyInteger('transfer_id')->unsigned()->autoIncrement();
$table->unsignedBigInteger('employee_id')->nullable();
$table->unsignedBigInteger('old_department_id')->nullable();
$table->unsignedBigInteger('new_department_id')->nullable();
$table->integer('status')->nullable();
$table->date('transfer_date')->nullable();
$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_transfers');
}
};

View File

@ -0,0 +1,35 @@
<?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_warnings', function (Blueprint $table) {
$table->tinyInteger('warning_id')->unsigned()->autoIncrement();
$table->unsignedBigInteger('employee_id')->nullable();
$table->mediumText('subject')->nullable();
$table->string('type')->nullable();
$table->date('warning_date')->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_warnings');
}
};

View File

@ -0,0 +1,34 @@
<?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_companies', function (Blueprint $table) {
$table->tinyInteger('company_id')->unsigned()->autoIncrement();
$table->string('title')->nullable();
$table->string('alias')->nullable();
$table->unsignedBigInteger('company_type_id')->nullable();
$table->integer('status')->nullable();
$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_companies');
}
};

View File

@ -0,0 +1,34 @@
<?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_company_types', function (Blueprint $table) {
$table->tinyInteger('company_type_id')->unsigned()->autoIncrement();
$table->string('title')->nullable();
$table->string('alias')->nullable();
$table->integer('status')->nullable();
$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_company_types');
}
};

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('company.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.companies.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($company, 'PUT')->route('company.update', $company->company_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.companies.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,69 @@
@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('company.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Company</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" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($companyLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->title }}</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('company.show', [$item->company_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('company.edit', [$item->company_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('company.destroy', [$item->company_id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,48 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
<div class="flex-shrink-0">
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
</div>
</div>
<div class='card-body'>
<p><b>Title :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->title }}</span></p>
<p><b>Alias :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->alias }}</span></p>
<p><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
</p>
<p><b>Remarks :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->remarks }}</span></p>
<p><b>Display Order :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->display_order }}</span></p>
<p><b>Createdby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->createdby }}</span></p>
<p><b>Updatedby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->updatedby }}</span></p>
<p><b>Job Description :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->job_description }}</span></p>
<p><b>Departments Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->departments_id }}</span></p>
<div class="d-flex justify-content-between">
<div>
<p><b>Created On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->created_at }}</span></p>
<p><b>Created By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->createdBy }}</span></p>
</div>
<div>
<p><b>Updated On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updated_at }}</span></p>
<p><b>Updated By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updatedBy }}</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
@endSection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('companyType.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.companytypes.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($companyType, 'PUT')->route('companyType.update', $companytype->company_type_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.companytypes.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,69 @@
@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('companyType.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Company Type</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" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($companyTypeLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->title }}</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('companyType.show', [$item->company_type_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('companyType.edit', [$item->company_type_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('companyType.destroy', [$item->company_type_id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,48 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
<div class="flex-shrink-0">
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
</div>
</div>
<div class='card-body'>
<p><b>Title :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->title }}</span></p>
<p><b>Alias :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->alias }}</span></p>
<p><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
</p>
<p><b>Remarks :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->remarks }}</span></p>
<p><b>Display Order :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->display_order }}</span></p>
<p><b>Createdby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->createdby }}</span></p>
<p><b>Updatedby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->updatedby }}</span></p>
<p><b>Job Description :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->job_description }}</span></p>
<p><b>Departments Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->departments_id }}</span></p>
<div class="d-flex justify-content-between">
<div>
<p><b>Created On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->created_at }}</span></p>
<p><b>Created By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->createdBy }}</span></p>
</div>
<div>
<p><b>Updated On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updated_at }}</span></p>
<p><b>Updated By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updatedBy }}</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
@endSection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('complaint.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.complaints.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($complaint, 'PUT')->route('complaint.update', $complaint->complaint_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.complaints.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -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('complaint.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Complaint</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">Complaint Against</span></th>
<th class="tb-col"><span class="overline-title">complaint By</span></th>
<th class="tb-col"><span class="overline-title">complaint Date</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($complaintLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->employee_id }}</td>
<td class="tb-col">{{ $item->complaint_by }}</td>
<td class="tb-col">{{ $item->complaint_date }}</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('complaint.show', [$item->complaint_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('complaint.edit', [$item->complaint_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('complaint.destroy', [$item->complaint_id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

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

View File

@ -0,0 +1,26 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Title')->class('form-label') }}
{{ html()->text('title')->class('form-control')->placeholder('Enter Title') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Company Type')->class('form-label') }}
{{ html()->select('company_type_id', $companyTypeLists)->class('form-select')->placeholder('Select Company Type') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 5]) }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Remarks')->class('form-label') }}
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 5]) }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Company', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Title')->class('form-label') }}
{{ html()->text('title')->class('form-control')->placeholder('Enter Title') }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Company Type', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,33 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Complaint Against')->class('form-label') }}
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Complaint By')->class('form-label') }}
{{ html()->select('complaint_by')->class('form-select')->placeholder('Select Who Complaint') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Complaint Date')->class('form-label') }}
{{ html()->date('complaint_date')->class('form-control')->placeholder('Select Date') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 5]) }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Remarks')->class('form-label') }}
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 5]) }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Complaint', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,37 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Employee')->class('form-label') }}
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Department From')->class('form-label') }}
{{ html()->select('old_department_id')->class('form-select')->placeholder('Select Previous Department') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Department To')->class('form-label') }}
{{ html()->select('new_department_id')->class('form-select')->placeholder('Select New Department') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Transfer Date')->class('form-label') }}
{{ html()->date('transfer_date')->class('form-control')->placeholder('Select Transfer Date') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->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 class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Transfer', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,36 @@
<div class="row gy-3">
<div class="col-lg-4 col-md-6">
{{ html()->label('Employee')->class('form-label') }}
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Warning type')->class('form-label') }}
{{ html()->select('type')->class('form-control')->placeholder('Select Warning Type') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Warning Date')->class('form-label') }}
{{ html()->date('warning_date')->class('form-control')->placeholder('Select Warning Date') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Subject')->class('form-label') }}
{{ html()->text('subject')->class('form-control')->placeholder('Write Warning Suject') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->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 class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Warning', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('transfer.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.transfers.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($transfer, 'PUT')->route('transfer.update', $transfer->transfer_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.transfers.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,75 @@
@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('transfer.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Transfer</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">Employee</span></th>
<th class="tb-col"><span class="overline-title">Department From</span></th>
<th class="tb-col"><span class="overline-title">Department To</span></th>
<th class="tb-col"><span class="overline-title">Transfer Date</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($transferLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->employee_id }}</td>
<td class="tb-col">{{ $item->old_department_id }}</td>
<td class="tb-col">{{ $item->new_department_id }}</td>
<td class="tb-col">{{ $item->transfer_date }}</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('transfer.show', [$item->transfer_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('transfer.edit', [$item->transfer_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('transfer.destroy', [$item->transfer_id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,48 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
<div class="flex-shrink-0">
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
</div>
</div>
<div class='card-body'>
<p><b>Title :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->title }}</span></p>
<p><b>Alias :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->alias }}</span></p>
<p><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
</p>
<p><b>Remarks :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->remarks }}</span></p>
<p><b>Display Order :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->display_order }}</span></p>
<p><b>Createdby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->createdby }}</span></p>
<p><b>Updatedby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->updatedby }}</span></p>
<p><b>Job Description :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->job_description }}</span></p>
<p><b>Departments Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->departments_id }}</span></p>
<div class="d-flex justify-content-between">
<div>
<p><b>Created On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->created_at }}</span></p>
<p><b>Created By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->createdBy }}</span></p>
</div>
<div>
<p><b>Updated On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updated_at }}</span></p>
<p><b>Updated By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updatedBy }}</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
@endSection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->form('POST')->route('warning.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.warnings.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,23 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class='card-body'>
{{ html()->modelForm($warning, 'PUT')->route('warning.update', $warning->warning_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.warnings.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,75 @@
@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('warning.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Warning</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">Employee</span></th>
<th class="tb-col"><span class="overline-title">Warning Type</span></th>
<th class="tb-col"><span class="overline-title">Subject</span></th>
<th class="tb-col"><span class="overline-title">Warning Date</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($warningLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->employee_id }}</td>
<td class="tb-col">{{ $item->type }}</td>
<td class="tb-col">{{ $item->subject }}</td>
<td class="tb-col">{{ $item->warning_date }}</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('warning.show', [$item->warning_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('warning.edit', [$item->warning_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('warning.destroy', [$item->warning_id]) }}"
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,48 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class='card'>
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
<div class="flex-shrink-0">
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
</div>
</div>
<div class='card-body'>
<p><b>Title :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->title }}</span></p>
<p><b>Alias :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->alias }}</span></p>
<p><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
</p>
<p><b>Remarks :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->remarks }}</span></p>
<p><b>Display Order :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->display_order }}</span></p>
<p><b>Createdby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->createdby }}</span></p>
<p><b>Updatedby :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->updatedby }}</span></p>
<p><b>Job Description :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->job_description }}</span></p>
<p><b>Departments Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->departments_id }}</span></p>
<div class="d-flex justify-content-between">
<div>
<p><b>Created On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->created_at }}</span></p>
<p><b>Created By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->createdBy }}</span></p>
</div>
<div>
<p><b>Updated On :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updated_at }}</span></p>
<p><b>Updated By :</b>&nbsp;&nbsp;&nbsp;<span>{{ $data->updatedBy }}</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
@endSection

View File

@ -3,8 +3,13 @@
use Illuminate\Support\Facades\Route;
use Modules\Admin\Http\Controllers\AdminController;
use Modules\Admin\Http\Controllers\AppreciationController;
use Modules\Admin\Http\Controllers\CompanyController;
use Modules\Admin\Http\Controllers\CompanyTypeController;
use Modules\Admin\Http\Controllers\ComplaintController;
use Modules\Admin\Http\Controllers\PromotionDemotionController;
use Modules\Admin\Http\Controllers\ResignationController;
use Modules\Admin\Http\Controllers\TransferController;
use Modules\Admin\Http\Controllers\WarningController;
/*
|--------------------------------------------------------------------------
@ -22,6 +27,11 @@ Route::group([], function () {
Route::resource('promotion-demotion', PromotionDemotionController::class)->names('promotionDemotion');
Route::resource('appreciation', AppreciationController::class)->names('appreciation');
Route::resource('resignation', ResignationController::class)->names('resignation');
Route::resource('complaint', ComplaintController::class)->names('complaint');
Route::resource('transfer', TransferController::class)->names('transfer');
Route::resource('warning', WarningController::class)->names('warning');
Route::resource('company', CompanyController::class)->names('company');
Route::resource('company-type', CompanyTypeController::class)->names('companyType');
});
require __DIR__ . '/route.countries.php';

View File

@ -411,37 +411,37 @@ class OMIS
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
DB::statement("CREATE TABLE IF NOT EXISTS `tbl_companytypes` (
`companytype_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` VARCHAR(255),
`alias` VARCHAR(255),
`description` TEXT,
`display_order` INT(11),
`status` INT(11),
`remarks` TEXT,
`created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
`createdby` INT(11),
`updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedby` INT(11)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
DB::statement("CREATE TABLE IF NOT EXISTS `tbl_companies` (
`company_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` VARCHAR(255),
`alias` VARCHAR(255),
`description` TEXT,
`address` TEXT,
`cities_id` INT(11),
`companytypes_id` INT(11),
`display_order` INT(11),
`status` INT(11),
`remarks` TEXT,
`created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
`createdby` INT(11),
`updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updatedby` INT(11)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
// DB::statement("CREATE TABLE IF NOT EXISTS `tbl_companytypes` (
// `companytype_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
// `title` VARCHAR(255),
// `alias` VARCHAR(255),
// `description` TEXT,
// `display_order` INT(11),
// `status` INT(11),
// `remarks` TEXT,
// `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
// `createdby` INT(11),
// `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
// `updatedby` INT(11)
// ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
// ");
// DB::statement("CREATE TABLE IF NOT EXISTS `tbl_companies` (
// `company_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
// `title` VARCHAR(255),
// `alias` VARCHAR(255),
// `description` TEXT,
// `address` TEXT,
// `cities_id` INT(11),
// `companytypes_id` INT(11),
// `display_order` INT(11),
// `status` INT(11),
// `remarks` TEXT,
// `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP,
// `createdby` INT(11),
// `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
// `updatedby` INT(11)
// ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
// ");
DB::statement("CREATE TABLE IF NOT EXISTS `tbl_branches` (
`branch_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`companies_id` INT(11) NULL,

View File

@ -106,9 +106,9 @@
<!-- JAVASCRIPT -->
<script src="{{ asset('assets/libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('assets/libs/jquery/jquery.min.js') }}"></script>
{{-- <script src="{{ asset('assets/libs/simplebar/simplebar.min.js') }}"></script> --}}
{{-- <script src="{{ asset('assets/libs/node-waves/waves.min.js') }}"></script> --}}
{{-- <script src="{{ asset('assets/libs/feather-icons/feather.min.js') }}"></script> --}}
<script src="{{ asset('assets/libs/simplebar/simplebar.min.js') }}"></script>
<script src="{{ asset('assets/libs/node-waves/waves.min.js') }}"></script>
<script src="{{ asset('assets/libs/feather-icons/feather.min.js') }}"></script>
{{-- <script src="{{ asset('assets/js/pages/plugins/lord-icon-2.1.0.js') }}"></script> --}}
{{-- <script src="{{ asset('assets/js/plugins.js') }}"></script> --}}
<script src="{{ asset('assets/libs/@ckeditor/ckeditor5-build-classic/build/ckeditor.js') }}"></script>

View File

@ -43,12 +43,12 @@
<ul class="nav nav-sm flex-column">
<li class="nav-item">
<a href="{{ route('companytypes.index') }}"
class="nav-link @if (\Request::is('companytype') || \Request::is('companytype/*')) active @endif">Company Type</a>
<a href="{{ route('companyType.index') }}"
class="nav-link @if (\Request::is('company-type') || \Request::is('company-type/*')) active @endif">Company Type</a>
</li>
<li class="nav-item">
<a href="{{ route('companies.index') }}"
<a href="{{ route('company.index') }}"
class="nav-link @if (\Request::is('company') || \Request::is('company/*')) active @endif">Company</a>
</li>
@ -141,20 +141,6 @@
class="nav-link @if (\Request::is('role') || \Request::is('role/*')) active @endif">Roles</a>
</li>
<li class="nav-item">
<a href="{{ route('promotionDemotion.index') }}"
class="nav-link @if (\Request::is('promotion-demotion') || \Request::is('promotion-demotion/*')) active @endif">Promotion/ Demotions</a>
</li>
<li class="nav-item">
<a href="{{ route('appreciation.index') }}"
class="nav-link @if (\Request::is('appreciation') || \Request::is('appreciation/*')) active @endif">Appreciations</a>
</li>
<li class="nav-item">
<a href="{{ route('resignation.index') }}"
class="nav-link @if (\Request::is('resignation') || \Request::is('resignation/*')) active @endif">Resignations</a>
</li>
<li class="nav-item">
<a href="{{ route('countries.index') }}"
@ -188,6 +174,18 @@
class="nav-link @if (\Request::is('nationality') || \Request::is('nationality/*')) active @endif">Nationalities</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link menu-link" href="#MenuFour" data-bs-toggle="collapse" role="button"
aria-expanded="false" aria-controls="MenuFour">
<i class="ri-dashboard-2-line"></i> <span data-key="t-hrs">HR</span>
</a>
<div class="menu-dropdown collapse" id="MenuFour">
<ul class="nav nav-sm flex-column">
<li class="nav-item">
<a href="{{ route('department.index') }}"
class="nav-link @if (\Request::is('department') || \Request::is('department/*')) active @endif">Departments</a>
@ -197,6 +195,37 @@
<a href="{{ route('designation.index') }}"
class="nav-link @if (\Request::is('desgination') || \Request::is('desgination/*')) active @endif">Designations</a>
</li>
<li class="nav-item">
<a href="{{ route('promotionDemotion.index') }}"
class="nav-link @if (\Request::is('promotion-demotion') || \Request::is('promotion-demotion/*')) active @endif">Promotion/ Demotions</a>
</li>
<li class="nav-item">
<a href="{{ route('appreciation.index') }}"
class="nav-link @if (\Request::is('appreciation') || \Request::is('appreciation/*')) active @endif">Appreciations</a>
</li>
<li class="nav-item">
<a href="{{ route('complaint.index') }}"
class="nav-link @if (\Request::is('complaint') || \Request::is('complaint/*')) active @endif">Complaints</a>
</li>
<li class="nav-item">
<a href="{{ route('resignation.index') }}"
class="nav-link @if (\Request::is('resignation') || \Request::is('resignation/*')) active @endif">Resignations</a>
</li>
<li class="nav-item">
<a href="{{ route('transfer.index') }}"
class="nav-link @if (\Request::is('transfer') || \Request::is('transfer/*')) active @endif">Transfers</a>
</li>
<li class="nav-item">
<a href="{{ route('warning.index') }}"
class="nav-link @if (\Request::is('warning') || \Request::is('warning/*')) active @endif">Warnings</a>
</li>
</ul>
</div>
</li>