247 lines
6.2 KiB
JavaScript
Vendored
247 lines
6.2 KiB
JavaScript
Vendored
import AdminIndex from "./components/demo/admin/index.vue";
|
|
import AdminLogin from "./components/demo/admin/login.vue";
|
|
|
|
import test from "./components/demo/admin/position/test.vue";
|
|
import FinalResult from "./components/demo/admin/home/final.vue";
|
|
|
|
import ManageElection from "./components/demo/admin/home/home.vue";
|
|
import ManageElectionIndex from "./components/demo/admin/home/index.vue";
|
|
import ManageElectionResult from "./components/demo/admin/home/result.vue";
|
|
|
|
import ManagePosition from "./components/demo/admin/position/position.vue";
|
|
import ManagePositionIndex from "./components/demo/admin/position/index.vue";
|
|
import ManagePositionAdd from "./components/demo/admin/position/add.vue";
|
|
import ManagePositionEdit from "./components/demo/admin/position/edit.vue";
|
|
|
|
import ManagePartylist from "./components/demo/admin/partylist/partylist.vue";
|
|
import ManagePartylistIndex from "./components/demo/admin/partylist/index.vue";
|
|
import ManagePartylistAdd from "./components/demo/admin/partylist/add.vue";
|
|
import ManagePartylistEdit from "./components/demo/admin/partylist/edit.vue";
|
|
|
|
import ManageVoter from "./components/demo/admin/voter/voter.vue";
|
|
import ManageVoterIndex from "./components/demo/admin/voter/index.vue";
|
|
import ManageVoterAdd from "./components/demo/admin/voter/add.vue";
|
|
import ManageVoterEdit from "./components/demo/admin/voter/edit.vue";
|
|
|
|
import ManageNominee from "./components/demo/admin/nominee/nominee.vue";
|
|
import ManageNomineeIndex from "./components/demo/admin/nominee/index.vue";
|
|
import ManageNomineeAdd from "./components/demo/admin/nominee/add.vue";
|
|
import ManageNomineeEdit from "./components/demo/admin/nominee/edit.vue";
|
|
|
|
import ManageAccount from "./components/demo/admin/admin/admin.vue";
|
|
import ManageAccountIndex from "./components/demo/admin/admin/index.vue";
|
|
import ManageAccountEdit from "./components/demo/admin/admin/edit.vue";
|
|
import ManageAccountPassword from "./components/demo/admin/admin/password.vue";
|
|
import ManageAccountAdd from "./components/demo/admin/admin/add.vue";
|
|
|
|
import ManagePenyata from './components/demo/admin/penyata/penyata.vue';
|
|
import ManagePenyataIndex from './components/demo/admin/penyata/index.vue';
|
|
import ManagePenyataView from './components/demo/admin/penyata/view.vue';
|
|
|
|
import AdminActivityLogIndex from './components/demo/admin/activitylog/index.vue';
|
|
|
|
|
|
const default_component = {
|
|
template: "<div>Not found: {{ $route.path }}</div>",
|
|
};
|
|
|
|
const routes = [
|
|
{
|
|
path: "/",
|
|
component: AdminIndex,
|
|
children: [
|
|
{
|
|
path: "result/:election_id",
|
|
component: FinalResult,
|
|
name: "Election Result",
|
|
},
|
|
|
|
{
|
|
path: "penyata",
|
|
component: ManagePenyata,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManagePenyataIndex,
|
|
name: "Manage Penyata",
|
|
},
|
|
{
|
|
path: "view/:no_anggota",
|
|
component: ManagePenyataView,
|
|
name: "View Penyata",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "",
|
|
component: ManageElection,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManageElectionIndex,
|
|
name: "Admin Home",
|
|
},
|
|
|
|
{
|
|
path: "result",
|
|
component: ManageElectionResult,
|
|
name: "Result",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "position",
|
|
component: ManagePosition,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManagePositionIndex,
|
|
name: "Kemaskini Jawatan",
|
|
},
|
|
|
|
{
|
|
path: "add",
|
|
component: ManagePositionAdd,
|
|
name: "Tambah Jawatan",
|
|
},
|
|
|
|
{
|
|
path: "edit/:id",
|
|
component: ManagePositionEdit,
|
|
name: "Edit Position",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "partylist",
|
|
component: ManagePartylist,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManagePartylistIndex,
|
|
name: "Manage Partylist",
|
|
},
|
|
|
|
{
|
|
path: "add",
|
|
component: ManagePartylistAdd,
|
|
name: "Add Partylist",
|
|
},
|
|
|
|
{
|
|
path: "edit/:id",
|
|
component: ManagePartylistEdit,
|
|
name: "Edit Partylist",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "voter",
|
|
component: ManageVoter,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManageVoterIndex,
|
|
name: "Manage Voter",
|
|
},
|
|
|
|
{
|
|
path: "add",
|
|
component: ManageVoterAdd,
|
|
name: "Tambah Pengundi",
|
|
},
|
|
|
|
{
|
|
path: "edit/:id",
|
|
component: ManageVoterEdit,
|
|
name: "Edit Voter",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "nominee",
|
|
component: ManageNominee,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManageNomineeIndex,
|
|
name: "Maklumat Calon",
|
|
},
|
|
|
|
{
|
|
path: "add",
|
|
component: ManageNomineeAdd,
|
|
name: "Tambah Calon",
|
|
},
|
|
|
|
{
|
|
path: "edit/:id",
|
|
component: ManageNomineeEdit,
|
|
name: "Edit Nominee",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "activity-log",
|
|
component: AdminActivityLogIndex,
|
|
name: "Activity Log",
|
|
},
|
|
|
|
{
|
|
path: "/account",
|
|
component: ManageAccount,
|
|
children: [
|
|
{
|
|
path: "",
|
|
component: ManageAccountIndex,
|
|
name: "Manage Account",
|
|
},
|
|
|
|
{
|
|
path: "update",
|
|
component: ManageAccountEdit,
|
|
name: "Update Account",
|
|
},
|
|
|
|
{
|
|
path: "password",
|
|
component: ManageAccountPassword,
|
|
name: "Update Password",
|
|
},
|
|
|
|
{
|
|
path: "add",
|
|
component: ManageAccountAdd,
|
|
name: "Add Account",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: "/login",
|
|
component: AdminLogin,
|
|
name: "Admin Login",
|
|
},
|
|
|
|
{
|
|
path: "/test",
|
|
component: test,
|
|
},
|
|
|
|
{
|
|
path: "/penyata/:id",
|
|
name: "penyataView",
|
|
component: () => import("@/views/penyata.vue"),
|
|
},
|
|
];
|
|
|
|
export default routes;
|