diff --git a/css/styles.css b/css/styles.css index 01b5a99..d1d11f5 100644 --- a/css/styles.css +++ b/css/styles.css @@ -28,3 +28,39 @@ body { font-family: "Roboto", sans-serif; } + + +.scroll-container { + scroll-padding: 50px 0 0 50px; +} + +::-webkit-scrollbar { + width: 7px; +} + +/* this targets the default scrollbar (compulsory) */ + +::-webkit-scrollbar-track { + background-color: #E3F2FD; +} + +/* the new scrollbar will have a flat appearance with the set background color */ + +::-webkit-scrollbar-thumb { + background-color: #2196F3; + ; +} + +/* this will style the thumb, ignoring the track */ + +::-webkit-scrollbar-button { + background-color: #E3F2FD; + ; +} + +/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */ + +::-webkit-scrollbar-corner { + background-color: black; +} + diff --git a/globalcomponent/one-menu.vue b/globalcomponent/one-menu.vue index a994bd2..5bb9f01 100644 --- a/globalcomponent/one-menu.vue +++ b/globalcomponent/one-menu.vue @@ -1,54 +1,89 @@ diff --git a/globalcomponent/one-navbar.vue b/globalcomponent/one-navbar.vue index 1a2713f..a32b658 100644 --- a/globalcomponent/one-navbar.vue +++ b/globalcomponent/one-navbar.vue @@ -5,54 +5,57 @@ - Application + {{ bread_crumb }} diff --git a/globalstore/globalstore.js b/globalstore/globalstore.js index 4b90238..313864e 100644 --- a/globalstore/globalstore.js +++ b/globalstore/globalstore.js @@ -1,68 +1,82 @@ -const URL = "/westone-api/v1/system/auth"; +const URL = "../json/jsonformatter.json"; +const URLBread = "../json/breadcumb.json"; const store = { namespaced: true, state() { return { - count: 0, + menu_level_0: [], + menu_level_1: [], + menu_level_2: [], drawer: true, - data: null, - email: "lashlkdsa", - password: null, - dialog_success: false + bread_crumb: "", + search_error_message: "", + branch: {}, + is_page_allowed: true, + dashboard: "" }; }, mutations: { - increment(state) { - state.count++; + update_menu_level_0(state, data) { + state.menu_level_0 = data }, - decrement(state) { - state.count--; + update_bread_crumb(state, val) { + state.bread_crumb = val }, - setData(state, payload) { - state.data = payload; + update_menu_level_1(state, data) { + state.menu_level_1 = data }, - setDrawer(state, payload) { + update_menu_level_2(state, data) { + state.menu_level_2 = data + }, + update_branch(state, val) { + state.branch = val + }, + update_search_error_message(state, val) { + state.search_error_message = val + }, + update_page_allowed(state, val) { + state.is_page_allowed = val + }, + update_dashboard(state, val) { + state.dashboard = val + }, + update_drawer(state, payload) { state.drawer = payload; }, - setEmail(state, data) { - state.email = data; - }, - setPassword(state, data) { - state.password = data; - }, - setDialogSuccess(state, data) { - state.dialog_success = data; - } }, actions: { - increment({ commit }) { - commit('increment'); - }, - decrement({ commit }) { - commit('decrement'); - }, - async loginState({ state, commit }) { - const params = { - email: state.email, - password: state.pasword - }; + async loadMenuData(context) { + try { + let resp = await axios.get(URL); - try { - const response = await axios.post(URL + '/login', params); - commit('setData', response.data); + if (resp.data.status != "OK") { + console.error('Gagal get api:'); + } else { + let x = resp.data.data + if (x[0]) + context.commit("update_menu_level_0", x[0]['p_0']) + if (x[1]) + context.commit("update_menu_level_1", x[1]) + if (x[2]) + context.commit("update_menu_level_2", x[2]) + } + // tambahan get bread_crumb + resp = await axios.get(URLBread) + if (resp.data.status != "OK") { + context.commit("update_search_error_message", resp.message) + } else { + context.commit("update_search_error_message", "") + console.log("menu", resp.data.data.bread_crumb) + context.commit("update_bread_crumb", resp.data.data.bread_crumb) + context.commit("update_branch", resp.data.data.branch) + context.commit("update_page_allowed", resp.data.is_page_allowed) + context.commit("update_dashboard", resp.data.dashboard) + } } catch (error) { - commit('setError', error); + console.error('Error loading menu data:', error); } }, - async LoginParam({ commit }, params) { - try { - const response = await axios.post(URL + '/login', params); - commit('setData', response.data); - } catch (error) { - commit('setError', error); - } - } } }; export default store \ No newline at end of file diff --git a/json/breadcumb.json b/json/breadcumb.json new file mode 100644 index 0000000..36f6fde --- /dev/null +++ b/json/breadcumb.json @@ -0,0 +1,9 @@ +{ + "status": "OK", + "data": { + "bread_crumb": "Menu", + "dashboard": "one-ui/test/vuex/one-fo-verification", + "is_page_allowed": true, + "branch": [] + } +} \ No newline at end of file diff --git a/json/jsonformatter.json b/json/jsonformatter.json new file mode 100644 index 0000000..e04d062 --- /dev/null +++ b/json/jsonformatter.json @@ -0,0 +1,811 @@ +{ + "status": "OK", + "data": [ + { + "p_0": [ + { + "id": 1, + "url": "#", + "icon": "flip_to_front", + "name": "Front Office", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 114, + "url": "#", + "icon": "flip_to_front", + "name": "Laboratorium", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 115, + "url": "#", + "icon": "flip_to_front", + "name": "Radiodiagnostik", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 116, + "url": "#", + "icon": "flip_to_front", + "name": "Elektromedis", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 117, + "url": "#", + "icon": "healing", + "name": "Layanan Klinik", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 157, + "url": "#", + "icon": "healing", + "name": "MCU", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 131, + "url": "#", + "icon": "monetization_on", + "name": "Keuangan", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 31, + "url": "#", + "icon": "work", + "name": "Master Data", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + }, + { + "id": 30, + "url": "test/vuex/one-report-v8/", + "icon": "description", + "name": "Laporan", + "level": 0, + "state": false, + "is_parent": "N", + "parent_id": 0 + }, + { + "id": 463, + "url": "#", + "icon": "work", + "name": "API", + "level": 0, + "state": false, + "is_parent": "Y", + "parent_id": 0 + } + ] + }, + { + "p_1": [ + { + "id": 455, + "url": "test/vuex/cpone-fo-registration-v12", + "icon": null, + "name": "Registration (Preregister)", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 489, + "url": "test/vuex/one-fo-cashier-cpone", + "icon": null, + "name": "Kasir", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 123, + "url": "test/vuex/one-patient-list-barcode-vv-6-cpone/", + "icon": null, + "name": "List Pasien", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 490, + "url": "test/vuex/one-result-handover/", + "icon": null, + "name": "Serah Terima hasil", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 493, + "url": "test/vuex/one-send-email-cpone/", + "icon": null, + "name": "Kirim Email Hasil", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 495, + "url": "test/vuex/one-patient-list-nonlab-cpone/", + "icon": null, + "name": "List Pasien Nonlab", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 496, + "url": "test/vuex/cpone-nonlab-upload-document/", + "icon": null, + "name": "Nonlab Upload Document", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + }, + { + "id": 492, + "url": "test/vuex/cpone-fo-supervisor/", + "icon": null, + "name": "Tambah & Ganti Pemeriksaan", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 1 + } + ], + "p_31": [ + { + "id": 32, + "url": "#", + "icon": null, + "name": "System", + "level": 1, + "state": false, + "is_parent": "Y", + "parent_id": 31 + }, + { + "id": 41, + "url": "#", + "icon": null, + "name": "Setting Pemeriksaan", + "level": 1, + "state": false, + "is_parent": "Y", + "parent_id": 31 + }, + { + "id": 68, + "url": "#", + "icon": null, + "name": "Klien dan Harga", + "level": 1, + "state": false, + "is_parent": "Y", + "parent_id": 31 + } + ], + "p_114": [ + { + "id": 459, + "url": "test/vuex/cpone-sample-lab-mobile-v6/", + "icon": "", + "name": "Specimen Collection Mobile", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 114 + }, + { + "id": 491, + "url": "test/vuex/cpone-patient-checkout/", + "icon": "", + "name": "Patient Checkout", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 114 + }, + { + "id": 84, + "url": "test/vuex/cpone-process-resultentry-v20/", + "icon": "", + "name": "Result Entry", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 114 + } + ], + "p_115": [ + { + "id": 104, + "url": "test/vuex/one-resultentry-so-xray-v8-cpone", + "icon": null, + "name": "Dokumentasi Hasil", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 115 + } + ], + "p_116": [ + { + "id": 122, + "url": "test/vuex/one-resultentry-so-electromedis-v8-cpone/", + "icon": null, + "name": "Dokumentasi Hasil", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 116 + } + ], + "p_117": [ + { + "id": 127, + "url": "test/vuex/cpone-resultentry-so-others-v2/", + "icon": null, + "name": "Dokumentasi Hasil", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 117 + } + ], + "p_131": [ + { + "id": 133, + "url": "test/vuex/cpone-bill/", + "icon": null, + "name": "Penagihan", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 131 + }, + { + "id": 134, + "url": "test/vuex/cpone-bill-payment/", + "icon": null, + "name": "Pelunasan", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 131 + }, + { + "id": 478, + "url": "test/vuex/cpone-bill-cancel/", + "icon": null, + "name": "Hapus Pemeriksaan", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 131 + } + ], + "p_157": [ + { + "id": 486, + "url": "test/vuex/cpone-sample-to-branch/", + "icon": null, + "name": "Surat Jalan Sample", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 206, + "url": "test/vuex/cpone-setup-mcu-v4/", + "icon": null, + "name": "Setup", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 207, + "url": "test/vuex/cpone-mcu-offline-preregister-v2/", + "icon": null, + "name": "Pre-Register (xls)", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 208, + "url": "test/vuex/one-mcu-offline-preregister-app-cponev2/", + "icon": null, + "name": "Pre-Register", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 158, + "url": "test/vuex/one-mcu-resume-individu-cpone/", + "icon": null, + "name": "Resume Individu", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 479, + "url": "test/vuex/one-admin-mcu/", + "icon": null, + "name": "Pengelolaan MCU", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 483, + "url": "test/vuex/cpone-mcu-officer/", + "icon": null, + "name": "MCU Officer", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 488, + "url": "test/vuex/cpone-so-template-additional/", + "icon": null, + "name": "Additional Fisik", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + }, + { + "id": 475, + "url": "test/vuex/one-mcu-resume-individu-cponev2/", + "icon": null, + "name": "Resume Individu V2", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 157 + } + ], + "p_248": [ + { + "id": 260, + "url": "#", + "icon": null, + "name": "Laporan", + "level": 1, + "state": false, + "is_parent": "Y", + "parent_id": 248 + } + ], + "p_329": [ + { + "id": 330, + "url": "#", + "icon": null, + "name": "Masterdata", + "level": 1, + "state": false, + "is_parent": "Y", + "parent_id": 329 + } + ], + "p_463": [ + { + "id": 460, + "url": "test/vuex/cpone-result-status/", + "icon": null, + "name": "Api Result", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 463 + }, + { + "id": 458, + "url": "test/vuex/cpone-nattest-mapping/", + "icon": null, + "name": "Nat Test Mapping", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 463 + }, + { + "id": 494, + "url": "test/vuex/cpone-mcu-inject-old", + "icon": null, + "name": "Inject data Old", + "level": 1, + "state": false, + "is_parent": "N", + "parent_id": 463 + } + ] + }, + { + "p_32": [ + { + "id": 33, + "url": "test/vuex/one-md-usergroup-user-v4/", + "icon": null, + "name": "User Group", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 470, + "url": "test/vuex/cpone-masterdata-doctor/", + "icon": null, + "name": "Doctor", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 34, + "url": "test/vuex/one-md-usergroup-user-v4/", + "icon": null, + "name": "User", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 240, + "url": "test/vuex/one-md-email-config-onhold", + "icon": null, + "name": "Konfigurasi Email (Invoice)", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 170, + "url": "test/vuex/one-md-email-config", + "icon": null, + "name": "Konfigurasi Email (Hasil)", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 35, + "url": "test/vuex/one-md-priviledge/", + "icon": null, + "name": "Hak Akses", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 36, + "url": "test/vuex/one-report-usergroup/", + "icon": null, + "name": "Report Group", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 39, + "url": "test/vuex/one-md-staff", + "icon": null, + "name": "Staff", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 40, + "url": "#", + "icon": null, + "name": "Configuration", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 171, + "url": "test/vuex/one-md-form/", + "icon": null, + "name": "No Dokumen", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 487, + "url": "test/vuex/cpone-masterdata-patient/", + "icon": null, + "name": "Patient", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 339, + "url": "test/vuex/one-md-report/", + "icon": null, + "name": "Setting Report", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 241, + "url": "test/vuex/one-md-bank/", + "icon": null, + "name": "Bank", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + }, + { + "id": 172, + "url": "test/vuex/one-md-branch-v2/", + "icon": null, + "name": "Data Cabang", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 32 + } + ], + "p_41": [ + { + "id": 466, + "url": "test/vuex/cpone-group-result/", + "icon": null, + "name": "Group Result", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 43, + "url": "test/vuex/one-md-price-cpone/", + "icon": null, + "name": "Sub Group", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 467, + "url": "test/vuex/cpone-md-samplestation/", + "icon": null, + "name": "Sample Station", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 485, + "url": "test/vuex/cpone-md-location/", + "icon": null, + "name": "Lokasi", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 476, + "url": "test/vuex/one-md-advice-kelainan/", + "icon": "flip_to_front", + "name": "Saran Kelainan MCU", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 469, + "url": "test/vuex/cpone-md-bahan/", + "icon": null, + "name": "Bahan", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 468, + "url": "test/vuex/cpone-md-nat-bahan-sampletype/", + "icon": null, + "name": "Specimen", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 59, + "url": "test/vuex/one-md-test-nat-local-now/", + "icon": null, + "name": "Test", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 461, + "url": "test/vuex/cpone-md-requirement/", + "icon": null, + "name": "Requirement", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 465, + "url": "test/vuex/cpone-md-nonlab-template/", + "icon": "", + "name": "Non Lab Template", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 472, + "url": "test/vuex/cpone-md-pola-kelainan-nonlab/", + "icon": null, + "name": "Summary Kelainan Non Lab", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 471, + "url": "test/vuex/cpone-md-pola-kelainan/", + "icon": null, + "name": "Master Pola Kelainan", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 473, + "url": "test/vuex/cpone-md-kelainan-lab-v2/", + "icon": null, + "name": "Summary Kelainan Lab", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + }, + { + "id": 477, + "url": "test/vuex/one-md-map-nonlab-mcu-result/", + "icon": null, + "name": "Nonlab Template MCU ", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 41 + } + ], + "p_68": [ + { + "id": 457, + "url": "test/vuex/one-md-price-cpone/", + "icon": null, + "name": "Harga", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 68 + }, + { + "id": 474, + "url": "test/vuex/cpone-masterdata-packet-v3/", + "icon": null, + "name": "Paket", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 68 + }, + { + "id": 462, + "url": "test/vuex/cpone-masterdata-corporate-v2/", + "icon": null, + "name": "Corporate", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 68 + }, + { + "id": 55, + "url": "test/vuex/one-klinik-fo-registration-v2", + "icon": null, + "name": "Pasien", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 68 + }, + { + "id": 143, + "url": "test/vuex/one-md-test-nat-local-now/", + "icon": null, + "name": "Test Nat Lokal ", + "level": 2, + "state": false, + "is_parent": "N", + "parent_id": 68 + } + ] + } + ] +} \ No newline at end of file diff --git a/login-coba/index.html b/login-coba/index.html index 27b0a3f..a55485b 100644 --- a/login-coba/index.html +++ b/login-coba/index.html @@ -122,9 +122,11 @@ }; }, // - template: ` - - `, + template: ` + + + + `, // // // diff --git a/menu/images/logo.png b/menu/images/logo.png new file mode 100644 index 0000000..8dc7e90 Binary files /dev/null and b/menu/images/logo.png differ diff --git a/menu/index.html b/menu/index.html new file mode 100644 index 0000000..3705b4a --- /dev/null +++ b/menu/index.html @@ -0,0 +1,148 @@ + + + + + + WESTONE + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +