3 Commits

Author SHA1 Message Date
efe174e3b3 admin module added 2024-04-14 18:29:29 +05:45
c7c79e69a5 Merge branch 'main' of http://bibgit.com/dharmaraj/New-OMIS into omis_dharma 2024-04-12 10:26:58 +05:45
c378522598 master admin module 2024-04-11 17:50:16 +05:45
117 changed files with 1917 additions and 1709 deletions

View File

@ -0,0 +1,85 @@
<?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\AppreciationRepository;
class AppreciationController extends Controller
{
private $appreciationRepository;
public function __construct(AppreciationRepository $appreciationRepository)
{
$this->appreciationRepository = $appreciationRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = "Appreciation Lists";
$data['appreciationLists'] = $this->appreciationRepository->findAll();
return view('admin::appreciations.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = "Create Appreciation";
$data['editable'] = false;
return view('admin::appreciations.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
$this->appreciationRepository->create($request->all());
toastr()->success('Appreciation Created Successfully.');
return redirect()->route('appreciation.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::appreciations.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$data['title'] = "Edit Appreciation";
$data['editable'] = true;
$data['appreciation'] = $this->appreciationRepository->getAppreciationById($id);
return view('admin::appreciations.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
$this->appreciationRepository->update($id, $request->all());
toastr()->success('Appreciation Updated Successfully.');
return redirect()->route('appreciation.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
}

View File

@ -0,0 +1,218 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use App\Service\CommonModelService;
use Log;
use Exception;
use Modules\Admin\Models\Departments;
class DepartmentsController extends Controller
{
protected $modelService;
public function __construct(Departments $model)
{
$this->modelService = new CommonModelService($model);
}
public function index(Request $request)
{
$data = Departments::where('status', '<>', -1)->orderBy('display_order')->get();
return view("admin::departments.index", compact('data'));
}
public function create(Request $request)
{
$TableData = Departments::where('status', '<>', -1)->orderBy('display_order')->get();
$editable = false;
return view("admin::departments.edit", compact('TableData', 'editable'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
//ADD REQUIRED FIELDS FOR VALIDATION
]);
if ($validator->fails()) {
return response()->json([
'error' => $validator->errors(),
], 500);
}
$request->request->add(['alias' => slugify($request->title)]);
$request->request->add(['display_order' => getDisplayOrder('tbl_departments')]);
$request->request->add(['created_at' => date("Y-m-d h:i:s")]);
$request->request->add(['updated_at' => date("Y-m-d h:i:s")]);
$requestData = $request->all();
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL') . '/', '', $value);
});
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL'), '', $value);
});
DB::beginTransaction();
try {
$operationNumber = getOperationNumber();
$this->modelService->create($operationNumber, $operationNumber, null, $requestData);
} catch (\Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DepartmentsController::class, 'store', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
if ($request->ajax()) {
return response()->json(['status' => true, 'message' => 'The Departments Created Successfully.'], 200);
}
return redirect()->route('department.index')->with('success', 'The Departments created Successfully.');
}
public function sort(Request $request)
{
$idOrder = $request->input('id_order');
foreach ($idOrder as $index => $id) {
$companyArticle = Departments::find($id);
$companyArticle->display_order = $index + 1;
$companyArticle->save();
}
return response()->json(['status' => true, 'content' => 'The articles sorted successfully.'], 200);
}
public function updatealias(Request $request)
{
$articleId = $request->input('articleId');
$newAlias = $request->input('newAlias');
$companyArticle = Departments::find($articleId);
if (!$companyArticle) {
return response()->json(['status' => false, 'content' => 'Company article not found.'], 404);
}
$companyArticle->alias = $newAlias;
$companyArticle->save();
return response()->json(['status' => true, 'content' => 'Alias updated successfully.'], 200);
}
public function show(Request $request, $id)
{
$data = Departments::findOrFail($id);
return view("admin::departments.show", compact('data'));
}
public function edit(Request $request, $id)
{
$TableData = Departments::where('status', '<>', -1)->orderBy('display_order')->get();
$data = Departments::findOrFail($id);
$editable = true;
return view("admin::departments.edit", compact('data', 'TableData', 'editable'));
}
public function update(Request $request, $id)
{
$validator = Validator::make($request->all(), [
//ADD VALIDATION FOR REQIRED FIELDS
]);
if ($validator->fails()) {
return response()->json([
'error' => $validator->errors(),
], 500);
}
$requestData = $request->all();
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL') . '/', '', $value);
});
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL'), '', $value);
});
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $request->input('department_id'));
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DepartmentsController::class, 'update', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
if ($request->ajax()) {
return response()->json(['status' => true, 'message' => 'The Departments updated Successfully.'], 200);
}
// return redirect()->route('departments.index')->with('success','The Departments updated Successfully.');
return redirect()->back()->with('success', 'The Departments updated successfully.');
}
public function destroy(Request $request, $id)
{
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->destroy($OperationNumber, $OperationNumber, $id);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DepartmentsController::class, 'destroy', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Departments Deleted Successfully.'], 200);
}
public function toggle(Request $request, $id)
{
$data = Departments::findOrFail($id);
$requestData = ['status' => ($data->status == 1) ? 0 : 1];
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DepartmentsController::class, 'destroy', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Departments Deleted Successfully.'], 200);
}
public function clone(Request $request, $id)
{
$data = Departments::findOrFail($id);
unset($data['updatedby']);
unset($data['createdby']);
$requestData = $data->toArray();
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->create($OperationNumber, $OperationNumber, null, $requestData);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DepartmentsController::class, 'clone', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Departments Clonned Successfully.'], 200);
}
}

View File

