From 8d56e3af633ae96a57a319be704aa4f072ec507e Mon Sep 17 00:00:00 2001 From: weichien00 Date: Wed, 21 Jul 2021 02:48:09 +0800 Subject: [PATCH 01/16] update: add login.blade file. --- resources/views/layouts/base_login.blade.php | 12 ++- .../views/pages/accounts/login.blade.php | 92 +++++++++++++++++++ 2 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 resources/views/pages/accounts/login.blade.php diff --git a/resources/views/layouts/base_login.blade.php b/resources/views/layouts/base_login.blade.php index dcd78ed9..bf877528 100644 --- a/resources/views/layouts/base_login.blade.php +++ b/resources/views/layouts/base_login.blade.php @@ -1,7 +1,15 @@ @extends('layouts.base') @section('content') - +
+ +
@endsection \ No newline at end of file diff --git a/resources/views/pages/accounts/login.blade.php b/resources/views/pages/accounts/login.blade.php new file mode 100644 index 00000000..f04a65de --- /dev/null +++ b/resources/views/pages/accounts/login.blade.php @@ -0,0 +1,92 @@ +@extends('layouts.base_login') + +@section('inner_content') + +
+
+
+
+
+ +
+
+
+
+
+
Sign In
+

To keep using the services please sign in with your personal info

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
Forget Password
+

A reset password link will send to your email account.

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ {{--
+
New Customer
+

Create an account with us to join our fast growing community and start making transfers overseas at competitive exchange rates today.

+
--}} +
+
+ {{-- --}} +
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+@endsection From 54daf59e7cf4a77d32fc9beef744032bccbdbb8f Mon Sep 17 00:00:00 2001 From: weichien00 Date: Wed, 21 Jul 2021 02:53:54 +0800 Subject: [PATCH 02/16] add: login form component. --- .../accounts/elements/LoginFormComponent.vue | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 resources/assets/vue/components/accounts/elements/LoginFormComponent.vue diff --git a/resources/assets/vue/components/accounts/elements/LoginFormComponent.vue b/resources/assets/vue/components/accounts/elements/LoginFormComponent.vue new file mode 100644 index 00000000..db5b7111 --- /dev/null +++ b/resources/assets/vue/components/accounts/elements/LoginFormComponent.vue @@ -0,0 +1,78 @@ + + \ No newline at end of file From fbb21df45b5da98c33003381c2fb6681d2026cac Mon Sep 17 00:00:00 2001 From: weichien00 Date: Wed, 21 Jul 2021 02:58:55 +0800 Subject: [PATCH 03/16] add: registration section and related component - 1 checkemail , 2 register form. --- .../RegistrationCheckEmailFormComponent.vue | 81 ++++++ .../forms/RegistrationFormComponent.vue | 238 ++++++++++++++++++ .../sections/RegistrationSectionComponent.vue | 40 +++ 3 files changed, 359 insertions(+) create mode 100644 resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue create mode 100644 resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue create mode 100644 resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue diff --git a/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue new file mode 100644 index 00000000..71d0bf98 --- /dev/null +++ b/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue @@ -0,0 +1,81 @@ + + diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue new file mode 100644 index 00000000..5bbeb734 --- /dev/null +++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue @@ -0,0 +1,238 @@ + + diff --git a/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue b/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue new file mode 100644 index 00000000..85885bd9 --- /dev/null +++ b/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue @@ -0,0 +1,40 @@ + + From 398ceaa14f1d1e8b8e1afac845e13896aec8b14e Mon Sep 17 00:00:00 2001 From: weichien00 Date: Wed, 21 Jul 2021 09:53:46 +0800 Subject: [PATCH 04/16] update: add filecomponent to registrationForm component --- .../forms/RegistrationFormComponent.vue | 212 ++++++++++++------ 1 file changed, 139 insertions(+), 73 deletions(-) diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue index 5bbeb734..e48037bd 100644 --- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue @@ -80,81 +80,145 @@
-
-

Account Information

-
-
-
-
- - - - - -
-
-
-
- - - - -
-
- - - - -
-
-
-
- +
+
+ +
- - - -
- -
- - - - - -
-
-
-
-

