initial commit

This commit is contained in:
2026-06-29 13:00:18 +06:00
commit f2aea74471
3931 changed files with 562423 additions and 0 deletions

80
resources/js/router/index.js vendored Normal file
View File

@@ -0,0 +1,80 @@
import { createRouter, createWebHistory } from 'vue-router'
import routes from './routes'
import store from './../store'
import {getStep} from "../helper";
const router = createRouter({
history: createWebHistory(APP_BASE_ROUTE),
routes: routes
})
function isAuthenticated() {
return store.getters['auth/authenticated'];
}
router.beforeEach((to, from, next) => {
/*if (!isAuthenticated() && to.matched.some(record => record.meta.requires_auth)) {
next({ name: 'login' })
} else if (isAuthenticated() && to.matched.some(record => record.meta.is_auth_route)) {
next({ name: 'dashboard' })
}
next()*/
const step = getStep();
// console.clear()
// console.log(from.path,to.path)
if(to.name == "add-profile"){
if(!step){
next({name:'create-account'})
}else if(step == 3){
next({name:'choose-package'})
}else if(step == 4){
next({name:'create-cr-account'})
}
}else if(to.name == "choose-package"){
if(!step){
next({name:'create-account'})
}else if(step == 2){
next({name:'add-profile'})
}else if(step == 4){
next({name:'create-cr-account'})
}
}else if(to.name == "create-account") {
if(step == 2){
next({name:'add-profile'})
}else if(step == 3){
next({name:'choose-package'})
}else if(step == 4){
next({name:'create-cr-account'})
}
}else if(to.name == "success"){
if(!step){
next({name:'create-account'})
}
}else if(to.name == "create-cr-account"){
if(!step){
next({name:'create-account'})
}else if(step == 2){
next({name:'add-profile'})
}else if(step == 3){
next({name:'choose-package'})
}else if(step == 5){
next({name:'make-payment'})
}
}else if(to.name == "make-payment"){
if(!step){
next({name:'create-account'})
}else if(step == 2){
next({name:'add-profile'})
}else if(step == 3){
next({name:'choose-package'})
}else if(step == 4){
next({name:'create-cr-account'})
}
}
next()
})
export default router

63
resources/js/router/routes.js vendored Normal file
View File

@@ -0,0 +1,63 @@
import CreateAccount from "../components/partials/CreateAccount";
import AddProfile from "../components/partials/AddProfile";
import ChoosePackage from "../components/partials/ChoosePackage";
import CreateCreditReportAccount from "../components/partials/CreateCreditReportAccount";
import Success from "../components/partials/Success";
import MakePayment from "../components/partials/MakePayment";
const routes = [
{
path: '/',
redirect: { name: 'create-account' }
},
{
path: '/create/account',
name: 'create-account',
component: CreateAccount,
meta: {
is_step: false
},
},
{
path: '/add/profile',
name: 'add-profile',
component: AddProfile,
meta: {
is_step: true
},
},
{
path: '/choose/package',
name: 'choose-package',
component: ChoosePackage,
meta: {
is_step: true
},
},
{
path: '/create/cr-account',
name: 'create-cr-account',
component: CreateCreditReportAccount,
meta: {
is_step: true
},
},
{
path: '/success',
name: 'success',
component: Success,
meta: {
is_step: true
},
},
{
path: '/make/payment',
name: 'make-payment',
component: MakePayment,
meta: {
is_step: true
},
},
]
export default routes;