update route method

This commit is contained in:
Dede Fuji Abdul
2023-10-19 12:08:09 +07:00
parent 678f25f3a9
commit 4633851c6a
8 changed files with 499 additions and 770 deletions

View File

@ -1,162 +1,470 @@
import { createRouter, createWebHistory } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import HomeView from '@/views/HomeView.vue'
import LoginView from '@/views/LoginView.vue'
import NotFoundView from '@/views/NotFoundView.vue'
import AktifIndividual from '@/components/Pages/DaftarTransaksi/AktifIndividual.vue'
import EmptyPage from '@/components/Pages/HomeEmpty.vue'
import { useAuthStore } from '@/stores/auth'
import TestPage from '@/components/Pages/TestPage.vue'
export const routes = [
{
path: '/home',
name: 'Home',
component: HomeView,
children: [
{
path: '',
name: 'Home Page',
component: EmptyPage,
},
{
path: 'gangguan',
name: 'Gangguan',
children: [
{
path: '1',
name: 'Daftar',
children: [
{
path: '1',
name: 'Daftar Keluhan Dialihkan Ke Posko Lain',
component: TestPage,
},
{
path: '2',
name: 'Daftar Gangguan Melapor Lebih Dari 1 Kali',
component: TestPage,
},
{
path: '3',
name: 'Daftar Gangguan Response Time',
component: TestPage,
},
{
path: '4',
name: 'Daftar Gangguan Recovery Time',
component: TestPage,
},
{
path: '5',
name: 'Daftar Gangguan Selesai Tanpa ID Pelanggan',
component: TestPage,
},
{
path: '6',
name: 'Daftar Gangguan Berdasarkan Media',
component: TestPage,
},
{
path: '7',
name: 'Daftar Gangguan Diselesaikan Mobile APKT',
component: TestPage,
},
],
},
{
path: '2',
name: 'Rekapitulasi',
children: [
{
path: '1',
name: 'Rekapitulasi Gangguan All',
component: TestPage,
},
{
path: '2',
name: 'Rekapitulasi Gangguan Per Jenis Gangguan',
component: TestPage,
},
{
path: '3',
name: 'Rekapitulasi Gangguan Per Jenis Gangguan SE 004',
component: TestPage,
},
{
path: '4',
name: 'Rekapitulasi Gangguan Per Posko',
component: TestPage,
},
{
path: '5',
name: 'Rekapitulasi Gangguan Per Regu',
component: TestPage,
},
{
path: '6',
name: 'Rekapitulasi Gangguan Per Tanggal',
component: TestPage,
},
{
path: '7',
name: 'Rekapitulasi Gangguan Berdasarkan Media',
component: TestPage,
},
{
path: '8',
name: 'Rekapitulasi Gangguan Alih Posko',
component: TestPage,
},
{
path: '9',
name: 'Rekapitulasi Gangguan Per Status',
component: TestPage,
},
{
path: '10',
name: 'Rekapitulasi Gangguan Diselesaikan Mobile APKT',
component: TestPage,
},
{
path: '11',
name: 'Rekapitulasi Rating Per Posko',
component: TestPage,
},
{
path: '12',
name: 'Rekapitulasi Rating Per Regu',
component: TestPage,
},
{
path: '13',
name: 'Rekapitulasi Koreksi Transaksi Individual',
component: TestPage,
},
{
path: '14',
name: 'Rekapitulasi Cleansing Transaksi TM',
component: TestPage,
},
],
}
]
},
{
path: 'keluhan',
name: 'Keluhan',
children: [
{
path: '1',
name: 'Daftar',
children: [
{
path: '1',
name: 'Daftar Keluhan Dialihkan Ke Unit Lain',
component: TestPage,
},
{
path: '2',
name: 'Daftar Keluhan Pelanggan Lebih Dari 1 Kali',
component: TestPage,
},
{
path: '3',
name: 'Daftar Keluhan Response Time',
component: TestPage,
},
{
path: '4',
name: 'Daftar Keluhan Recovery Time',
component: TestPage,
},
{
path: '5',
name: 'Daftar Keluhan Selesai Tanpa ID Pelanggan',
component: TestPage,
},
{
path: '6',
name: 'Daftar Keluhan Berdasarkan Media',
component: TestPage,
},
{
path: '7',
name: 'Daftar Keluhan Selesai di CC123',
component: TestPage,
},
],
},
{
path: '2',
name: 'Rekapitulasi',
children: [
{
path: '1',
name: 'Rekapitulasi Keluhan All',
component: TestPage,
},
{
path: '2',
name: 'Rekapitulasi Keluhan Per Fungsi Bidang',
component: TestPage,
},
{
path: '3',
name: 'Rekapitulasi Keluhan Per Jenis Keluhan',
component: TestPage,
},
{
path: '4',
name: 'Rekapitulasi Keluhan Per Tanggal',
component: TestPage,
},
{
path: '5',
name: 'Rekapitulasi Keluhan Per Unit',
component: TestPage,
},
{
path: '6',
name: 'Rekapitulasi Keluhan Berdasarkan Media',
component: TestPage,
},
{
path: '7',
name: 'Rekapitulasi Keluhan Per Kelompok Keluhan',
component: TestPage,
},
{
path: '8',
name: 'Rekapitulasi Rating Per Unit',
component: TestPage,
},
],
}
],
},
{
path: 'monalisa',
name: 'Monalisa',
children: [
{
path: '1',
name: 'Gangguan',
children: [
{
path: '1',
name: 'Rekapitulasi',
children: [
{
path: '1',
name: 'Jumlah Kali Gangguan',
component: TestPage,
},
{
path: '2',
name: 'Recovery Time (RCT) Gangguan',
component: TestPage,
},
{
path: '3',
name: 'Response Time (RPT) Gangguan',
component: TestPage,
},
{
path: '4',
name: 'Rekapitulasi Gangguan Per Jenis Gangguan',
component: TestPage,
},
{
path: '5',
name: 'Rekapitulasi Lapor Ulang Gangguan',
component: TestPage,
},
{
path: '6',
name: 'Rekapitulasi ENS Gangguan',
component: TestPage,
},
{
path: '7',
name: 'Rekapitulasi Gangguan Belum Selesai',
component: TestPage,
},
],
},
],
},
{
path: '2',
name: 'Keluhan',
children: [
{
path: '1',
name: 'Rekapitulasi',
children: [
{
path: '1',
name: 'Jumlah Kali Keluhan',
component: TestPage,
},
{
path: '2',
name: 'Recovery Time (RCT) Keluhan',
component: TestPage,
},
{
path: '3',
name: 'Response Time (RPT) Keluhan',
component: TestPage,
},
{
path: '4',
name: 'Rekapitulasi Gangguan Per Jenis Keluhan',
component: TestPage,
},
{
path: '5',
name: 'Rekapitulasi Lapor Ulang Keluhan',
component: TestPage,
},
{
path: '6',
name: 'Rekapitulasi Keluhan Belum Selesai',
component: TestPage,
},
],
},
],
},
{
path: '3',
name: 'Laporan KPI',
children: [
{
path: '1',
name: 'Bulanan',
children: [
{
path: '1',
name: 'Penurunan Jumlah Komplain',
component: TestPage,
},
{
path: '2',
name: 'Aging Complaint',
component: TestPage,
},
{
path: '3',
name: 'Energy Not Sales (ENS)',
component: TestPage,
},
{
path: '4',
name: 'Kepatuhan dan Akurasi Dalam Pelaporan',
component: TestPage,
},
],
},
{
path: '2',
name: 'Kumulatif',
children: [
{
path: '1',
name: 'Penurunan Jumlah Komplain',
component: TestPage,
},
{
path: '2',
name: 'Aging Complaint',
component: TestPage,
},
{
path: '3',
name: 'Energy Not Sales (ENS)',
component: TestPage,
},
{
path: '4',
name: 'Kepatuhan dan Akurasi Dalam Pelaporan',
component: TestPage,
},
],
}
],
},
],
},
{
path: 'check-in-out',
name: 'Check In OutCheck In Dan Check Out',
children: [
{
path: '1',
name: 'Laporan Check In /Check Out (CICO)',
children: [
{
path: '1',
name: 'Laporan Check In /Check Out (CICO)',
component: TestPage,
},
],
},
],
},
{
path: 'anomali-pengaduan',
name: 'Anomali Penangan Pengaduan',
children: [
{
path: '1',
name: 'Gangguan',
children: [
{
path: '1',
name: 'Laporan Anomali Penangan Pengaduan Gangguan Unit',
component: TestPage,
},
{
path: '2',
name: 'Laporan Anomali Penangan Pengaduan Gangguan Petugas',
component: TestPage,
},
],
},
{
path: '2',
name: 'Keluhan',
children: [
{
path: '1',
name: 'Laporan Anomali Penangan Pengaduan Keluhan Unit',
component: TestPage,
},
],
},
],
},
{
path: 'ctt-kwh-periksa',
name: 'CTT & KWH Periksa',
children: [
{
path: '1',
name: 'Laporan CTT & KWH Periksa',
component: TestPage,
},
],
},
]
},
{
path: '/login',
name: 'Login',
component: LoginView
},
{
path: '/404',
name: 'Not Found',
component: NotFoundView
},
]
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
linkActiveClass: 'active',
routes: [
{
path: '/home',
name: 'Home',
'meta': { requiresAuth: true },
component: HomeView,
children: [
{
path: '',
name: 'Home Page',
component: EmptyPage,
},
{
path: 'gangguan',
name: 'Gangguan',
children: [
{
path: '1',
name: 'Daftar',
children: [
{
path: '1',
name: 'Daftar Keluhan Dialihkan Ke Posko Lain',
component: EmptyPage,
},
{
path: '2',
name: 'Daftar Gangguan Melapor Lebih Dari 1 Kali',
component: EmptyPage,
},
{
path: '3',
name: 'Daftar Gangguan Response Time',
component: EmptyPage,
},
{
path: '4',
name: 'Daftar Gangguan Recovery Time',
component: EmptyPage,
},
{
path: '5',
name: 'Daftar Gangguan Selesai Tanpa ID Pelanggan',
component: EmptyPage,
},
{
path: '6',
name: 'Daftar Gangguan Berdasarkan Media',
component: EmptyPage,
},
{
path: '7',
name: 'Daftar Gangguan Diselesaikan Mobile APKT',
component: EmptyPage,
},
],
},
{
path: '2',
name: 'Rekapitulasi',
children: [
{
path: '1',
name: 'Rekapitulasi Gangguan All',
component: EmptyPage,
},
{
path: '2',
name: 'Rekapitulasi Gangguan Per Jenis Gangguan',
component: EmptyPage,
},
{
path: '3',
name: 'Rekapitulasi Gangguan Per Jenis Gangguan SE 004',
component: EmptyPage,
},
{
path: '4',
name: 'Rekapitulasi Gangguan Per Posko',
component: EmptyPage,
},
{
path: '5',
name: 'Rekapitulasi Gangguan Per Regu',
component: EmptyPage,
},
{
path: '6',
name: 'Rekapitulasi Gangguan Per Tanggal',
component: EmptyPage,
},
{
path: '7',
name: 'Rekapitulasi Gangguan Berdasarkan Media',
component: EmptyPage,
},
{
path: '8',
name: 'Rekapitulasi Gangguan Alih Posko',
component: EmptyPage,
},
{
path: '9',
name: 'Rekapitulasi Gangguan Per Status',
component: EmptyPage,
},
{
path: '10',
name: 'Rekapitulasi Gangguan Diselesaikan Mobile APKT',
component: EmptyPage,
},
{
path: '11',
name: 'Rekapitulasi Rating Per Posko',
component: EmptyPage,
},
{
path: '12',
name: 'Rekapitulasi Rating Per Regu',
component: EmptyPage,
},
{
path: '13',
name: 'Rekapitulasi Koreksi Transaksi Individual',
component: EmptyPage,
},
{
path: '14',
name: 'Rekapitulasi Cleansing Transaksi TM',
component: EmptyPage,
},
],
}
]
},
]
},
{
path: '/login',
name: 'Login',
component: LoginView
},
{
path: '/404',
name: 'Not Found',
component: NotFoundView
},
]
routes: routes
})
router.beforeEach((to, from, next) => {