Account Information

-
-
-
-
- - - - -
-
-
-
- - - - -
-
- - - -
@@ -187,6 +251,8 @@ phone: '', password: '', password_confirmation: '', + identification_no:'', + files: [] }, status:{ direction:null, From 7106a44432f55f1c3b748c2ff9f3c11d468defe8 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 23 Jul 2021 23:06:11 +0800 Subject: [PATCH 05/16] update to match master. --- .../forms/RegistrationFormComponent.vue | 248 ++++++------------ .../views/pages/accounts/login.blade.php | 113 +++++--- 2 files changed, 152 insertions(+), 209 deletions(-) diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue index e48037bd..e436960a 100644 --- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue @@ -6,13 +6,14 @@
-
Debug: RegisstrationFormComponent {{parameters}}
+
Create Account
+
Create your account by filling in the form below.
-
+
@@ -79,150 +80,83 @@
-
-
-

Account Information

-
-
- -
-
- - - - -
-
- -
-
- - - - -
-
- - - - -
-
- -
-
- - -
- -
-
-
-
- -
-
- - - - -
-
- -
-
- -
-
- -
-
+
+
+
+
+

Account Information

+
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+ + + + +
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+ +
+
@@ -234,11 +168,6 @@ \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/checkEmailHandler.js b/resources/assets/vue/general/mixins/accounts/checkEmailHandler.js new file mode 100644 index 00000000..8be23185 --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/checkEmailHandler.js @@ -0,0 +1,23 @@ +import errorMessageHandler from "../errorMessageHandler"; +import formHandler from "../formHandler"; + +export default { + methods: { + successHandler(response){ + this.formHandler(''); + this.status = { + message:response.message, + error:false + } + }, + errorHandler(error){ + this.formHandler(error.message); + this.status = { + message:"", + error:true + } + } + }, + mixins: [errorMessageHandler, formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/validation/registrationCheckEmailValidation.js b/resources/assets/vue/general/mixins/accounts/validation/registrationCheckEmailValidation.js new file mode 100644 index 00000000..04e80ac2 --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/validation/registrationCheckEmailValidation.js @@ -0,0 +1,13 @@ +import { required, email } from "vuelidate/lib/validators"; +import checkEmailHandler from '../checkEmailHandler' +export default { + validations: { + parameters: { + email: { + required, + email + }, + } + }, + mixins: [checkEmailHandler] +} \ No newline at end of file diff --git a/resources/views/layouts/base_login.blade.php b/resources/views/layouts/base_login.blade.php index bf877528..b189d212 100644 --- a/resources/views/layouts/base_login.blade.php +++ b/resources/views/layouts/base_login.blade.php @@ -1,15 +1,5 @@ @extends('layouts.base') @section('content') -
- -
+ @yield('inner_content') @endsection \ No newline at end of file diff --git a/resources/views/pages/dashboards/admin.blade.php b/resources/views/pages/dashboards/admin.blade.php new file mode 100644 index 00000000..71944a13 --- /dev/null +++ b/resources/views/pages/dashboards/admin.blade.php @@ -0,0 +1,461 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Payments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Supplier Bills
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • +
+
+
+
+
+

webarch

+

Today's sales

+
+

+ MYR + 102,967 +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
Purchase CODE #2345 + Qty 1 + + 27 RM +
+
+
+
+
+
+
+
+
+
+
+ {{----}} + {{----}} + {{----}} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Currency Orders
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Payment Proof
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Purchase Orders
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+ Pending Verification +
+
+
+
+ + + +
+
+
+
+
+
+
+
+ Pending Submission +
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1.5810
+
+
+
+
+
- 0.0% +
+
+
+
+
+
+
+
RMB
+
+
+
USD
+
+
+
SGD
+
+
+
+
+
+
+
+
+
+
+
+
+
Customer Verification
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/pages/dashboards/customer.blade.php b/resources/views/pages/dashboards/customer.blade.php new file mode 100644 index 00000000..c5e842c2 --- /dev/null +++ b/resources/views/pages/dashboards/customer.blade.php @@ -0,0 +1,5 @@ +
+
+ +
+
\ No newline at end of file diff --git a/resources/views/pages/dashboards/index.blade.php b/resources/views/pages/dashboards/index.blade.php new file mode 100644 index 00000000..496640e4 --- /dev/null +++ b/resources/views/pages/dashboards/index.blade.php @@ -0,0 +1,5 @@ +@extends('layouts.base_portal') +@section('inner_content') + @include('pages.dashboards.admin') + @include('pages.dashboards.customer') +@endsection \ No newline at end of file diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php new file mode 100644 index 00000000..0a705893 --- /dev/null +++ b/resources/views/partials/footer.blade.php @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php new file mode 100644 index 00000000..cc2ccd7d --- /dev/null +++ b/resources/views/partials/header.blade.php @@ -0,0 +1,90 @@ +
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
Hi, !
+
+
+
+ +
+
+
+
+
+ {{-- +
+
+ +
+
+
--}} +
+
+ +
+
+
+
+
+
+
+
\ No newline at end of file From a55272f556644abf1f3dbcc735fe148011c97220 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Mon, 26 Jul 2021 12:13:22 +0800 Subject: [PATCH 07/16] update: add create acount link below login form --- .../vue/components/accounts/forms/LoginFormComponent.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue b/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue index e5a6c991..e5ee6305 100644 --- a/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/LoginFormComponent.vue @@ -28,6 +28,13 @@
Sign In
+
+
+
+

New Customer? Create Account

+
+
+
From bcdcac23826be7f482e0393bf31f99b2c5e2b127 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Mon, 26 Jul 2021 12:50:16 +0800 Subject: [PATCH 08/16] fix: login and registration. --- .../RegistrationCheckEmailFormComponent.vue | 9 +- .../forms/RegistrationFormComponent.vue | 272 +++++++++++------- .../sections/RegistrationSectionComponent.vue | 5 +- .../customerDashboardSectionComponent.vue | 21 ++ .../validation/registrationFormValidation.js | 16 +- .../assets/vue/general/mixins/stepNavi.js | 22 ++ .../views/pages/accounts/login.blade.php | 18 +- 7 files changed, 243 insertions(+), 120 deletions(-) create mode 100644 resources/assets/vue/components/companies/sections/customerDashboardSectionComponent.vue create mode 100644 resources/assets/vue/general/mixins/stepNavi.js diff --git a/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue index 71d0bf98..e96c3f46 100644 --- a/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/RegistrationCheckEmailFormComponent.vue @@ -4,13 +4,13 @@
-
Check if email exist
+
{{status.message}}
- +
@@ -37,7 +37,8 @@ diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue index e436960a..be33cc6e 100644 --- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue @@ -6,14 +6,13 @@
-
Create Account
-
Create your account by filling in the form below.
+
-
+
@@ -27,22 +26,11 @@
-
- -

Company

-
-

Personal

@@ -80,81 +68,148 @@
-
-
-
-
-
-
-
-
-

Account Information

-
-
-
-
- - - - -
-
-
-
- - - - -
-
- - - - -
-
-
-
-
-
-
-
-
-
- +
+
+ +
- -
-
- -
-
- - -
-
-
-
- -
-
- +
@@ -166,8 +221,14 @@ diff --git a/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue b/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue index 85885bd9..e956e17c 100644 --- a/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue +++ b/resources/assets/vue/components/accounts/sections/RegistrationSectionComponent.vue @@ -5,12 +5,11 @@
Create Account
-
- - + + diff --git a/resources/assets/vue/components/companies/sections/customerDashboardSectionComponent.vue b/resources/assets/vue/components/companies/sections/customerDashboardSectionComponent.vue new file mode 100644 index 00000000..6d8979aa --- /dev/null +++ b/resources/assets/vue/components/companies/sections/customerDashboardSectionComponent.vue @@ -0,0 +1,21 @@ + + \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js b/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js index a280739d..69e6ead0 100644 --- a/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js +++ b/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js @@ -4,10 +4,10 @@ export default { validations: { parameters: { name: { - required + required, }, email: { - required: requiredIf(function () { return this.step === 2 }), + required, email }, company_name: { @@ -18,12 +18,18 @@ export default { numeric }, password: { - required: requiredIf(function () { return this.step === 2 }), + required }, password_confirmation: { - required: requiredIf(function () { return this.step === 2 }), + required, sameAs: sameAs('password') - } + }, + identification_no:{ + required + }, + files:{ + required + }, } }, mixins: [authenticationHandler] diff --git a/resources/assets/vue/general/mixins/stepNavi.js b/resources/assets/vue/general/mixins/stepNavi.js new file mode 100644 index 00000000..a3c05a0d --- /dev/null +++ b/resources/assets/vue/general/mixins/stepNavi.js @@ -0,0 +1,22 @@ +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) { + }, + +} \ No newline at end of file diff --git a/resources/views/pages/accounts/login.blade.php b/resources/views/pages/accounts/login.blade.php index 4042bc05..9e7a5181 100644 --- a/resources/views/pages/accounts/login.blade.php +++ b/resources/views/pages/accounts/login.blade.php @@ -1,7 +1,7 @@ @extends('layouts.base_login') @section('inner_content') -
+
@@ -57,7 +57,7 @@
-
+
@@ -123,7 +123,21 @@
+
+
+
+
+
+
+ +
+
+ +
+
+
+
@endsection \ No newline at end of file From 693bd68726c9f5439efa78833b8ce767c2aca057 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Mon, 26 Jul 2021 15:04:21 +0800 Subject: [PATCH 09/16] fix: bank migration file typo. --- database/migrations/2021_07_05_115638_create_banks_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2021_07_05_115638_create_banks_table.php b/database/migrations/2021_07_05_115638_create_banks_table.php index 6b416d79..e41e8483 100644 --- a/database/migrations/2021_07_05_115638_create_banks_table.php +++ b/database/migrations/2021_07_05_115638_create_banks_table.php @@ -45,6 +45,6 @@ class CreateBanksTable extends Migration */ public function down() { - Schema::dropIfExists('banks'); + Schema::dropIfExists('bank_accounts'); } } From 40af7bb6901bfa4211e75c622ff6aaeabf4ce037 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Mon, 26 Jul 2021 15:04:51 +0800 Subject: [PATCH 10/16] fix: add missing class. --- .../Services/ExpiresPasswordReset.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/Classes/Modules/Accounts/Services/ExpiresPasswordReset.php diff --git a/app/Classes/Modules/Accounts/Services/ExpiresPasswordReset.php b/app/Classes/Modules/Accounts/Services/ExpiresPasswordReset.php new file mode 100644 index 00000000..b8b27692 --- /dev/null +++ b/app/Classes/Modules/Accounts/Services/ExpiresPasswordReset.php @@ -0,0 +1,28 @@ +is_expired = true; + return $this->handler($model); + + + } + + +} \ No newline at end of file From dd51cf4f4c8a144660db939fd6a6e037da997946 Mon Sep 17 00:00:00 2001 From: Amirul Amin Date: Thu, 29 Jul 2021 00:15:41 +0800 Subject: [PATCH 11/16] add side menu and header skeleton --- resources/views/pages/dashboard.blade.php | 206 ++++++++++++++++++++++ routes/web.php | 2 +- 2 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 resources/views/pages/dashboard.blade.php diff --git a/resources/views/pages/dashboard.blade.php b/resources/views/pages/dashboard.blade.php new file mode 100644 index 00000000..ca3b8dc7 --- /dev/null +++ b/resources/views/pages/dashboard.blade.php @@ -0,0 +1,206 @@ + + + + @include('vendor/head') + + + + + + + \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index a4397592..3c26200a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -39,5 +39,5 @@ Route::get('/account/password/reset/{token}', function ($token) { })->name('account.password.reset'); Route::get('/dashboard', function () { - return view('pages.dashboards.index'); + return view('pages.dashboard'); })->name('dashboard'); From 8b5dd24a1440494c3c45fcbec871545d48014e17 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 30 Jul 2021 02:10:37 +0800 Subject: [PATCH 12/16] update: integrate header,side menu to blade+vuejs. --- resources/assets/sass/_custom.scss | 113 ++++++++++++++++++ resources/assets/sass/main.scss | 2 + .../accounts/forms/LogOutFormComponent.vue | 4 +- .../general/elements/LoadingComponent.vue | 2 +- resources/views/layouts/base_portal.blade.php | 1 + .../pages/{ => templates}/dashboard.blade.php | 0 resources/views/partials/header.blade.php | 102 ++-------------- resources/views/partials/menu.blade.php | 89 ++++++++++++++ resources/views/vendor/head.blade.php | 2 +- routes/template.php | 10 ++ routes/web.php | 4 +- 11 files changed, 234 insertions(+), 95 deletions(-) create mode 100644 resources/assets/sass/_custom.scss rename resources/views/pages/{ => templates}/dashboard.blade.php (100%) create mode 100644 resources/views/partials/menu.blade.php create mode 100644 routes/template.php diff --git a/resources/assets/sass/_custom.scss b/resources/assets/sass/_custom.scss new file mode 100644 index 00000000..d5520287 --- /dev/null +++ b/resources/assets/sass/_custom.scss @@ -0,0 +1,113 @@ +@page { + header: page-header; + footer: page-footer; +} + +body { + font-family: sun-extA; +} + +.header { + margin-top: 5em; +} + +.sidebar { + width: 285px; + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 100; + padding: 0 15px 0 15px; /* Height of navbar */ + /* box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); */ +} + +.sidebar-sticky { + position: relative; + top: 0; + height: calc(100vh - 48px); + padding-top: .5rem; + overflow-x: hidden; + overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ +} + +@supports ((position: -webkit-sticky) or (position: sticky)) { +.sidebar-sticky { + position: -webkit-sticky; + position: sticky; + } +} + +.sidebar .nav-link { + font-weight: 500; + color: #333; +} + +.sidebar .nav-link .feather { + margin-right: 4px; + color: #999; +} + +.sidebar .nav-link.active { + color: #007bff; +} + +.sidebar .nav-link:hover .feather, +.sidebar .nav-link.active .feather { + color: inherit; +} + +.sidebar-heading { + font-size: .75rem; + text-transform: uppercase; +} + +.navbar-brand { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: 1rem; + background-color: rgba(0, 0, 0, .25); + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); +} + +.navbar .navbar-toggler { + top: .25rem; + right: 1rem; +} + +.navbar .form-control { + padding: .75rem 1rem; + border-width: 0; + border-radius: 0; +} + +.form-control-dark { + color: #fff; + background-color: rgba(255, 255, 255, .1); + border-color: rgba(255, 255, 255, .1); +} + +.form-control-dark:focus { + border-color: transparent; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); +} + +.text-menu { + color: #a6a6a6; + font-size: 16px; +} + +.board { + width: 100%; + height: 180px; + background: -webkit-linear-gradient(#503C93, #912873); + background: linear-gradient(#503C93, #912873); +} + +.text-small { + font-size: 12px; +} + +.btn-white { + background-color: #ffffff !important; +} \ No newline at end of file diff --git a/resources/assets/sass/main.scss b/resources/assets/sass/main.scss index 6c8a8703..d606b5f9 100644 --- a/resources/assets/sass/main.scss +++ b/resources/assets/sass/main.scss @@ -32,6 +32,8 @@ @import "modules"; // Responsive Util @import "responsive"; +// Import custom +@import "custom"; diff --git a/resources/assets/vue/components/accounts/forms/LogOutFormComponent.vue b/resources/assets/vue/components/accounts/forms/LogOutFormComponent.vue index b32d8912..de1c6443 100644 --- a/resources/assets/vue/components/accounts/forms/LogOutFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/LogOutFormComponent.vue @@ -2,8 +2,8 @@
-
- +
diff --git a/resources/assets/vue/components/general/elements/LoadingComponent.vue b/resources/assets/vue/components/general/elements/LoadingComponent.vue index 77668ce3..e4180dca 100644 --- a/resources/assets/vue/components/general/elements/LoadingComponent.vue +++ b/resources/assets/vue/components/general/elements/LoadingComponent.vue @@ -24,7 +24,7 @@ case 'primary': return '#912873'; case 'success': - return '#349128'; + return '#912873'; case 'danger': return '#F3201F'; case 'white': diff --git a/resources/views/layouts/base_portal.blade.php b/resources/views/layouts/base_portal.blade.php index 583dcc37..cadf3ee4 100644 --- a/resources/views/layouts/base_portal.blade.php +++ b/resources/views/layouts/base_portal.blade.php @@ -2,6 +2,7 @@ @section('content') @include('partials.header') + @include('partials.menu')
diff --git a/resources/views/pages/dashboard.blade.php b/resources/views/pages/templates/dashboard.blade.php similarity index 100% rename from resources/views/pages/dashboard.blade.php rename to resources/views/pages/templates/dashboard.blade.php diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index cc2ccd7d..ba63175b 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -1,90 +1,12 @@ -
-
-
-
-
-
- -
- -
- -
-
-
-
-
-
- -
-
-
-
-
-
-
Hi, !
-
-
-
- -
-
-
-
-
- {{-- -
-
- -
-
-
--}} -
-
- -
-
-
-
-
-
-
-
\ No newline at end of file + diff --git a/resources/views/partials/menu.blade.php b/resources/views/partials/menu.blade.php new file mode 100644 index 00000000..e1b8a017 --- /dev/null +++ b/resources/views/partials/menu.blade.php @@ -0,0 +1,89 @@ + diff --git a/resources/views/vendor/head.blade.php b/resources/views/vendor/head.blade.php index 994929c5..d51cea64 100644 --- a/resources/views/vendor/head.blade.php +++ b/resources/views/vendor/head.blade.php @@ -1,6 +1,6 @@ -Exchange - Overseas Money Transfers +IZYIM Shipping diff --git a/routes/template.php b/routes/template.php new file mode 100644 index 00000000..980da02a --- /dev/null +++ b/routes/template.php @@ -0,0 +1,10 @@ + 'template'], function () { + Route::get('/dashboard', function () { + return view('pages.templates.dashboard'); + })->name('template.dashboard'); +}); diff --git a/routes/web.php b/routes/web.php index 3c26200a..6fc5897b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -13,6 +13,8 @@ use Illuminate\Support\Facades\Route; | */ +require __DIR__ . '/template.php'; + Route::get('/', function () { return view('welcome'); }); @@ -39,5 +41,5 @@ Route::get('/account/password/reset/{token}', function ($token) { })->name('account.password.reset'); Route::get('/dashboard', function () { - return view('pages.dashboard'); + return view('pages.dashboards.index'); })->name('dashboard'); From 7fe6009669973988f281398ead7a07f71fe62ded Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 30 Jul 2021 03:37:23 +0800 Subject: [PATCH 13/16] add: missing blade for email verification and reset password. --- .../pages/accounts/email_verified.blade.php | 13 ++++ .../pages/accounts/reset_password.blade.php | 74 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 resources/views/pages/accounts/email_verified.blade.php create mode 100644 resources/views/pages/accounts/reset_password.blade.php diff --git a/resources/views/pages/accounts/email_verified.blade.php b/resources/views/pages/accounts/email_verified.blade.php new file mode 100644 index 00000000..86cf0405 --- /dev/null +++ b/resources/views/pages/accounts/email_verified.blade.php @@ -0,0 +1,13 @@ +@extends('layouts.base_login') + +@section('inner_content') +
+
+
+
+ +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/pages/accounts/reset_password.blade.php b/resources/views/pages/accounts/reset_password.blade.php new file mode 100644 index 00000000..4fae44b7 --- /dev/null +++ b/resources/views/pages/accounts/reset_password.blade.php @@ -0,0 +1,74 @@ +@extends('layouts.base_login') + +@section('inner_content') + +
+
+ +
+
+
+
+ + +
+
+
+
+
Reset your password
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+

Support:

+
+
+
+
+

To obtain access to this site or for any questions about its
use submit an email message to info@izyim.com

+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
Password Changed
+
+
+
+
+ Your password has been changed successfully +
+
+
+ +
+
+
+
+@endsection \ No newline at end of file From 0dc68cea5a08b1258d6cd5b0cb17e02555161dfa Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 30 Jul 2021 14:26:11 +0800 Subject: [PATCH 14/16] update: return number of order when login. --- .../Services/GeneratesAuthenticationToken.php | 4 +++- app/Models/CompanyModule.php | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php b/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php index d63678f3..49f5ffcd 100644 --- a/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php +++ b/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php @@ -55,13 +55,15 @@ class GeneratesAuthenticationToken { /** @var Company $companyModule */ $companyModule = $user->companyModule()->first(); + $order = $companyModule->orders->count(); $claims = [ 'id' => $user->id, 'name' => $user->name, 'email' => $user->email, 'type' => $user->type, - 'status' => $user->status + 'status' => $user->status, + 'order' => $order ]; if($user->type === RoleTypes::USER) { diff --git a/app/Models/CompanyModule.php b/app/Models/CompanyModule.php index bcb39dee..ce6ffc90 100644 --- a/app/Models/CompanyModule.php +++ b/app/Models/CompanyModule.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphMany; +use Illuminate\Database\Eloquent\Relations\HasMany; + use Illuminate\Database\Eloquent\SoftDeletes; /** @@ -56,6 +58,15 @@ class CompanyModule extends AbstractModel return $this->belongsToMany(User::class, (new CompanyEmployee())->getTable(), 'company_module_id', 'user_id'); } + /** + * @return HasMany + */ + public function orders(): HasMany + { + return $this->HasMany(Order::class, 'company_module_id'); + } + + // /** // * @return HasMany // */ From 3e8265fe3a21b73eb6c24589f61563c92d891b5d Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 30 Jul 2021 14:45:45 +0800 Subject: [PATCH 15/16] update: return company_module_id after login success. --- .../Accounts/Services/GeneratesAuthenticationToken.php | 7 ++++--- resources/assets/vue/vuex/modules/authentication.js | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php b/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php index 49f5ffcd..4d9677d3 100644 --- a/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php +++ b/app/Classes/Modules/Accounts/Services/GeneratesAuthenticationToken.php @@ -62,13 +62,14 @@ class GeneratesAuthenticationToken { 'name' => $user->name, 'email' => $user->email, 'type' => $user->type, - 'status' => $user->status, - 'order' => $order + 'status' => $user->status ]; if($user->type === RoleTypes::USER) { $claims = array_merge($claims, [ - 'company_id' => $companyModule->company_id + 'company_id' => $companyModule->company_id, + 'company_module_id' => $companyModule->id, + 'order' => $order ]); } diff --git a/resources/assets/vue/vuex/modules/authentication.js b/resources/assets/vue/vuex/modules/authentication.js index f349afa2..0af8a45b 100644 --- a/resources/assets/vue/vuex/modules/authentication.js +++ b/resources/assets/vue/vuex/modules/authentication.js @@ -17,6 +17,8 @@ export default { getUserId: (state, getters) => getters.getDecodedAccessToken.user.id, getUserEmail: (state, getters) => getters.getDecodedAccessToken.user.email, getCompanyId: (state, getters) => getters.getDecodedAccessToken.user.company_id, + getCompanyModuleId: (state, getters) => getters.getDecodedAccessToken.user.company_module_id, + getOrder: (state, getters) => getters.getDecodedAccessToken.user.order, getDecodedAccessToken(state) { try{ From a3daef72033c734f502bc650af0bdc2e3f9d26e6 Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 30 Jul 2021 14:47:05 +0800 Subject: [PATCH 16/16] add: vue emailVerification component. --- .../elements/EmailVerificationComponent.vue | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 resources/assets/vue/components/accounts/elements/EmailVerificationComponent.vue diff --git a/resources/assets/vue/components/accounts/elements/EmailVerificationComponent.vue b/resources/assets/vue/components/accounts/elements/EmailVerificationComponent.vue new file mode 100644 index 00000000..5169f3b0 --- /dev/null +++ b/resources/assets/vue/components/accounts/elements/EmailVerificationComponent.vue @@ -0,0 +1,77 @@ + + \ No newline at end of file