mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-27 00:14:16 +00:00
Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into package-ui-create
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Accounts\ControllersLogic;
|
||||
|
||||
use App\Classes\Exceptions\AccessForbiddenException;
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
|
||||
use App\Classes\Modules\Accounts\Processors\AuthenticationProcessor;
|
||||
use App\Classes\Modules\Accounts\Processors\CreateUserProcessor;
|
||||
use App\Classes\Modules\Companies\Processors\AssignEmployeeProcessor;
|
||||
use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject;
|
||||
use App\Classes\Modules\Companies\Services\FetchesCompany;
|
||||
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
|
||||
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
use App\Models\Company;
|
||||
use App\Models\CompanyModule;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class CreateInvitedCustomerLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification(): array
|
||||
{
|
||||
return [
|
||||
'title' => 'Created User',
|
||||
'message' => 'You have successfully created a new User'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CreateUserProcessor */
|
||||
private $createUserProcessor;
|
||||
|
||||
/** @var CreateContactProcessor */
|
||||
private $createContactProcessor;
|
||||
|
||||
/** @var FetchesCompany */
|
||||
private $fetchesCompany;
|
||||
|
||||
/** @var AssignEmployeeProcessor */
|
||||
private $assignEmployeeProcessor;
|
||||
|
||||
/** @var AuthenticationProcessor */
|
||||
private $authenticationProcessor;
|
||||
|
||||
|
||||
/**
|
||||
* CreateInvitedCustomerLogic constructor.
|
||||
* @param CreateUserProcessor $createUserProcessor
|
||||
* @param CreateContactProcessor $createContactProcessor
|
||||
* @param FetchesCompany $fetchesCompany
|
||||
* @param AssignEmployeeProcessor $assignEmployeeProcessor
|
||||
* @param AuthenticationProcessor $authenticationProcessor
|
||||
*/
|
||||
public function __construct(CreateUserProcessor $createUserProcessor, CreateContactProcessor $createContactProcessor, FetchesCompany $fetchesCompany, AssignEmployeeProcessor $assignEmployeeProcessor, AuthenticationProcessor $authenticationProcessor)
|
||||
{
|
||||
$this->createUserProcessor = $createUserProcessor;
|
||||
$this->createContactProcessor = $createContactProcessor;
|
||||
$this->fetchesCompany = $fetchesCompany;
|
||||
$this->assignEmployeeProcessor = $assignEmployeeProcessor;
|
||||
$this->authenticationProcessor = $authenticationProcessor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\AccessUnauthorisedException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request): JsonResponse
|
||||
{
|
||||
/** @var Company $company */
|
||||
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
|
||||
|
||||
/** @var CompanyModule $companyModule */
|
||||
$companyModule = $company->companyModules()->first();
|
||||
|
||||
if($companyModule->employees()->exists()){
|
||||
throw new AccessForbiddenException('This company\'s account has been claimed by another user already!');
|
||||
}
|
||||
|
||||
/** @var User $user */
|
||||
$user = $this->createUserProcessor->execute($request, RoleTypes::USER, !App::environment(['production']) ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION);
|
||||
|
||||
$contactObject = new ContactObject($request->input('name'), $request->input('phone'), $request->input('contact_email'), $request->input('wechat_id'));
|
||||
|
||||
$this->createContactProcessor->execute($contactObject, $company);
|
||||
|
||||
$Object = new EmploymentObject($companyModule, $user);
|
||||
|
||||
$this->assignEmployeeProcessor->execute($Object);
|
||||
|
||||
return $this->response($this->authenticationProcessor->execute($request));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Accounts;
|
||||
|
||||
use App\Classes\Modules\Accounts\ControllersLogic\CreateInvitedCustomerLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateInvitedCustomerController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param CreateInvitedCustomerLogic $createCustomerLogic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function create(Request $request, CreateInvitedCustomerLogic $createCustomerLogic): JsonResponse
|
||||
{
|
||||
return $createCustomerLogic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ use App\Models\CompanyModule;
|
||||
use App\Models\Currency;
|
||||
use App\Models\SegmentConstant;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
|
||||
class CompanyResource extends JsonResource
|
||||
{
|
||||
@@ -25,6 +26,7 @@ class CompanyResource extends JsonResource
|
||||
$companyModule = $this->companyModules()->where('type', '=', BusinessType::IMPORTER)->first();
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'hash_id' => Crypt::encryptString($this->id),
|
||||
'name' => $this->name,
|
||||
'reference' => $this->reference,
|
||||
'type' => (int) $this->type,
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Exchange;
|
||||
use App\Models\AbstractModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
/**
|
||||
* Class Company
|
||||
* @package App\Models
|
||||
*
|
||||
* @property \App\Models\Country country_id
|
||||
* @property \App\Models\State state_id
|
||||
* @property \App\Models\District district_id
|
||||
* @property string postcode
|
||||
* @property string street_one
|
||||
* @property string street_two
|
||||
* @property integer billing_type
|
||||
*/
|
||||
class Company extends AbstractModel
|
||||
{
|
||||
protected $connection = 'exchange_db';
|
||||
|
||||
protected $table = 'companies';
|
||||
|
||||
/**
|
||||
* @return belongsToMany
|
||||
*/
|
||||
public function employees(): belongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class, (new Employee())->getTable(), 'company_id','user_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Exchange;
|
||||
|
||||
use App\Models\AbstractModel;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* Class CompanyEmployee
|
||||
* @package App\Models
|
||||
*
|
||||
* @property \App\Models\Company company_id
|
||||
* @property \App\Models\User user_id
|
||||
*/
|
||||
class Employee extends AbstractModel
|
||||
{
|
||||
protected $connection = 'exchange_db';
|
||||
|
||||
protected $table = 'employees';
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function company(): HasMany
|
||||
{
|
||||
return $this->HasMany(Company::class, 'company_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
**/
|
||||
public function user(): HasOne
|
||||
{
|
||||
return $this->hasOne(User::class, 'user_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Exchange;
|
||||
|
||||
use App\Models\AbstractModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class User extends AbstractModel {
|
||||
|
||||
protected $connection = 'exchange_db';
|
||||
|
||||
/**
|
||||
* @return belongsToMany
|
||||
*/
|
||||
public function company(): belongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Company::class, (new Employee())->getTable(), 'user_id', 'company_id');
|
||||
}
|
||||
}
|
||||
+19
-1
@@ -82,7 +82,25 @@ return [
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'exchange_db' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE_EXCHANGE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET_IZYIM', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject;
|
||||
use App\Classes\Modules\Companies\Processors\AssignEmployeeProcessor;
|
||||
use App\Models\CompanyConnection;
|
||||
use App\Models\Exchange\Company as ExchangeCompany;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class CompanyEmployeesTableSeeder extends Seeder
|
||||
{
|
||||
|
||||
/** @var AssignEmployeeProcessor */
|
||||
private $assignEmployeeProcessor;
|
||||
|
||||
/**
|
||||
* CompanyEmployeesTableSeeder constructor.
|
||||
* @param AssignEmployeeProcessor $assignEmployeeProcessor
|
||||
*/
|
||||
public function __construct(AssignEmployeeProcessor $assignEmployeeProcessor)
|
||||
{
|
||||
$this->assignEmployeeProcessor = $assignEmployeeProcessor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::beginTransaction();
|
||||
foreach(ExchangeCompany::all() as $company) {
|
||||
|
||||
if($connection = CompanyConnection::where('invitee_reference', $company->reference)->first()){
|
||||
|
||||
$companyModule = $connection->invitee;
|
||||
|
||||
if($companyModule->employees()->exists()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$exchangeUser = $company->employees()->first();
|
||||
|
||||
if(User::where('email', '=', $exchangeUser->email)->count()){
|
||||
continue;
|
||||
}
|
||||
|
||||
$user = new User();
|
||||
$user->name = $exchangeUser->name;
|
||||
$user->email = $exchangeUser->email;
|
||||
$user->password = $exchangeUser->password;
|
||||
$user->type = $exchangeUser->type;
|
||||
$user->status = $exchangeUser->status;
|
||||
|
||||
$user->save();
|
||||
|
||||
$Object = new EmploymentObject($companyModule, $user);
|
||||
|
||||
$this->assignEmployeeProcessor->execute($Object);
|
||||
}
|
||||
|
||||
}
|
||||
DB::commit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row text-left" @keyup.enter="submitForm">
|
||||
<div class="col">
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" >
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="bold fs-11 all-caps muted">Personal Information</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col p-r-5">
|
||||
<validation-wrapper-component :validator="$v.parameters.name">
|
||||
<label>Full Name</label>
|
||||
<input class="form-control" v-model="parameters.name">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<validation-wrapper-component :validator="$v.parameters.phone">
|
||||
<label>Phone</label>
|
||||
<input class="form-control" v-model="parameters.phone">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.email">
|
||||
<label>Email</label>
|
||||
<input class="form-control" v-model="parameters.email">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col p-r-5">
|
||||
<validation-wrapper-component :validator="$v.parameters.password">
|
||||
<label>Password</label>
|
||||
<input class="form-control" type="password" v-model="parameters.password">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<validation-wrapper-component :validator="$v.parameters.password_confirmation">
|
||||
<label>Password Confirmation</label>
|
||||
<input class="form-control" type="password" v-model="parameters.password_confirmation">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-sm p-t-10 p-b-10 btn-default bg-master-lighter b-rad-none" @click="$store.dispatch('toggleSection', {name: 'registrationForm', status: false})">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-10">
|
||||
<i class="fa fa-angle-left fs-16" style="margin-top: 1px;"></i>
|
||||
</div>
|
||||
<div class="col p-l-5">I already have an account</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<button type="button" class="btn btn-sm btn-block p-t-10 p-b-10 p-r-35 p-l-35 btn-primary b-rad-none p-r-30" @click="submit(route('api.account.registration.invite.register'), 'post', section, false, false)"><i class="fa fa-check fs-18 m-r-10"></i>Complete Registration</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import inviteRegistrationFormValidation from '../../../general/mixins/accounts/validation/inviteRegistrationFormValidation';
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
required: true,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
error: '',
|
||||
parameters : {
|
||||
company_id: this.id,
|
||||
name: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
password: '',
|
||||
password_confirmation: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins: [inviteRegistrationFormValidation]
|
||||
}
|
||||
</script>
|
||||
@@ -38,7 +38,6 @@
|
||||
</template>
|
||||
<script>
|
||||
import registrationCheckEmailValidation from '../../../general/mixins/accounts/validation/registrationCheckEmailValidation';
|
||||
import stepNavi from '../../../general/mixins/stepNavi';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -257,7 +257,6 @@
|
||||
</template>
|
||||
<script>
|
||||
import registrationFormValidation from '../../../general/mixins/accounts/validation/registrationFormValidation';
|
||||
import stepNavi from '../../../general/mixins/stepNavi';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<h6 class="no-margin fs-12">Account Owner</h6>
|
||||
<h6 class="no-margin fs-12">Email Address</h6>
|
||||
<h6 class="no-margin">{{item.employee.email}}</h6>
|
||||
</div>
|
||||
</div>
|
||||
@@ -107,6 +107,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-end m-t-5 m-b-5">
|
||||
<div class="col-auto text-right">
|
||||
<div class="font-heading fs-10 all-caps p-t-5 p-b-5 p-l-10 p-r-15 b-rad-sm bg-master-lighter" v-if="item.employee">
|
||||
<i class="fa fa-circle text-success m-r-5"></i>Claimed
|
||||
</div>
|
||||
<div class="font-heading fs-10 all-caps p-t-5 p-b-5 p-l-10 p-r-15 b-rad-sm bg-master-lighter pointer" ref="copyButton" v-if="!item.employee" @click="copyUrl">
|
||||
Invitation Link <i class="fa fa-clipboard text-complete m-l-5"></i>
|
||||
</div>
|
||||
<textarea style="position: absolute; left: -99999px;" ref="invitationLink">{{ route('company.claim', item.hash_id) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -114,6 +125,19 @@
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
export default {
|
||||
methods: {
|
||||
copyUrl(event) {
|
||||
this.$refs.invitationLink.select();
|
||||
document.execCommand('copy');
|
||||
|
||||
$(this.$refs.copyButton).tooltip({
|
||||
title: 'Url Copied To Clipboard!',
|
||||
placement: 'left',
|
||||
delay: 1000
|
||||
});
|
||||
$(this.$refs.copyButton).tooltip('show');
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
import { required, email, numeric, sameAs, requiredUnless, requiredIf } from "vuelidate/lib/validators";
|
||||
import authenticationHandler from '../authenticationHandler'
|
||||
export default {
|
||||
validations: {
|
||||
parameters: {
|
||||
name: {
|
||||
required: required
|
||||
},
|
||||
email: {
|
||||
required: required,
|
||||
email
|
||||
},
|
||||
phone: {
|
||||
required: required,
|
||||
numeric
|
||||
},
|
||||
password: {
|
||||
required: required,
|
||||
},
|
||||
password_confirmation: {
|
||||
required: required,
|
||||
sameAs: sameAs('password')
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins: [authenticationHandler]
|
||||
}
|
||||
+4
-1
@@ -5,7 +5,10 @@ export default {
|
||||
(this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : '';
|
||||
},
|
||||
isProtectedRoute(){
|
||||
const unprotectedRoutes = [this.route('login'), this.route('account.email.verification')];
|
||||
const unprotectedRoutes = [this.route('login'), this.route('account.email.verification'), this.route('company.claim')];
|
||||
if(window.location.href.indexOf(this.route('company.claim')) === 0) {
|
||||
return false;
|
||||
}
|
||||
return !unprotectedRoutes.includes(window.location.href);
|
||||
},
|
||||
isWithTokenRoute(){
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
export default {
|
||||
methods: {
|
||||
changeStep(direction) {
|
||||
this.status.direction = direction;
|
||||
|
||||
if (direction === 'next') {
|
||||
|
||||
if (this.validate()) {
|
||||
//this.step += 1;
|
||||
this.status.email = this.parameters.email;
|
||||
this.$emit('updateStatus', this.status);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.$emit('updateStatus', this.status);
|
||||
this.$v.$reset();
|
||||
},
|
||||
},
|
||||
beforeDestroy: function (event) {
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
@extends('layouts.base_login')
|
||||
|
||||
@section('inner_content')
|
||||
<div class="row h-100 no-margin align-items-center justify-content-center">
|
||||
<div class="col col-md-10">
|
||||
<div class="row m-b-50">
|
||||
<div class="col-8 col-md-6">
|
||||
<img class="w-100" src="{{asset('images/cief-izyim-logo.png')}}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<loading-component style="height: 350px;" key="1" color="primary" v-show="$store.getters.isLoading('loginSection')"></loading-component>
|
||||
<div class="row justify-content-center" v-show="!$store.getters.isLoading('loginSection')">
|
||||
<div class="col">
|
||||
<invite-registration-form-component section="loginSection" :id={{ $id }}></invite-registration-form-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -5,6 +5,7 @@ use Illuminate\Support\Facades\Route;
|
||||
Route::group(['prefix' => 'account', 'namespace' => 'Accounts', 'as' => 'account.'], function () {
|
||||
|
||||
Route::post('/registration', 'CreateCustomerController@create')->name('registration.register');
|
||||
Route::post('/invite/registration', 'CreateInvitedCustomerController@create')->name('registration.invite.register');
|
||||
|
||||
Route::group(['prefix' => 'authentication', 'as' => 'authentication.'], function () {
|
||||
Route::group(['prefix' => 'login', 'as' => 'authenticate.'], function () {
|
||||
|
||||
+7
-6
@@ -6,6 +6,7 @@ use App\Classes\Jobs\FetchLoadedContainersFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchPackingListFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchWarehouseReceiveListFromVTPortalJob;
|
||||
use App\Models\CompanyConnection;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
@@ -21,9 +22,9 @@ use Illuminate\Support\Facades\Route;
|
||||
|
||||
require __DIR__ . '/template.php';
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
Route::get('', function () {
|
||||
return view('pages.accounts.login');
|
||||
})->name('login');
|
||||
|
||||
Route::group(['prefix' => 'swagger'], function () {
|
||||
Route::get('/', function () {
|
||||
@@ -34,9 +35,9 @@ Route::group(['prefix' => 'swagger'], function () {
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('', function () {
|
||||
return view('pages.accounts.login');//temporary showing welcome page.
|
||||
})->name('login');
|
||||
Route::get('/business/claim/{hash}', function ($hash) {
|
||||
return view('pages.accounts.claim_business', ['id' => Crypt::decryptString($hash)]);
|
||||
})->name('company.claim');
|
||||
|
||||
Route::get('/account/email/verification/{token}', function ($token) {
|
||||
return view('pages.accounts.email_verified', ['token' => $token]);
|
||||
|
||||
Reference in New Issue
Block a user