diff --git a/resources/assets/js/components/ProgressTrack.vue b/resources/assets/js/components/ProgressTrack.vue new file mode 100644 index 00000000..0aa7c413 --- /dev/null +++ b/resources/assets/js/components/ProgressTrack.vue @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/middleware/auth.js b/resources/assets/js/middleware/auth.js index 1302a8b7..138da317 100644 --- a/resources/assets/js/middleware/auth.js +++ b/resources/assets/js/middleware/auth.js @@ -3,11 +3,9 @@ import store from '~/store' export default async (to, from, next) => { if (!store.getters['auth/check']) { next({ name: 'login' }) - } - else if (store.getters['auth/user'].role == "admin"){ - next({ name : 'admin.home' }) - } - else { + } else if (store.getters['auth/user'].role == 'admin') { + next({ name: 'admin.home' }) + } else { next() } } diff --git a/resources/assets/js/pages/auth/login.vue b/resources/assets/js/pages/auth/login.vue index 8af30930..054eb81f 100644 --- a/resources/assets/js/pages/auth/login.vue +++ b/resources/assets/js/pages/auth/login.vue @@ -80,32 +80,37 @@ export default { methods: { async login () { - const loading = this.$loading({ - lock: true, - text: 'Logging in', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); // Submit the form. const { data } = await this.form.post('/api/login') + + // Add loading screen + const loading = this.$loading({ + lock: true, + text: 'Logging in', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + // Save the token. this.$store.dispatch('auth/saveToken', { token: data.token, - remember: this.remember + remember: this.remember, }) // Fetch the user. await this.$store.dispatch('auth/fetchUser') + + // Redirect home. - if(store.getters['auth/user'].role === 'admin'){ - loading.close(); + if (store.getters['auth/user'].role === 'admin') { this.$router.push({ name: 'admin.home' }) + loading.close() } - loading.close(); this.$router.push({ name: 'home' }) + loading.close() } } } diff --git a/resources/assets/js/pages/auth/register.vue b/resources/assets/js/pages/auth/register.vue index be69fc71..9792e4ec 100644 --- a/resources/assets/js/pages/auth/register.vue +++ b/resources/assets/js/pages/auth/register.vue @@ -96,10 +96,9 @@ export default { await this.$store.dispatch('auth/updateUser', { user: data }) // Redirect home. - if(store.getters['auth/user'].role === 'admin'){ + if (store.getters['auth/user'].role === 'admin') { this.$router.push({ name: 'admin.home' }) - } - else{ + } else { this.$router.push({ name: 'home' }) } } diff --git a/resources/assets/js/pages/booking/completed.vue b/resources/assets/js/pages/booking/completed.vue new file mode 100644 index 00000000..1cb07172 --- /dev/null +++ b/resources/assets/js/pages/booking/completed.vue @@ -0,0 +1,166 @@ + + + + + + Order Completed + + + + + + + + + + Purchase Order + + + + + + + + + + + + + + + + Invoice + + + + + + + + + + + + + + + China Bank Slip + + + + + + + + + + + + + + + + + + + Order Details + + + + + + + + + + + + + + + + + + + + + + + + Order Bankin Slip + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/booking/confirmation.vue b/resources/assets/js/pages/booking/confirmation.vue new file mode 100644 index 00000000..58812c71 --- /dev/null +++ b/resources/assets/js/pages/booking/confirmation.vue @@ -0,0 +1,115 @@ + + + + + + Bankin Slip Verification In Progress + + Go Back + + + + + + Order Details + + + + + + + + + + + + + + + + + + + + + + + + BankinSlip + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/booking/poComplete.vue b/resources/assets/js/pages/booking/poComplete.vue new file mode 100644 index 00000000..e70b0242 --- /dev/null +++ b/resources/assets/js/pages/booking/poComplete.vue @@ -0,0 +1,151 @@ + + + + + + Processing Invoice + + + + + + + + + + Purchase Order + + + + + + + + + + + + + + + + China Bank Slip + + + + + + + + + + + + + + + + + + + Order Details + + + + + + + + + + + + + + + + + + + + + + + + Order Bankin Slip + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/booking/transfer.vue b/resources/assets/js/pages/booking/transfer.vue new file mode 100644 index 00000000..c9c7b4d9 --- /dev/null +++ b/resources/assets/js/pages/booking/transfer.vue @@ -0,0 +1,117 @@ + + + + + + Transfer In Progress + + ETA : 3 days 14 Hours + + Go Back + + + + + + Order Details + + + + + + + + + + + + + + + + + + + + + + + + BankinSlip + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/booking/uploadPo.vue b/resources/assets/js/pages/booking/uploadPo.vue new file mode 100644 index 00000000..fb2a2c31 --- /dev/null +++ b/resources/assets/js/pages/booking/uploadPo.vue @@ -0,0 +1,171 @@ + + + + + + Transfer Completed + Please upload your PO + + + + + + + + + + Upload PO + + + + + + + Drop file here or + click to upload + + jpg/png files with a size less than 500kb + + + + + + Submit + + + + + + + + + China Bank Slip + + + + + + + + + + + + + + + + + + + Order Details + + + + + + + + + + + + + + + + + + + + + + + + Order Bankin Slip + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/booking/uploadUserBankSlip.vue b/resources/assets/js/pages/booking/uploadUserBankSlip.vue new file mode 100644 index 00000000..7b8f829b --- /dev/null +++ b/resources/assets/js/pages/booking/uploadUserBankSlip.vue @@ -0,0 +1,123 @@ + + + + + + Waiting For Payment + + + + + + + + + + + + + + Time Left : + + + + + + + + + + + + + + + + + + + + + Bankin Amount (RM) : + + + + + + + + Submit + + Upload Later + + + + + + + \ No newline at end of file diff --git a/resources/assets/js/pages/home.vue b/resources/assets/js/pages/home.vue index 69b59a57..9b21ef47 100644 --- a/resources/assets/js/pages/home.vue +++ b/resources/assets/js/pages/home.vue @@ -2,285 +2,520 @@ - + - - - - - + + + I need : + + + + + + - + + + + + + + + + - - - - - - Cash/Bank Transfer - Cheque - BA - + + + + + + + + + + + Cash/Bank Transfer + + + Cheque + + + BA + + - - - X1 : - 1.56 - 1.64 - 1.62 - + + + + + + + + + + + X1 : + + + 1.56 + + + 1.64 + + + 1.62 + + - - - - - Book - - Book - - Book - + + + + + + + + + + Book + + + + + Book + + + + + Book + + + - - - - X2 : - 1.56 - 1.64 - 1.62 - + + + + + + + + + + + X2 : + + + 1.56 + + + 1.64 + + + 1.62 + + - - - - - Book - - Book - - Book - - + + + + + + + + + + Book + + + + + Book + + + + + Book + + + + - - - - - - - - - - - - - - - - - - Cancel - Book Now - - - + + + + + + + + + + + + + + + + + + + + Cancel + Book Now + + + + - - + + - - - - - - - - - - Confirm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{scope.row.tag}} - - + + + + + + + + + Confirm + + + + + + + + + + + + + + Update + { BookingStatus(event, scope.row.booking_no) }"> {{scope.row.booking_no}} + + + + + + + + + + + + + {{ scope.row.status_desc }} + + {{ scope.row.status }} + + + + + + + + + Update + Cancel + + + - + - - - + \ No newline at end of file diff --git a/resources/assets/js/pages/upload.vue b/resources/assets/js/pages/upload.vue deleted file mode 100644 index 9b391033..00000000 --- a/resources/assets/js/pages/upload.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Your order has been book - Please upload the bank slip - - - - Time Left : - - - - - - - - - - - - - - - - - - Amount (RM) : - - - - - Submit - Upload Later - - - - - - - - - - - diff --git a/resources/assets/js/router/routes.js b/resources/assets/js/router/routes.js index b7e4448c..9d72ad75 100644 --- a/resources/assets/js/router/routes.js +++ b/resources/assets/js/router/routes.js @@ -6,23 +6,29 @@ const PasswordReset = () => import('~/pages/auth/password/reset').then(m => m.de const NotFound = () => import('~/pages/errors/404').then(m => m.default || m) const Home = () => import('~/pages/home').then(m => m.default || m) -const Upload = () => import('~/pages/upload').then(m => m.default || m) const Settings = () => import('~/pages/settings/index').then(m => m.default || m) const SettingsProfile = () => import('~/pages/settings/profile').then(m => m.default || m) const SettingsPassword = () => import('~/pages/settings/password').then(m => m.default || m) +// Booking +const Upload = () => import('~/pages/booking/uploadUserBankSlip').then(m => m.default || m) +const Confirmation = () => import('~/pages/booking/confirmation').then(m => m.default || m) +const Transfer = () => import('~/pages/booking/transfer').then(m => m.default || m) +const UploadPo = () => import('~/pages/booking/uploadPo').then(m => m.default || m) +const PoComplete = () => import('~/pages/booking/poComplete').then(m => m.default || m) +const Completed = () => import('~/pages/booking/completed').then(m => m.default || m) + + const AdminHome = () => import('~/pages/admin/home').then(m => m.default || m) export default [ { path: '/', name: 'welcome', component: Welcome }, - { path: '/login', name: 'login', component: Login }, { path: '/register', name: 'register', component: Register }, { path: '/password/reset', name: 'password.request', component: PasswordEmail }, { path: '/password/reset/:token', name: 'password.reset', component: PasswordReset }, { path: '/home', name: 'home', component: Home }, - { path: '/upload', name: 'upload', component: Upload }, { path: '/settings', component: Settings, children: [ @@ -30,8 +36,16 @@ export default [ { path: 'profile', name: 'settings.profile', component: SettingsProfile }, { path: 'password', name: 'settings.password', component: SettingsPassword } ] }, + + // Booking + { path: '/booking/upload-user-bankslip', name: 'booking.user.upload', component: Upload }, + { path: '/booking/confirmation', name: 'booking.confirmation', component: Confirmation }, + { path: '/booking/transfer', name: 'booking.transfer', component: Transfer }, + { path: '/booking/upload-po', name: 'booking.user.uploadpo', component: UploadPo }, + { path: '/booking/po-complete', name: 'booking.user.pocomplete', component: PoComplete }, + { path: '/booking/complete', name: 'booking.complete', component: Completed }, + { path: '/admin', name: 'admin.home', component: AdminHome }, - { path: '*', component: NotFound } ]
{{ scope.row.status_desc }}