@ -0,0 +1,209 @@
<?php
namespace Modules\Admin\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use App\Service\CommonModelService;
use Log;
use Exception;
use Modules\Admin\Models\Designations;
class DesignationsController extends Controller
{
protected $modelService;
public function __construct(Designations $model)
{
$this->modelService = new CommonModelService($model);
}
public function index(Request $request)
{
$data = Designations::where('status', '<>', -1)->orderBy('display_order')->get();
return view("admin::designations.index", compact('data'));
}
public function create(Request $request)
{
$TableData = Designations::where('status', '<>', -1)->orderBy('display_order')->get();
$editable = false;
return view("admin::designations.edit", compact('TableData', 'editable'));
}
public function store(Request $request)
{
$validator = Validator::make($request->all(), [
//ADD REQUIRED FIELDS FOR VALIDATION
]);
if ($validator->fails()) {
return response()->json([
'error' => $validator->errors(),
], 500);
}
$request->request->add(['alias' => slugify($request->title)]);
$request->request->add(['display_order' => getDisplayOrder('tbl_designations')]);
$request->request->add(['created_at' => date("Y-m-d h:i:s")]);
$request->request->add(['updated_at' => date("Y-m-d h:i:s")]);
$requestData = $request->all();
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL') . '/', '', $value);
});
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL'), '', $value);
});
DB::beginTransaction();
try {
$operationNumber = getOperationNumber();
$this->modelService->create($operationNumber, $operationNumber, null, $requestData);
} catch (\Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DesignationsController::class, 'store', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
if ($request->ajax()) {
return response()->json(['status' => true, 'message' => 'The Designations Created Successfully.'], 200);
}
return redirect()->route('designation.index')->with('success', 'The Designations created Successfully.');
}
public function sort(Request $request)
{
$idOrder = $request->input('id_order');
foreach ($idOrder as $index => $id) {
$companyArticle = Designations::find($id);
$companyArticle->display_order = $index + 1;
$companyArticle->save();
}
return response()->json(['status' => true, 'content' => 'The articles sorted successfully.'], 200);
}
public function updatealias(Request $request)
{
$articleId = $request->input('articleId');
$newAlias = $request->input('newAlias');
$companyArticle = Designations::find($articleId);
if (!$companyArticle) {
return response()->json(['status' => false, 'content' => 'Company article not found.'], 404);
}
$companyArticle->alias = $newAlias;
$companyArticle->save();
return response()->json(['status' => true, 'content' => 'Alias updated successfully.'], 200);
}
public function show(Request $request, $id)
{
$data = Designations::findOrFail($id);
return view("admin::designations.show", compact('data'));
}
public function edit(Request $request, $id)
{
$TableData = Designations::where('status', '<>', -1)->orderBy('display_order')->get();
$data = Designations::findOrFail($id);
$editable = true;
return view("admin::designations.edit", compact('data', 'TableData', 'editable'));
}
public function update(Request $request, $id)
{
$validator = Validator::make($request->all(), [
//ADD VALIDATION FOR REQIRED FIELDS
]);
if ($validator->fails()) {
return response()->json([
'error' => $validator->errors(),
], 500);
}
$requestData = $request->all();
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL') . '/', '', $value);
});
array_walk_recursive($requestData, function (&$value) {
$value = str_replace(env('APP_URL'), '', $value);
});
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $request->input('designation_id'));
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DesignationsController::class, 'update', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
if ($request->ajax()) {
return response()->json(['status' => true, 'message' => 'The Designations updated Successfully.'], 200);
}
// return redirect()->route('designations.index')->with('success','The Designations updated Successfully.');
return redirect()->back()->with('success', 'The Designations updated successfully.');
}
public function destroy(Request $request, $id)
{
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->destroy($OperationNumber, $OperationNumber, $id);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DesignationsController::class, 'destroy', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Designations Deleted Successfully.'], 200);
}
public function toggle(Request $request, $id)
{
$data = Designations::findOrFail($id);
$requestData = ['status' => ($data->status == 1) ? 0 : 1];
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DesignationsController::class, 'destroy', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Designations Deleted Successfully.'], 200);
}
public function clone(Request $request, $id)
{
$data = Designations::findOrFail($id);
unset($data['updatedby']);
unset($data['createdby']);
$requestData = $data->toArray();
DB::beginTransaction();
try {
$OperationNumber = getOperationNumber();
$this->modelService->create($OperationNumber, $OperationNumber, null, $requestData);
} catch (Exception $e) {
DB::rollBack();
Log::info($e->getMessage());
createErrorLog(DesignationsController::class, 'clone', $e->getMessage());
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
}
DB::commit();
return response()->json(['status' => true, 'message' => 'The Designations Clonned Successfully.'], 200);
}
}

View File

