Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";
- // import { useAuthStore } from "@/stores/auth";
- import { userAuthStore } from "@/stores/userAuth";
- import { useConfigStore } from "@/stores/config";
- const routes: Array<RouteRecordRaw> = [
- {
- path: "/",
- redirect: "/",
- component: () => import("@/layouts/new-ui-layout/LandingPageLayout.vue"),
- children: [
- {
- path: "/",
- name: "landing",
- component: () => import("@/views/LandingPage.vue"),
- meta: {
- pageTitle: "Welcome",
- breadcrumbs: []
- }
- }
- ]
- },
- {
- path: "/",
- component: () => import("@/layouts/default-layout/ModuleLayout.vue"),
- meta: {
- middleware: "auth"
- },
- children: [
- {
- path: "/dashboard",
- name: "dashboard",
- component: () => import("@/views/Dashboardv2.vue"),
- meta: {
- pageTitle: "Dashboard",
- breadcrumbs: [],
- requiresAuth: true
- }
- }
- ]
- },
- {
- path: "/",
- component: () => import("@/layouts/new-ui-layout/AuthLayout.vue"),
- children: [
- {
- path: "/sign-in",
- name: "sign-in",
- component: () => import("@/views/Auth/Authv2/SignIn.vue"),
- meta: {
- pageTitle: "Sign In"
- }
- }
- ]
- },
- {
- path: "/",
- component: () => import("@/layouts/default-layout/DefaultLayoutv2.vue"),
- meta: {
- middleware: "auth"
- },
- children: [
- {
- path: "/eksplorasi/dashboard",
- name: "dashboard-eksplorasi",
- component: () => import("@/views/Eksplorasi/DashboardEksplorasiv2.vue"),
- meta: {
- pageTitle: "Dashboard",
- breadcrumbs: ["Dashboards"]
- }
- }
- ]
- },
- {
- path: "/",
- redirect: "/dashboard3",
- component: () => import("@/layouts/default-layout/DefaultLayoutv2.vue"),
- meta: {
- middleware: "auth"
- },
- children: [
- {
- path: "/dashboard3",
- name: "dashboard3",
- component: () => import("@/views/Dashboard.vue"),
- meta: {
- pageTitle: "Dashboard",
- breadcrumbs: ["Dashboards"]
- }
- },
- {
- path: "/eksplorasi/:id/detail-pelaporan",
- name: "eksplorasi-detail-pelaporan",
- component: () => import("@/views/Eksplorasi/Pelaporan/DetailPelaporan.vue"),
- meta: {
- pageTitle: "Dashboard Eksplorasi",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/dashboard-rkab",
- name: "dashboard-rkab",
- component: () => import("@/views/DashboardRKAB.vue"),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/dashboard-listing-blok",
- name: "dashboard-listing-blok",
- component: () =>
- import("@/views/Eksplorasi/DashboardListingBlok/DashboardListingBlok.vue"),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/dashboard-pelaporan",
- name: "dashboard-pelaporan",
- component: () => import("@/views/Eksplorasi/Pelaporan/DashboardPelaporan.vue"),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/rkab-akhir",
- name: "eksplorasi-rkab-akhir",
- component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanAkhir.vue"),
- meta: {
- pageTitle: "Pelaporan Akhir",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/detail-pelaporan/:id",
- name: "detail-pelaporan",
- component: () =>
- import(
- "@/views/Eksplorasi/Pelaporan/DaftarPelaporan_byFilter/HalamanListingPelaporan.vue"
- ),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/rkab-berkala",
- name: "eksplorasi-rkab-berkala",
- component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanBerkala.vue"),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- // {
- // path: "/eksplorasi/rkab-berkala/:filter",
- // name: "eksplorasi-rkab-berkala-filter",
- // component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanBerkala/filter.vue"),
- // meta: {
- // pageTitle: "Layout Builder",
- // breadcrumbs: ["Layout"]
- // }
- // },
- //component filter.vue tidak ditemukan, tolong yang buat di cek lagi.
- {
- path: "/halaman-listing-pit/:idBlok",
- name: "halaman-listing-pit",
- component: () =>
- import("@/views/Eksplorasi/DashboardListingPit/HalamanListingPit.vue"),
- meta: {
- pageTitle: "Layout Builder",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/pengajuan-rkab",
- name: "eksplorasi-pengajuan",
- component: () =>
- import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep1.vue"),
- meta: {
- pageTitle: "Pengajuan RKAB",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/perusahaan",
- name: "eksplorasi-perusahaan",
- component: () =>
- import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep2.vue"),
- meta: {
- pageTitle: "Perusahaan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks",
- name: "eksplorasi-matriks",
- component: () =>
- import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep3.vue"),
- meta: {
- pageTitle: "Matriks",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/lampiran",
- name: "eksplorasi-lampiran",
- component: () =>
- import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep4.vue"),
- meta: {
- pageTitle: "Lampiran",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/ringkasan",
- name: "eksplorasi-ringkasan",
- component: () =>
- import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep5.vue"),
- meta: {
- pageTitle: "Ringkasan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/2a",
- name: "eksplorasi-matriks-2a",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2a.vue"),
- meta: {
- pageTitle: "Matriks 2a",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/2b",
- name: "eksplorasi-matriks-2b",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2b.vue"),
- meta: {
- pageTitle: "Matriks 2b",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/2c",
- name: "eksplorasi-matriks-2c",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2c.vue"),
- meta: {
- pageTitle: "Matriks 2b",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/3",
- name: "eksplorasi-matriks-3",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks3.vue"),
- meta: {
- pageTitle: "Matriks 3",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/4a",
- name: "eksplorasi-matriks-4a",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks4a.vue"),
- meta: {
- pageTitle: "Matriks 4a",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/:id/matriks/4b",
- name: "eksplorasi-matriks-4b",
- component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks4b.vue"),
- meta: {
- pageTitle: "Matriks 4b",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/pengajuan-rkab/:id",
- name: "eksplorasi-pengajuan-rkab-card-filter",
- component: () => import("@/views/Eksplorasi/Detail/CardRingkasan/CardDetail.vue"),
- meta: {
- pageTitle: "Daftar Pengajuan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/pengajuan-rkab/:id/penugasan-koordinator",
- name: "eksplorasi-pengajuan-rkab-card-filter-penugasan-koordinator",
- component: () => import("@/views/Eksplorasi/Detail/PenugasanKoordinator.vue"),
- meta: {
- pageTitle: "Penugasan Ke Koordinator",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/profil-perusahaan/profil",
- name: "profil-perusahaan-profil",
- component: () => import("@/views/ProfilPerusahaan/Profil.vue"),
- meta: {
- pageTitle: "Profil Perusahaan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/profil-perusahaan/perizinan",
- name: "profil-perusahaan-perizinan",
- component: () => import("@/views/ProfilPerusahaan/Perizinan.vue"),
- meta: {
- pageTitle: "Daftar Perizinan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/detail/rkab/:id",
- name: "detail-rkab",
- component: () => import("@/views/Eksplorasi/Detail/DetailRKAB.vue"),
- meta: {
- pageTitle: "Daftar Perizinan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/detail/review/rkab/:id",
- name: "detail-review-rkab",
- component: () => import("@/views/Eksplorasi/DetailReviewRKAB.vue"),
- meta: {
- pageTitle: "Review RKAB"
- }
- },
- {
- path: "/eksplorasi/detail/review/rkab/:id",
- name: "eksplorasi-detail-review-penolakan",
- component: () => import("@/views/Eksplorasi/Detail/ReviewPenolakan.vue"),
- meta: {
- pageTitle: "Review RKAB Penolakan"
- }
- },
- {
- path: "/eksplorasi/detail/review/rkab/:id",
- name: "eksplorasi-detail-review-persetujuan",
- component: () => import("@/views/Eksplorasi/Detail/ReviewPenolakan.vue"),
- meta: {
- pageTitle: "Review RKAB Persetujuan"
- }
- },
- {
- path: "/eksplorasi/detail/review/matriks/:id",
- name: "detail-matriks",
- component: () => import("@/views/Eksplorasi/Detail/ReviewMatriks.vue"),
- meta: {
- pageTitle: "Review Matriks"
- }
- },
- {
- path: "/eksplorasi/penugasan-evaluator/:id",
- name: "eksplorasi-detail-penugasan-evaluator",
- component: () =>
- import(
- "@/views/Eksplorasi/Detail/PenugasanEvaluator/DetailPenugasanEvaluator.vue"
- ),
- meta: {
- pageTitle: "Detail Penugasan Evaluator",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/tekno-ekonomi",
- name: "eksplorasi-studi-kelayakan-tekno-ekonomi",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/TeknoEkonomi.vue"),
- meta: {
- pageTitle: "Studi Tekno Ekonomi",
- breadcrumbs: ["Studi Kelayakan", "Studi Tekno Ekonomi"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/tekno-ekonomi/:id",
- name: "detail-eksplorasi-studi-kelayakan-tekno-ekonomi",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/DetailTeknoEkonomi.vue"),
- meta: {
- pageTitle: "Studi Tekno Ekonomi",
- breadcrumbs: ["Studi Kelayakan", "Studi Tekno Ekonomi"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/akhir",
- name: "studi-kelayakan-akhir",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/Akhir.vue"),
- meta: {
- pageTitle: "Studi Akhir Kelayakan ",
- breadcrumbs: ["Studi Kelayakan", "Studi Akhir Kelayakan"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/dashboard",
- name: "eksplorasi-dashboard-studi-kelayakan",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/DashboardKelayakan.vue"),
- meta: {
- pageTitle: "Dashboard Studi Kelayakan"
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/tekno-ekonomi/create",
- name: "eksplorasi-studi-kelayakan-tekno-ekonomi-create",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/TeknoEkonomi.vue"),
- meta: {
- pageTitle: "Buat Pelaporan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/akhir/create",
- name: "eksplorasi-studi-kelayakan-akhir-create",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/Akhir.vue"),
- meta: {
- pageTitle: "Buat Pelaporan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/akhir/create",
- name: "eksplorasi-studi-kelayakan-akhir-create",
- component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/Akhir.vue"),
- meta: {
- pageTitle: "Buat Pelaporan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/eksplorasi/studi-kelayakan/listing/:filter",
- name: "eksplorasi-studi-kelayakan-listing",
- component: () =>
- import("@/views/Eksplorasi/StudiKelayakan/ListingStudiKelayakan.vue"),
- meta: {
- pageTitle: "Halaman Listing Studi Kelayakan",
- breadcrumbs: ["Layout"]
- }
- },
- {
- path: "/pelaporan/pilih-rkab",
- name: "eksplorasi-pelaporan-pilih-rkab",
- component: () => import("@/views/Eksplorasi/Pelaporan/HalamanPilihRKAB.vue"),
- meta: { requiresAuth: true }
- },
- {
- path: "/eksplorasi/pelaporan/pengajuan/:idRKAB",
- name: "eksplorasi-pengajuan-pelaporan-berkala",
- component: () =>
- import("@/views/Eksplorasi/Pelaporan/CreatePelaporan/PelaporanBerkala.vue"),
- meta: { requiresAuth: true }
- },
- {
- path: "/eksplorasi/pelaporan/pengajuan-akhir",
- name: "eksplorasi-pengajuan-pelaporan-akhir",
- component: () =>
- import(
- "@/views/Eksplorasi/Pelaporan/PelaporanAkhir/PengajuanPelaporanAkhir.vue"
- ),
- meta: { requiresAuth: true }
- },
- {
- path: "/operasi-produksi/pencampuran-batubara",
- name: "operasi-produksi/pencampuran-batubara",
- component: () =>
- import(
- "@/views/OperasiProduksi/Produksi/PencampuranBatubara/DashboardPencampuranBatubara.vue"
- ),
- meta: { requiresAuth: true }
- },
- {
- path: "/operasi-produksi/pencampuran-batubara/create",
- name: "operasi-produksi/pencampuran-batubara/create",
- component: () =>
- import(
- "@/views/OperasiProduksi/Produksi/PencampuranBatubara/Form/FormRealiasasiPencampuranBatubara.vue"
- ),
- meta: { requiresAuth: true }
- },
- {
- path: "/crafted/pages/profile",
- name: "profile",
- component: () => import("@/components/page-layouts/Profile.vue"),
- meta: {
- breadcrumbs: ["Pages", "Profile"]
- },
- children: [
- {
- path: "overview",
- name: "profile-overview",
- component: () => import("@/views/crafted/pages/profile/Overview.vue"),
- meta: {
- pageTitle: "Overview"
- }
- },
- {
- path: "projects",
- name: "profile-projects",
- component: () => import("@/views/crafted/pages/profile/Projects.vue"),
- meta: {
- pageTitle: "Projects"
- }
- },
- {
- path: "campaigns",
- name: "profile-campaigns",
- component: () => import("@/views/crafted/pages/profile/Campaigns.vue"),
- meta: {
- pageTitle: "Campaigns"
- }
- },
- {
- path: "documents",
- name: "profile-documents",
- component: () => import("@/views/crafted/pages/profile/Documents.vue"),
- meta: {
- pageTitle: "Documents"
- }
- },
- {
- path: "connections",
- name: "profile-connections",
- component: () => import("@/views/crafted/pages/profile/Connections.vue"),
- meta: {
- pageTitle: "Connections"
- }
- },
- {
- path: "activity",
- name: "profile-activity",
- component: () => import("@/views/crafted/pages/profile/Activity.vue"),
- meta: {
- pageTitle: "Activity"
- }
- }
- ]
- },
- {
- path: "/crafted/pages/wizards/horizontal",
- name: "horizontal-wizard",
- component: () => import("@/views/crafted/pages/wizards/HorizontalWizardPage.vue"),
- meta: {
- pageTitle: "Horizontal",
- breadcrumbs: ["Pages", "Wizard"]
- }
- },
- {
- path: "/crafted/pages/wizards/vertical",
- name: "vertical-wizard",
- component: () => import("@/views/crafted/pages/wizards/VerticalWizardPage.vue"),
- meta: {
- pageTitle: "Vertical",
- breadcrumbs: ["Pages", "Wizard"]
- }
- },
- {
- path: "/crafted/account",
- name: "account",
- component: () => import("@/views/crafted/account/Account.vue"),
- meta: {
- breadcrumbs: ["Crafted", "Account"]
- },
- children: [
- {
- path: "overview",
- name: "account-overview",
- component: () => import("@/views/crafted/account/Overview.vue"),
- meta: {
- pageTitle: "Overview"
- }
- },
- {
- path: "settings",
- name: "account-settings",
- component: () => import("@/views/crafted/account/Settings.vue"),
- meta: {
- pageTitle: "Settings"
- }
- }
- ]
- },
- {
- path: "/apps/customers/getting-started",
- name: "apps-customers-getting-started",
- component: () => import("@/views/apps/customers/GettingStarted.vue"),
- meta: {
- pageTitle: "Getting Started",
- breadcrumbs: ["Apps", "Customers"]
- }
- },
- {
- path: "/apps/customers/customers-listing",
- name: "apps-customers-listing",
- component: () => import("@/views/apps/customers/CustomersListing.vue"),
- meta: {
- pageTitle: "Customers Listing",
- breadcrumbs: ["Apps", "Customers"]
- }
- },
- {
- path: "/apps/customers/customer-details",
- name: "apps-customers-details",
- component: () => import("@/views/apps/customers/CustomerDetails.vue"),
- meta: {
- pageTitle: "Customers Details",
- breadcrumbs: ["Apps", "Customers"]
- }
- },
- {
- path: "/apps/subscriptions/getting-started",
- name: "apps-subscriptions-getting-started",
- component: () => import("@/views/apps/subscriptions/GettingStarted.vue"),
- meta: {
- pageTitle: "Getting Started",
- breadcrumbs: ["Apps", "Subscriptions"]
- }
- },
- {
- path: "/apps/subscriptions/subscription-list",
- name: "apps-subscriptions-subscription-list",
- component: () => import("@/views/apps/subscriptions/SubscriptionList.vue"),
- meta: {
- pageTitle: "Getting Started",
- breadcrumbs: ["Apps", "Subscriptions"]
- }
- },
- {
- path: "/apps/subscriptions/add-subscription",
- name: "apps-subscriptions-add-subscription",
- component: () => import("@/views/apps/subscriptions/AddSubscription.vue"),
- meta: {
- pageTitle: "Add Subscription",
- breadcrumbs: ["Apps", "Subscriptions"]
- }
- },
- {
- path: "/apps/subscriptions/view-subscription",
- name: "apps-subscriptions-view-subscription",
- component: () => import("@/views/apps/subscriptions/ViewSubscription.vue"),
- meta: {
- pageTitle: "View Subscription",
- breadcrumbs: ["Apps", "Subscriptions"]
- }
- },
- {
- path: "/apps/calendar",
- name: "apps-calendar",
- component: () => import("@/views/apps/Calendar.vue"),
- meta: {
- pageTitle: "Calendar",
- breadcrumbs: ["Apps"]
- }
- },
- {
- path: "/apps/chat/private-chat",
- name: "apps-private-chat",
- component: () => import("@/views/apps/chat/Chat.vue"),
- meta: {
- pageTitle: "Private Chat",
- breadcrumbs: ["Apps", "Chat"]
- }
- },
- {
- path: "/apps/chat/group-chat",
- name: "apps-group-chat",
- component: () => import("@/views/apps/chat/Chat.vue"),
- meta: {
- pageTitle: "Group Chat",
- breadcrumbs: ["Apps", "Chat"]
- }
- },
- {
- path: "/apps/chat/drawer-chat",
- name: "apps-drawer-chat",
- component: () => import("@/views/apps/chat/DrawerChat.vue"),
- meta: {
- pageTitle: "Drawer Chat",
- breadcrumbs: ["Apps", "Chat"]
- }
- },
- {
- path: "/crafted/modals/general/invite-friends",
- name: "modals-general-invite-friends",
- component: () => import("@/views/crafted/modals/general/InviteFriends.vue"),
- meta: {
- pageTitle: "Invite Friends",
- breadcrumbs: ["Crafted", "Modals", "General"]
- }
- },
- {
- path: "/crafted/modals/general/view-user",
- name: "modals-general-view-user",
- component: () => import("@/views/crafted/modals/general/ViewUsers.vue"),
- meta: {
- pageTitle: "View User",
- breadcrumbs: ["Crafted", "Modals", "General"]
- }
- },
- {
- path: "/crafted/modals/general/upgrade-plan",
- name: "modals-general-upgrade-plan",
- component: () => import("@/views/crafted/modals/general/UpgradePlan.vue"),
- meta: {
- pageTitle: "Upgrade Plan",
- breadcrumbs: ["Crafted", "Modals", "General"]
- }
- },
- {
- path: "/crafted/modals/general/share-and-earn",
- name: "modals-general-share-and-earn",
- component: () => import("@/views/crafted/modals/general/ShareAndEarn.vue"),
- meta: {
- pageTitle: "Share And Earn",
- breadcrumbs: ["Crafted", "Modals", "General"]
- }
- },
- {
- path: "/crafted/modals/forms/new-target",
- name: "modals-forms-new-target",
- component: () => import("@/views/crafted/modals/forms/NewTarget.vue"),
- meta: {
- pageTitle: "New Target",
- breadcrumbs: ["Crafted", "Modals", "Forms"]
- }
- },
- {
- path: "/crafted/modals/forms/new-card",
- name: "modals-forms-new-card",
- component: () => import("@/views/crafted/modals/forms/NewCard.vue"),
- meta: {
- pageTitle: "New Card",
- breadcrumbs: ["Crafted", "Modals", "Forms"]
- }
- },
- {
- path: "/crafted/modals/forms/new-address",
- name: "modals-forms-new-address",
- component: () => import("@/views/crafted/modals/forms/NewAddress.vue"),
- meta: {
- pageTitle: "New Address",
- breadcrumbs: ["Crafted", "Modals", "Forms"]
- }
- },
- {
- path: "/crafted/modals/forms/create-api-key",
- name: "modals-forms-create-api-key",
- component: () => import("@/views/crafted/modals/forms/CreateApiKey.vue"),
- meta: {
- pageTitle: "Create Api Key",
- breadcrumbs: ["Crafted", "Modals", "Forms"]
- }
- },
- {
- path: "/crafted/modals/wizards/two-factor-auth",
- name: "modals-wizards-two-factor-auth",
- component: () => import("@/views/crafted/modals/wizards/TwoFactorAuth.vue"),
- meta: {
- pageTitle: "Two Factory Auth",
- breadcrumbs: ["Crafted", "Modals", "Wizards"]
- }
- },
- {
- path: "/crafted/modals/wizards/create-app",
- name: "modals-wizards-create-app",
- component: () => import("@/views/crafted/modals/wizards/CreateApp.vue"),
- meta: {
- pageTitle: "Create App",
- breadcrumbs: ["Crafted", "Modals", "Wizards"]
- }
- },
- {
- path: "/crafted/modals/wizards/create-account",
- name: "modals-wizards-create-account",
- component: () => import("@/views/crafted/modals/wizards/CreateAccount.vue"),
- meta: {
- pageTitle: "Create Account",
- breadcrumbs: ["Crafted", "Modals", "Wizards"]
- }
- },
- {
- path: "/crafted/widgets/lists",
- name: "widgets-list",
- component: () => import("@/views/crafted/widgets/Lists.vue"),
- meta: {
- pageTitle: "Lists",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/crafted/widgets/statistics",
- name: "widgets-statistics",
- component: () => import("@/views/crafted/widgets/Statistics.vue"),
- meta: {
- pageTitle: "Statistics",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/crafted/widgets/charts",
- name: "widgets-charts",
- component: () => import("@/views/crafted/widgets/Charts.vue"),
- meta: {
- pageTitle: "Charts",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/crafted/widgets/mixed",
- name: "widgets-mixed",
- component: () => import("@/views/crafted/widgets/Mixed.vue"),
- meta: {
- pageTitle: "Mixed",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/crafted/widgets/tables",
- name: "widgets-tables",
- component: () => import("@/views/crafted/widgets/Tables.vue"),
- meta: {
- pageTitle: "Tables",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/crafted/widgets/feeds",
- name: "widgets-feeds",
- component: () => import("@/views/crafted/widgets/Feeds.vue"),
- meta: {
- pageTitle: "Feeds",
- breadcrumbs: ["Crafted", "Widgets"]
- }
- },
- {
- path: "/notifikasi",
- name: "notifikasi",
- component: () => import("@/views/Notifikasi/index.vue"),
- meta: {
- pageTitle: "List Notifikasi",
- breadcrumbs: ["Dashboard", "List Notifikasi"]
- }
- },
- {
- path: "/notifikasi/detail",
- name: "notifikasi-detail",
- component: () => import("@/views/Notifikasi/detail.vue"),
- meta: {
- pageTitle: "Detail Notifikasi",
- breadcrumbs: ["Dashboard", "List Notifikasi", "Detail"]
- }
- },
- {
- path: "/eksplorasi/laporan/kegiatan-rkab/:status",
- name: "eksplorasi-laporan-kegiatan-rkab",
- component: () => import("@/views/Eksplorasi/LaporanKegiatanRKAB/Index.vue"),
- meta: {
- pageTitle: "Laporan Kegiatan RKAB",
- breadcrumbs: ["Dashboard", "Laporan Kegiatan RKAB"]
- }
- },
- {
- path: "/eksplorasi/laporan/kegiatan-rkab-detail/:id",
- name: "eksplorasi-laporan-kegiatan-rkab-detail",
- component: () => import("@/views/Eksplorasi/LaporanKegiatanRKAB/Detail.vue"),
- meta: {
- pageTitle: "Laporan Kegiatan RKAB",
- breadcrumbs: ["Dashboard", "Laporan Kegiatan RKAB"]
- }
- },
- {
- path: "/laporan-kinerja/dashboard",
- name: "laporan-kinerja-dashboard",
- component: () => import("@/views/LaporanKinerja/DashboardLaporanKinerja.vue"),
- meta: {
- pageTitle: "Laporan Kinerja",
- breadcrumbs: ["Dahboard Laporan Kinerja"]
- }
- },
- {
- path: "/eksplorasi/pelaporan-studi-kelayakan/:status",
- name: "eksplorasi-pelaporan-studi-kelayakan",
- component: () =>
- import("@/views/Eksplorasi/StudiKelayakan/PelaporanStudiKelayakan/Index.vue"),
- meta: {
- pageTitle: "Pelaporan Studi Kelayakan",
- breadcrumbs: ["Dashboard", "Pelaporan Studi Kelayakan"]
- }
- },
- {
- path: "/eksplorasi/pelaporan-studi-kelayakan-detail/:id",
- name: "eksplorasi-pelaporan-studi-kelayakan-detail",
- component: () =>
- import("@/views/Eksplorasi/StudiKelayakan/PelaporanStudiKelayakan/Detail.vue"),
- meta: {
- pageTitle: "Pelaporan Studi Kelayakan Detail",
- breadcrumbs: ["Dashboard", "Pelaporan Studi Kelayakan", "Detail"]
- }
- },
- {
- path: "/audit-trail",
- name: "audit-trail",
- component: () => import("@/views/AuditTrails/AuditTrails.vue"),
- meta: {
- pageTitle: "Audit Trail",
- breadcrumbs: ["Dashboard", "Audit Trail"]
- }
- }
- ]
- },
- {
- path: "/",
- component: () => import("@/layouts/AuthLayout.vue"),
- children: [
- // {
- // path: "/sign-in",
- // name: "sign-in",
- // component: () => import("@/views/crafted/authentication/basic-flow/SignIn.vue"),
- // meta: {
- // pageTitle: "Sign In"
- // }
- // },
- {
- path: "/sign-up",
- name: "sign-up",
- component: () => import("@/views/crafted/authentication/basic-flow/SignUp.vue"),
- meta: {
- pageTitle: "Sign Up"
- }
- },
- {
- path: "/sign-in/admin",
- name: "sign-in-admin",
- component: () =>
- import("@/views/crafted/authentication/basic-flow/SignInAdmin.vue"),
- meta: {
- pageTitle: "Sign Up"
- }
- },
- {
- path: "/password-reset",
- name: "password-reset",
- component: () =>
- import("@/views/crafted/authentication/basic-flow/PasswordReset.vue"),
- meta: {
- pageTitle: "Password reset"
- }
- }
- ]
- },
- {
- 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: createWebHistory(import.meta.env.BASE_URL),
- routes,
- scrollBehavior(to) {
- // If the route has a hash, scroll to the section with the specified ID; otherwise, scroll to the top of the page.
- if (to.hash) {
- return {
- el: to.hash,
- top: 80,
- behavior: "smooth"
- };
- } else {
- return {
- top: 0,
- left: 0,
- behavior: "smooth"
- };
- }
- }
- });
- router.beforeEach((to, from, next) => {
- const store = userAuthStore();
- const isLogged = store.getUserToken;
- if (to.meta.requiresAuth && !isLogged) {
- // jika belum login maka tidak bisa akses ke dalam
- next("/sign-in");
- // } else if (!to.meta.requiresAuth && isLogged != false) {
- // // jika sudah di dalam tidak bisa akses keluar
- // let tempPath = from.path.toString();
- // next(tempPath);
- } else {
- // jika tidak di atas, maka next page
- next();
- }
- //** Metronic Start */
- // const authStore = useAuthStore();
- // const configStore = useConfigStore();
- // // current page view title
- // document.title = `${to.meta.pageTitle} - MinerbaOne`;
- // // 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) {
- // // next();
- // // } else {
- // // next({ name: "sign-in" });
- // // }
- // // } else {
- // // next();
- // // }
- // next();
- //** Metronic End */
- });
- export default router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement