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 @@
+
+
Enter your email address to register/login.
+Looks like you already have an account with us.
+Looks like you are a new user.
Let's create a fresh new izyim profile for you.
Enter your email address you're using for your account below
and we will send you a password reset link
+ Users
+Forwarders
+Importers
+Warehouses
+Active Users
+Blocked Users
+User Invites
+Reports
+List of the system currently active users
+List of the system currently inactive users
+Orders
+Customers
+Warehouses
+Employees
+Active Users
+Blocked Users
+User Invites
+Reports
+List of the system currently active users
+