@ -0,0 +1,87 @@
<?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\PromotionDemotionRepository;
class PromotionDemotionController extends Controller
{
private $promotionDemotionRepository;
public function __construct(PromotionDemotionRepository $promotionDemotionRepository)
{
$this->promotionDemotionRepository = $promotionDemotionRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = "Promotion/ Demotion Lists";
$data['promotionDemotionLists'] = $this->promotionDemotionRepository->findAll();
return view('admin::promotiondemotions.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['editable'] = false;
$data['title'] = "Create Promotion/ Demotion";
return view('admin::promotiondemotions.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
$this->promotionDemotionRepository->create($request->all());
toastr()->success('Promotion/ Demotion Created Successfully');
return redirect()->route('promotionDemotion.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::promotiondemotions.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$data['editable'] = false;
$data['title'] = "Edit Promotion/ Demotion";
$data['promotionDemotion'] = $this->promotionDemotionRepository->getPromotionDemotionById($id);
return view('admin::promotiondemotions.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
$this->promotionDemotionRepository->update($id, $request->all());
toastr()->success('Promotion/ Demotion Updated Successfully');
return redirect()->route('promotionDemotion.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
$this->promotionDemotionRepository->delete($id);
toastr()->success('Promotion/ Demotion Deleted Successfully');
return redirect()->route('promotionDemotion.index');
}
}

View File

@ -0,0 +1,83 @@
<?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\ResignationRepository;
class ResignationController extends Controller
{
private $resignationRepository;
public function __construct(ResignationRepository $resignationRepository)
{
$this->resignationRepository = $resignationRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Resignation List';
$data['resignationLists'] = $this->resignationRepository->findAll();
return view('admin::resignations.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Resignation';
$data['editable'] = false;
return view('admin::resignations.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
$this->resignationRepository->create($request->all());
return redirect()->route('resignation.index');
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('admin::resignations.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$data['title'] = 'Edit Resignation';
$data['editable'] = true;
$data['resignation'] = $this->resignationRepository->getResignationById($id);
return view('admin::resignations.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
$this->resignationRepository->update($id, $request->all());
return redirect()->route('resignation.index');
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\AppreciationFactory;
class Appreciation extends Model
{
use HasFactory;
protected $table = 'tbl_appreciations';
protected $primaryKey = 'appreciation_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'alias',
'type',
'employee_id',
'appreciated_by',
'appreciated_date',
'status',
'description',
'remarks',
];
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models;
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Models;
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

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\PromotionDemotionFactory;
class PromotionDemotion extends Model
{
use HasFactory;
protected $table = "tbl_promotion_demotions";
protected $primaryKey = "promotion_demotion_id";
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'title',
'employee_id',
'old_designation_id',
'new_designation_id',
'type',
'status',
'description',
'remarks',
];
}

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\ResignationFactory;
class Resignation extends Model
{
use HasFactory;
protected $table = 'tbl_resignations';
protected $primaryKey = 'resignation_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'resignation_date',
'approved_date',
'approved_by',
'description',
'remarks',
'status',
'createdBy',
'updatedBy',
];
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface AppreciationInterface
{
public function findAll();
public function getAppreciationById($appreciationId);
public function delete($appreciationId);
public function create(array $AppreciationDetails);
public function update($appreciationId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Appreciation;
class AppreciationRepository implements AppreciationInterface
{
public function findAll()
{
return Appreciation::get();
}
public function getAppreciationById($appreciationId)
{
return Appreciation::findOrFail($appreciationId);
}
public function delete($appreciationId)
{
Appreciation::destroy($appreciationId);
}
public function create(array $appreciationDetails)
{
return Appreciation::create($appreciationDetails);
}
public function update($appreciationId, array $newDetails)
{
return Appreciation::where('appreciation_id', $appreciationId)->update($newDetails);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface PromotionDemotionInterface
{
public function findAll();
public function getPromotionDemotionById($promotionDemotionId);
public function delete($promotionDemotionId);
public function create(array $PromotionDemotionDetails);
public function update($promotionDemotionId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\PromotionDemotion;
class PromotionDemotionRepository implements PromotionDemotionInterface
{
public function findAll()
{
return PromotionDemotion::get();
}
public function getPromotionDemotionById($promotionDemotionId)
{
return PromotionDemotion::findOrFail($promotionDemotionId);
}
public function delete($promotionDemotionId)
{
PromotionDemotion::destroy($promotionDemotionId);
}
public function create(array $promotionDemotionDetails)
{
return PromotionDemotion::create($promotionDemotionDetails);
}
public function update($promotionDemotionId, array $newDetails)
{
return PromotionDemotion::where('promotion_demotion_id', $promotionDemotionId)->update($newDetails);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Modules\Admin\Repositories;
interface ResignationInterface
{
public function findAll();
public function getResignationById($resignationId);
public function delete($resignationId);
public function create(array $ResignationDetails);
public function update($resignationId, array $newDetails);
}

View File

@ -0,0 +1,35 @@
<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Resignation;
class ResignationRepository implements ResignationInterface
{
public function findAll()
{
return Resignation::get();
}
public function getResignationById($resignationId)
{
return Resignation::findOrFail($resignationId);
}
public function delete($resignationId)
{
Resignation::destroy($resignationId);
}
public function create(array $resignationDetails)
{
return Resignation::create($resignationDetails);
}
public function update($resignationId, array $newDetails)
{
return Resignation::where('resignation_id', $resignationId)->update($newDetails);
}
}

View File

@ -4,6 +4,8 @@ namespace Modules\Admin\Services;
use Modules\Admin\Models\Castes;
use Modules\Admin\Models\Cities;
use Modules\Admin\Models\Country;
use Modules\Admin\Models\Departments;
use Modules\Admin\Models\Designations;
use Modules\Admin\Models\Districts;
use Modules\Admin\Models\Genders;
use Modules\Admin\Models\Nationalities;
@ -47,5 +49,14 @@ final class AdminService
return Nationalities::pluck('title', 'nationality_id');
}
function pluckDepartments()
{
return Departments::pluck('title', 'department_id');
}
function pluckDesignations()
{
return Designations::pluck('title', 'designation_id');
}
}

View File

@ -0,0 +1,38 @@
<?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_promotion_demotions', function (Blueprint $table) {
$table->tinyInteger('promotion_demotion_id')->unsigned()->autoIncrement();
$table->string('title')->nullable();
$table->string('alias')->nullable();
$table->unsignedBigInteger('employee_id')->nullable();
$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->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_promotion_demotions');
}
};

View File

@ -0,0 +1,37 @@
<?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_appreciations', function (Blueprint $table) {
$table->tinyInteger('appreciation_id')->unsigned()->autoIncrement();
$table->string('title')->nullable();
$table->string('alias')->nullable();
$table->string('type')->nullable();
$table->unsignedBigInteger('employee_id')->nullable();
$table->unsignedBigInteger('appreciated_by')->nullable();
$table->date('appreciated_date')->nullable();
$table->unsignedBigInteger('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_appreciations');
}
};

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_resignations', function (Blueprint $table) {
$table->tinyInteger('resignation_id')->unsigned()->autoIncrement();
$table->unsignedBigInteger('employee_id')->nullable();
$table->date('resignation_date')->nullable();
$table->date('approved_date')->nullable();
$table->unsignedBigInteger('approved_by')->nullable();
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->unsignedBigInteger('status')->nullable();
$table->unsignedBigInteger('createdBy')->nullable();
$table->unsignedBigInteger('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_resignations');
}
};

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('appreciation.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.appreciations.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($appreciation, 'PUT')->route('appreciation.update', $appreciation->appreciation_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.appreciations.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('appreciation.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Appreciation</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">Appreciated Type</span></th>
<th class="tb-col"><span class="overline-title">Appreciated By</span></th>
<th class="tb-col"><span class="overline-title">Appreciated Date</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($appreciationLists 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->appreciated_by }}</td>
<td class="tb-col">{{ $item->appreciated_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('appreciation.show', [$item->appreciation_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('appreciation.edit', [$item->appreciation_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->appreciation_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

@ -1,15 +1,14 @@
@extends('layouts.app')
@section('content')
<div class='card'>
<div class='card-header d-flex justify-content-between align-items-center'>
<h2><?php echo label('View Details'); ?></h2>
<?php createButton('btn-primary btn-cancel', '', 'Back to List', route('cities.index')); ?>
<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('cities.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>Districts Id :&nbsp;&nbsp;&nbsp;&nbsp;</b> <span>{{ $data->districts_id }}</span></p>
<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>

View File

@ -14,7 +14,7 @@
<form action="{{ $editable ? route('department.update', [$data->department_id]) : route('department.store') }}"
id="updateCustomForm" method="POST">
@csrf
<input type=hidden name='department_id' value='{{ $editable ? $data->department_id : '' }}' />

View File

@ -9,10 +9,12 @@
<!-- end page title -->
<div class='card'>
<div class='card-header d-flex justify-content-between align-items-center'>
<h2><?php echo label('View Detail'); ?></h2>
<?php createButton('btn-primary btn-cancel', '', 'Back to List', route('department.index')); ?>
<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('department.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>

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' => 'Designation'])
<!-- 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

@ -1,7 +1,7 @@
@extends('admin::layouts.master')
@section('content')
<h1>Hello World</h1>
<h1>Hello World</h1>
<p>Module: {!! config('admin.name') !!}</p>
<p>Module: {!! config('admin.name') !!}</p>
@endsection

View File

@ -0,0 +1,43 @@
<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('Appreciation Type')->class('form-label') }}
{{ html()->select('type', [1 => 'Employee of the Month', 2 => 'Best Manger'])->class('form-select')->placeholder('Select Type') }}
</div>
<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('Appreciated By')->class('form-label') }}
{{ html()->select('appreciated_by')->class('form-select')->placeholder('Select Who Appreciated') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Appreciated Date')->class('form-label') }}
{{ html()->date('appreciated_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 Appreciation', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,46 @@
<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('Type')->class('form-label') }}
{{ html()->select('type', [1 => 'Promotion', 2 => 'Demotion'])->class('form-select')->placeholder('Select Type') }}
</div>
<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('Previous Designation')->class('form-label') }}
{{ html()->select('old_designation_id')->class('form-select')->placeholder('Select Previous Desgination') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('New Designation')->class('form-label') }}
{{ html()->select('new_designation_id')->class('form-select')->placeholder('Select New Desgination') }}
</div>
<div class="col-lg-4 col-md-6">
{{ html()->label('Date')->class('form-label') }}
{{ html()->date('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 Promotion/ Demotion', 'submit')->class('btn btn-success') }}
</div>
</div>

View File

@ -0,0 +1,26 @@
<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('Resignation Date')->class('form-label') }}
{{ html()->date('resignation_date')->class('form-control')->placeholder('Select Resignation Date') }}
</div>
<div class="col-lg-12 col-md-12">
{{ html()->label('Reason')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->placeholder('Write reason for resgination')->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 Resignation', '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('promotionDemotion.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.promotiondemotions.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($promotionDemotion, 'PUT')->route('promotionDemotion.update', $promotionDemotion->promotion_demotion_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.promotiondemotions.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' => 'Promotion/ Demotion'])
<!-- end page title -->
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">Promotion/ Demotion Lists</h5>
<div class="flex-shrink-0">
<a href="{{ route('promotionDemotion.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Promotion/ Demotion</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">Title</span></th>
<th class="tb-col"><span class="overline-title">Employee</span></th>
<th class="tb-col" width="20%"><span class="overline-title">Previous Designation</span></th>
<th class="tb-col" width="20%"><span class="overline-title">New Designation</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($promotionDemotionLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->title }}</td>
<td class="tb-col">{{ $item->employee_id }}</td>
<td class="tb-col">{{ $item->old_promotion_demotion_id }}</td>
<td class="tb-col">{{ $item->new_promotion_demotion_id }}</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('promotionDemotion.show', [$item->promotion_demotion_id]) }}"
class="dropdown-item"><i class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('promotionDemotion.edit', [$item->promotion_demotion_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('promotionDemotion.destroy', [$item->promotion_demotion_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('resignation.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.resignations.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($resignation, 'PUT')->route('resignation.update', $resignation->resignation_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('admin::partials.resignations.action')
{{ html()->form()->close() }}
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,77 @@
@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('resignation.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Create Resignation</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">Resignation Date</span></th>
<th class="tb-col"><span class="overline-title">Approved Date</span></th>
<th class="tb-col"><span class="overline-title">Approved 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 ($resignationLists as $index => $item)
<tr>
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $item->employee_id }}</td>
<td class="tb-col">{{ $item->resignation_date }}</td>
<td class="tb-col">{{ $item->approved_date }}</td>
<td class="tb-col">{{ $item->approved_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('resignation.show', [$item->resignation_id]) }}" class="dropdown-item"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
</li>
<li><a href="{{ route('resignation.edit', [$item->resignation_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('resignation.destroy', [$item->resignation_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

@ -2,6 +2,9 @@
use Illuminate\Support\Facades\Route;
use Modules\Admin\Http\Controllers\AdminController;
use Modules\Admin\Http\Controllers\AppreciationController;
use Modules\Admin\Http\Controllers\PromotionDemotionController;
use Modules\Admin\Http\Controllers\ResignationController;
/*
|--------------------------------------------------------------------------
@ -16,6 +19,9 @@ use Modules\Admin\Http\Controllers\AdminController;
Route::group([], function () {
Route::resource('admin', AdminController::class)->names('admin');
Route::resource('promotion-demotion', PromotionDemotionController::class)->names('promotionDemotion');
Route::resource('appreciation', AppreciationController::class)->names('appreciation');
Route::resource('resignation', ResignationController::class)->names('resignation');
});
require __DIR__ . '/route.countries.php';

View File

@ -45,8 +45,8 @@ class EmployeeController extends Controller
public function create()
{
$data['title'] = 'Create Employee';
$data['departmentList'] = [];
$data['designationList'] = [];
$data['departmentList'] = $this->adminService->pluckDepartments();
$data['designationList'] = $this->adminService->pluckDesignations();
$data['nationalityList'] = $this->adminService->pluckNationalities();
$data['genderList'] = $this->adminService->pluckGenders();
$data['casteList'] = $this->adminService->pluckCastes();

View File

@ -10,7 +10,7 @@ class Employee extends Model
protected $table = 'tbl_employees';
protected $primaryKey = 'id';
protected $guarded = [];
protected $appends = ['full_name'];
protected $appends = (['full_name']);
protected function getFullNameAttribute()
{

View File

@ -2,7 +2,6 @@
namespace Modules\Employee\Repositories;
use Illuminate\Support\Facades\DB;
use Modules\Employee\Models\Employee;
class EmployeeRepository implements EmployeeInterface
@ -39,7 +38,7 @@ class EmployeeRepository implements EmployeeInterface
public function pluck()
{
return Employee::pluck(DB::raw('CONCAT(first_name," ", middle_name , " ",last_name) AS full_name'), 'id');
return Employee::pluck('first_name', 'id');
}
// public function uploadImage($file)

View File

@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
return new class extends Migration {
/**
* Run the migrations.
*/
@ -43,6 +42,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('employees');
Schema::dropIfExists('tbl_employees');
}
};

View File

@ -27,7 +27,7 @@
<div class="col-md-4">
{{ html()->label('Gender')->class('form-label') }}
{{ html()->select('genders_id', [1 => 'male', 2 => 'female'])->class('form-select')->placeholder('Select Gender') }}
{{ html()->select('genders_id', $genderList)->class('form-select')->placeholder('Select Gender') }}
</div>
<div class="col-md-4">
@ -39,7 +39,7 @@
<div class="col-md-4">
{{ html()->label('Nationality')->class('form-label') }}
{{ html()->select('nationalities_id', [1 => 'Nepal', 2 => 'Other'])->class('form-control')->placeholder('Select Nationality') }}
{{ html()->select('nationality_id', $nationalityList)->class('form-select')->placeholder('Select Nationality') }}
</div>
<div class="col-md-4">
@ -91,12 +91,12 @@
<hr>
<div class="col-md-4">
{{ html()->label('Department')->class('form-label') }}
{{ html()->select('department_id', ['Nepal'])->class('form-select')->placeholder('Select Department') }}
{{ html()->select('department_id', $departmentList)->class('form-select')->placeholder('Select Department') }}
</div>
<div class="col-md-4">
{{ html()->label('Designation')->class('form-label') }}
{{ html()->select('designation_id', ['Nepal'])->class('form-select')->placeholder('Select Designation') }}
{{ html()->select('designation_id', $designationList)->class('form-select')->placeholder('Select Designation') }}
</div>
{{-- <div class="col-md-4">
@ -115,7 +115,6 @@
</div>
<!-- end card -->
<div class="mb-4 text-end">
<button type="submit" class="btn btn-success w-sm">Save</button>
</div>

View File

@ -5,19 +5,22 @@ namespace Modules\Leave\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Modules\Employee\Repositories\EmployeeInterface;
use Modules\Leave\Repositories\LeaveInterface;
use Modules\Employee\Repositories\EmployeeRepository;
use Modules\Leave\Repositories\LeaveRepository;
use Modules\Leave\Repositories\LeaveTypeRepository;
use Yoeunes\Toastr\Facades\Toastr;
class LeaveController extends Controller
{
private $leaveRepository;
private $employeeRepository;
private $leaveTypeRepository;
public function __construct(LeaveInterface $leaveRepository, EmployeeInterface $employeeRepository)
public function __construct(LeaveRepository $leaveRepository, EmployeeRepository $employeeRepository, LeaveTypeRepository $leaveTypeRepository)
{
$this->leaveRepository = $leaveRepository;
$this->employeeRepository = $employeeRepository;
$this->leaveTypeRepository = $leaveTypeRepository;
$this->middleware('role_or_permission:access leaves|create leaves|edit leaves|delete leaves', ['only' => ['index', 'show']]);
$this->middleware('role_or_permission:create leaves', ['only' => ['create', 'store']]);
@ -42,7 +45,9 @@ class LeaveController extends Controller
public function create()
{
$data['title'] = 'Create Leave';
$data['editable'] = false;
$data['employeeList'] = $this->employeeRepository->pluck();
$data['leaveTypeList'] = $this->leaveTypeRepository->pluck();
return view('leave::leave.create', $data);
}
@ -76,6 +81,8 @@ class LeaveController extends Controller
{
$data['title'] = 'Edit Leave';
$data['editable'] = true;
$data['leave'] = $this->leaveRepository->getLeaveById($id);
return view('leave::leave.edit', $data);

View File

@ -5,18 +5,14 @@ namespace Modules\Leave\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Modules\Leave\Repositories\LeaveInterface;
use Modules\Leave\Repositories\LeaveTypeInterface;
class LeaveTypeController extends Controller
{
private $leaveRepository;
private $leaveTypeRepository;
public function __construct(LeaveInterface $leaveRepository, LeaveTypeInterface $leaveTypeRepository)
public function __construct(LeaveTypeInterface $leaveTypeRepository)
{
$this->leaveRepository = $leaveRepository;
$this->leaveTypeRepository = $leaveTypeRepository;
}
/**
@ -24,7 +20,8 @@ class LeaveTypeController extends Controller
*/
public function index()
{
$data['leaveTypes'] = $this->leaveTypeRepository->findAll();
$data['title'] = 'LeaveType List';
$data['leaveTypeLists'] = $this->leaveTypeRepository->findAll();
return view('leave::leave-type.index', $data);
}
@ -33,7 +30,10 @@ class LeaveTypeController extends Controller
*/
public function create()
{
$data['title'] = 'Create Leave Type';
$data['title'] = 'Create LeaveType';
$data['editable'] = false;
return view('leave::leave-type.create', $data);
}
@ -42,7 +42,12 @@ class LeaveTypeController extends Controller
*/
public function store(Request $request): RedirectResponse
{
//
try {
$this->leaveTypeRepository->create($request->all());
return redirect()->route('leaveType.index')->with('success', 'Leave Type Created Successfully');
} catch (\Throwable $th) {
throw $th;
}
}
/**
@ -58,7 +63,11 @@ class LeaveTypeController extends Controller
*/
public function edit($id)
{
return view('leave::leave-type.edit');
$data['editable'] = false;
$data['title'] = 'Edit LeaveType';
return view('leave::leave-type.edit', $data);
}
/**

View File

@ -4,19 +4,12 @@ namespace Modules\Leave\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Leave\Database\factories\LeaveTypeFactory;
class LeaveType extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [];
protected static function newFactory(): LeaveTypeFactory
{
//return LeaveTypeFactory::new();
}
protected $table = 'tbl_leave_types';
protected $primaryKey = 'leave_type_id';
protected $guarded = [];
}

View File

@ -4,9 +4,10 @@ namespace Modules\Leave\Repositories;
interface LeaveTypeInterface
{
public function pluck();
public function findAll();
public function getLeaveById($leaveId);
public function delete($leaveId);
public function create(array $LeaveDetails);
public function update($leaveId, array $newDetails);
public function getLeaveTypeById($leaveTypeId);
public function delete($leaveTypeId);
public function create(array $LeaveTypeDetails);
public function update($leaveTypeId, array $newDetails);
}

View File

@ -6,29 +6,33 @@ use Modules\Leave\Models\LeaveType;
class LeaveTypeRepository implements LeaveTypeInterface
{
public function pluck()
{
return LeaveType::pluck('title', 'leave_type_id');
}
public function findAll()
{
return LeaveType::get();
}
public function getLeaveById($leaveId)
public function getLeaveTypeById($leaveTypeId)
{
return LeaveType::findOrFail($leaveId);
return LeaveType::findOrFail($leaveTypeId);
}
public function delete($leaveId)
public function delete($leaveTypeId)
{
LeaveType::destroy($leaveId);
LeaveType::destroy($leaveTypeId);
}
public function create(array $leaveDetails)
public function create(array $leaveTypeDetails)
{
return LeaveType::create($leaveDetails);
return LeaveType::create($leaveTypeDetails);
}
public function update($leaveId, array $newDetails)
public function update($leaveTypeId, array $newDetails)
{
return LeaveType::where('leave_id', $leaveId)->update($newDetails);
return LeaveType::where('leave_type_id', $leaveTypeId)->update($newDetails);
}
}

View File

@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
return new class extends Migration {
/**
* Run the migrations.
*/
@ -17,6 +16,12 @@ return new class extends Migration
$table->unsignedBigInteger('leave_type_id');
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->date('leave_approved_date')->nullable();
$table->Integer('total_days')->nullable();
$table->unsignedBigInteger('leave_approved_by')->nullable();
$table->Integer('status')->nullable();
$table->longtext('description')->nullable();
$table->text('remarks')->nullable();
$table->timestamps();
});
}

View File

@ -7,12 +7,12 @@
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="row">
<div class="col-lg-8">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<form action="{{ route('leaveType.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('leave::leave.partials.action')
@include('leave::leave-type.partials.action')
</form>
</div>
</div>

View File

@ -27,7 +27,7 @@
{{ html()->modelForm($leave, 'PUT')->route('leave.update', $leave->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('leave::leave.partials.action')
@include('leave::leave-type.partials.action')
{{ html()->closeModelForm() }}

View File

@ -3,13 +3,15 @@
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header align-items-center d-flex">
<h5 class="card-title flex-grow-1 mb-0">Leave Lists</h5>
<h5 class="card-title flex-grow-1 mb-0">LeaveType Lists</h5>
<div class="flex-shrink-0">
<a href="{{ route('leaveType.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Add</a>
@ -22,19 +24,16 @@
<thead>
<tr>
<th>S.N</th>
<th>Leave Type</th>
<th>Created By</th>
<th>Title</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($leaveTypes as $key => $leaveType)
@forelse ($leaveTypeLists as $key => $leaveType)
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $leaveType->employee_id }}</td>
<td>{{ $leaveType->start_date }}</td>
<td>{{ $leaveType->end_date }}</td>
<td>{{ $leaveType->title }}</td>
<td>{{ $leaveType->created_at }}</td>
<td>
<div class="hstack flex-wrap gap-3">
@ -42,12 +41,12 @@
data-bs-target="#viewModal">
<i class="ri-eye-line"></i>
</a>
<a href="{{ route('leaveType.edit', $leaveType->leaveType_id) }}"
<a href="{{ route('leaveType.edit', $leaveType->leave_type_id) }}"
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
<a href="javascript:void(0);"
data-link="{{ route('leaveType.destroy', $leaveType->leaveType_id) }}"
data-id="{{ $leaveType->leave_id }}" class="link-danger fs-15 remove-item-btn"><i
data-link="{{ route('leaveType.destroy', $leaveType->leave_type_id) }}"
data-id="{{ $leaveType->leave_type_id }}" class="link-danger fs-15 remove-item-btn"><i
class="ri-delete-bin-line"></i></a>
</div>

View File

@ -1,23 +1,12 @@
<div class="mb-3">
<label for="employee_id" class="form-label">Employee Name</label>
{{ html()->select('employee_id', $employeeList)->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="mb-3">
<label for="start_date" class="form-label">Start Leave Date</label>
<input type="date" class="form-control" id="start_date" name="start_date"
value="{{ old('start_date', $leave->start_date ?? '') }}">
</div>
<div class="mb-3">
<label for="end_date" class="form-label">End Leave Date</label>
<input type="date" class="form-control" id="end_date" name="end_date"
value="{{ old('end_date', $leave->end_date ?? '') }}">
<div class="row">
<div class="col-md-4">
{{ html()->label('Title')->class('form-label') }}
{{ html()->text('title')->class('form-control')->placeholder('Enter Leave Type') }}
</div>
</div>
<div class="text-end">
<button type="submit" class="btn btn-primary">{{ isset($leave) ? 'Update' : 'Add Leave' }}</button>
<button type="submit" class="btn btn-primary">{{ $editable ? 'Update' : 'Add Leave Type' }}</button>
</div>
@push('js')

View File

@ -6,7 +6,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="{{ route('leave.store') }}" class="needs-validation" novalidate method="post">
<form action="{{ route('leave-t.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('leave::leave.partials.action')
</form>

View File

@ -7,7 +7,7 @@
@include('layouts.partials.breadcrumb', ['title' => $title])
<!-- end page title -->
<div class="row">
<div class="col-lg-8">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<form action="{{ route('leave.store') }}" class="needs-validation" novalidate method="post">

View File

@ -15,7 +15,6 @@
<li class="breadcrumb-item active">{{ $title }}</li>
</ol>
</div>
</div>
</div>
</div>

View File

@ -50,7 +50,7 @@
<h5 class="card-title flex-grow-1 mb-0">Leave Lists</h5>
<div class="flex-shrink-0">
<a href="{{ route('leave.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Add</a>
class="ri-add-fill me-1 align-bottom"></i> Apply Leave</a>
</div>
</div>
@ -104,5 +104,5 @@
</div>
</div>
<!-- container-fluid -->
@include('leave::leave.partials.view')
{{-- @include('leave::leave.partials.view') --}}
@endsection

View File

@ -1,22 +1,32 @@
<div class="mb-3">
<div class="row g-2">
<div class="col-md-6">
{{ html()->label('Leave Type')->class('form-label') }}
{{ html()->select('leave_type_id', $leaveTypeList)->class('form-select')->placeholder('Select Leave Type') }}
</div>
<label for="employee_id" class="form-label">Title</label>
</div>
<div class="col-md-6">
{{ html()->label('Employee')->class('form-label') }}
{{ html()->select('employee_id', [1 => 'Deepak'])->class('form-select')->placeholder('Select Employee') }}
</div>
<div class="mb-3">
<label for="start_date" class="form-label">Start Leave Date</label>
<input type="date" class="form-control" id="start_date" name="start_date"
value="{{ old('start_date', $leave->start_date ?? '') }}">
</div>
<div class="col-md-6">
{{ html()->label('Start Date')->class('form-label') }}
{{ html()->date('start_date')->class('form-control')->placeholder('Select Start Date') }}
</div>
<div class="mb-3">
<label for="end_date" class="form-label">End Leave Date</label>
<input type="date" class="form-control" id="end_date" name="end_date"
value="{{ old('end_date', $leave->end_date ?? '') }}">
</div>
<div class="col-md-6">
{{ html()->label('Start Date')->class('form-label') }}
{{ html()->date('end_date')->class('form-control')->placeholder('Select Start Date') }}
</div>
<div class="text-end">
<button type="submit" class="btn btn-primary">{{ isset($leave) ? 'Update' : 'Add Leave' }}</button>
<div class="col-md-12">
{{ html()->label('Description')->class('form-label') }}
{{ html()->textarea('description')->class('form-control')->placeholder('Write Reason for Leave') }}
</div>
<div class="text-end">
{{ html()->button($editable ? 'Update' : 'Add Leave', 'submit')->class('btn btn-success') }}
</div>
</div>
@push('js')

View File

@ -18,5 +18,4 @@ use Modules\Leave\Http\Controllers\LeaveTypeController;
Route::group([], function () {
Route::resource('leave', LeaveController::class)->names('leave');
Route::resource('leave-type', LeaveTypeController::class)->names('leaveType');
});

View File

@ -1,91 +0,0 @@
<?php
namespace Modules\Taxation\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Companies;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Modules\Employee\Repositories\EmployeeInterface;
class InvoiceController extends Controller
{
private $employeeRepository;
public function __construct(EmployeeInterface $employeeRepository)
{
$this->employeeRepository = $employeeRepository;
}
/**
* Display a listing of the resource.
*/
public function index()
{
$data['title'] = 'Invoice List';
$data['invoices'] = [];
return view('taxation::invoice.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data['title'] = 'Create Invoice';
$data['companyList'] = Companies::pluck('title', 'company_id');
$data['employeeList'] = $this->employeeRepository->pluck();
return view('taxation::invoice.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('taxation::invoice.show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
return view('taxation::invoice.edit');
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
public function cloneProduct(Request $request)
{
$data = [];
$numInc = $request->numberInc;
$script = true;
return response()->json([
'view' => view('taxation::invoice.clone-product', compact('data', 'numInc', 'script'))->render(),
]);
}
}

View File

@ -1,67 +0,0 @@
<?php
namespace Modules\Taxation\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class TaxationController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('taxation::index');
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
return view('taxation::create');
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request): RedirectResponse
{
//
}
/**
* Show the specified resource.
*/
public function show($id)
{
return view('taxation::show');
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
return view('taxation::edit');
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, $id): RedirectResponse
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
//
}
}

View File

@ -1,49 +0,0 @@
<?php
namespace Modules\Taxation\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('Taxation', '/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('Taxation', '/routes/api.php'));
}
}

View File

@ -1,114 +0,0 @@
<?php
namespace Modules\Taxation\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class TaxationServiceProvider extends ServiceProvider
{
protected string $moduleName = 'Taxation';
protected string $moduleNameLower = 'taxation';
/**
* 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);
}
/**
* 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;
}
}

View File

@ -1,15 +0,0 @@
<?php
namespace Modules\Employee\Repositories;
interface EmployeeInterface
{
public function findAll();
public function getEmployeeById($employeeId);
public function getEmployeeByEmail($email);
public function delete($employeeId);
public function create($EmployeeDetails);
public function update($employeeId, array $newDetails);
public function pluck();
}

View File

@ -1,58 +0,0 @@
<?php
namespace Modules\Employee\Repositories;
use Modules\Employee\Models\Employee;
class EmployeeRepository implements EmployeeInterface
{
public function findAll()
{
return Employee::paginate(20);
}
public function getEmployeeById($employeeId)
{
return Employee::findOrFail($employeeId);
}
public function getEmployeeByEmail($email)
{
return Employee::where('email', $email)->first();
}
public function delete($employeeId)
{
Employee::destroy($employeeId);
}
public function create($employeeDetails)
{
return Employee::create($employeeDetails);
}
public function update($employeeId, array $newDetails)
{
return Employee::whereId($employeeId)->update($newDetails);
}
public function pluck()
{
return Employee::pluck('first_name', 'id');
}
// public function uploadImage($file)
// {
// if ($req->file()) {
// $fileName = time() . '_' . $req->file->getClientOriginalName();
// $filePath = $req->file('file')->storeAs('uploads', $fileName, 'public');
// $fileModel->name = time() . '_' . $req->file->getClientOriginalName();
// $fileModel->file_path = '/storage/' . $filePath;
// $fileModel->save();
// return back()
// ->with('success', 'File has been uploaded.')
// ->with('file', $fileName);
// }
// }
}

View File

@ -1,30 +0,0 @@
{
"name": "nwidart/taxation",
"description": "",
"authors": [
{
"name": "Nicolas Widart",
"email": "n.widart@gmail.com"
}
],
"extra": {
"laravel": {
"providers": [],
"aliases": {
}
}
},
"autoload": {
"psr-4": {
"Modules\\Taxation\\": "app/",
"Modules\\Taxation\\Database\\Factories\\": "database/factories/",
"Modules\\Taxation\\Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Modules\\Taxation\\Tests\\": "tests/"
}
}
}

View File

@ -1,5 +0,0 @@
<?php
return [
'name' => 'Taxation',
];

View File

@ -1,16 +0,0 @@
<?php
namespace Modules\Taxation\database\seeders;
use Illuminate\Database\Seeder;
class TaxationDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// $this->call([]);
}
}

View File

@ -1,11 +0,0 @@
{
"name": "Taxation",
"alias": "taxation",
"description": "",
"keywords": [],
"priority": 0,
"providers": [
"Modules\\Taxation\\Providers\\TaxationServiceProvider"
],
"files": []
}

View File

@ -1,15 +0,0 @@
{
"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"
}
}

View File

@ -1,39 +0,0 @@
<div class="card card-body product-card card-border-secondary mb-2 border">
<div class="row gy-2 mb-2">
<div class="col-md-4">
{{ html()->label('Product')->class('form-label') }}
{{ html()->text('product_id')->class('form-control')->placeholder('Enter Product Name')->required() }}
</div>
<div class="col-md-2">
{{ html()->label('Unit')->class('form-label') }}
{{ html()->text('unit')->class('form-control')->placeholder('Enter Unit')->required() }}
</div>
<div class="col-md-2">
{{ html()->label('Rate')->class('form-label') }}
{{ html()->text('rate')->class('form-control product-price cleave-numeral')->placeholder('Enter Rate')->attributes(['id' => 'cleave-numeral']) }}
</div>
<div class="col-md-2">
{{ html()->label('Quantity')->class('form-label') }}
{{ html()->text('qty')->class('form-control product-quantity cleave-numeral')->placeholder('Enter QTY')->attributes(['id' => 'cleave-numeral']) }}
</div>
<div class="col-md-2">
{{ html()->label('Amount')->class('form-label') }}
{{ html()->text('amt')->class('form-control product-line-price bg-light')->placeholder('Enter Amount')->isReadOnly() }}
</div>
<div class="col-md-6">
{{ html()->label('Description')->class('form-label') }}
{{ html()->text('desc')->class('form-control')->placeholder('Enter Description') }}
</div>
<div class="col-md-6 d-flex justify-content-end align-items-end">
<button type="button" class="btn btn-danger btn-icon waves-effect btn-remove waves-light"><i
class="ri-delete-bin-5-line"></i></button>
</div>
</div>
</div>

View File

@ -1,27 +0,0 @@
@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">
<form action="{{ route('invoice.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('taxation::invoice.partials.action')
</form>
</div>
</div>
</div>
<!-- container-fluid -->
</div>
@endsection
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
@endpush

View File

@ -1,47 +0,0 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
<h4 class="mb-sm-0">{{ $title }}</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
<li class="breadcrumb-item active">{{ $title }}</li>
</ol>
</div>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-body">
{{ html()->modelForm($leave, 'PUT')->route('leave.update', $leave->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('leave::leave.partials.action')
{{ html()->closeModelForm() }}
</div>
</div>
</div>
</div>
<!--end row-->
</div>
<!-- container-fluid -->
</div>
@endsection
@push('js')
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
@endpush

View File

@ -1,68 +0,0 @@
@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<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('invoice.create') }}" class="btn btn-success waves-effect waves-light"><i
class="ri-add-fill me-1 align-bottom"></i> Add</a>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
<thead>
<tr>
<th>S.N</th>
<th>Id</th>
<th>Created By</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse ($invoices as $key => $leaveType)
<tr>
<td>{{ $key + 1 }}</td>
<td>{{ $leaveType->employee_id }}</td>
<td>{{ $leaveType->start_date }}</td>
<td>{{ $leaveType->end_date }}</td>
<td>{{ $leaveType->created_at }}</td>
<td>
<div class="hstack flex-wrap gap-3">
<a href="javascript:void(0);" class="link-info fs-15 view-item-btn" data-bs-toggle="modal"
data-bs-target="#viewModal">
<i class="ri-eye-line"></i>
</a>
<a href="{{ route('leaveType.edit', $leaveType->leaveType_id) }}"
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
<a href="javascript:void(0);"
data-link="{{ route('leaveType.destroy', $leaveType->leaveType_id) }}"
data-id="{{ $leaveType->leave_id }}" class="link-danger fs-15 remove-item-btn"><i
class="ri-delete-bin-line"></i></a>
</div>
</td>
</tr>
@empty
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--end row-->
</div>
</div>
@endsection

View File

@ -1,207 +0,0 @@
<div class="row gy-1">
<h5 class="text-primary text-center">Invoice Details</h5>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Company')->class('form-label') }}
{{ html()->select('company_id', $companyList)->class('form-control')->placeholder('Select Company')->required() }}
{{ html()->div('Please select company')->class('invalid-feedback') }}
</div>
<div class="col-md-4">
{{ html()->label('Invoice No.')->class('form-label') }}
{{ html()->text('invoice_no')->class('form-control')->placeholder('Enter Invoice No')->attributes(['id' => 'cleave-prefix']) }}
</div>
<div class="col-md-4">
{{ html()->label('VAT No.')->class('form-label') }}
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter VAT No') }}
</div>
<div class="col-md-4">
{{ html()->label('Sales Date')->class('form-label') }}
{{ html()->date('sale_date')->class('form-control')->placeholder('Choose Sales Date')->required() }}
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
</div>
<div class="col-md-4">
{{ html()->label('Bill Issue Date')->class('form-label') }}
{{ html()->date('isse_date')->class('form-control')->placeholder('Choose Bill Issue Date')->required() }}
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
</div>
</div>
<div class="row gy-1 my-2">
<h5 class="text-primary text-center">Buyer Details</h5>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Buyer')->class('form-label') }}
{{ html()->select('buyer_id', $employeeList)->class('form-control')->placeholder('Select Buyer') }}
</div>
<div class="col-md-4">
{{ html()->label('Address No.')->class('form-label') }}
{{ html()->text('buyer_address')->class('form-control')->placeholder('Enter Address') }}
</div>
<div class="col-md-4">
{{ html()->label('VAT No.')->class('form-label') }}
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter Buyer VAT No') }}
</div>
<div class="col-md-4">
{{ html()->label('Contact No')->class('form-label') }}
{{ html()->date('sale_date')->class('form-control')->placeholder('Enter Contact No') }}
</div>
<div class="col-md-4">
{{ html()->label('Mode of Payment')->class('form-label') }}
{{ html()->select('buyer_id', [1 => 'Cash', 2 => 'Bank', 3 => 'Credit'])->class('form-control')->placeholder('Select Payment Mode') }}
</div>
</div>
{{-- <div class="row mt-2">
<p class="text-primary">Shipping Details</p>
<div class="border border-dashed"></div>
<div class="col-md-4">
{{ html()->label('Address')->class('form-label') }}
{{ html()->text('address')->class('form-control')->placeholder('Enter Address') }}
</div>
<div class="col-md-4">
{{ html()->label('Shipping Date')->class('form-label') }}
{{ html()->date('shiiping_date')->class('form-control')->placeholder('Enter Temporary Address') }}
</div>
</div> --}}
<div class="row gy-1 gx-2 mt-1">
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-info btn-icon add-btn text-end"><i class="ri-add-line"></i></button>
</div>
@include('taxation::invoice.clone-product')
<div class="appendProductCard"></div>
</div>
<div class="d-flex justify-content-end w-30 mb-2">
<table class="table-borderless align-middle">
<tbody>
<tr>
<th scope="row">Sub Total</th>
<td style="width:150px;">
<input type="text" class="form-control bg-light border-0" id="subtotal" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr>
<th scope="row">Estimated Tax (11%)</th>
<td>
<input type="text" class="form-control bg-light border-0" id="tax" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr>
<th scope="row">Discount</th>
<td>
<input type="text" class="form-control bg-light border-0" id="discount" placeholder="$0.00"
readonly="">
</td>
</tr>
<tr class="border-top border-top-dashed">
<th scope="row">Total Amount</th>
<td>
<input type="text" class="form-control bg-light border-0" id="total" placeholder="$0.00"
readonly="">
</td>
</tr>
</tbody>
</table>
</div>
<div class="mb-4 text-end">
<button type="submit" class="btn btn-success w-sm">Save</button>
</div>
@push('js')
<script src="{{ asset('assets/libs/cleave.js/cleave.min.js') }}"></script>
<script src="{{ asset('assets/js/pages/form-masks.init.js') }}"></script>
<script>
$("body").on('click', '.add-btn', function(e) {
e.preventDefault();
numberInc = $('.product-card').length
$.ajax({
type: 'get',
url: '{{ route('cloneProduct') }}',
data: {
numberInc: numberInc
},
success: function(response) {
$('.appendProductCard').append(response.view)
// $('#invoice-container').html(response.view).fadeIn()
},
error: function(xhr) {
},
});
});
$("body").on('click', '.btn-remove', function() {
if ($('.product-card').length > 1) {
$(this).parents(".product-card").remove();
}
recalculate();
});
function amountKeyup() {
$("body").on('keyup', '.product-price', function() {
var priceInput = $(this);
var qtyInput = priceInput.closest(".row").find(".product-quantity");
var linePrice = priceInput.closest(".row").find(".product-line-price");
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
});
$("body").on('keyup', '.product-quantity', function() {
var priceInput = $(this);
var qtyInput = priceInput.closest(".row").find(".product-price");
var linePrice = priceInput.closest(".row").find(".product-line-price");
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
});
}
amountKeyup()
function updateQuantity(rate, qty, linePriceInput) {
var amount = (rate * qty).toFixed(2);
linePriceInput.val(amount);
recalculate();
}
function recalculate() {
var subtotal = 0;
$(".product-line-price").each(function() {
if ($(this).val()) {
subtotal += parseFloat($(this).val());
}
});
var tax = subtotal * 0.125;
var discount = subtotal * 0.15;
var shipping = subtotal > 0 ? 65 : 0;
var total = subtotal + tax + shipping - discount;
$("#subtotal").val(subtotal.toFixed(2));
$("#tax").val(tax.toFixed(2));
$("#discount").val(discount.toFixed(2));
$("#shipping").val(shipping.toFixed(2));
$("#total").val(total.toFixed(2));
// $("#totalamountInput").val(total.toFixed(2));
// $("#amountTotalPay").val(total.toFixed(2));
}
</script>
@endpush

View File

@ -1,16 +0,0 @@
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-modal="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalgridLabel">View Leave</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="{{ route('leave.store') }}" class="needs-validation" novalidate method="post">
@csrf
@include('leave::leave.partials.action')
</form>
</div>
</div>
</div>
</div>

View File

@ -1,29 +0,0 @@
<!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>Taxation 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-taxation', 'resources/assets/sass/app.scss') }} --}}
</head>
<body>
@yield('content')
{{-- Vite JS --}}
{{-- {{ module_vite('build-taxation', 'resources/assets/js/app.js') }} --}}
</body>

View File

@ -1,19 +0,0 @@
<?php
use Illuminate\Support\Facades\Route;
use Modules\Taxation\Http\Controllers\TaxationController;
/*
*--------------------------------------------------------------------------
* 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('taxation', TaxationController::class)->names('taxation');
});

Some files were not shown because too many files have changed in this diff Show More