From bc7f28b0f8868e8a5d2331bab7f5b9ff07618a83 Mon Sep 17 00:00:00 2001 From: Mauve Date: Tue, 15 Sep 2026 17:05:27 +0800 Subject: [PATCH] add calendar page --- src/router/index.ts | 1637 +++++++++-------- .../appSetting/calendarSetting/Index.vue | 368 ++++ src/views/appSetting/property/Index.vue | 17 +- src/views/appSetting/property/Modal.vue | 38 + src/views/appSetting/room/Index.vue | 46 + src/views/appSetting/room/Modal.vue | 46 + .../approval/approvalRoutingLog/Index.vue | 2 +- .../calendarSetting/Index.vue | 368 ++++ .../daylightAppSetting/property/Index.vue | 15 + .../daylightAppSetting/property/Modal.vue | 50 +- src/views/daylightAppSetting/room/Index.vue | 46 + src/views/daylightAppSetting/room/Modal.vue | 46 + 12 files changed, 1903 insertions(+), 776 deletions(-) create mode 100644 src/views/appSetting/calendarSetting/Index.vue create mode 100644 src/views/daylightAppSetting/calendarSetting/Index.vue diff --git a/src/router/index.ts b/src/router/index.ts index ccface6..ec3fabd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,8 +1,8 @@ import { - createRouter, - createWebHashHistory, - useRoute, - type RouteRecordRaw, + createRouter, + createWebHashHistory, + useRoute, + type RouteRecordRaw, } from "vue-router"; import { useAuthStore } from "@/stores/auth"; import { useConfigStore } from "@/stores/config"; @@ -10,781 +10,886 @@ import { useConfigStore } from "@/stores/config"; const routes: Array = [ { path: "/sso-callback/", - component: () => import("@/views/crafted/authentication/basic-flow/SsoCallback.vue"), - }, - { - path: "/sso-sign-in", - name: "sso-sign-in", - component: () => import("@/views/crafted/authentication/basic-flow/SsoSignIn.vue"), - }, - { - path: "/error/", - component: () => import("@/layouts/main-layout/MainLayout.vue"), - children: [ - { - path: "/no-permission-page", - name: "no-permission-page", - component: () => import("@/views/crafted/authentication/ErrorNoPermission.vue"), - meta: { - pageTitle: "welcome", - breadcrumbs: [], - }, - } - ] + component: () => + import("@/views/crafted/authentication/basic-flow/SsoCallback.vue"), }, { - path: "/", - redirect: "/welcome", - component: () => import("@/layouts/main-layout/MainLayout.vue"), - meta: { - middleware: "auth", - }, - children: [ - { - path: "/welcome", - name: "welcome", - component: () => import("@/views/apps/welcome/Welcome.vue"), - meta: { - pageTitle: "welcome", - breadcrumbs: [], - }, - }, - { - path: "/dashboard", - name: "dashboard", - component: () => import("@/views/Dashboard.vue"), - meta: { - pageTitle: "dashboard", - breadcrumbs: ["dashboard"], - }, - }, - { - path: "/appSetting/setting/setting", - name: "setting", - component: () => import("@/views/appSetting/setting/Index.vue"), - meta: { - pageTitle: "Reservation Setting", - breadcrumbs: ["reservation setting"], - }, - }, - { - path: "/daylightAppSetting/setting/setting", - name: "daylightSetting", - component: () => import("@/views/daylightAppSetting/setting/Index.vue"), - meta: { - pageTitle: "Reservation Setting", - breadcrumbs: ["reservation setting"], - }, - }, - { - path: "/appSetting/section/section", - name: "section", - component: () => import("@/views/appSetting/section/Index.vue"), - meta: { - pageTitle: "Section Setting", - breadcrumbs: ["section setting"], - }, - }, - { - path: "/daylightAppSetting/section/section", - name: "daylightSection", - component: () => import("@/views/daylightAppSetting/section/Index.vue"), - meta: { - pageTitle: "Section Setting", - breadcrumbs: ["section setting"], - }, - }, - { - path: "/appSetting/property/property", - name: "property", - component: () => import("@/views/appSetting/property/Index.vue"), - meta: { - pageTitle: "Hotel Property Setting", - breadcrumbs: ["hotel property setting"], - }, - }, - { - path: "/daylightAppSetting/property/property", - name: "daylightProperty", - component: () => import("@/views/daylightAppSetting/property/Index.vue"), - meta: { - pageTitle: "Hotel Property Setting", - breadcrumbs: ["hotel property setting"], - }, - }, - { - path: "/appSetting/tier/tier", - name: "tier", - component: () => import("@/views/appSetting/tier/Index.vue"), - meta: { - pageTitle: "Tier Setting", - breadcrumbs: ["tier setting"], - }, - }, - { - path: "/daylightAppSetting/tier/tier", - name: "daylightTier", - component: () => import("@/views/daylightAppSetting/tier/Index.vue"), - meta: { - pageTitle: "Tier Setting", - breadcrumbs: ["tier setting"], - }, - }, - { - path: "/appSetting/bookingType/bookingType", - name: "bookingType", - component: () => import("@/views/appSetting/bookingType/Index.vue"), - meta: { - pageTitle: "Booking Type Setting", - breadcrumbs: ["booking type"], - }, - }, - { - path: "/daylightAppSetting/bookingType/bookingType", - name: "daylightBookingType", - component: () => import("@/views/daylightAppSetting/bookingType/Index.vue"), - meta: { - pageTitle: "Booking Type Setting", - breadcrumbs: ["booking type"], - }, - }, - { - path: "/appSetting/blockCode/blockCode", - name: "blockCode", - component: () => import("@/views/appSetting/blockCode/Index.vue"), - meta: { - pageTitle: "Block Code Setting", - breadcrumbs: ["block code setting"], - }, - }, - { - path: "/daylightAppSetting/blockCode/blockCode", - name: "daylightBlockCode", - component: () => import("@/views/daylightAppSetting/blockCode/Index.vue"), - meta: { - pageTitle: "Block Code Setting", - breadcrumbs: ["block code setting"], - }, - }, - { - path: "/appSetting/rate/rate", - name: "rate", - component: () => import("@/views/appSetting/rate/Index.vue"), - meta: { - pageTitle: "Rate Code Setting", - breadcrumbs: ["rate code setting"], - }, - }, - { - path: "/daylightAppSetting/rate/rate", - name: "daylightRate", - component: () => import("@/views/daylightAppSetting/rate/Index.vue"), - meta: { - pageTitle: "Rate Code Setting", - breadcrumbs: ["rate code setting"], - }, - }, - { - path: "/appSetting/source/source", - name: "source", - component: () => import("@/views/appSetting/source/Index.vue"), - meta: { - pageTitle: "Source Code Setting", - breadcrumbs: ["source code setting"], - }, - }, - { - path: "/daylightAppSetting/source/source", - name: "daylightSource", - component: () => import("@/views/daylightAppSetting/source/Index.vue"), - meta: { - pageTitle: "Source Code Setting", - breadcrumbs: ["source code setting"], - }, - }, - { - path: "/appSetting/market/market", - name: "market", - component: () => import("@/views/appSetting/market/Index.vue"), - meta: { - pageTitle: "Market Code Setting", - breadcrumbs: ["market code setting"], - }, - }, - { - path: "/daylightAppSetting/market/market", - name: "daylightMarket", - component: () => import("@/views/daylightAppSetting/market/Index.vue"), - meta: { - pageTitle: "Market Code Setting", - breadcrumbs: ["market code setting"], - }, - }, - { - path: "/appSetting/block/block", - name: "block", - component: () => import("@/views/appSetting/block/Index.vue"), - meta: { - pageTitle: "Block Setting", - breadcrumbs: ["block setting"], - }, - }, - { - path: "/appSetting/department/department", - name: "department", - component: () => import("@/views/appSetting/department/Index.vue"), - meta: { - pageTitle: "Department Setting", - breadcrumbs: ["department setting"], - }, - }, - { - path: "/appSetting/division/division", - name: "division", - component: () => import("@/views/appSetting/division/Index.vue"), - meta: { - pageTitle: "Division Setting", - breadcrumbs: ["division setting"], - }, - }, - { - path: "/appSetting/room/room", - name: "room", - component: () => import("@/views/appSetting/room/Index.vue"), - meta: { - pageTitle: "Room Setting", - breadcrumbs: ["room setting"], - }, - }, - { - path: "/daylightAppSetting/room/room", - name: "daylightRoom", - component: () => import("@/views/daylightAppSetting/room/Index.vue"), - meta: { - pageTitle: "Room Setting", - breadcrumbs: ["room setting"], - }, - }, - { - path: "/appSetting/roomType/roomType", - name: "roomType", - component: () => import("@/views/appSetting/roomType/Index.vue"), - meta: { - pageTitle: "Room Type Setting", - breadcrumbs: ["room type setting"], - }, - }, - { - path: "/appSetting/teamStructure/teamStructure", - name: "teamStructure", - component: () => import("@/views/appSetting/teamStructure/Index.vue"), - meta: { - pageTitle: "Team Structure Setting", - breadcrumbs: ["team structure setting"], - }, - }, - { - path: "/daylightAppSetting/roomType/roomType", - name: "daylightRoomType", - component: () => import("@/views/daylightAppSetting/roomType/Index.vue"), - meta: { - pageTitle: "Room Type Setting", - breadcrumbs: ["room type setting"], - }, - }, - { - path: "/appSetting/roomFeature/roomFeature", - name: "roomFeature", - component: () => import("@/views/appSetting/roomFeature/Index.vue"), - meta: { - pageTitle: "Room Feature Setting", - breadcrumbs: ["room feature setting"], - }, - }, - { - path: "/daylightAppSetting/roomFeature/roomFeature", - name: "daylightRoomFeature", - component: () => import("@/views/daylightAppSetting/roomFeature/Index.vue"), - meta: { - pageTitle: "Room Feature Setting", - breadcrumbs: ["room feature setting"], - }, - }, - { - path: "/appSetting/itemInventory/itemInventory", - name: "itemInventory", - component: () => import("@/views/appSetting/itemInventory/Index.vue"), - meta: { - pageTitle: "Item Inventory Code", - breadcrumbs: ["item inventory code"], - }, - }, - { - path: "/daylightAppSetting/itemInventory/itemInventory", - name: "daylightItemInventory", - component: () => import("@/views/daylightAppSetting/itemInventory/Index.vue"), - meta: { - pageTitle: "Item Inventory Code", - breadcrumbs: ["item inventory code"], - }, - }, - { - path: "/appSetting/user/user", - name: "user", - component: () => import("@/views/appSetting/user/Index.vue"), - meta: { - pageTitle: "User Mapping", - breadcrumbs: ["user mapping"], - }, - }, - { - path: "/daylightAppSetting/user/user", - name: "daylightUser", - component: () => import("@/views/daylightAppSetting/user/Index.vue"), - meta: { - pageTitle: "User Mapping", - breadcrumbs: ["user mapping"], - }, - }, - { - path: "/appSetting/opera/opera", - name: "opera", - component: () => import("@/views/appSetting/opera/Index.vue"), - meta: { - pageTitle: "Opera Mapping", - breadcrumbs: ["opera mapping"], - }, - }, - { - path: "/daylightAppSetting/daylight/daylight", - name: "daylight", - component: () => import("@/views/daylightAppSetting/daylight/Index.vue"), - meta: { - pageTitle: "User-Room Mapping", - breadcrumbs: ["user-room mapping"], - }, - }, - { - path: "/appSetting/exceptionOpera/exceptionOpera", - name: "exceptionOpera", - component: () => import("@/views/appSetting/exceptionOpera/Index.vue"), - meta: { - pageTitle: "Exception Opera Mapping", - breadcrumbs: ["exception opera mapping"], - }, - }, - { - path: "/daylightAppSetting/exceptionDaylight/exceptionDaylight", - name: "daylightExceptionDaylight", - component: () => import("@/views/daylightAppSetting/exceptionDaylight/Index.vue"), - meta: { - pageTitle: "Exception User-Room Mapping", - breadcrumbs: ["exception user-room mapping"], - }, - }, - { - path: "/appSetting/criteria/criteria", - name: "criteria", - component: () => import("@/views/appSetting/criteria/Index.vue"), - meta: { - pageTitle: "Room Allotment Control", - breadcrumbs: ["Room Allotment Control"], - }, - }, - { - path: "/daylightAppSetting/criteria/criteria", - name: "daylightCriteria", - component: () => import("@/views/daylightAppSetting/criteria/Index.vue"), - meta: { - pageTitle: "Room Allotment Control", - breadcrumbs: ["Room Allotment Control"], - }, - }, - { - path: "/appSetting/bedType/bedType", - name: "bedType", - component: () => import("@/views/appSetting/bedType/Index.vue"), - meta: { - pageTitle: "Bed Type Mapping", - breadcrumbs: ["bed type mapping"], - }, - }, - { - path: "/daylightAppSetting/bedType/bedType", - name: "daylightBedType", - component: () => import("@/views/daylightAppSetting/bedType/Index.vue"), - meta: { - pageTitle: "Bed Type Mapping", - breadcrumbs: ["bed type mapping"], - }, - }, - { - path: "/appSetting/otherProperty/roomStatus", - name: "otherRoomStatus", - component: () => import("@/views/appSetting/otherProperty/roomStatus/Index.vue"), - meta: { - pageTitle: "Other Property Room Status", - breadcrumbs: ["Other Property Room Status"], - }, - }, - { - path: "/daylightAppSetting/otherProperty/roomStatus", - name: "daylightOtherRoomStatus", - component: () => import("@/views/daylightAppSetting/otherProperty/roomStatus/Index.vue"), - meta: { - pageTitle: "Other Property Room Status", - breadcrumbs: ["Other Property Room Status"], - }, - }, - { - path: "/appSetting/otherProperty/segment", - name: "otherSegment", - component: () => import("@/views/appSetting/otherProperty/segment/Index.vue"), - meta: { - pageTitle: "Other Property Segment", - breadcrumbs: ["Other Property Segment"], - }, - }, - { - path: "/daylightAppSetting/otherProperty/segment", - name: "daylightOtherSegment", - component: () => import("@/views/daylightAppSetting/otherProperty/segment/Index.vue"), - meta: { - pageTitle: "Other Property Segment", - breadcrumbs: ["Other Property Segment"], - }, - }, - { - path: "/appSetting/otherProperty/userMapping", - name: "otherUserMapping", - component: () => import("@/views/appSetting/otherProperty/userMapping/Index.vue"), - meta: { - pageTitle: "Other Property User Mapping", - breadcrumbs: ["Other Property User Mapping"], - }, - }, - { - path: "/daylightAppSetting/otherProperty/userMapping", - name: "daylightOtherUserMapping", - component: () => import("@/views/daylightAppSetting/otherProperty/userMapping/Index.vue"), - meta: { - pageTitle: "Other Property User Mapping", - breadcrumbs: ["Other Property User Mapping"], - }, - }, - { - path: "/appSetting/otherProperty/allotment", - name: "otherAllotment", - component: () => import("@/views/appSetting/otherProperty/allotment/Index.vue"), - meta: { - pageTitle: "Other Properties Allotment", - breadcrumbs: ["Other Properties Allotment"], - }, - }, - { - path: "/daylightAppSetting/otherProperty/allotment", - name: "daylightOtherAllotment", - component: () => import("@/views/daylightAppSetting/otherProperty/allotment/Index.vue"), - meta: { - pageTitle: "Other Properties Allotment", - breadcrumbs: ["Other Properties Allotment"], - }, - }, - { - path: "/appSetting/emailTemplate/emailTemplate", - name: "emailTemplate", - component: () => import("@/views/appSetting/emailTemplate/Index.vue"), - meta: { - pageTitle: "Email Template", - breadcrumbs: ["Email Template"], - }, - }, - { - path: "/daylightAppSetting/emailTemplate/emailTemplate", - name: "daylightEmailTemplate", - component: () => import("@/views/daylightAppSetting/emailTemplate/Index.vue"), - meta: { - pageTitle: "Email Template", - breadcrumbs: ["Email Template"], - }, - }, - { - path: "/reservation/allotmentDashboard/allotmentDashboard", - name: "otherAllotmentDashboard", - component: () => import("@/views/reservation/allotmentDashboard/Index.vue"), - meta: { - pageTitle: "Other Properties Allotment Dashboard", - breadcrumbs: ["Other Properties Allotment Dashboard"], - }, - }, - { - path: "/appSetting/nonMGMStatus/nonMGMStatus", - name: "nonMGMStatus", - component: () => import("@/views/appSetting/nonMGMStatus/Index.vue"), - meta: { - pageTitle: "Non MGM Booking Setting", - breadcrumbs: ["non-mgm booking setting"], - }, - }, - { - path: "/daylightAppSetting/nonMGMStatus/nonMGMStatus", - name: "daylightNonMGMStatus", - component: () => import("@/views/daylightAppSetting/nonMGMStatus/Index.vue"), - meta: { - pageTitle: "Non MGM Booking Setting", - breadcrumbs: ["non-mgm booking setting"], - }, - }, - { - path: "/reservation/waitlist/waitlist", - name: "waitlist", - component: () => import("@/views/reservation/waitlist/Index.vue"), - meta: { - pageTitle: "Waitlist", - breadcrumbs: ["Waitlist"], - }, - }, - { - path: "/reservation/other/other", - name: "other", - component: () => import("@/views/reservation/other/Index.vue"), - meta: { - pageTitle: "Other Property Console", - breadcrumbs: ["Other Property Console"], - }, - }, - { - path: "/reservation/fail/fail", - name: "Fail", - component: () => import("@/views/reservation/fail/Index.vue"), - meta: { - pageTitle: "Fail Booking", - breadcrumbs: ["Fail Booking"], - }, - }, - { - path: "/log/login/login", - name: "loginLog", - component: () => import("@/views/log/loginLog/Index.vue"), - meta: { - pageTitle: "Login Log", - breadcrumbs: ["Login/out Log"], - }, - }, - { - path: "/log/operation/operation", - name: "operationLog", - component: () => import("@/views/log/operationLog/Index.vue"), - meta: { - pageTitle: "Operation Log", - breadcrumbs: ["Operation Log"], - }, - }, - { - path: "/log/ows/ows", - name: "owsLog", - component: () => import("@/views/log/owsLog/Index.vue"), - meta: { - pageTitle: "OWS Log", - breadcrumbs: ["OWS Log"], - }, - }, - { - path: "/log/email/email", - name: "emailLog", - component: () => import("@/views/log/emailLog/Index.vue"), - meta: { - pageTitle: "Manual Handling Email Log", - breadcrumbs: ["Manual Handling Email Log"], - }, - }, - { - path: "/log/declaration/declaration", - name: "declarationlog", - component: () => import("@/views/log/declarationlog/Index.vue"), - meta: { - pageTitle: "Declaration Log", - breadcrumbs: ["Declaration Log"], - }, - }, - { - path: "/log/eta/eta", - name: "etalog", - component: () => import("@/views/log/etalog/Index.vue"), - meta: { - pageTitle: "ETA Log", - breadcrumbs: ["ETA Log"], - }, - }, - { - path: "/setting/users/users", - name: "users", - component: () => import("@/views/setting/users/Index.vue"), - meta: { - pageTitle: "users", - breadcrumbs: ["users"], - }, - }, - { - path: "/setting/groups/groups", - name: "roles", - component: () => import("@/views/setting/groups/Index.vue"), - meta: { - pageTitle: "roles", - breadcrumbs: ["roles"], - }, - }, - { - path: "/setting/settings/settings", - name: "settings", - component: () => import("@/views/setting/settings/Index.vue"), - meta: { - pageTitle: "settings", - breadcrumbs: ["settings"], - }, - }, - { - path: "/approval/approvalRoutingLog/approvalRoutingLog", - name: "approvalRoutingLog", - component: () => import("@/views/approval/approvalRoutingLog/Index.vue"), - meta: { - pageTitle: "Approval Routing Log", - breadcrumbs: ["approval routing log"], - }, - }, - { - path: "/approval/requestReasonSetting/requestReasonSetting", - name: "requestReasonSetting", - component: () => import("@/views/approval/requestReasonSetting/Index.vue"), - meta: { - pageTitle: "Request Reason Setting", - breadcrumbs: ["request reason setting"], - }, - }, - ], - }, - { - path: "/", - component: () => import("@/layouts/AuthLayout.vue"), - children: [ - { - path: "/sign-in", - name: "sign-in", - component: () => - import("@/views/crafted/authentication/basic-flow/SignIn.vue"), - meta: { - pageTitle: "system_login", + path: "/sso-sign-in", + name: "sso-sign-in", + component: () => + import("@/views/crafted/authentication/basic-flow/SsoSignIn.vue"), + }, + { + path: "/error/", + component: () => import("@/layouts/main-layout/MainLayout.vue"), + children: [ + { + path: "/no-permission-page", + name: "no-permission-page", + component: () => + import( + "@/views/crafted/authentication/ErrorNoPermission.vue" + ), + meta: { + pageTitle: "welcome", + breadcrumbs: [], + }, }, + ], + }, + { + path: "/", + redirect: "/welcome", + component: () => import("@/layouts/main-layout/MainLayout.vue"), + meta: { + middleware: "auth", }, - { - path: "/sign-off", - name: "sign-off", - component: () => import("@/views/crafted/authentication/basic-flow/SignOff.vue"), - }, - { - path: "/sso-callback", - name: "sso-callback", - component: () => import("@/views/crafted/authentication/basic-flow/SsoCallback.vue"), - }, - ], - }, - { - path: "/", - component: () => import("@/layouts/SystemLayout.vue"), - children: [ - { - // the 404 route, when none of the above matches - path: "/404", - name: "404", - component: () => import("@/views/crafted/authentication/Error404.vue"), - meta: { - pageTitle: "Error 404", - }, - }, - { - path: "/500", - name: "500", - component: () => import("@/views/crafted/authentication/Error500.vue"), - meta: { - pageTitle: "Error 500", - }, - }, - ], - }, - { - path: "/:pathMatch(.*)*", - redirect: "/404", - }, + children: [ + { + path: "/welcome", + name: "welcome", + component: () => import("@/views/apps/welcome/Welcome.vue"), + meta: { + pageTitle: "welcome", + breadcrumbs: [], + }, + }, + { + path: "/dashboard", + name: "dashboard", + component: () => import("@/views/Dashboard.vue"), + meta: { + pageTitle: "dashboard", + breadcrumbs: ["dashboard"], + }, + }, + { + path: "/appSetting/setting/setting", + name: "setting", + component: () => import("@/views/appSetting/setting/Index.vue"), + meta: { + pageTitle: "Reservation Setting", + breadcrumbs: ["reservation setting"], + }, + }, + { + path: "/daylightAppSetting/setting/setting", + name: "daylightSetting", + component: () => + import("@/views/daylightAppSetting/setting/Index.vue"), + meta: { + pageTitle: "Reservation Setting", + breadcrumbs: ["reservation setting"], + }, + }, + { + path: "/appSetting/section/section", + name: "section", + component: () => import("@/views/appSetting/section/Index.vue"), + meta: { + pageTitle: "Section Setting", + breadcrumbs: ["section setting"], + }, + }, + { + path: "/daylightAppSetting/section/section", + name: "daylightSection", + component: () => + import("@/views/daylightAppSetting/section/Index.vue"), + meta: { + pageTitle: "Section Setting", + breadcrumbs: ["section setting"], + }, + }, + { + path: "/appSetting/property/property", + name: "property", + component: () => + import("@/views/appSetting/property/Index.vue"), + meta: { + pageTitle: "Hotel Property Setting", + breadcrumbs: ["hotel property setting"], + }, + }, + { + path: "/daylightAppSetting/property/property", + name: "daylightProperty", + component: () => + import("@/views/daylightAppSetting/property/Index.vue"), + meta: { + pageTitle: "Hotel Property Setting", + breadcrumbs: ["hotel property setting"], + }, + }, + { + path: "/appSetting/tier/tier", + name: "tier", + component: () => import("@/views/appSetting/tier/Index.vue"), + meta: { + pageTitle: "Tier Setting", + breadcrumbs: ["tier setting"], + }, + }, + { + path: "/daylightAppSetting/tier/tier", + name: "daylightTier", + component: () => + import("@/views/daylightAppSetting/tier/Index.vue"), + meta: { + pageTitle: "Tier Setting", + breadcrumbs: ["tier setting"], + }, + }, + { + path: "/appSetting/bookingType/bookingType", + name: "bookingType", + component: () => + import("@/views/appSetting/bookingType/Index.vue"), + meta: { + pageTitle: "Booking Type Setting", + breadcrumbs: ["booking type"], + }, + }, + { + path: "/daylightAppSetting/bookingType/bookingType", + name: "daylightBookingType", + component: () => + import("@/views/daylightAppSetting/bookingType/Index.vue"), + meta: { + pageTitle: "Booking Type Setting", + breadcrumbs: ["booking type"], + }, + }, + { + path: "/appSetting/blockCode/blockCode", + name: "blockCode", + component: () => + import("@/views/appSetting/blockCode/Index.vue"), + meta: { + pageTitle: "Block Code Setting", + breadcrumbs: ["block code setting"], + }, + }, + { + path: "/daylightAppSetting/blockCode/blockCode", + name: "daylightBlockCode", + component: () => + import("@/views/daylightAppSetting/blockCode/Index.vue"), + meta: { + pageTitle: "Block Code Setting", + breadcrumbs: ["block code setting"], + }, + }, + { + path: "/appSetting/rate/rate", + name: "rate", + component: () => import("@/views/appSetting/rate/Index.vue"), + meta: { + pageTitle: "Rate Code Setting", + breadcrumbs: ["rate code setting"], + }, + }, + { + path: "/daylightAppSetting/rate/rate", + name: "daylightRate", + component: () => + import("@/views/daylightAppSetting/rate/Index.vue"), + meta: { + pageTitle: "Rate Code Setting", + breadcrumbs: ["rate code setting"], + }, + }, + { + path: "/appSetting/source/source", + name: "source", + component: () => import("@/views/appSetting/source/Index.vue"), + meta: { + pageTitle: "Source Code Setting", + breadcrumbs: ["source code setting"], + }, + }, + { + path: "/daylightAppSetting/source/source", + name: "daylightSource", + component: () => + import("@/views/daylightAppSetting/source/Index.vue"), + meta: { + pageTitle: "Source Code Setting", + breadcrumbs: ["source code setting"], + }, + }, + { + path: "/appSetting/market/market", + name: "market", + component: () => import("@/views/appSetting/market/Index.vue"), + meta: { + pageTitle: "Market Code Setting", + breadcrumbs: ["market code setting"], + }, + }, + { + path: "/daylightAppSetting/market/market", + name: "daylightMarket", + component: () => + import("@/views/daylightAppSetting/market/Index.vue"), + meta: { + pageTitle: "Market Code Setting", + breadcrumbs: ["market code setting"], + }, + }, + { + path: "/appSetting/block/block", + name: "block", + component: () => import("@/views/appSetting/block/Index.vue"), + meta: { + pageTitle: "Block Setting", + breadcrumbs: ["block setting"], + }, + }, + { + path: "/appSetting/department/department", + name: "department", + component: () => + import("@/views/appSetting/department/Index.vue"), + meta: { + pageTitle: "Department Setting", + breadcrumbs: ["department setting"], + }, + }, + { + path: "/appSetting/division/division", + name: "division", + component: () => + import("@/views/appSetting/division/Index.vue"), + meta: { + pageTitle: "Division Setting", + breadcrumbs: ["division setting"], + }, + }, + { + path: "/appSetting/room/room", + name: "room", + component: () => import("@/views/appSetting/room/Index.vue"), + meta: { + pageTitle: "Room Setting", + breadcrumbs: ["room setting"], + }, + }, + { + path: "/daylightAppSetting/room/room", + name: "daylightRoom", + component: () => + import("@/views/daylightAppSetting/room/Index.vue"), + meta: { + pageTitle: "Room Setting", + breadcrumbs: ["room setting"], + }, + }, + { + path: "/appSetting/roomType/roomType", + name: "roomType", + component: () => + import("@/views/appSetting/roomType/Index.vue"), + meta: { + pageTitle: "Room Type Setting", + breadcrumbs: ["room type setting"], + }, + }, + { + path: "/appSetting/teamStructure/teamStructure", + name: "teamStructure", + component: () => + import("@/views/appSetting/teamStructure/Index.vue"), + meta: { + pageTitle: "Team Structure Setting", + breadcrumbs: ["team structure setting"], + }, + }, + { + path: "/daylightAppSetting/roomType/roomType", + name: "daylightRoomType", + component: () => + import("@/views/daylightAppSetting/roomType/Index.vue"), + meta: { + pageTitle: "Room Type Setting", + breadcrumbs: ["room type setting"], + }, + }, + { + path: "/appSetting/roomFeature/roomFeature", + name: "roomFeature", + component: () => + import("@/views/appSetting/roomFeature/Index.vue"), + meta: { + pageTitle: "Room Feature Setting", + breadcrumbs: ["room feature setting"], + }, + }, + { + path: "/daylightAppSetting/roomFeature/roomFeature", + name: "daylightRoomFeature", + component: () => + import("@/views/daylightAppSetting/roomFeature/Index.vue"), + meta: { + pageTitle: "Room Feature Setting", + breadcrumbs: ["room feature setting"], + }, + }, + { + path: "/appSetting/itemInventory/itemInventory", + name: "itemInventory", + component: () => + import("@/views/appSetting/itemInventory/Index.vue"), + meta: { + pageTitle: "Item Inventory Code", + breadcrumbs: ["item inventory code"], + }, + }, + { + path: "/daylightAppSetting/itemInventory/itemInventory", + name: "daylightItemInventory", + component: () => + import( + "@/views/daylightAppSetting/itemInventory/Index.vue" + ), + meta: { + pageTitle: "Item Inventory Code", + breadcrumbs: ["item inventory code"], + }, + }, + { + path: "/appSetting/user/user", + name: "user", + component: () => import("@/views/appSetting/user/Index.vue"), + meta: { + pageTitle: "User Mapping", + breadcrumbs: ["user mapping"], + }, + }, + { + path: "/daylightAppSetting/user/user", + name: "daylightUser", + component: () => + import("@/views/daylightAppSetting/user/Index.vue"), + meta: { + pageTitle: "User Mapping", + breadcrumbs: ["user mapping"], + }, + }, + { + path: "/appSetting/opera/opera", + name: "opera", + component: () => import("@/views/appSetting/opera/Index.vue"), + meta: { + pageTitle: "Opera Mapping", + breadcrumbs: ["opera mapping"], + }, + }, + { + path: "/daylightAppSetting/daylight/daylight", + name: "daylight", + component: () => + import("@/views/daylightAppSetting/daylight/Index.vue"), + meta: { + pageTitle: "User-Room Mapping", + breadcrumbs: ["user-room mapping"], + }, + }, + { + path: "/appSetting/exceptionOpera/exceptionOpera", + name: "exceptionOpera", + component: () => + import("@/views/appSetting/exceptionOpera/Index.vue"), + meta: { + pageTitle: "Exception Opera Mapping", + breadcrumbs: ["exception opera mapping"], + }, + }, + { + path: "/daylightAppSetting/exceptionDaylight/exceptionDaylight", + name: "daylightExceptionDaylight", + component: () => + import( + "@/views/daylightAppSetting/exceptionDaylight/Index.vue" + ), + meta: { + pageTitle: "Exception User-Room Mapping", + breadcrumbs: ["exception user-room mapping"], + }, + }, + { + path: "/appSetting/criteria/criteria", + name: "criteria", + component: () => + import("@/views/appSetting/criteria/Index.vue"), + meta: { + pageTitle: "Room Allotment Control", + breadcrumbs: ["Room Allotment Control"], + }, + }, + { + path: "/daylightAppSetting/criteria/criteria", + name: "daylightCriteria", + component: () => + import("@/views/daylightAppSetting/criteria/Index.vue"), + meta: { + pageTitle: "Room Allotment Control", + breadcrumbs: ["Room Allotment Control"], + }, + }, + { + path: "/appSetting/bedType/bedType", + name: "bedType", + component: () => import("@/views/appSetting/bedType/Index.vue"), + meta: { + pageTitle: "Bed Type Mapping", + breadcrumbs: ["bed type mapping"], + }, + }, + { + path: "/daylightAppSetting/bedType/bedType", + name: "daylightBedType", + component: () => + import("@/views/daylightAppSetting/bedType/Index.vue"), + meta: { + pageTitle: "Bed Type Mapping", + breadcrumbs: ["bed type mapping"], + }, + }, + { + path: "/appSetting/otherProperty/roomStatus", + name: "otherRoomStatus", + component: () => + import( + "@/views/appSetting/otherProperty/roomStatus/Index.vue" + ), + meta: { + pageTitle: "Other Property Room Status", + breadcrumbs: ["Other Property Room Status"], + }, + }, + { + path: "/daylightAppSetting/otherProperty/roomStatus", + name: "daylightOtherRoomStatus", + component: () => + import( + "@/views/daylightAppSetting/otherProperty/roomStatus/Index.vue" + ), + meta: { + pageTitle: "Other Property Room Status", + breadcrumbs: ["Other Property Room Status"], + }, + }, + { + path: "/appSetting/otherProperty/segment", + name: "otherSegment", + component: () => + import( + "@/views/appSetting/otherProperty/segment/Index.vue" + ), + meta: { + pageTitle: "Other Property Segment", + breadcrumbs: ["Other Property Segment"], + }, + }, + { + path: "/daylightAppSetting/otherProperty/segment", + name: "daylightOtherSegment", + component: () => + import( + "@/views/daylightAppSetting/otherProperty/segment/Index.vue" + ), + meta: { + pageTitle: "Other Property Segment", + breadcrumbs: ["Other Property Segment"], + }, + }, + { + path: "/appSetting/otherProperty/userMapping", + name: "otherUserMapping", + component: () => + import( + "@/views/appSetting/otherProperty/userMapping/Index.vue" + ), + meta: { + pageTitle: "Other Property User Mapping", + breadcrumbs: ["Other Property User Mapping"], + }, + }, + { + path: "/appSetting/calendarSetting/calendarSetting", + name: "calendarSetting", + component: () => + import("@/views/appSetting/calendarSetting/Index.vue"), + meta: { + pageTitle: "Room Calendar Access Setting", + breadcrumbs: ["Room Calendar Access Setting"], + }, + }, + { + path: "/daylightAppSetting/otherProperty/userMapping", + name: "daylightOtherUserMapping", + component: () => + import( + "@/views/daylightAppSetting/otherProperty/userMapping/Index.vue" + ), + meta: { + pageTitle: "Other Property User Mapping", + breadcrumbs: ["Other Property User Mapping"], + }, + }, + { + path: "/appSetting/otherProperty/allotment", + name: "otherAllotment", + component: () => + import( + "@/views/appSetting/otherProperty/allotment/Index.vue" + ), + meta: { + pageTitle: "Other Properties Allotment", + breadcrumbs: ["Other Properties Allotment"], + }, + }, + { + path: "/daylightAppSetting/otherProperty/allotment", + name: "daylightOtherAllotment", + component: () => + import( + "@/views/daylightAppSetting/otherProperty/allotment/Index.vue" + ), + meta: { + pageTitle: "Other Properties Allotment", + breadcrumbs: ["Other Properties Allotment"], + }, + }, + { + path: "/appSetting/emailTemplate/emailTemplate", + name: "emailTemplate", + component: () => + import("@/views/appSetting/emailTemplate/Index.vue"), + meta: { + pageTitle: "Email Template", + breadcrumbs: ["Email Template"], + }, + }, + { + path: "/daylightAppSetting/emailTemplate/emailTemplate", + name: "daylightEmailTemplate", + component: () => + import( + "@/views/daylightAppSetting/emailTemplate/Index.vue" + ), + meta: { + pageTitle: "Email Template", + breadcrumbs: ["Email Template"], + }, + }, + { + path: "/reservation/allotmentDashboard/allotmentDashboard", + name: "otherAllotmentDashboard", + component: () => + import("@/views/reservation/allotmentDashboard/Index.vue"), + meta: { + pageTitle: "Other Properties Allotment Dashboard", + breadcrumbs: ["Other Properties Allotment Dashboard"], + }, + }, + { + path: "/appSetting/nonMGMStatus/nonMGMStatus", + name: "nonMGMStatus", + component: () => + import("@/views/appSetting/nonMGMStatus/Index.vue"), + meta: { + pageTitle: "Non MGM Booking Setting", + breadcrumbs: ["non-mgm booking setting"], + }, + }, + { + path: "/daylightAppSetting/nonMGMStatus/nonMGMStatus", + name: "daylightNonMGMStatus", + component: () => + import("@/views/daylightAppSetting/nonMGMStatus/Index.vue"), + meta: { + pageTitle: "Non MGM Booking Setting", + breadcrumbs: ["non-mgm booking setting"], + }, + }, + { + path: "/daylightAppSetting/calendarSetting/calendarSetting", + name: "daylightCalendarSetting", + component: () => + import( + "@/views/daylightAppSetting/calendarSetting/Index.vue" + ), + meta: { + pageTitle: "Room Calendar Access Setting", + breadcrumbs: ["Room Calendar Access Setting"], + }, + }, + { + path: "/reservation/waitlist/waitlist", + name: "waitlist", + component: () => + import("@/views/reservation/waitlist/Index.vue"), + meta: { + pageTitle: "Waitlist", + breadcrumbs: ["Waitlist"], + }, + }, + { + path: "/reservation/other/other", + name: "other", + component: () => import("@/views/reservation/other/Index.vue"), + meta: { + pageTitle: "Other Property Console", + breadcrumbs: ["Other Property Console"], + }, + }, + { + path: "/reservation/fail/fail", + name: "Fail", + component: () => import("@/views/reservation/fail/Index.vue"), + meta: { + pageTitle: "Fail Booking", + breadcrumbs: ["Fail Booking"], + }, + }, + { + path: "/log/login/login", + name: "loginLog", + component: () => import("@/views/log/loginLog/Index.vue"), + meta: { + pageTitle: "Login Log", + breadcrumbs: ["Login/out Log"], + }, + }, + { + path: "/log/operation/operation", + name: "operationLog", + component: () => import("@/views/log/operationLog/Index.vue"), + meta: { + pageTitle: "Operation Log", + breadcrumbs: ["Operation Log"], + }, + }, + { + path: "/log/ows/ows", + name: "owsLog", + component: () => import("@/views/log/owsLog/Index.vue"), + meta: { + pageTitle: "OWS Log", + breadcrumbs: ["OWS Log"], + }, + }, + { + path: "/log/email/email", + name: "emailLog", + component: () => import("@/views/log/emailLog/Index.vue"), + meta: { + pageTitle: "Manual Handling Email Log", + breadcrumbs: ["Manual Handling Email Log"], + }, + }, + { + path: "/log/declaration/declaration", + name: "declarationlog", + component: () => import("@/views/log/declarationlog/Index.vue"), + meta: { + pageTitle: "Declaration Log", + breadcrumbs: ["Declaration Log"], + }, + }, + { + path: "/log/eta/eta", + name: "etalog", + component: () => import("@/views/log/etalog/Index.vue"), + meta: { + pageTitle: "ETA Log", + breadcrumbs: ["ETA Log"], + }, + }, + { + path: "/setting/users/users", + name: "users", + component: () => import("@/views/setting/users/Index.vue"), + meta: { + pageTitle: "users", + breadcrumbs: ["users"], + }, + }, + { + path: "/setting/groups/groups", + name: "roles", + component: () => import("@/views/setting/groups/Index.vue"), + meta: { + pageTitle: "roles", + breadcrumbs: ["roles"], + }, + }, + { + path: "/setting/settings/settings", + name: "settings", + component: () => import("@/views/setting/settings/Index.vue"), + meta: { + pageTitle: "settings", + breadcrumbs: ["settings"], + }, + }, + { + path: "/approval/approvalRoutingLog/approvalRoutingLog", + name: "approvalRoutingLog", + component: () => + import("@/views/approval/approvalRoutingLog/Index.vue"), + meta: { + pageTitle: "Approval Routing Log", + breadcrumbs: ["approval routing log"], + }, + }, + { + path: "/approval/requestReasonSetting/requestReasonSetting", + name: "requestReasonSetting", + component: () => + import("@/views/approval/requestReasonSetting/Index.vue"), + meta: { + pageTitle: "Request Reason Setting", + breadcrumbs: ["request reason setting"], + }, + }, + ], + }, + { + path: "/", + component: () => import("@/layouts/AuthLayout.vue"), + children: [ + { + path: "/sign-in", + name: "sign-in", + component: () => + import( + "@/views/crafted/authentication/basic-flow/SignIn.vue" + ), + meta: { + pageTitle: "system_login", + }, + }, + { + path: "/sign-off", + name: "sign-off", + component: () => + import( + "@/views/crafted/authentication/basic-flow/SignOff.vue" + ), + }, + { + path: "/sso-callback", + name: "sso-callback", + component: () => + import( + "@/views/crafted/authentication/basic-flow/SsoCallback.vue" + ), + }, + ], + }, + { + path: "/", + component: () => import("@/layouts/SystemLayout.vue"), + children: [ + { + // the 404 route, when none of the above matches + path: "/404", + name: "404", + component: () => + import("@/views/crafted/authentication/Error404.vue"), + meta: { + pageTitle: "Error 404", + }, + }, + { + path: "/500", + name: "500", + component: () => + import("@/views/crafted/authentication/Error500.vue"), + meta: { + pageTitle: "Error 500", + }, + }, + ], + }, + { + path: "/:pathMatch(.*)*", + redirect: "/404", + }, ]; const router = createRouter({ - history: createWebHashHistory(), - routes, + history: createWebHashHistory(), + routes, }); router.beforeResolve(async (to, from, next) => { - // 在这里可以进行路由守卫的逻辑处理,例如:身份验证、数据预加载等 - // 确保调用 `next()` - //const router = useRoute(); - let baseUrl = import.meta.env.BASE_URL; - let browserUrl = window.location.href; - //console.log('Windows '+browserUrl); - const pattern = '(.+'+baseUrl+')(.+)#.'; - let matchResult = browserUrl.match(pattern); - if(matchResult !=null && matchResult.length>=3){ - let newUrl = browserUrl; - let dynamicRouter = matchResult[2]; - if(dynamicRouter.includes('code=') - || dynamicRouter.includes('token=') - || dynamicRouter.includes('SAMLResponse=')){ - if(dynamicRouter.includes('?')){ - dynamicRouter+='&'; - }else{ - dynamicRouter+='?'; - } - //dynamicRouter+='SAMLResponse=tVhbb%2bI4FP4rFg%2b7TyGBprTNMmhpoC1aUirCzEjzYpnEoZ6N48h2aDu%2ffo8TaKE3knZHqiri%2bNw%2ff%2bfEfUV4mntzqnKRKYomoy8tnLhO99h1Ti3H6VLLdWJqndJuxzo6JT3n1Fm6UXLUQt%2boVExkX1rdttNCE6UKOsmUJpmGJafrWqCg01s4Z17nzOuetI977o8WGlGlWUZ0KXmrda482%2bb8NuIxXUdcOR2bR5Jj%2bIlJzFlmt5BvXDNqC5l5giimvIxwqjwdeeEwmHrggRdVm7wiUzmNWMJo3EL3PM2UV8b4vnQuhRaRSFuDfhmJrETfFyJKUWkiaQ1MJBAIiRPV5ivOSUSKdiR4uWLDtjWLqLK1LJTu25WJQb9KfqiJLtT%2bky9iir6RtKDvu6DK3V5YRKBetZA96Nv7WodbJ6vadt0EquhS68h1zyy3lzjWMj45sWiXnEbwknR7Z7Wq6Z7%2beI6BZinbJPqDqQuL5U8a6UH%2fGmxMRoNOp%2bv2en%2bDgjYXfXuzut0GCEqY5CXsUED1rYgPoIl7S0okla1XdYyIJuha6Fk2k8NEU%2fk8SV33CfJzgGPOSgDXBLyp4itWn1YHfViPmVlUxo9zmghJ36jU0RE48aazHWd3H%2bCliMHXiAIlaMmiyu52cQD5xVwsWUq3PkMUffvx%2fdPPPXn7yV1QpuHFstDUQJRySMzOGjKVqxIFeVLRLeVEtQFZSpC8LeTKvlN213GObfhjMQgz%2fWBHKWFc2aaOrR1l5QEaDDMG1ZpSka3Avf13OwuNnNgYvJSiyF9aHAlOWIa%2bAnjVS5PPN08v8UWIr4chvhKapniWU1nWW1mQRMB%2f%2bYDnNBdSKxyImCUPTdQuREwe%2fgSg0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bn37oUEDJXZ4zMqH1%2b9EOt4R8eee9J2O%2baaJQT0wKmeZDG9r3vbtjHmC2jv93r%2fyU%2bh8c1pMjCXVQmc8moE9gjsMXcfFYl4d9X5Nbcvr8juL28fd4K1Hy8JH68PtzfCg%2f8A&Signature=cW0dDCBzojJYmppEv7E3osAKPlrBUzh4zws6uZ%2f5GyCq0e3DqAcqRvqBEszEibz5P7%2fn0sxAE9ZWGfyb%2ffv1HRHQjdhmYtue15UYzJ2pU6jzMv3V4XiuV%2fQbDr3m4XGNkGgkBZe2YK9wY2AUVDOKlmNCB%2bT7ltHHSJ0E0TVNwY9dniGZD07DGHnU62ko0gtLSkEgMsI2gOdAsbsyPwLe66dT18pP4bRGPVY0Rwsew%2fNCo4tUVEEzAiZ47gSmpFJoN09U2l9dB1sLDrKYk8ZI7EiLLq1i9JUFuKegCgaY0mLR9AxP3%2fhtszdn6Qd0pmvxSWcH5jIgjN5RKVogw8FIRg%3d%3d&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256'; - newUrl = matchResult[1]+'#/sso-callback/'+dynamicRouter; - }else{ - newUrl = matchResult[1]+'#/'+dynamicRouter; - } - window.location.href=newUrl; - return false; - }else{ - next(); - } - -}) + // 在这里可以进行路由守卫的逻辑处理,例如:身份验证、数据预加载等 + // 确保调用 `next()` + //const router = useRoute(); + let baseUrl = import.meta.env.BASE_URL; + let browserUrl = window.location.href; + //console.log('Windows '+browserUrl); + const pattern = "(.+" + baseUrl + ")(.+)#."; + let matchResult = browserUrl.match(pattern); + if (matchResult != null && matchResult.length >= 3) { + let newUrl = browserUrl; + let dynamicRouter = matchResult[2]; + if ( + dynamicRouter.includes("code=") || + dynamicRouter.includes("token=") || + dynamicRouter.includes("SAMLResponse=") + ) { + if (dynamicRouter.includes("?")) { + dynamicRouter += "&"; + } else { + dynamicRouter += "?"; + } + //dynamicRouter+='SAMLResponse=tVhbb%2bI4FP4rFg%2b7TyGBprTNMmhpoC1aUir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ibz5P7%2fn0sxAE9ZWGfyb%2ffv1HRHQjdhmYtue15UYzJ2pU6jzMv3V4XiuV%2fQbDr3m4XGNkGgkBZe2YK9wY2AUVDOKlmNCB%2bT7ltHHSJ0E0TVNwY9dniGZD07DGHnU62ko0gtLSkEgMsI2gOdAsbsyPwLe66dT18pP4bRGPVY0Rwsew%2fNCo4tUVEEzAiZ47gSmpFJoN09U2l9dB1sLDrKYk8ZI7EiLLq1i9JUFuKegCgaY0mLR9AxP3%2fhtszdn6Qd0pmvxSWcH5jIgjN5RKVogw8FIRg%3d%3d&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256'; + newUrl = matchResult[1] + "#/sso-callback/" + dynamicRouter; + } else { + newUrl = matchResult[1] + "#/" + dynamicRouter; + } + window.location.href = newUrl; + return false; + } else { + next(); + } +}); router.beforeEach((to, from, next) => { - const authStore = useAuthStore(); - const configStore = useConfigStore(); - // current page view title - document.title = `${import.meta.env.VITE_APP_NAME}`; - // reset config to initial state - configStore.resetLayoutConfig(); - // verify auth token before each page change - authStore.verifyAuth(); - // before page access check if page requires authentication - if (to.meta.middleware == "auth") { - if (authStore.isAuthenticated) { - if(to.path && authStore.canVisitRouter(to.path)){ - next(); - }else{ - next({ name: "no-permission-page" }); - } - } else { - next({ name: "sso-sign-in" }); - } - } else { - next(); - } + const authStore = useAuthStore(); + const configStore = useConfigStore(); + // current page view title + document.title = `${import.meta.env.VITE_APP_NAME}`; + // reset config to initial state + configStore.resetLayoutConfig(); + // verify auth token before each page change + authStore.verifyAuth(); + // before page access check if page requires authentication + if (to.meta.middleware == "auth") { + if (authStore.isAuthenticated) { + if (to.path && authStore.canVisitRouter(to.path)) { + next(); + } else { + next({ name: "no-permission-page" }); + } + } else { + next({ name: "sso-sign-in" }); + } + } else { + next(); + } - // Scroll page to top on every route change - window.scrollTo({ - top: 0, - left: 0, - behavior: "smooth", - }); + // Scroll page to top on every route change + window.scrollTo({ + top: 0, + left: 0, + behavior: "smooth", + }); }); export default router; diff --git a/src/views/appSetting/calendarSetting/Index.vue b/src/views/appSetting/calendarSetting/Index.vue new file mode 100644 index 0000000..d58a395 --- /dev/null +++ b/src/views/appSetting/calendarSetting/Index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/appSetting/property/Index.vue b/src/views/appSetting/property/Index.vue index a39b886..d2af2bc 100644 --- a/src/views/appSetting/property/Index.vue +++ b/src/views/appSetting/property/Index.vue @@ -173,7 +173,10 @@ propertyEditorRef.value.openDelete(pData.id,actionCallback); } } - }; + }; + const formatNullableValue = (pData)=>{ + return pData.value==null?'':String(pData.value); + }; // Each Column Definition results in one Column. const columnDefs = [ { headerName:"Property Name" , field: "name", sortable: true,unSortIcon: true, checkboxSelection:false, minWidth:100, }, @@ -182,6 +185,18 @@ { headerName:"Property Code" , field: "code", sortable: true,unSortIcon: true, minWidth:140 , resizable: true, }, { headerName:"Category" , field: "category", sortable: true,unSortIcon: true, minWidth:120, resizable: true, }, { headerName:"Sort Order" , field: "sortOrder", sortable: true,unSortIcon: true, minWidth:140 , resizable: true, }, + { headerName:"Calendar Name" , field: "calendarName", sortable: true,unSortIcon: true, minWidth:140 , resizable: true, valueFormatter:formatNullableValue, }, + { headerName:"Calendar Order" , field: "calendarOrder", sortable: true,unSortIcon: true, minWidth:140 , resizable: true, valueFormatter:formatNullableValue, }, + { headerName:"Show Calendar" , field: "showCalendar", sortable: true,unSortIcon: true, minWidth:140 , resizable: true, + cellRenderer:params=>{ + if(params.value===1 || params.value==='1'){ + return 'Yes'; + }else if(params.value===0 || params.value==='0'){ + return 'No'; + } + return ''; + } + }, // { headerName:"Last Update At" , field: "updatedAt", minWidth:160 , resizable: true, // cellRenderer:params=>{ // return params.value?moment(params.value).format("YYYY-MM-DD HH:mm:ss"):''; diff --git a/src/views/appSetting/property/Modal.vue b/src/views/appSetting/property/Modal.vue index 1ad7f2a..ef370d3 100644 --- a/src/views/appSetting/property/Modal.vue +++ b/src/views/appSetting/property/Modal.vue @@ -166,6 +166,44 @@ +
+ + + + + + + + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + +
diff --git a/src/views/appSetting/room/Index.vue b/src/views/appSetting/room/Index.vue index 128562f..e889211 100644 --- a/src/views/appSetting/room/Index.vue +++ b/src/views/appSetting/room/Index.vue @@ -269,6 +269,9 @@ export default defineComponent({ } return res; }; + const formatNullableValue = (pData) => { + return pData.value == null ? "" : String(pData.value); + }; // Each Column Definition results in one Column. const columnDefs = [ { @@ -311,6 +314,49 @@ export default defineComponent({ minWidth: 150, resizable: true, }, + { + headerName: "Calendar Name", + field: "calendarName", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + valueFormatter: formatNullableValue, + }, + { + headerName: "Calendar Order", + field: "calendarOrder", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + valueFormatter: formatNullableValue, + }, + { + headerName: "Show Calendar", + field: "showCalendar", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + cellRenderer: (params) => { + if (params.value === 1 || params.value === "1") { + return "Yes"; + } else if (params.value === 0 || params.value === "0") { + return "No"; + } + return ""; + }, + }, + { + headerName: "Default Show Calendar", + field: "defaultShowCalendar", + sortable: true, + unSortIcon: true, + minWidth: 190, + resizable: true, + cellRenderer: getYesOrNoStatus, + }, { headerName: "Room Type for Create Booking", field: "forCreateBooking", diff --git a/src/views/appSetting/room/Modal.vue b/src/views/appSetting/room/Modal.vue index 8568f5f..797fb11 100644 --- a/src/views/appSetting/room/Modal.vue +++ b/src/views/appSetting/room/Modal.vue @@ -151,6 +151,52 @@
+
+ + + + + + + + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + +
-
- + - - - -
+ +
-->
+
+ + + + + + + + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + +
diff --git a/src/views/daylightAppSetting/room/Index.vue b/src/views/daylightAppSetting/room/Index.vue index c594343..e8be6f0 100644 --- a/src/views/daylightAppSetting/room/Index.vue +++ b/src/views/daylightAppSetting/room/Index.vue @@ -257,6 +257,9 @@ export default defineComponent({ } return res; }; + const formatNullableValue = (pData)=>{ + return pData.value==null?'':String(pData.value); + }; // Each Column Definition results in one Column. const columnDefs = [ { @@ -299,6 +302,49 @@ export default defineComponent({ minWidth: 150, resizable: true, }, + { + headerName: "Calendar Name", + field: "calendarName", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + valueFormatter: formatNullableValue, + }, + { + headerName: "Calendar Order", + field: "calendarOrder", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + valueFormatter: formatNullableValue, + }, + { + headerName: "Show Calendar", + field: "showCalendar", + sortable: true, + unSortIcon: true, + minWidth: 150, + resizable: true, + cellRenderer: (params) => { + if (params.value === 1 || params.value === "1") { + return "Yes"; + } else if (params.value === 0 || params.value === "0") { + return "No"; + } + return ""; + }, + }, + { + headerName: "Default Show Calendar", + field: "defaultShowCalendar", + sortable: true, + unSortIcon: true, + minWidth: 190, + resizable: true, + cellRenderer: getYesOrNoStatus, + }, { headerName: "Room Type for Create Booking", field: "forCreateBooking", diff --git a/src/views/daylightAppSetting/room/Modal.vue b/src/views/daylightAppSetting/room/Modal.vue index 267062a..19b9915 100644 --- a/src/views/daylightAppSetting/room/Modal.vue +++ b/src/views/daylightAppSetting/room/Modal.vue @@ -152,6 +152,52 @@
+
+ + + + + + + + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + +