Compare commits
1 Commits
e9c62209d4
...
omis_ranja
Author | SHA1 | Date | |
---|---|---|---|
442822e472 |
@ -1,85 +0,0 @@
|
||||
<?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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\CompanyRepository;
|
||||
use Modules\Admin\Services\AdminService;
|
||||
|
||||
class CompanyController extends Controller
|
||||
{
|
||||
private $companyRepository;
|
||||
private $adminService;
|
||||
|
||||
public function __construct(CompanyRepository $companyRepository, AdminService $adminService)
|
||||
{
|
||||
$this->companyRepository = $companyRepository;
|
||||
$this->adminService = $adminService;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Company Lists';
|
||||
$data['companyLists'] = $this->companyRepository->findAll();
|
||||
return view('admin::companies.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Companys';
|
||||
$data['editable'] = false;
|
||||
$data['companyTypeLists'] = $this->adminService->pluckCompanyTypes();
|
||||
return view('admin::companies.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->companyRepository->create($request->all());
|
||||
toastr()->success('Company Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('company.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::companies.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Company';
|
||||
$data['editable'] = true;
|
||||
$data['companyTypeLists'] = $this->adminService->pluckCompanyTypes();
|
||||
$data['company'] = $this->companyRepository->getCompanyById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::companies.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->companyRepository->update($id, $request->all());
|
||||
toastr()->success('Company Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('company.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->companyRepository->delete($id);
|
||||
toastr()->success('Company Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('company.index');
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\CompanyTypeRepository;
|
||||
|
||||
class CompanyTypeController extends Controller
|
||||
{
|
||||
private $companyTypeRepository;
|
||||
|
||||
public function __construct(CompanyTypeRepository $companyTypeRepository)
|
||||
{
|
||||
$this->companyTypeRepository = $companyTypeRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Company Type Lists';
|
||||
$data['companyTypeLists'] = $this->companyTypeRepository->findAll();
|
||||
return view('admin::companytypes.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Company Type';
|
||||
$data['editable'] = false;
|
||||
return view('admin::companytypes.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->companyTypeRepository->create($request->all());
|
||||
toastr()->success('Company Type Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('companyType.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::companytypes.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Company Type';
|
||||
$data['editable'] = true;
|
||||
$data['companyType'] = $this->companyTypeRepository->getCompanyById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::companytypes.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->companyTypeRepository->update($id, $request->all());
|
||||
toastr()->success('Company Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('company.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->companyTypeRepository->delete($id);
|
||||
toastr()->success('Company Type Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('companyType.index');
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\ComplaintRepository;
|
||||
|
||||
class ComplaintController extends Controller
|
||||
{
|
||||
private $complaintRepository;
|
||||
|
||||
public function __construct(ComplaintRepository $complaintRepository)
|
||||
{
|
||||
$this->complaintRepository = $complaintRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Complaint Lists';
|
||||
$data['complaintLists'] = $this->complaintRepository->findAll();
|
||||
return view('admin::complaints.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Complaints';
|
||||
$data['editable'] = false;
|
||||
return view('admin::complaints.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->complaintRepository->create($request->all());
|
||||
toastr()->success('Complaint Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('complaint.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::complaints.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Complaints';
|
||||
$data['editable'] = true;
|
||||
$data['complaint'] = $this->complaintRepository->getComplaintById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::complaints.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->complaintRepository->update($id, $request->all());
|
||||
toastr()->success('Complaint Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('complaint.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->complaintRepository->delete($id);
|
||||
toastr()->success('Complaint Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('complaint.index');
|
||||
}
|
||||
}
|
@ -1,218 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,209 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
<?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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\TransferRepository;
|
||||
|
||||
class TransferController extends Controller
|
||||
{
|
||||
private $transferRepository;
|
||||
|
||||
public function __construct(TransferRepository $transferRepository)
|
||||
{
|
||||
$this->transferRepository = $transferRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Transfer Lists';
|
||||
$data['transferLists'] = $this->transferRepository->findAll();
|
||||
return view('admin::transfers.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Transfers';
|
||||
$data['editable'] = false;
|
||||
return view('admin::transfers.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->transferRepository->create($request->all());
|
||||
toastr()->success('Transfer Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('transfer.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::transfers.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Transfers';
|
||||
$data['editable'] = true;
|
||||
$data['transfer'] = $this->transferRepository->getTransferById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::transfers.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->transferRepository->update($id, $request->all());
|
||||
toastr()->success('Transfer Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('transfer.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->transferRepository->delete($id);
|
||||
toastr()->success('Transfer Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('transfer.index');
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\WarningRepository;
|
||||
|
||||
class WarningController extends Controller
|
||||
{
|
||||
private $warningRepository;
|
||||
|
||||
public function __construct(WarningRepository $warningRepository)
|
||||
{
|
||||
$this->warningRepository = $warningRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Warning Lists';
|
||||
$data['warningLists'] = $this->warningRepository->findAll();
|
||||
return view('admin::warnings.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Warnings';
|
||||
$data['editable'] = false;
|
||||
return view('admin::warnings.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->warningRepository->create($request->all());
|
||||
toastr()->success('Warning Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('warning.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::warnings.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Warnings';
|
||||
$data['editable'] = true;
|
||||
$data['warning'] = $this->warningRepository->getWarningById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::warnings.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->warningRepository->update($id, $request->all());
|
||||
toastr()->success('Warning Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('warning.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->warningRepository->delete($id);
|
||||
toastr()->success('Warning Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('warning.index');
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?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',
|
||||
];
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Database\factories\CompanyFactory;
|
||||
|
||||
class Company extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_companies';
|
||||
protected $primaryKey = 'company_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'alias',
|
||||
'company_type_id',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Database\factories\CompanyTypeFactory;
|
||||
|
||||
class CompanyType extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_company_types';
|
||||
protected $primaryKey = 'company_type_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'alias',
|
||||
'status',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Database\factories\ComplaintFactory;
|
||||
|
||||
class Complaint extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_complaints';
|
||||
protected $primaryKey = 'complaint_id';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'complaint_id',
|
||||
'employee_id',
|
||||
'complaint_date',
|
||||
'complaint_by',
|
||||
'description',
|
||||
'remarks',
|
||||
'status',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?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',
|
||||
];
|
||||
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Database\factories\TransferFactory;
|
||||
|
||||
class Transfer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_transfers';
|
||||
protected $primaryKey = 'transfer_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'employee_id',
|
||||
'old_department_id',
|
||||
'new_department_id',
|
||||
'status',
|
||||
'transfer_date',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Admin\Database\factories\WarningFactory;
|
||||
|
||||
class Warning extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_warnings';
|
||||
protected $primaryKey = 'warning_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'employee_id',
|
||||
'subject',
|
||||
'warning_date',
|
||||
'description',
|
||||
'remarks',
|
||||
'status',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?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);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface CompanyInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getCompanyById($companyId);
|
||||
public function delete($companyId);
|
||||
public function create(array $companyDetails);
|
||||
public function update($companyId, array $newDetails);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Company;
|
||||
|
||||
|
||||
class CompanyRepository implements CompanyInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Company::get();
|
||||
}
|
||||
|
||||
public function getCompanyById($companyId)
|
||||
{
|
||||
return Company::findOrFail($companyId);
|
||||
}
|
||||
|
||||
public function delete($companyId)
|
||||
{
|
||||
Company::destroy($companyId);
|
||||
}
|
||||
|
||||
public function create(array $companyDetails)
|
||||
{
|
||||
return Company::create($companyDetails);
|
||||
}
|
||||
|
||||
public function update($companyId, array $newDetails)
|
||||
{
|
||||
return Company::where('company_id', $companyId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface CompanyTypeInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getCompanyTypeById($companyTypeId);
|
||||
public function delete($companyTypeId);
|
||||
public function create(array $companyTypeDetails);
|
||||
public function update($companyTypeId, array $newDetails);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\CompanyType;
|
||||
|
||||
|
||||
class CompanyTypeRepository implements CompanyTypeInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return CompanyType::get();
|
||||
}
|
||||
|
||||
public function getCompanyTypeById($companyTypeId)
|
||||
{
|
||||
return CompanyType::findOrFail($companyTypeId);
|
||||
}
|
||||
|
||||
public function delete($companyTypeId)
|
||||
{
|
||||
CompanyType::destroy($companyTypeId);
|
||||
}
|
||||
|
||||
public function create(array $companyTypeDetails)
|
||||
{
|
||||
return CompanyType::create($companyTypeDetails);
|
||||
}
|
||||
|
||||
public function update($companyTypeId, array $newDetails)
|
||||
{
|
||||
return CompanyType::where('companyType_id', $companyTypeId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface ComplaintInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getComplaintById($complaintId);
|
||||
public function delete($complaintId);
|
||||
public function create(array $complaintDetails);
|
||||
public function update($complaintId, array $newDetails);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Complaint;
|
||||
|
||||
|
||||
class ComplaintRepository implements ComplaintInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Complaint::get();
|
||||
}
|
||||
|
||||
public function getComplaintById($complaintId)
|
||||
{
|
||||
return Complaint::findOrFail($complaintId);
|
||||
}
|
||||
|
||||
public function delete($complaintId)
|
||||
{
|
||||
Complaint::destroy($complaintId);
|
||||
}
|
||||
|
||||
public function create(array $complaintDetails)
|
||||
{
|
||||
return Complaint::create($complaintDetails);
|
||||
}
|
||||
|
||||
public function update($complaintId, array $newDetails)
|
||||
{
|
||||
return Complaint::where('complaint_id', $complaintId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?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);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?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);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface TransferInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getTransferById($transferId);
|
||||
public function delete($transferId);
|
||||
public function create(array $transferDetails);
|
||||
public function update($transferId, array $newDetails);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Transfer;
|
||||
|
||||
|
||||
class TransferRepository implements TransferInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Transfer::get();
|
||||
}
|
||||
|
||||
public function getTransferById($transferId)
|
||||
{
|
||||
return Transfer::findOrFail($transferId);
|
||||
}
|
||||
|
||||
public function delete($transferId)
|
||||
{
|
||||
Transfer::destroy($transferId);
|
||||
}
|
||||
|
||||
public function create(array $transferDetails)
|
||||
{
|
||||
return Transfer::create($transferDetails);
|
||||
}
|
||||
|
||||
public function update($transferId, array $newDetails)
|
||||
{
|
||||
return Transfer::where('transfer_id', $transferId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface WarningInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getWarningById($warningId);
|
||||
public function delete($warningId);
|
||||
public function create(array $warningDetails);
|
||||
public function update($warningId, array $newDetails);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Warning;
|
||||
|
||||
|
||||
class WarningRepository implements WarningInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Warning::get();
|
||||
}
|
||||
|
||||
public function getWarningById($warningId)
|
||||
{
|
||||
return Warning::findOrFail($warningId);
|
||||
}
|
||||
|
||||
public function delete($warningId)
|
||||
{
|
||||
Warning::destroy($warningId);
|
||||
}
|
||||
|
||||
public function create(array $warningDetails)
|
||||
{
|
||||
return Warning::create($warningDetails);
|
||||
}
|
||||
|
||||
public function update($warningId, array $newDetails)
|
||||
{
|
||||
return Warning::where('warning_id', $warningId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -3,10 +3,7 @@ namespace Modules\Admin\Services;
|
||||
|
||||
use Modules\Admin\Models\Castes;
|
||||
use Modules\Admin\Models\Cities;
|
||||
use Modules\Admin\Models\CompanyType;
|
||||
use Modules\Admin\Models\Country;
|
||||
use Modules\Admin\Models\Departments;
|
||||
use Modules\Admin\Models\Designations;
|
||||
use Modules\Admin\Models\Districts;
|
||||
use Modules\Admin\Models\Genders;
|
||||
use Modules\Admin\Models\Nationalities;
|
||||
@ -19,11 +16,6 @@ final class AdminService
|
||||
return Country::pluck('title', 'country_id');
|
||||
}
|
||||
|
||||
function pluckCompanyTypes()
|
||||
{
|
||||
return CompanyType::pluck('title', 'company_type_id');
|
||||
}
|
||||
|
||||
function pluckProvinces()
|
||||
{
|
||||
return Province::pluck('title', 'province_id');
|
||||
@ -55,14 +47,5 @@ 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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?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->date('date')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_promotion_demotions');
|
||||
}
|
||||
};
|
@ -1,37 +0,0 @@
|
||||
<?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->integer('status')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_appreciations');
|
||||
}
|
||||
};
|
@ -1,35 +0,0 @@
|
||||
<?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->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_resignations');
|
||||
}
|
||||
};
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_complaints', function (Blueprint $table) {
|
||||
$table->tinyInteger('complaint_id')->unsigned()->autoIncrement();
|
||||
$table->unsignedBigInteger('employee_id')->nullable();
|
||||
$table->date('complaint_date')->nullable();
|
||||
$table->unsignedBigInteger('complaint_by')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_complaints');
|
||||
}
|
||||
};
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_transfers', function (Blueprint $table) {
|
||||
$table->tinyInteger('transfer_id')->unsigned()->autoIncrement();
|
||||
$table->unsignedBigInteger('employee_id')->nullable();
|
||||
$table->unsignedBigInteger('old_department_id')->nullable();
|
||||
$table->unsignedBigInteger('new_department_id')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->date('transfer_date')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_transfers');
|
||||
}
|
||||
};
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_warnings', function (Blueprint $table) {
|
||||
$table->tinyInteger('warning_id')->unsigned()->autoIncrement();
|
||||
$table->unsignedBigInteger('employee_id')->nullable();
|
||||
$table->mediumText('subject')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->date('warning_date')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_warnings');
|
||||
}
|
||||
};
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_companies', function (Blueprint $table) {
|
||||
$table->tinyInteger('company_id')->unsigned()->autoIncrement();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('alias')->nullable();
|
||||
$table->unsignedBigInteger('company_type_id')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_companies');
|
||||
}
|
||||
};
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_company_types', function (Blueprint $table) {
|
||||
$table->tinyInteger('company_type_id')->unsigned()->autoIncrement();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('alias')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_company_types');
|
||||
}
|
||||
};
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('appreciation.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.appreciations.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ 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
|
@ -1,75 +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-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
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,14 +1,15 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<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('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 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>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Districts Id : </b> <span>{{ $data->districts_id }}</span></p>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('company.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.companies.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->modelForm($company, 'PUT')->route('company.update', $company->company_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.companies.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,69 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('company.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Company</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Name</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($companyLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ route('company.show', [$item->company_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
|
||||
</li>
|
||||
|
||||
<li><a href="{{ route('company.edit', [$item->company_id]) }}"
|
||||
class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
|
||||
Edit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('company.destroy', [$item->company_id]) }}"
|
||||
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('companyType.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.companytypes.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->modelForm($companyType, 'PUT')->route('companyType.update', $companytype->company_type_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.companytypes.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,69 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('companyType.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Company Type</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Name</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($companyTypeLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ route('companyType.show', [$item->company_type_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
|
||||
</li>
|
||||
|
||||
<li><a href="{{ route('companyType.edit', [$item->company_type_id]) }}"
|
||||
class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
|
||||
Edit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('companyType.destroy', [$item->company_type_id]) }}"
|
||||
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('complaint.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.complaints.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->modelForm($complaint, 'PUT')->route('complaint.update', $complaint->complaint_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.complaints.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,73 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('complaint.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Complaint</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Complaint Against</span></th>
|
||||
<th class="tb-col"><span class="overline-title">complaint By</span></th>
|
||||
<th class="tb-col"><span class="overline-title">complaint Date</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($complaintLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->employee_id }}</td>
|
||||
<td class="tb-col">{{ $item->complaint_by }}</td>
|
||||
<td class="tb-col">{{ $item->complaint_date }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ route('complaint.show', [$item->complaint_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
|
||||
</li>
|
||||
|
||||
<li><a href="{{ route('complaint.edit', [$item->complaint_id]) }}"
|
||||
class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
|
||||
Edit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('complaint.destroy', [$item->complaint_id]) }}"
|
||||
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('complaints.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,48 +0,0 @@
|
||||
@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 : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -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
|
||||
|
@ -1,43 +0,0 @@
|
||||
<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>
|
@ -1,26 +0,0 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Enter Title') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Company Type')->class('form-label') }}
|
||||
{{ html()->select('company_type_id', $companyTypeLists)->class('form-select')->placeholder('Select Company Type') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 5]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 5]) }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add Company', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -1,11 +0,0 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Enter Title') }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add Company Type', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -1,33 +0,0 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Complaint Against')->class('form-label') }}
|
||||
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Complaint By')->class('form-label') }}
|
||||
{{ html()->select('complaint_by')->class('form-select')->placeholder('Select Who Complaint') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Complaint Date')->class('form-label') }}
|
||||
{{ html()->date('complaint_date')->class('form-control')->placeholder('Select Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 5]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 5]) }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add Complaint', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -1,46 +0,0 @@
|
||||
<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>
|
@ -1,26 +0,0 @@
|
||||
<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>
|
@ -1,37 +0,0 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Employee')->class('form-label') }}
|
||||
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Department From')->class('form-label') }}
|
||||
{{ html()->select('old_department_id')->class('form-select')->placeholder('Select Previous Department') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Department To')->class('form-label') }}
|
||||
{{ html()->select('new_department_id')->class('form-select')->placeholder('Select New Department') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Transfer Date')->class('form-label') }}
|
||||
{{ html()->date('transfer_date')->class('form-control')->placeholder('Select Transfer Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add Transfer', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -1,36 +0,0 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Employee')->class('form-label') }}
|
||||
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Warning type')->class('form-label') }}
|
||||
{{ html()->select('type')->class('form-control')->placeholder('Select Warning Type') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Warning Date')->class('form-label') }}
|
||||
{{ html()->date('warning_date')->class('form-control')->placeholder('Select Warning Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Subject')->class('form-label') }}
|
||||
{{ html()->text('subject')->class('form-control')->placeholder('Write Warning Suject') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
{{ html()->label('Remarks')->class('form-label') }}
|
||||
{{ html()->textarea('remarks')->class('form-control')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Add Warning', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('promotionDemotion.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.promotiondemotions.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ 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
|
@ -1,75 +0,0 @@
|
||||
@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
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('resignation.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.resignations.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ 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
|
@ -1,77 +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-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
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('transfer.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.transfers.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->modelForm($transfer, 'PUT')->route('transfer.update', $transfer->transfer_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.transfers.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,75 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('transfer.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Transfer</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Employee</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Department From</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Department To</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Transfer Date</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($transferLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->employee_id }}</td>
|
||||
<td class="tb-col">{{ $item->old_department_id }}</td>
|
||||
<td class="tb-col">{{ $item->new_department_id }}</td>
|
||||
<td class="tb-col">{{ $item->transfer_date }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ route('transfer.show', [$item->transfer_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
|
||||
</li>
|
||||
|
||||
<li><a href="{{ route('transfer.edit', [$item->transfer_id]) }}"
|
||||
class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
|
||||
Edit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('transfer.destroy', [$item->transfer_id]) }}"
|
||||
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->form('POST')->route('warning.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.warnings.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +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'>
|
||||
|
||||
{{ html()->modelForm($warning, 'PUT')->route('warning.update', $warning->warning_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('admin::partials.warnings.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,75 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('warning.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Warning</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Employee</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Warning Type</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Subject</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Warning Date</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($warningLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->employee_id }}</td>
|
||||
<td class="tb-col">{{ $item->type }}</td>
|
||||
<td class="tb-col">{{ $item->subject }}</td>
|
||||
<td class="tb-col">{{ $item->warning_date }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ route('warning.show', [$item->warning_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> View</a>
|
||||
</li>
|
||||
|
||||
<li><a href="{{ route('warning.edit', [$item->warning_id]) }}"
|
||||
class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i>
|
||||
Edit</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('warning.destroy', [$item->warning_id]) }}"
|
||||
class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,48 +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-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">View Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('designations.index') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='card-body'>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</span></p>
|
||||
<p><b>Job Description : </b> <span>{{ $data->job_description }}</span></p>
|
||||
<p><b>Departments Id : </b> <span>{{ $data->departments_id }}</span></p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{ $data->created_at }}</span></p>
|
||||
<p><b>Created By :</b> <span>{{ $data->createdBy }}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{ $data->updated_at }}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{ $data->updatedBy }}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endSection
|
@ -2,14 +2,6 @@
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Admin\Http\Controllers\AdminController;
|
||||
use Modules\Admin\Http\Controllers\AppreciationController;
|
||||
use Modules\Admin\Http\Controllers\CompanyController;
|
||||
use Modules\Admin\Http\Controllers\CompanyTypeController;
|
||||
use Modules\Admin\Http\Controllers\ComplaintController;
|
||||
use Modules\Admin\Http\Controllers\PromotionDemotionController;
|
||||
use Modules\Admin\Http\Controllers\ResignationController;
|
||||
use Modules\Admin\Http\Controllers\TransferController;
|
||||
use Modules\Admin\Http\Controllers\WarningController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -24,14 +16,6 @@ use Modules\Admin\Http\Controllers\WarningController;
|
||||
|
||||
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');
|
||||
Route::resource('complaint', ComplaintController::class)->names('complaint');
|
||||
Route::resource('transfer', TransferController::class)->names('transfer');
|
||||
Route::resource('warning', WarningController::class)->names('warning');
|
||||
Route::resource('company', CompanyController::class)->names('company');
|
||||
Route::resource('company-type', CompanyTypeController::class)->names('companyType');
|
||||
});
|
||||
|
||||
require __DIR__ . '/route.countries.php';
|
||||
|
@ -45,8 +45,8 @@ class EmployeeController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Employee';
|
||||
$data['departmentList'] = $this->adminService->pluckDepartments();
|
||||
$data['designationList'] = $this->adminService->pluckDesignations();
|
||||
$data['departmentList'] = [];
|
||||
$data['designationList'] = [];
|
||||
$data['nationalityList'] = $this->adminService->pluckNationalities();
|
||||
$data['genderList'] = $this->adminService->pluckGenders();
|
||||
$data['casteList'] = $this->adminService->pluckCastes();
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Modules\Employee\Repositories;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Modules\Employee\Models\Employee;
|
||||
|
||||
class EmployeeRepository implements EmployeeInterface
|
||||
@ -38,7 +39,7 @@ class EmployeeRepository implements EmployeeInterface
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return Employee::pluck('first_name', 'id');
|
||||
return Employee::pluck(DB::raw('CONCAT(first_name," ", middle_name , " ",last_name) AS full_name'), 'id');
|
||||
}
|
||||
|
||||
// public function uploadImage($file)
|
||||
|
@ -4,7 +4,8 @@ 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.
|
||||
*/
|
||||
@ -42,6 +43,6 @@ return new class extends Migration {
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_employees');
|
||||
Schema::dropIfExists('employees');
|
||||
}
|
||||
};
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Gender')->class('form-label') }}
|
||||
{{ html()->select('genders_id', $genderList)->class('form-select')->placeholder('Select Gender') }}
|
||||
{{ html()->select('genders_id', [1 => 'male', 2 => 'female'])->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('nationality_id', $nationalityList)->class('form-select')->placeholder('Select Nationality') }}
|
||||
{{ html()->select('nationalities_id', [1 => 'Nepal', 2 => 'Other'])->class('form-control')->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', $departmentList)->class('form-select')->placeholder('Select Department') }}
|
||||
{{ html()->select('department_id', ['Nepal'])->class('form-select')->placeholder('Select Department') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Designation')->class('form-label') }}
|
||||
{{ html()->select('designation_id', $designationList)->class('form-select')->placeholder('Select Designation') }}
|
||||
{{ html()->select('designation_id', ['Nepal'])->class('form-select')->placeholder('Select Designation') }}
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-md-4">
|
||||
@ -115,6 +115,7 @@
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
|
||||
<div class="mb-4 text-end">
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
</div>
|
||||
|
@ -5,22 +5,19 @@ namespace Modules\Leave\Http\Controllers;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Employee\Repositories\EmployeeRepository;
|
||||
use Modules\Leave\Repositories\LeaveRepository;
|
||||
use Modules\Leave\Repositories\LeaveTypeRepository;
|
||||
use Modules\Employee\Repositories\EmployeeInterface;
|
||||
use Modules\Leave\Repositories\LeaveInterface;
|
||||
use Yoeunes\Toastr\Facades\Toastr;
|
||||
|
||||
class LeaveController extends Controller
|
||||
{
|
||||
private $leaveRepository;
|
||||
private $employeeRepository;
|
||||
private $leaveTypeRepository;
|
||||
|
||||
public function __construct(LeaveRepository $leaveRepository, EmployeeRepository $employeeRepository, LeaveTypeRepository $leaveTypeRepository)
|
||||
public function __construct(LeaveInterface $leaveRepository, EmployeeInterface $employeeRepository)
|
||||
{
|
||||
$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']]);
|
||||
@ -45,9 +42,7 @@ 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);
|
||||
}
|
||||
|
||||
@ -81,8 +76,6 @@ class LeaveController extends Controller
|
||||
{
|
||||
$data['title'] = 'Edit Leave';
|
||||
|
||||
$data['editable'] = true;
|
||||
|
||||
$data['leave'] = $this->leaveRepository->getLeaveById($id);
|
||||
|
||||
return view('leave::leave.edit', $data);
|
||||
|
@ -5,14 +5,18 @@ 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(LeaveTypeInterface $leaveTypeRepository)
|
||||
public function __construct(LeaveInterface $leaveRepository, LeaveTypeInterface $leaveTypeRepository)
|
||||
{
|
||||
$this->leaveRepository = $leaveRepository;
|
||||
$this->leaveTypeRepository = $leaveTypeRepository;
|
||||
}
|
||||
/**
|
||||
@ -20,8 +24,7 @@ class LeaveTypeController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'LeaveType List';
|
||||
$data['leaveTypeLists'] = $this->leaveTypeRepository->findAll();
|
||||
$data['leaveTypes'] = $this->leaveTypeRepository->findAll();
|
||||
return view('leave::leave-type.index', $data);
|
||||
}
|
||||
|
||||
@ -30,10 +33,7 @@ class LeaveTypeController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create LeaveType';
|
||||
|
||||
$data['editable'] = false;
|
||||
|
||||
$data['title'] = 'Create Leave Type';
|
||||
return view('leave::leave-type.create', $data);
|
||||
}
|
||||
|
||||
@ -42,12 +42,7 @@ 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;
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
@ -63,11 +58,7 @@ class LeaveTypeController extends Controller
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['editable'] = false;
|
||||
|
||||
$data['title'] = 'Edit LeaveType';
|
||||
|
||||
return view('leave::leave-type.edit', $data);
|
||||
return view('leave::leave-type.edit');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,12 +4,19 @@ 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;
|
||||
|
||||
protected $table = 'tbl_leave_types';
|
||||
protected $primaryKey = 'leave_type_id';
|
||||
protected $guarded = [];
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
protected static function newFactory(): LeaveTypeFactory
|
||||
{
|
||||
//return LeaveTypeFactory::new();
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,9 @@ namespace Modules\Leave\Repositories;
|
||||
|
||||
interface LeaveTypeInterface
|
||||
{
|
||||
public function pluck();
|
||||
public function findAll();
|
||||
public function getLeaveTypeById($leaveTypeId);
|
||||
public function delete($leaveTypeId);
|
||||
public function create(array $LeaveTypeDetails);
|
||||
public function update($leaveTypeId, array $newDetails);
|
||||
public function getLeaveById($leaveId);
|
||||
public function delete($leaveId);
|
||||
public function create(array $LeaveDetails);
|
||||
public function update($leaveId, array $newDetails);
|
||||
}
|
||||
|
@ -6,33 +6,29 @@ 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 getLeaveTypeById($leaveTypeId)
|
||||
public function getLeaveById($leaveId)
|
||||
{
|
||||
return LeaveType::findOrFail($leaveTypeId);
|
||||
return LeaveType::findOrFail($leaveId);
|
||||
}
|
||||
|
||||
public function delete($leaveTypeId)
|
||||
public function delete($leaveId)
|
||||
{
|
||||
LeaveType::destroy($leaveTypeId);
|
||||
LeaveType::destroy($leaveId);
|
||||
}
|
||||
|
||||
public function create(array $leaveTypeDetails)
|
||||
public function create(array $leaveDetails)
|
||||
{
|
||||
return LeaveType::create($leaveTypeDetails);
|
||||
return LeaveType::create($leaveDetails);
|
||||
}
|
||||
|
||||
public function update($leaveTypeId, array $newDetails)
|
||||
public function update($leaveId, array $newDetails)
|
||||
{
|
||||
return LeaveType::where('leave_type_id', $leaveTypeId)->update($newDetails);
|
||||
return LeaveType::where('leave_id', $leaveId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,8 @@ 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.
|
||||
*/
|
||||
@ -16,12 +17,6 @@ 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();
|
||||
});
|
||||
}
|
||||
|
@ -7,12 +7,12 @@
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('leaveType.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('leave::leave-type.partials.action')
|
||||
@include('leave::leave.partials.action')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
{{ html()->modelForm($leave, 'PUT')->route('leave.update', $leave->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('leave::leave-type.partials.action')
|
||||
@include('leave::leave.partials.action')
|
||||
|
||||
{{ html()->closeModelForm() }}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user