diff --git a/app/Classes/Modules/Accounts/ControllersLogic/AuthenticateUserLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/AuthenticateUserLogic.php index 432a9eeb..62114ed7 100644 --- a/app/Classes/Modules/Accounts/ControllersLogic/AuthenticateUserLogic.php +++ b/app/Classes/Modules/Accounts/ControllersLogic/AuthenticateUserLogic.php @@ -63,6 +63,7 @@ class AuthenticateUserLogic extends AbstractControllerLogic return $this->response(['access_token' => $token, 'redirect_url' => $this->authenticationRedirect->url()]); } catch (\Exception $exception){ + dd($exception); throw new ErrorException($exception->getMessage(), $exception->getCode()); } diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CheckEmailLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CheckEmailLogic.php new file mode 100644 index 00000000..6c0a7444 --- /dev/null +++ b/app/Classes/Modules/Accounts/ControllersLogic/CheckEmailLogic.php @@ -0,0 +1,59 @@ + 'User found', + 'message' => 'Account Already Exists' + ]; + } + + /** @var FetchesUser */ + private $fetchesUser; + + + /** + * CheckEmailLogic constructor. + * @param FetchesUser $fetchesUser + */ + public function __construct(FetchesUser $fetchesUser) + { + $this->fetchesUser = $fetchesUser; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + protected function logic(Request $request): JsonResponse { + + try { + + $this->fetchesUser->execute(['email' => $request->input('email')]); + + return $this->response(); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Accounts/ControllersLogic/ListUsersLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/ListUsersLogic.php new file mode 100644 index 00000000..2899073d --- /dev/null +++ b/app/Classes/Modules/Accounts/ControllersLogic/ListUsersLogic.php @@ -0,0 +1,65 @@ + 'List Users', + 'message' => 'You have successfully retrieved a list of users' + ]; + } + + /** @var CanListUsers */ + private $canListUser; + + /** @var ListsUsers */ + private $listsUsers; + + /** + * ListUsersControllerLogic constructor. + * @param CanListUsers $canListUser + * @param ListsUsers $listsUsers + */ + public function __construct(CanListUsers $canListUser, ListsUsers $listsUsers) + { + $this->canListUser = $canListUser; + $this->listsUsers = $listsUsers; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + $this->canListUser->passes(); + + $query = $this->listsUsers->execute($this->listsUsers->deserializeFilters($request->input('filters'))); + + return $this->collectionResponse(UserResource::collection($query)); + + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Accounts/Services/AuthenticationRedirect.php b/app/Classes/Modules/Accounts/Services/AuthenticationRedirect.php index 397a31d9..5b7e964f 100644 --- a/app/Classes/Modules/Accounts/Services/AuthenticationRedirect.php +++ b/app/Classes/Modules/Accounts/Services/AuthenticationRedirect.php @@ -2,11 +2,18 @@ namespace App\Classes\Modules\Accounts\Services; +use App\Classes\ValueObjects\Constants\Roles; + class AuthenticationRedirect { public function url(){ - return route('dashboard'); + + if(\Auth::user()->hasRole('Shadow Admin') || \Auth::user()->hasRole('Ultimate Admin')){ + return route('dashboard.forwarder'); + } + + // return route('dashboard.importer', ['id' => Auth()->user()->employers->first()->company->id]); } } \ No newline at end of file diff --git a/app/Classes/Modules/Accounts/Services/ListsUsers.php b/app/Classes/Modules/Accounts/Services/ListsUsers.php new file mode 100644 index 00000000..95d4bfbf --- /dev/null +++ b/app/Classes/Modules/Accounts/Services/ListsUsers.php @@ -0,0 +1,33 @@ +repository = $repository; + } + + + /** + * @return Builder + */ + function getRepository(): Builder + { + return $this->repository->newQuery(); + } +} \ No newline at end of file diff --git a/app/Classes/Modules/Accounts/Standards/Rules/CanListUsers.php b/app/Classes/Modules/Accounts/Standards/Rules/CanListUsers.php new file mode 100644 index 00000000..0039de25 --- /dev/null +++ b/app/Classes/Modules/Accounts/Standards/Rules/CanListUsers.php @@ -0,0 +1,46 @@ + 'Created Company', + 'message' => 'You have successfully created a new Company' + ]; + } + + /** @var CreateCompanyProcessor */ + private $createCompanyProcessor; + + /** + * CreateCompanyLogic constructor. + * @param CreateCompanyProcessor $createCompanyProcessor + */ + public function __construct(CreateCompanyProcessor $createCompanyProcessor) + { + $this->createCompanyProcessor = $createCompanyProcessor; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + return $this->resourceResponse(new CompanyResource($this->createCompanyProcessor->execute($request))); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/ControllerLogic/DeleteCompanyLogic.php b/app/Classes/Modules/Companies/ControllerLogic/DeleteCompanyLogic.php new file mode 100644 index 00000000..83d3548b --- /dev/null +++ b/app/Classes/Modules/Companies/ControllerLogic/DeleteCompanyLogic.php @@ -0,0 +1,73 @@ + 'Deleted Company', + 'message' => 'You have successfully deleted a Company' + ]; + } + + + /** @var CanDeleteCompany */ + private $canDeleteCompany; + + /** @var DeletesCompany */ + private $deletesCompany; + + /** @var FetchesCompany */ + private $fetchesCompany; + + /** + * DeleteCompanyLogic constructor. + * @param CanDeleteCompany $canDeleteCompany + * @param DeletesCompany $deletesCompany + * @param FetchesCompany $fetchesCompany + */ + public function __construct(CanDeleteCompany $canDeleteCompany, DeletesCompany $deletesCompany, FetchesCompany $fetchesCompany) + { + $this->canDeleteCompany = $canDeleteCompany; + $this->deletesCompany = $deletesCompany; + $this->fetchesCompany = $fetchesCompany; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + $this->canDeleteCompany->passes(); + + $query = $this->fetchesCompany->execute(['id' => $request->route('id')]); + + $this->deletesCompany->execute($query); + + return $this->response([]); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/ControllerLogic/FetchCompanyLogic.php b/app/Classes/Modules/Companies/ControllerLogic/FetchCompanyLogic.php new file mode 100644 index 00000000..bf1db91a --- /dev/null +++ b/app/Classes/Modules/Companies/ControllerLogic/FetchCompanyLogic.php @@ -0,0 +1,67 @@ + 'Retrieved Company', + 'message' => 'You have successfully retrieved a Company' + ]; + } + + /** @var CanFetchCompany */ + private $canFetchCompany; + + /** @var FetchesCompany */ + private $fetchesCompany; + + /** + * FetchCompanyControllerLogic constructor. + * @param CanFetchCompany $canFetchCompany + * @param FetchesCompany $fetchesCompany + */ + public function __construct(CanFetchCompany $canFetchCompany, FetchesCompany $fetchesCompany) + { + $this->canFetchCompany = $canFetchCompany; + $this->fetchesCompany = $fetchesCompany; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + $this->canFetchCompany->passes(); + + $query = $this->fetchesCompany->execute(['id' => $request->route('id')]); + + return $this->resourceResponse(new CompanyResource($query)); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/ControllerLogic/ListCompaniesLogic.php b/app/Classes/Modules/Companies/ControllerLogic/ListCompaniesLogic.php new file mode 100644 index 00000000..96c54464 --- /dev/null +++ b/app/Classes/Modules/Companies/ControllerLogic/ListCompaniesLogic.php @@ -0,0 +1,64 @@ + 'Retrieved Companies', + 'message' => 'You have successfully retrieved a list of Companies' + ]; + } + + /** @var CanListCompanies */ + private $canListCompanies; + + /** @var ListsCompanies */ + private $listsCompanies; + + /** + * ListCompaniesControllerLogic constructor. + * @param CanListCompanies $canListCompanies + * @param ListsCompanies $listsCompanies + */ + public function __construct(CanListCompanies $canListCompanies, ListsCompanies $listsCompanies) + { + $this->canListCompanies = $canListCompanies; + $this->listsCompanies = $listsCompanies; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + $this->canListCompanies->passes(); + + $query = $this->listsCompanies->execute($this->listsCompanies->deserializeFilters($request->input('filters'))); + return $this->collectionResponse(CompanyResource::collection($query)); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/ControllerLogic/UpdateCompanyLogic.php b/app/Classes/Modules/Companies/ControllerLogic/UpdateCompanyLogic.php new file mode 100644 index 00000000..edd078bc --- /dev/null +++ b/app/Classes/Modules/Companies/ControllerLogic/UpdateCompanyLogic.php @@ -0,0 +1,78 @@ + 'Updated Company', + 'message' => 'You have successfully updated the Company' + ]; + } + + /** @var CanUpdateCompany */ + private $canUpdateCompany; + + /** @var UpdatesCompany */ + private $updatesCompany; + + /** @var FetchesCompany */ + private $fetchesCompany; + + /** + * UpdateCompanyControllerLogic constructor. + * @param CanUpdateCompany $canUpdateCompany + * @param UpdatesCompany $updatesCompany + * @param FetchesCompany $fetchesCompany + */ + public function __construct(CanUpdateCompany $canUpdateCompany, UpdatesCompany $updatesCompany, FetchesCompany $fetchesCompany) + { + $this->canUpdateCompany = $canUpdateCompany; + $this->updatesCompany = $updatesCompany; + $this->fetchesCompany = $fetchesCompany; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + $object = new CompanyObject($request->input('reference_no'), $request->input('name'), $request->input('type')); + + $this->canUpdateCompany->passes($object); + + $query = $this->fetchesCompany->execute(['id' => $request->route('id')]); + + $query = $this->updatesCompany->execute($query, $object); + + return $this->resourceResponse(new CompanyResource($query)); + + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/DataTransferObjects/ConnectionObject.php b/app/Classes/Modules/Companies/DataTransferObjects/ConnectionObject.php new file mode 100644 index 00000000..078378b4 --- /dev/null +++ b/app/Classes/Modules/Companies/DataTransferObjects/ConnectionObject.php @@ -0,0 +1,45 @@ +inviter = $inviter; + $this->invitee = $invitee; + } + + /** + * @return CompanyModule + */ + public function getInviter(): CompanyModule + { + return $this->inviter; + } + + /** + * @return CompanyModule + */ + public function getInvitee(): CompanyModule + { + return $this->invitee; + } + + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/DataTransferObjects/EmployeeObject.php b/app/Classes/Modules/Companies/DataTransferObjects/EmployeeObject.php new file mode 100644 index 00000000..816a2de5 --- /dev/null +++ b/app/Classes/Modules/Companies/DataTransferObjects/EmployeeObject.php @@ -0,0 +1,58 @@ +companyModule = $companyModule; + $this->user = $user; + $this->role = $role; + } + + /** + * @return CompanyModule + */ + public function getCompanyModule(): CompanyModule + { + return $this->companyModule; + } + + /** + * @return User + */ + public function getUser(): User + { + return $this->user; + } + + /** + * @return int + */ + public function getRole(): int + { + return $this->role; + } + + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/DataTransferObjects/ModuleObject.php b/app/Classes/Modules/Companies/DataTransferObjects/ModuleObject.php new file mode 100644 index 00000000..732799a3 --- /dev/null +++ b/app/Classes/Modules/Companies/DataTransferObjects/ModuleObject.php @@ -0,0 +1,44 @@ +company = $company; + $this->type = $type; + } + + /** + * @return Company + */ + public function getCompany(): Company + { + return $this->company; + } + + /** + * @return int + */ + public function getType(): int + { + return $this->type; + } + +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/Services/ListsCompanies.php b/app/Classes/Modules/Companies/Services/ListsCompanies.php new file mode 100644 index 00000000..179704e7 --- /dev/null +++ b/app/Classes/Modules/Companies/Services/ListsCompanies.php @@ -0,0 +1,33 @@ +repository = $repository; + } + + + /** + * @return Builder + */ + function getRepository(): Builder + { + return $this->repository->newQuery(); + } +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/Standards/Rules/CanDeleteCompany.php b/app/Classes/Modules/Companies/Standards/Rules/CanDeleteCompany.php new file mode 100644 index 00000000..b2621b4f --- /dev/null +++ b/app/Classes/Modules/Companies/Standards/Rules/CanDeleteCompany.php @@ -0,0 +1,43 @@ +execute($request); + } + +} diff --git a/app/Http/Controllers/Accounts/ListUsersController.php b/app/Http/Controllers/Accounts/ListUsersController.php new file mode 100644 index 00000000..c63d898a --- /dev/null +++ b/app/Http/Controllers/Accounts/ListUsersController.php @@ -0,0 +1,30 @@ +listsUsers = $listsUsers; + } + + + public function list(Request $request, ListUsersLogic $logic): JsonResponse { + return $logic->execute($request); + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/Companies/CreateCompanyController.php b/app/Http/Controllers/Companies/CreateCompanyController.php new file mode 100644 index 00000000..2ed56acc --- /dev/null +++ b/app/Http/Controllers/Companies/CreateCompanyController.php @@ -0,0 +1,20 @@ +execute($request); + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/Companies/DeleteCompanyController.php b/app/Http/Controllers/Companies/DeleteCompanyController.php new file mode 100644 index 00000000..f59a8eaa --- /dev/null +++ b/app/Http/Controllers/Companies/DeleteCompanyController.php @@ -0,0 +1,20 @@ +execute($request); + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/Companies/FetchCompanyController.php b/app/Http/Controllers/Companies/FetchCompanyController.php new file mode 100644 index 00000000..cc4a9a02 --- /dev/null +++ b/app/Http/Controllers/Companies/FetchCompanyController.php @@ -0,0 +1,20 @@ +execute($request); + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/Companies/ListCompaniesController.php b/app/Http/Controllers/Companies/ListCompaniesController.php new file mode 100644 index 00000000..17cc6caf --- /dev/null +++ b/app/Http/Controllers/Companies/ListCompaniesController.php @@ -0,0 +1,20 @@ +execute($request); + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/Companies/UpdateCompanyController.php b/app/Http/Controllers/Companies/UpdateCompanyController.php new file mode 100644 index 00000000..3ff239fb --- /dev/null +++ b/app/Http/Controllers/Companies/UpdateCompanyController.php @@ -0,0 +1,20 @@ +execute($request); + } + +} \ No newline at end of file diff --git a/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue b/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue new file mode 100644 index 00000000..88f4f169 --- /dev/null +++ b/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue @@ -0,0 +1,71 @@ + + \ No newline at end of file diff --git a/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue b/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue index 1528f831..25c12827 100644 --- a/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue @@ -16,7 +16,7 @@ - +
{{parameters.email}}
@@ -53,19 +53,24 @@ \ No newline at end of file diff --git a/resources/assets/vue/components/accounts/sections/LoginSectionComponent.vue b/resources/assets/vue/components/accounts/sections/LoginSectionComponent.vue new file mode 100644 index 00000000..ebe212ce --- /dev/null +++ b/resources/assets/vue/components/accounts/sections/LoginSectionComponent.vue @@ -0,0 +1,121 @@ + + \ No newline at end of file diff --git a/resources/views/pages/accounts/authentication/login.blade.php b/resources/views/pages/accounts/authentication/login.blade.php index f5059196..1a217cac 100644 --- a/resources/views/pages/accounts/authentication/login.blade.php +++ b/resources/views/pages/accounts/authentication/login.blade.php @@ -1,5 +1,93 @@ @extends('layouts.base_login') @section('inner_content') - + +
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+
+
+
+
Did you forget your password?
+
+
+
+
+

Enter your email address you're using for your account below
and we will send you a password reset link

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
Login Successful
+
+
+
+
+ Please wait for redirect +
+
+
+
+
+
+
+
+
+
+
+
reset your password
+
+
+
+
we have sent a reset password email to
Please click the reset password link to set your new password.
+
+
+
didn't receive the email yet ? Please check your spam folder, or resend the email
+
+
+
Did you remember your password? Go back to login
+
+
+
+
@endsection \ No newline at end of file diff --git a/resources/views/pages/dashboards/admin_profile.blade.php b/resources/views/pages/dashboards/admin_profile.blade.php new file mode 100644 index 00000000..0ff2ad6f --- /dev/null +++ b/resources/views/pages/dashboards/admin_profile.blade.php @@ -0,0 +1,254 @@ +@extends('layouts.base_portal') +@section('inner_content') +
+
+
+
+
+
+
+
+

Accounts

+
+
+
+
+ Here you manage all the system users & businesses +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Users

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Forwarders

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Importers

+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+

Warehouses

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Navigation +
+
+ +
+
+
+
+
+
+
+
+ +
+
+

Active Users

+
+
+
+
+
+
+
+
+ +
+
+

Blocked Users

+
+
+
+
+
+
+
+
+ +
+
+

User Invites

+
+
+
+
+
+
+
+
+ +
+
+

Reports

+
+
+
+
+
+
+
+ . +
+ + +
+
+
Active users
+

List of the system currently active users

+
+
+ +
+ +
+
+
Blocked users
+

List of the system currently inactive users

+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/pages/dashboards/forwarder_profile.blade.php b/resources/views/pages/dashboards/forwarder_profile.blade.php new file mode 100644 index 00000000..84d22662 --- /dev/null +++ b/resources/views/pages/dashboards/forwarder_profile.blade.php @@ -0,0 +1,238 @@ +@extends('layouts.base_portal') +@section('inner_content') +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Orders

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Customers

+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+

Warehouses

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

Employees

+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+ Navigation +
+
+ +
+
+
+
+
+
+
+
+ +
+
+

Active Users

+
+
+
+
+
+
+
+
+ +
+
+

Blocked Users

+
+
+
+
+
+
+
+
+ +
+
+

User Invites

+
+
+
+
+
+
+
+
+ +
+
+

Reports

+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
Active users
+

List of the system currently active users

+
+
+ +
+
+
+
+
+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/pages/dashboards/importer_profile.blade.php b/resources/views/pages/dashboards/importer_profile.blade.php new file mode 100644 index 00000000..a9638d0f --- /dev/null +++ b/resources/views/pages/dashboards/importer_profile.blade.php @@ -0,0 +1,9 @@ +@extends('layouts.base_portal') +@section('inner_content') +
+
+ + +
+
+@endsection \ No newline at end of file diff --git a/routes/account.php b/routes/account.php index 76c96fa8..5262c0f2 100644 --- a/routes/account.php +++ b/routes/account.php @@ -8,6 +8,7 @@ Route::group(['prefix' => 'account', 'namespace' => 'Accounts', 'as' => 'account Route::group(['prefix' => 'login', 'as' => 'authenticate.'], function () { Route::post('/attempt', 'UserAuthenticationController@authenticate')->name('attempt'); + Route::post('/check_email', 'CheckEmailController@check')->name('email.check'); }); // Route::group(['prefix' => 'password', 'as' => 'password.'], function () { @@ -23,8 +24,7 @@ Route::group(['prefix' => 'account', 'namespace' => 'Accounts', 'as' => 'account Route::post('/registration', 'CreateUserController@create')->name('registration'); - // Route::group(['prefix' => 'user', 'as' => 'user.'], function () { - // Route::get('list', 'ListUsersController@list')->name('list'); - // }); - + Route::group(['prefix' => 'user', 'as' => 'user.'], function () { + Route::get('list', 'ListUsersController@list')->name('list'); + }); }); \ No newline at end of file diff --git a/routes/api.php b/routes/api.php index 1771abb5..97c63f0b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -24,6 +24,8 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function require __DIR__ . '/segment.php'; + require __DIR__ . '/company.php'; + require __DIR__ . '/company_bank.php'; Route::group(['middleware' => 'valid.token'], function () { diff --git a/routes/company.php b/routes/company.php new file mode 100644 index 00000000..b35d6a34 --- /dev/null +++ b/routes/company.php @@ -0,0 +1,11 @@ + 'company', 'as' => 'company.', 'namespace' => 'Companies'], function () { + Route::get('/{id}/show', 'FetchCompanyController@fetch')->name('show'); + Route::get('/list', 'ListCompaniesController@list')->name('list'); + Route::post('/create', 'CreateCompanyController@create')->name('create'); + Route::put('/update/{id}', 'UpdateCompanyController@update')->name('update'); + Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('delete'); +}); \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 1c0aaa42..947823e5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,7 +17,6 @@ Route::get('', function () { return view('pages.accounts.authentication.login'); })->name('login'); - Route::get('account/registration', function () { return view('pages.accounts.registration'); })->name('registration'); @@ -26,11 +25,14 @@ Route::get('account/registration-step-2', function () { return view('pages.accounts.registration_step_2'); })->name('registration-step-2'); +Route::get('/accounts', function () { + return view('pages.accounts.dashboard'); +})->name('account.dashboard'); -Route::get('account/password/reset/{token}', function ($token){ - return view('pages.accounts.authentication.reset_password',['token' => $token]); -})->name('account.password.reset'); +// Route::get('/company/{id}/importer/dashboard', function ($id) { +// return view('pages.dashboards.importer_profile', ['id' => (int) $id]); +// })->name('dashboard.importer'); -route::get('dashboard/', function (){ - return redirect()->route('registration-step-2'); -})->name('dashboard'); +Route::get('/company/forwarder/dashboard', function () { + return view('pages.dashboards.forwarder_profile'); +})->name('dashboard.forwarder'); \ No newline at end of file