complaint calendar transfer warning
This commit is contained in:
67
Modules/Admin/app/Http/Controllers/CalendarController.php
Normal file
67
Modules/Admin/app/Http/Controllers/CalendarController.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class CalendarController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('admin::index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('admin::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ class CompanyController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Companys';
|
||||
$data['title'] = 'Create Company';
|
||||
$data['editable'] = false;
|
||||
$data['companyTypeLists'] = $this->adminService->pluckCompanyTypes();
|
||||
return view('admin::companies.create', $data);
|
||||
|
@ -31,7 +31,7 @@ class ComplaintController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Complaints';
|
||||
$data['title'] = 'Create Complaint';
|
||||
$data['editable'] = false;
|
||||
return view('admin::complaints.create', $data);
|
||||
}
|
||||
@ -65,7 +65,7 @@ class ComplaintController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Complaints';
|
||||
$data['title'] = 'Edit Complaint';
|
||||
$data['editable'] = true;
|
||||
$data['complaint'] = $this->complaintRepository->getComplaintById($id);
|
||||
|
||||
|
109
Modules/Admin/app/Http/Controllers/EventController.php
Normal file
109
Modules/Admin/app/Http/Controllers/EventController.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\EventRepository;
|
||||
|
||||
class EventController extends Controller
|
||||
{
|
||||
private $eventRepository;
|
||||
|
||||
public function __construct(EventRepository $eventRepository)
|
||||
{
|
||||
$this->eventRepository = $eventRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Event Lists';
|
||||
$data['eventLists'] = $this->eventRepository->findAll();
|
||||
return view('admin::events.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Event';
|
||||
$data['editable'] = false;
|
||||
return view('admin::events.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->eventRepository->create($request->all());
|
||||
toastr()->success('Event Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('event.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::events.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Event';
|
||||
$data['editable'] = true;
|
||||
$data['event'] = $this->eventRepository->getEventById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::events.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->eventRepository->update($id, $request->all());
|
||||
toastr()->success('Event Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('event.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->eventRepository->delete($id);
|
||||
toastr()->success('Event Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('event.index');
|
||||
}
|
||||
}
|
109
Modules/Admin/app/Http/Controllers/HolidayController.php
Normal file
109
Modules/Admin/app/Http/Controllers/HolidayController.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Admin\Repositories\HolidayRepository;
|
||||
|
||||
class HolidayController extends Controller
|
||||
{
|
||||
private $holidayRepository;
|
||||
|
||||
public function __construct(HolidayRepository $holidayRepository)
|
||||
{
|
||||
$this->holidayRepository = $holidayRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Holiday Lists';
|
||||
$data['holidayLists'] = $this->holidayRepository->findAll();
|
||||
return view('admin::holidays.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Holiday';
|
||||
$data['editable'] = false;
|
||||
return view('admin::holidays.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$this->holidayRepository->create($request->all());
|
||||
toastr()->success('Holiday Created Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('holiday.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::holidays.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Holiday';
|
||||
$data['editable'] = true;
|
||||
$data['holiday'] = $this->holidayRepository->getHolidayById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('admin::holidays.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
try {
|
||||
|
||||
$this->holidayRepository->update($id, $request->all());
|
||||
toastr()->success('Holiday Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('holiday.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->holidayRepository->delete($id);
|
||||
toastr()->success('Holiday Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('holiday.index');
|
||||
}
|
||||
}
|
@ -31,7 +31,7 @@ class TransferController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Transfers';
|
||||
$data['title'] = 'Create Transfer';
|
||||
$data['editable'] = false;
|
||||
return view('admin::transfers.create', $data);
|
||||
}
|
||||
@ -65,7 +65,7 @@ class TransferController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Transfers';
|
||||
$data['title'] = 'Edit Transfer';
|
||||
$data['editable'] = true;
|
||||
$data['transfer'] = $this->transferRepository->getTransferById($id);
|
||||
|
||||
|
@ -31,7 +31,7 @@ class WarningController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Warnings';
|
||||
$data['title'] = 'Create Warning';
|
||||
$data['editable'] = false;
|
||||
return view('admin::warnings.create', $data);
|
||||
}
|
||||
@ -65,7 +65,7 @@ class WarningController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
try {
|
||||
$data['title'] = 'Edit Warnings';
|
||||
$data['title'] = 'Edit Warning';
|
||||
$data['editable'] = true;
|
||||
$data['warning'] = $this->warningRepository->getWarningById($id);
|
||||
|
||||
|
Reference in New Issue
Block a user