Advertisement
dicaribapak11

index.ts

May 28th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.68 KB | None | 0 0
  1. import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";
  2. // import { useAuthStore } from "@/stores/auth";
  3. import { userAuthStore } from "@/stores/userAuth";
  4. import { useConfigStore } from "@/stores/config";
  5.  
  6. const routes: Array<RouteRecordRaw> = [
  7. {
  8. path: "/",
  9. redirect: "/",
  10. component: () => import("@/layouts/new-ui-layout/LandingPageLayout.vue"),
  11. children: [
  12. {
  13. path: "/",
  14. name: "landing",
  15. component: () => import("@/views/LandingPage.vue"),
  16. meta: {
  17. pageTitle: "Welcome",
  18. breadcrumbs: []
  19. }
  20. }
  21. ]
  22. },
  23. {
  24. path: "/",
  25. component: () => import("@/layouts/default-layout/ModuleLayout.vue"),
  26. meta: {
  27. middleware: "auth"
  28. },
  29. children: [
  30. {
  31. path: "/dashboard",
  32. name: "dashboard",
  33. component: () => import("@/views/Dashboardv2.vue"),
  34. meta: {
  35. pageTitle: "Dashboard",
  36. breadcrumbs: [],
  37. requiresAuth: true
  38. }
  39. }
  40. ]
  41. },
  42. {
  43. path: "/",
  44. component: () => import("@/layouts/new-ui-layout/AuthLayout.vue"),
  45. children: [
  46. {
  47. path: "/sign-in",
  48. name: "sign-in",
  49. component: () => import("@/views/Auth/Authv2/SignIn.vue"),
  50. meta: {
  51. pageTitle: "Sign In"
  52. }
  53. }
  54. ]
  55. },
  56.  
  57. {
  58. path: "/",
  59. component: () => import("@/layouts/default-layout/DefaultLayoutv2.vue"),
  60. meta: {
  61. middleware: "auth"
  62. },
  63. children: [
  64. {
  65. path: "/eksplorasi/dashboard",
  66. name: "dashboard-eksplorasi",
  67. component: () => import("@/views/Eksplorasi/DashboardEksplorasiv2.vue"),
  68. meta: {
  69. pageTitle: "Dashboard",
  70. breadcrumbs: ["Dashboards"]
  71. }
  72. }
  73. ]
  74. },
  75.  
  76. {
  77. path: "/",
  78. redirect: "/dashboard3",
  79. component: () => import("@/layouts/default-layout/DefaultLayoutv2.vue"),
  80. meta: {
  81. middleware: "auth"
  82. },
  83. children: [
  84. {
  85. path: "/dashboard3",
  86. name: "dashboard3",
  87. component: () => import("@/views/Dashboard.vue"),
  88. meta: {
  89. pageTitle: "Dashboard",
  90. breadcrumbs: ["Dashboards"]
  91. }
  92. },
  93. {
  94. path: "/eksplorasi/:id/detail-pelaporan",
  95. name: "eksplorasi-detail-pelaporan",
  96. component: () => import("@/views/Eksplorasi/Pelaporan/DetailPelaporan.vue"),
  97. meta: {
  98. pageTitle: "Dashboard Eksplorasi",
  99. breadcrumbs: ["Layout"]
  100. }
  101. },
  102. {
  103. path: "/eksplorasi/dashboard-rkab",
  104. name: "dashboard-rkab",
  105. component: () => import("@/views/DashboardRKAB.vue"),
  106. meta: {
  107. pageTitle: "Layout Builder",
  108. breadcrumbs: ["Layout"]
  109. }
  110. },
  111. {
  112. path: "/eksplorasi/dashboard-listing-blok",
  113. name: "dashboard-listing-blok",
  114. component: () =>
  115. import("@/views/Eksplorasi/DashboardListingBlok/DashboardListingBlok.vue"),
  116. meta: {
  117. pageTitle: "Layout Builder",
  118. breadcrumbs: ["Layout"]
  119. }
  120. },
  121. {
  122. path: "/eksplorasi/dashboard-pelaporan",
  123. name: "dashboard-pelaporan",
  124. component: () => import("@/views/Eksplorasi/Pelaporan/DashboardPelaporan.vue"),
  125. meta: {
  126. pageTitle: "Layout Builder",
  127. breadcrumbs: ["Layout"]
  128. }
  129. },
  130. {
  131. path: "/eksplorasi/rkab-akhir",
  132. name: "eksplorasi-rkab-akhir",
  133. component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanAkhir.vue"),
  134. meta: {
  135. pageTitle: "Pelaporan Akhir",
  136. breadcrumbs: ["Layout"]
  137. }
  138. },
  139. {
  140. path: "/eksplorasi/detail-pelaporan/:id",
  141. name: "detail-pelaporan",
  142. component: () =>
  143. import(
  144. "@/views/Eksplorasi/Pelaporan/DaftarPelaporan_byFilter/HalamanListingPelaporan.vue"
  145. ),
  146. meta: {
  147. pageTitle: "Layout Builder",
  148. breadcrumbs: ["Layout"]
  149. }
  150. },
  151. {
  152. path: "/eksplorasi/rkab-berkala",
  153. name: "eksplorasi-rkab-berkala",
  154. component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanBerkala.vue"),
  155. meta: {
  156. pageTitle: "Layout Builder",
  157. breadcrumbs: ["Layout"]
  158. }
  159. },
  160. // {
  161. // path: "/eksplorasi/rkab-berkala/:filter",
  162. // name: "eksplorasi-rkab-berkala-filter",
  163. // component: () => import("@/views/Eksplorasi/Pelaporan/PelaporanBerkala/filter.vue"),
  164. // meta: {
  165. // pageTitle: "Layout Builder",
  166. // breadcrumbs: ["Layout"]
  167. // }
  168. // },
  169. //component filter.vue tidak ditemukan, tolong yang buat di cek lagi.
  170. {
  171. path: "/halaman-listing-pit/:idBlok",
  172. name: "halaman-listing-pit",
  173. component: () =>
  174. import("@/views/Eksplorasi/DashboardListingPit/HalamanListingPit.vue"),
  175. meta: {
  176. pageTitle: "Layout Builder",
  177. breadcrumbs: ["Layout"]
  178. }
  179. },
  180. {
  181. path: "/eksplorasi/pengajuan-rkab",
  182. name: "eksplorasi-pengajuan",
  183. component: () =>
  184. import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep1.vue"),
  185. meta: {
  186. pageTitle: "Pengajuan RKAB",
  187. breadcrumbs: ["Layout"]
  188. }
  189. },
  190. {
  191. path: "/eksplorasi/:id/perusahaan",
  192. name: "eksplorasi-perusahaan",
  193. component: () =>
  194. import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep2.vue"),
  195. meta: {
  196. pageTitle: "Perusahaan",
  197. breadcrumbs: ["Layout"]
  198. }
  199. },
  200. {
  201. path: "/eksplorasi/:id/matriks",
  202. name: "eksplorasi-matriks",
  203. component: () =>
  204. import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep3.vue"),
  205. meta: {
  206. pageTitle: "Matriks",
  207. breadcrumbs: ["Layout"]
  208. }
  209. },
  210. {
  211. path: "/eksplorasi/:id/lampiran",
  212. name: "eksplorasi-lampiran",
  213. component: () =>
  214. import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep4.vue"),
  215. meta: {
  216. pageTitle: "Lampiran",
  217. breadcrumbs: ["Layout"]
  218. }
  219. },
  220. {
  221. path: "/eksplorasi/:id/ringkasan",
  222. name: "eksplorasi-ringkasan",
  223. component: () =>
  224. import("@/views/Eksplorasi/Pengajuan/RouterPengajuan/PengajuanRKABStep5.vue"),
  225. meta: {
  226. pageTitle: "Ringkasan",
  227. breadcrumbs: ["Layout"]
  228. }
  229. },
  230. {
  231. path: "/eksplorasi/:id/matriks/2a",
  232. name: "eksplorasi-matriks-2a",
  233. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2a.vue"),
  234. meta: {
  235. pageTitle: "Matriks 2a",
  236. breadcrumbs: ["Layout"]
  237. }
  238. },
  239. {
  240. path: "/eksplorasi/:id/matriks/2b",
  241. name: "eksplorasi-matriks-2b",
  242. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2b.vue"),
  243. meta: {
  244. pageTitle: "Matriks 2b",
  245. breadcrumbs: ["Layout"]
  246. }
  247. },
  248. {
  249. path: "/eksplorasi/:id/matriks/2c",
  250. name: "eksplorasi-matriks-2c",
  251. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks2c.vue"),
  252. meta: {
  253. pageTitle: "Matriks 2b",
  254. breadcrumbs: ["Layout"]
  255. }
  256. },
  257. {
  258. path: "/eksplorasi/:id/matriks/3",
  259. name: "eksplorasi-matriks-3",
  260. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks3.vue"),
  261. meta: {
  262. pageTitle: "Matriks 3",
  263. breadcrumbs: ["Layout"]
  264. }
  265. },
  266. {
  267. path: "/eksplorasi/:id/matriks/4a",
  268. name: "eksplorasi-matriks-4a",
  269. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks4a.vue"),
  270. meta: {
  271. pageTitle: "Matriks 4a",
  272. breadcrumbs: ["Layout"]
  273. }
  274. },
  275. {
  276. path: "/eksplorasi/:id/matriks/4b",
  277. name: "eksplorasi-matriks-4b",
  278. component: () => import("@/views/Eksplorasi/Pengajuan/Matriks/RouterMatriks4b.vue"),
  279. meta: {
  280. pageTitle: "Matriks 4b",
  281. breadcrumbs: ["Layout"]
  282. }
  283. },
  284. {
  285. path: "/eksplorasi/pengajuan-rkab/:id",
  286. name: "eksplorasi-pengajuan-rkab-card-filter",
  287. component: () => import("@/views/Eksplorasi/Detail/CardRingkasan/CardDetail.vue"),
  288. meta: {
  289. pageTitle: "Daftar Pengajuan",
  290. breadcrumbs: ["Layout"]
  291. }
  292. },
  293. {
  294. path: "/eksplorasi/pengajuan-rkab/:id/penugasan-koordinator",
  295. name: "eksplorasi-pengajuan-rkab-card-filter-penugasan-koordinator",
  296. component: () => import("@/views/Eksplorasi/Detail/PenugasanKoordinator.vue"),
  297. meta: {
  298. pageTitle: "Penugasan Ke Koordinator",
  299. breadcrumbs: ["Layout"]
  300. }
  301. },
  302. {
  303. path: "/profil-perusahaan/profil",
  304. name: "profil-perusahaan-profil",
  305. component: () => import("@/views/ProfilPerusahaan/Profil.vue"),
  306. meta: {
  307. pageTitle: "Profil Perusahaan",
  308. breadcrumbs: ["Layout"]
  309. }
  310. },
  311. {
  312. path: "/profil-perusahaan/perizinan",
  313. name: "profil-perusahaan-perizinan",
  314. component: () => import("@/views/ProfilPerusahaan/Perizinan.vue"),
  315. meta: {
  316. pageTitle: "Daftar Perizinan",
  317. breadcrumbs: ["Layout"]
  318. }
  319. },
  320. {
  321. path: "/eksplorasi/detail/rkab/:id",
  322. name: "detail-rkab",
  323. component: () => import("@/views/Eksplorasi/Detail/DetailRKAB.vue"),
  324. meta: {
  325. pageTitle: "Daftar Perizinan",
  326. breadcrumbs: ["Layout"]
  327. }
  328. },
  329. {
  330. path: "/eksplorasi/detail/review/rkab/:id",
  331. name: "detail-review-rkab",
  332. component: () => import("@/views/Eksplorasi/DetailReviewRKAB.vue"),
  333. meta: {
  334. pageTitle: "Review RKAB"
  335. }
  336. },
  337. {
  338. path: "/eksplorasi/detail/review/rkab/:id",
  339. name: "eksplorasi-detail-review-penolakan",
  340. component: () => import("@/views/Eksplorasi/Detail/ReviewPenolakan.vue"),
  341. meta: {
  342. pageTitle: "Review RKAB Penolakan"
  343. }
  344. },
  345. {
  346. path: "/eksplorasi/detail/review/rkab/:id",
  347. name: "eksplorasi-detail-review-persetujuan",
  348. component: () => import("@/views/Eksplorasi/Detail/ReviewPenolakan.vue"),
  349. meta: {
  350. pageTitle: "Review RKAB Persetujuan"
  351. }
  352. },
  353. {
  354. path: "/eksplorasi/detail/review/matriks/:id",
  355. name: "detail-matriks",
  356. component: () => import("@/views/Eksplorasi/Detail/ReviewMatriks.vue"),
  357. meta: {
  358. pageTitle: "Review Matriks"
  359. }
  360. },
  361. {
  362. path: "/eksplorasi/penugasan-evaluator/:id",
  363. name: "eksplorasi-detail-penugasan-evaluator",
  364. component: () =>
  365. import(
  366. "@/views/Eksplorasi/Detail/PenugasanEvaluator/DetailPenugasanEvaluator.vue"
  367. ),
  368. meta: {
  369. pageTitle: "Detail Penugasan Evaluator",
  370. breadcrumbs: ["Layout"]
  371. }
  372. },
  373. {
  374. path: "/eksplorasi/studi-kelayakan/tekno-ekonomi",
  375. name: "eksplorasi-studi-kelayakan-tekno-ekonomi",
  376. component: () => import("@/views/Eksplorasi/StudiKelayakan/TeknoEkonomi.vue"),
  377. meta: {
  378. pageTitle: "Studi Tekno Ekonomi",
  379. breadcrumbs: ["Studi Kelayakan", "Studi Tekno Ekonomi"]
  380. }
  381. },
  382. {
  383. path: "/eksplorasi/studi-kelayakan/tekno-ekonomi/:id",
  384. name: "detail-eksplorasi-studi-kelayakan-tekno-ekonomi",
  385. component: () => import("@/views/Eksplorasi/StudiKelayakan/DetailTeknoEkonomi.vue"),
  386. meta: {
  387. pageTitle: "Studi Tekno Ekonomi",
  388. breadcrumbs: ["Studi Kelayakan", "Studi Tekno Ekonomi"]
  389. }
  390. },
  391. {
  392. path: "/eksplorasi/studi-kelayakan/akhir",
  393. name: "studi-kelayakan-akhir",
  394. component: () => import("@/views/Eksplorasi/StudiKelayakan/Akhir.vue"),
  395. meta: {
  396. pageTitle: "Studi Akhir Kelayakan ",
  397. breadcrumbs: ["Studi Kelayakan", "Studi Akhir Kelayakan"]
  398. }
  399. },
  400. {
  401. path: "/eksplorasi/studi-kelayakan/dashboard",
  402. name: "eksplorasi-dashboard-studi-kelayakan",
  403. component: () => import("@/views/Eksplorasi/StudiKelayakan/DashboardKelayakan.vue"),
  404. meta: {
  405. pageTitle: "Dashboard Studi Kelayakan"
  406. }
  407. },
  408. {
  409. path: "/eksplorasi/studi-kelayakan/tekno-ekonomi/create",
  410. name: "eksplorasi-studi-kelayakan-tekno-ekonomi-create",
  411. component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/TeknoEkonomi.vue"),
  412. meta: {
  413. pageTitle: "Buat Pelaporan",
  414. breadcrumbs: ["Layout"]
  415. }
  416. },
  417. {
  418. path: "/eksplorasi/studi-kelayakan/akhir/create",
  419. name: "eksplorasi-studi-kelayakan-akhir-create",
  420. component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/Akhir.vue"),
  421. meta: {
  422. pageTitle: "Buat Pelaporan",
  423. breadcrumbs: ["Layout"]
  424. }
  425. },
  426. {
  427. path: "/eksplorasi/studi-kelayakan/akhir/create",
  428. name: "eksplorasi-studi-kelayakan-akhir-create",
  429. component: () => import("@/views/Eksplorasi/StudiKelayakan/Form/Akhir.vue"),
  430. meta: {
  431. pageTitle: "Buat Pelaporan",
  432. breadcrumbs: ["Layout"]
  433. }
  434. },
  435. {
  436. path: "/eksplorasi/studi-kelayakan/listing/:filter",
  437. name: "eksplorasi-studi-kelayakan-listing",
  438. component: () =>
  439. import("@/views/Eksplorasi/StudiKelayakan/ListingStudiKelayakan.vue"),
  440. meta: {
  441. pageTitle: "Halaman Listing Studi Kelayakan",
  442. breadcrumbs: ["Layout"]
  443. }
  444. },
  445. {
  446. path: "/pelaporan/pilih-rkab",
  447. name: "eksplorasi-pelaporan-pilih-rkab",
  448. component: () => import("@/views/Eksplorasi/Pelaporan/HalamanPilihRKAB.vue"),
  449. meta: { requiresAuth: true }
  450. },
  451. {
  452. path: "/eksplorasi/pelaporan/pengajuan/:idRKAB",
  453. name: "eksplorasi-pengajuan-pelaporan-berkala",
  454. component: () =>
  455. import("@/views/Eksplorasi/Pelaporan/CreatePelaporan/PelaporanBerkala.vue"),
  456. meta: { requiresAuth: true }
  457. },
  458. {
  459. path: "/eksplorasi/pelaporan/pengajuan-akhir",
  460. name: "eksplorasi-pengajuan-pelaporan-akhir",
  461. component: () =>
  462. import(
  463. "@/views/Eksplorasi/Pelaporan/PelaporanAkhir/PengajuanPelaporanAkhir.vue"
  464. ),
  465. meta: { requiresAuth: true }
  466. },
  467. {
  468. path: "/operasi-produksi/pencampuran-batubara",
  469. name: "operasi-produksi/pencampuran-batubara",
  470. component: () =>
  471. import(
  472. "@/views/OperasiProduksi/Produksi/PencampuranBatubara/DashboardPencampuranBatubara.vue"
  473. ),
  474. meta: { requiresAuth: true }
  475. },
  476. {
  477. path: "/operasi-produksi/pencampuran-batubara/create",
  478. name: "operasi-produksi/pencampuran-batubara/create",
  479. component: () =>
  480. import(
  481. "@/views/OperasiProduksi/Produksi/PencampuranBatubara/Form/FormRealiasasiPencampuranBatubara.vue"
  482. ),
  483. meta: { requiresAuth: true }
  484. },
  485. {
  486. path: "/crafted/pages/profile",
  487. name: "profile",
  488. component: () => import("@/components/page-layouts/Profile.vue"),
  489. meta: {
  490. breadcrumbs: ["Pages", "Profile"]
  491. },
  492. children: [
  493. {
  494. path: "overview",
  495. name: "profile-overview",
  496. component: () => import("@/views/crafted/pages/profile/Overview.vue"),
  497. meta: {
  498. pageTitle: "Overview"
  499. }
  500. },
  501. {
  502. path: "projects",
  503. name: "profile-projects",
  504. component: () => import("@/views/crafted/pages/profile/Projects.vue"),
  505. meta: {
  506. pageTitle: "Projects"
  507. }
  508. },
  509. {
  510. path: "campaigns",
  511. name: "profile-campaigns",
  512. component: () => import("@/views/crafted/pages/profile/Campaigns.vue"),
  513. meta: {
  514. pageTitle: "Campaigns"
  515. }
  516. },
  517. {
  518. path: "documents",
  519. name: "profile-documents",
  520. component: () => import("@/views/crafted/pages/profile/Documents.vue"),
  521. meta: {
  522. pageTitle: "Documents"
  523. }
  524. },
  525. {
  526. path: "connections",
  527. name: "profile-connections",
  528. component: () => import("@/views/crafted/pages/profile/Connections.vue"),
  529. meta: {
  530. pageTitle: "Connections"
  531. }
  532. },
  533. {
  534. path: "activity",
  535. name: "profile-activity",
  536. component: () => import("@/views/crafted/pages/profile/Activity.vue"),
  537. meta: {
  538. pageTitle: "Activity"
  539. }
  540. }
  541. ]
  542. },
  543. {
  544. path: "/crafted/pages/wizards/horizontal",
  545. name: "horizontal-wizard",
  546. component: () => import("@/views/crafted/pages/wizards/HorizontalWizardPage.vue"),
  547. meta: {
  548. pageTitle: "Horizontal",
  549. breadcrumbs: ["Pages", "Wizard"]
  550. }
  551. },
  552. {
  553. path: "/crafted/pages/wizards/vertical",
  554. name: "vertical-wizard",
  555. component: () => import("@/views/crafted/pages/wizards/VerticalWizardPage.vue"),
  556. meta: {
  557. pageTitle: "Vertical",
  558. breadcrumbs: ["Pages", "Wizard"]
  559. }
  560. },
  561. {
  562. path: "/crafted/account",
  563. name: "account",
  564. component: () => import("@/views/crafted/account/Account.vue"),
  565. meta: {
  566. breadcrumbs: ["Crafted", "Account"]
  567. },
  568. children: [
  569. {
  570. path: "overview",
  571. name: "account-overview",
  572. component: () => import("@/views/crafted/account/Overview.vue"),
  573. meta: {
  574. pageTitle: "Overview"
  575. }
  576. },
  577. {
  578. path: "settings",
  579. name: "account-settings",
  580. component: () => import("@/views/crafted/account/Settings.vue"),
  581. meta: {
  582. pageTitle: "Settings"
  583. }
  584. }
  585. ]
  586. },
  587. {
  588. path: "/apps/customers/getting-started",
  589. name: "apps-customers-getting-started",
  590. component: () => import("@/views/apps/customers/GettingStarted.vue"),
  591. meta: {
  592. pageTitle: "Getting Started",
  593. breadcrumbs: ["Apps", "Customers"]
  594. }
  595. },
  596. {
  597. path: "/apps/customers/customers-listing",
  598. name: "apps-customers-listing",
  599. component: () => import("@/views/apps/customers/CustomersListing.vue"),
  600. meta: {
  601. pageTitle: "Customers Listing",
  602. breadcrumbs: ["Apps", "Customers"]
  603. }
  604. },
  605. {
  606. path: "/apps/customers/customer-details",
  607. name: "apps-customers-details",
  608. component: () => import("@/views/apps/customers/CustomerDetails.vue"),
  609. meta: {
  610. pageTitle: "Customers Details",
  611. breadcrumbs: ["Apps", "Customers"]
  612. }
  613. },
  614. {
  615. path: "/apps/subscriptions/getting-started",
  616. name: "apps-subscriptions-getting-started",
  617. component: () => import("@/views/apps/subscriptions/GettingStarted.vue"),
  618. meta: {
  619. pageTitle: "Getting Started",
  620. breadcrumbs: ["Apps", "Subscriptions"]
  621. }
  622. },
  623. {
  624. path: "/apps/subscriptions/subscription-list",
  625. name: "apps-subscriptions-subscription-list",
  626. component: () => import("@/views/apps/subscriptions/SubscriptionList.vue"),
  627. meta: {
  628. pageTitle: "Getting Started",
  629. breadcrumbs: ["Apps", "Subscriptions"]
  630. }
  631. },
  632. {
  633. path: "/apps/subscriptions/add-subscription",
  634. name: "apps-subscriptions-add-subscription",
  635. component: () => import("@/views/apps/subscriptions/AddSubscription.vue"),
  636. meta: {
  637. pageTitle: "Add Subscription",
  638. breadcrumbs: ["Apps", "Subscriptions"]
  639. }
  640. },
  641. {
  642. path: "/apps/subscriptions/view-subscription",
  643. name: "apps-subscriptions-view-subscription",
  644. component: () => import("@/views/apps/subscriptions/ViewSubscription.vue"),
  645. meta: {
  646. pageTitle: "View Subscription",
  647. breadcrumbs: ["Apps", "Subscriptions"]
  648. }
  649. },
  650. {
  651. path: "/apps/calendar",
  652. name: "apps-calendar",
  653. component: () => import("@/views/apps/Calendar.vue"),
  654. meta: {
  655. pageTitle: "Calendar",
  656. breadcrumbs: ["Apps"]
  657. }
  658. },
  659. {
  660. path: "/apps/chat/private-chat",
  661. name: "apps-private-chat",
  662. component: () => import("@/views/apps/chat/Chat.vue"),
  663. meta: {
  664. pageTitle: "Private Chat",
  665. breadcrumbs: ["Apps", "Chat"]
  666. }
  667. },
  668. {
  669. path: "/apps/chat/group-chat",
  670. name: "apps-group-chat",
  671. component: () => import("@/views/apps/chat/Chat.vue"),
  672. meta: {
  673. pageTitle: "Group Chat",
  674. breadcrumbs: ["Apps", "Chat"]
  675. }
  676. },
  677. {
  678. path: "/apps/chat/drawer-chat",
  679. name: "apps-drawer-chat",
  680. component: () => import("@/views/apps/chat/DrawerChat.vue"),
  681. meta: {
  682. pageTitle: "Drawer Chat",
  683. breadcrumbs: ["Apps", "Chat"]
  684. }
  685. },
  686. {
  687. path: "/crafted/modals/general/invite-friends",
  688. name: "modals-general-invite-friends",
  689. component: () => import("@/views/crafted/modals/general/InviteFriends.vue"),
  690. meta: {
  691. pageTitle: "Invite Friends",
  692. breadcrumbs: ["Crafted", "Modals", "General"]
  693. }
  694. },
  695. {
  696. path: "/crafted/modals/general/view-user",
  697. name: "modals-general-view-user",
  698. component: () => import("@/views/crafted/modals/general/ViewUsers.vue"),
  699. meta: {
  700. pageTitle: "View User",
  701. breadcrumbs: ["Crafted", "Modals", "General"]
  702. }
  703. },
  704. {
  705. path: "/crafted/modals/general/upgrade-plan",
  706. name: "modals-general-upgrade-plan",
  707. component: () => import("@/views/crafted/modals/general/UpgradePlan.vue"),
  708. meta: {
  709. pageTitle: "Upgrade Plan",
  710. breadcrumbs: ["Crafted", "Modals", "General"]
  711. }
  712. },
  713. {
  714. path: "/crafted/modals/general/share-and-earn",
  715. name: "modals-general-share-and-earn",
  716. component: () => import("@/views/crafted/modals/general/ShareAndEarn.vue"),
  717. meta: {
  718. pageTitle: "Share And Earn",
  719. breadcrumbs: ["Crafted", "Modals", "General"]
  720. }
  721. },
  722. {
  723. path: "/crafted/modals/forms/new-target",
  724. name: "modals-forms-new-target",
  725. component: () => import("@/views/crafted/modals/forms/NewTarget.vue"),
  726. meta: {
  727. pageTitle: "New Target",
  728. breadcrumbs: ["Crafted", "Modals", "Forms"]
  729. }
  730. },
  731. {
  732. path: "/crafted/modals/forms/new-card",
  733. name: "modals-forms-new-card",
  734. component: () => import("@/views/crafted/modals/forms/NewCard.vue"),
  735. meta: {
  736. pageTitle: "New Card",
  737. breadcrumbs: ["Crafted", "Modals", "Forms"]
  738. }
  739. },
  740. {
  741. path: "/crafted/modals/forms/new-address",
  742. name: "modals-forms-new-address",
  743. component: () => import("@/views/crafted/modals/forms/NewAddress.vue"),
  744. meta: {
  745. pageTitle: "New Address",
  746. breadcrumbs: ["Crafted", "Modals", "Forms"]
  747. }
  748. },
  749. {
  750. path: "/crafted/modals/forms/create-api-key",
  751. name: "modals-forms-create-api-key",
  752. component: () => import("@/views/crafted/modals/forms/CreateApiKey.vue"),
  753. meta: {
  754. pageTitle: "Create Api Key",
  755. breadcrumbs: ["Crafted", "Modals", "Forms"]
  756. }
  757. },
  758. {
  759. path: "/crafted/modals/wizards/two-factor-auth",
  760. name: "modals-wizards-two-factor-auth",
  761. component: () => import("@/views/crafted/modals/wizards/TwoFactorAuth.vue"),
  762. meta: {
  763. pageTitle: "Two Factory Auth",
  764. breadcrumbs: ["Crafted", "Modals", "Wizards"]
  765. }
  766. },
  767. {
  768. path: "/crafted/modals/wizards/create-app",
  769. name: "modals-wizards-create-app",
  770. component: () => import("@/views/crafted/modals/wizards/CreateApp.vue"),
  771. meta: {
  772. pageTitle: "Create App",
  773. breadcrumbs: ["Crafted", "Modals", "Wizards"]
  774. }
  775. },
  776. {
  777. path: "/crafted/modals/wizards/create-account",
  778. name: "modals-wizards-create-account",
  779. component: () => import("@/views/crafted/modals/wizards/CreateAccount.vue"),
  780. meta: {
  781. pageTitle: "Create Account",
  782. breadcrumbs: ["Crafted", "Modals", "Wizards"]
  783. }
  784. },
  785. {
  786. path: "/crafted/widgets/lists",
  787. name: "widgets-list",
  788. component: () => import("@/views/crafted/widgets/Lists.vue"),
  789. meta: {
  790. pageTitle: "Lists",
  791. breadcrumbs: ["Crafted", "Widgets"]
  792. }
  793. },
  794. {
  795. path: "/crafted/widgets/statistics",
  796. name: "widgets-statistics",
  797. component: () => import("@/views/crafted/widgets/Statistics.vue"),
  798. meta: {
  799. pageTitle: "Statistics",
  800. breadcrumbs: ["Crafted", "Widgets"]
  801. }
  802. },
  803. {
  804. path: "/crafted/widgets/charts",
  805. name: "widgets-charts",
  806. component: () => import("@/views/crafted/widgets/Charts.vue"),
  807. meta: {
  808. pageTitle: "Charts",
  809. breadcrumbs: ["Crafted", "Widgets"]
  810. }
  811. },
  812. {
  813. path: "/crafted/widgets/mixed",
  814. name: "widgets-mixed",
  815. component: () => import("@/views/crafted/widgets/Mixed.vue"),
  816. meta: {
  817. pageTitle: "Mixed",
  818. breadcrumbs: ["Crafted", "Widgets"]
  819. }
  820. },
  821. {
  822. path: "/crafted/widgets/tables",
  823. name: "widgets-tables",
  824. component: () => import("@/views/crafted/widgets/Tables.vue"),
  825. meta: {
  826. pageTitle: "Tables",
  827. breadcrumbs: ["Crafted", "Widgets"]
  828. }
  829. },
  830. {
  831. path: "/crafted/widgets/feeds",
  832. name: "widgets-feeds",
  833. component: () => import("@/views/crafted/widgets/Feeds.vue"),
  834. meta: {
  835. pageTitle: "Feeds",
  836. breadcrumbs: ["Crafted", "Widgets"]
  837. }
  838. },
  839. {
  840. path: "/notifikasi",
  841. name: "notifikasi",
  842. component: () => import("@/views/Notifikasi/index.vue"),
  843. meta: {
  844. pageTitle: "List Notifikasi",
  845. breadcrumbs: ["Dashboard", "List Notifikasi"]
  846. }
  847. },
  848. {
  849. path: "/notifikasi/detail",
  850. name: "notifikasi-detail",
  851. component: () => import("@/views/Notifikasi/detail.vue"),
  852. meta: {
  853. pageTitle: "Detail Notifikasi",
  854. breadcrumbs: ["Dashboard", "List Notifikasi", "Detail"]
  855. }
  856. },
  857. {
  858. path: "/eksplorasi/laporan/kegiatan-rkab/:status",
  859. name: "eksplorasi-laporan-kegiatan-rkab",
  860. component: () => import("@/views/Eksplorasi/LaporanKegiatanRKAB/Index.vue"),
  861. meta: {
  862. pageTitle: "Laporan Kegiatan RKAB",
  863. breadcrumbs: ["Dashboard", "Laporan Kegiatan RKAB"]
  864. }
  865. },
  866. {
  867. path: "/eksplorasi/laporan/kegiatan-rkab-detail/:id",
  868. name: "eksplorasi-laporan-kegiatan-rkab-detail",
  869. component: () => import("@/views/Eksplorasi/LaporanKegiatanRKAB/Detail.vue"),
  870. meta: {
  871. pageTitle: "Laporan Kegiatan RKAB",
  872. breadcrumbs: ["Dashboard", "Laporan Kegiatan RKAB"]
  873. }
  874. },
  875. {
  876. path: "/laporan-kinerja/dashboard",
  877. name: "laporan-kinerja-dashboard",
  878. component: () => import("@/views/LaporanKinerja/DashboardLaporanKinerja.vue"),
  879. meta: {
  880. pageTitle: "Laporan Kinerja",
  881. breadcrumbs: ["Dahboard Laporan Kinerja"]
  882. }
  883. },
  884. {
  885. path: "/eksplorasi/pelaporan-studi-kelayakan/:status",
  886. name: "eksplorasi-pelaporan-studi-kelayakan",
  887. component: () =>
  888. import("@/views/Eksplorasi/StudiKelayakan/PelaporanStudiKelayakan/Index.vue"),
  889. meta: {
  890. pageTitle: "Pelaporan Studi Kelayakan",
  891. breadcrumbs: ["Dashboard", "Pelaporan Studi Kelayakan"]
  892. }
  893. },
  894. {
  895. path: "/eksplorasi/pelaporan-studi-kelayakan-detail/:id",
  896. name: "eksplorasi-pelaporan-studi-kelayakan-detail",
  897. component: () =>
  898. import("@/views/Eksplorasi/StudiKelayakan/PelaporanStudiKelayakan/Detail.vue"),
  899. meta: {
  900. pageTitle: "Pelaporan Studi Kelayakan Detail",
  901. breadcrumbs: ["Dashboard", "Pelaporan Studi Kelayakan", "Detail"]
  902. }
  903. },
  904. {
  905. path: "/audit-trail",
  906. name: "audit-trail",
  907. component: () => import("@/views/AuditTrails/AuditTrails.vue"),
  908. meta: {
  909. pageTitle: "Audit Trail",
  910. breadcrumbs: ["Dashboard", "Audit Trail"]
  911. }
  912. }
  913. ]
  914. },
  915. {
  916. path: "/",
  917. component: () => import("@/layouts/AuthLayout.vue"),
  918. children: [
  919. // {
  920. // path: "/sign-in",
  921. // name: "sign-in",
  922. // component: () => import("@/views/crafted/authentication/basic-flow/SignIn.vue"),
  923. // meta: {
  924. // pageTitle: "Sign In"
  925. // }
  926. // },
  927. {
  928. path: "/sign-up",
  929. name: "sign-up",
  930. component: () => import("@/views/crafted/authentication/basic-flow/SignUp.vue"),
  931. meta: {
  932. pageTitle: "Sign Up"
  933. }
  934. },
  935. {
  936. path: "/sign-in/admin",
  937. name: "sign-in-admin",
  938. component: () =>
  939. import("@/views/crafted/authentication/basic-flow/SignInAdmin.vue"),
  940. meta: {
  941. pageTitle: "Sign Up"
  942. }
  943. },
  944. {
  945. path: "/password-reset",
  946. name: "password-reset",
  947. component: () =>
  948. import("@/views/crafted/authentication/basic-flow/PasswordReset.vue"),
  949. meta: {
  950. pageTitle: "Password reset"
  951. }
  952. }
  953. ]
  954. },
  955.  
  956. {
  957. path: "/",
  958. component: () => import("@/layouts/SystemLayout.vue"),
  959. children: [
  960. {
  961. // the 404 route, when none of the above matches
  962. path: "/404",
  963. name: "404",
  964. component: () => import("@/views/crafted/authentication/Error404.vue"),
  965. meta: {
  966. pageTitle: "Error 404"
  967. }
  968. },
  969. {
  970. path: "/500",
  971. name: "500",
  972. component: () => import("@/views/crafted/authentication/Error500.vue"),
  973. meta: {
  974. pageTitle: "Error 500"
  975. }
  976. }
  977. ]
  978. },
  979.  
  980. {
  981. path: "/:pathMatch(.*)*",
  982. redirect: "/404"
  983. }
  984. ];
  985.  
  986. const router = createRouter({
  987. history: createWebHistory(import.meta.env.BASE_URL),
  988. routes,
  989. scrollBehavior(to) {
  990. // If the route has a hash, scroll to the section with the specified ID; otherwise, scroll to the top of the page.
  991. if (to.hash) {
  992. return {
  993. el: to.hash,
  994. top: 80,
  995. behavior: "smooth"
  996. };
  997. } else {
  998. return {
  999. top: 0,
  1000. left: 0,
  1001. behavior: "smooth"
  1002. };
  1003. }
  1004. }
  1005. });
  1006.  
  1007. router.beforeEach((to, from, next) => {
  1008. const store = userAuthStore();
  1009. const isLogged = store.getUserToken;
  1010. if (to.meta.requiresAuth && !isLogged) {
  1011. // jika belum login maka tidak bisa akses ke dalam
  1012. next("/sign-in");
  1013. // } else if (!to.meta.requiresAuth && isLogged != false) {
  1014. // // jika sudah di dalam tidak bisa akses keluar
  1015. // let tempPath = from.path.toString();
  1016. // next(tempPath);
  1017. } else {
  1018. // jika tidak di atas, maka next page
  1019. next();
  1020. }
  1021.  
  1022. //** Metronic Start */
  1023. // const authStore = useAuthStore();
  1024. // const configStore = useConfigStore();
  1025.  
  1026. // // current page view title
  1027. // document.title = `${to.meta.pageTitle} - MinerbaOne`;
  1028.  
  1029. // // reset config to initial state
  1030. // configStore.resetLayoutConfig();
  1031.  
  1032. // // verify auth token before each page change
  1033. // authStore.verifyAuth();
  1034.  
  1035. // // before page access check if page requires authentication
  1036. // // if (to.meta.middleware == "auth") {
  1037. // // if (authStore.isAuthenticated) {
  1038. // // next();
  1039. // // } else {
  1040. // // next({ name: "sign-in" });
  1041. // // }
  1042. // // } else {
  1043. // // next();
  1044. // // }
  1045. // next();
  1046. //** Metronic End */
  1047. });
  1048.  
  1049. export default router;
  1050.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement