diff --git a/assets/scss/_colors.scss b/assets/scss/_colors.scss index d68de2e..a05e544 100644 --- a/assets/scss/_colors.scss +++ b/assets/scss/_colors.scss @@ -10,12 +10,12 @@ $neutral-400: #E5F7FA; $neutral-300: #F5F7FA; $neutral-100: #FFFFFF; -$primary-700: #0053AD; -$primary-600: #0663C7; -$primary-500: #0671E0; -$primary-400: #4196F0; -$primary-300: #DBEDFF; -$primary-200: #EEF5FC; +$primary-700: #FF9B1B; +$primary-600: #FFA532; +$primary-500: #FFB95F; +$primary-400: #FFCD8D; +$primary-300: #FFDCAF; +$primary-200: #FFE6C6; $primary-100: #EEF5FC; $secondary-700: #0053AD; diff --git a/components/common/AppSnackbar.vue b/components/common/AppSnackbar.vue new file mode 100644 index 0000000..44d6e48 --- /dev/null +++ b/components/common/AppSnackbar.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/components/common/FormFieldGroup.vue b/components/common/FormFieldGroup.vue new file mode 100644 index 0000000..9197b9c --- /dev/null +++ b/components/common/FormFieldGroup.vue @@ -0,0 +1,55 @@ + + + + + \ No newline at end of file diff --git a/components/common/PageHeader.vue b/components/common/PageHeader.vue new file mode 100644 index 0000000..3e16713 --- /dev/null +++ b/components/common/PageHeader.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/components/common/SelectionDialog.vue b/components/common/SelectionDialog.vue new file mode 100644 index 0000000..ac3b4b3 --- /dev/null +++ b/components/common/SelectionDialog.vue @@ -0,0 +1,125 @@ + + + + + \ No newline at end of file diff --git a/components/features/antrean/PatientSearchFilter.vue b/components/features/antrean/PatientSearchFilter.vue new file mode 100644 index 0000000..cf6778a --- /dev/null +++ b/components/features/antrean/PatientSearchFilter.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/components/features/antrean/QueueCreationDialog.vue b/components/features/antrean/QueueCreationDialog.vue new file mode 100644 index 0000000..a07db38 --- /dev/null +++ b/components/features/antrean/QueueCreationDialog.vue @@ -0,0 +1,231 @@ + + + + + \ No newline at end of file diff --git a/components/features/antrean/RuangSelectionDialog.vue b/components/features/antrean/RuangSelectionDialog.vue new file mode 100644 index 0000000..552170c --- /dev/null +++ b/components/features/antrean/RuangSelectionDialog.vue @@ -0,0 +1,262 @@ + + + + + \ No newline at end of file diff --git a/components/features/antrean/TabelPatientList.vue b/components/features/antrean/TabelPatientList.vue new file mode 100644 index 0000000..01b1608 --- /dev/null +++ b/components/features/antrean/TabelPatientList.vue @@ -0,0 +1,195 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/klinik/DaySelector.vue b/components/features/master/klinik/DaySelector.vue new file mode 100644 index 0000000..71517fe --- /dev/null +++ b/components/features/master/klinik/DaySelector.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/klinik/FormDialogKlinik.vue b/components/features/master/klinik/FormDialogKlinik.vue new file mode 100644 index 0000000..5e9334b --- /dev/null +++ b/components/features/master/klinik/FormDialogKlinik.vue @@ -0,0 +1,276 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/klinik/KonfigurasiShift.vue b/components/features/master/klinik/KonfigurasiShift.vue new file mode 100644 index 0000000..09c2e4a --- /dev/null +++ b/components/features/master/klinik/KonfigurasiShift.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/klinik/TabelKlinik.vue b/components/features/master/klinik/TabelKlinik.vue new file mode 100644 index 0000000..f9cdc76 --- /dev/null +++ b/components/features/master/klinik/TabelKlinik.vue @@ -0,0 +1,111 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/loket/LoketFormDialog.vue b/components/features/master/loket/LoketFormDialog.vue new file mode 100644 index 0000000..2c367d8 --- /dev/null +++ b/components/features/master/loket/LoketFormDialog.vue @@ -0,0 +1,327 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/loket/LoketTable.vue b/components/features/master/loket/LoketTable.vue new file mode 100644 index 0000000..5934845 --- /dev/null +++ b/components/features/master/loket/LoketTable.vue @@ -0,0 +1,125 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/ruang/FormDialogRuang.vue b/components/features/master/ruang/FormDialogRuang.vue new file mode 100644 index 0000000..05092c5 --- /dev/null +++ b/components/features/master/ruang/FormDialogRuang.vue @@ -0,0 +1,245 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/ruang/RoomListManager.vue b/components/features/master/ruang/RoomListManager.vue new file mode 100644 index 0000000..05efbaa --- /dev/null +++ b/components/features/master/ruang/RoomListManager.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/components/features/master/ruang/TabelRuang.vue b/components/features/master/ruang/TabelRuang.vue new file mode 100644 index 0000000..f684756 --- /dev/null +++ b/components/features/master/ruang/TabelRuang.vue @@ -0,0 +1,108 @@ + + + + + \ No newline at end of file diff --git a/components/TabelData.vue b/components/features/monitoring/TabelData.vue similarity index 100% rename from components/TabelData.vue rename to components/features/monitoring/TabelData.vue diff --git a/components/TabelLayanan.vue b/components/features/monitoring/TabelLayanan.vue similarity index 100% rename from components/TabelLayanan.vue rename to components/features/monitoring/TabelLayanan.vue diff --git a/components/TabelListPasien.vue b/components/features/monitoring/TabelListPasien.vue similarity index 100% rename from components/TabelListPasien.vue rename to components/features/monitoring/TabelListPasien.vue diff --git a/components/features/queue/CurrentPatientCard.vue b/components/features/queue/CurrentPatientCard.vue new file mode 100644 index 0000000..afc7fe3 --- /dev/null +++ b/components/features/queue/CurrentPatientCard.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/components/features/queue/QueueActionsCard.vue b/components/features/queue/QueueActionsCard.vue new file mode 100644 index 0000000..5f2c8a2 --- /dev/null +++ b/components/features/queue/QueueActionsCard.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/components/features/queue/TabelPatientData.vue b/components/features/queue/TabelPatientData.vue new file mode 100644 index 0000000..530db08 --- /dev/null +++ b/components/features/queue/TabelPatientData.vue @@ -0,0 +1,304 @@ + + + + + \ No newline at end of file diff --git a/components/AppBar.vue.txt b/components/layout/AppBar.vue.txt similarity index 100% rename from components/AppBar.vue.txt rename to components/layout/AppBar.vue.txt diff --git a/components/ProfileMenu.vue b/components/layout/ProfileMenu.vue similarity index 100% rename from components/ProfileMenu.vue rename to components/layout/ProfileMenu.vue diff --git a/components/ProfilePopup.vue b/components/layout/ProfilePopup.vue similarity index 100% rename from components/ProfilePopup.vue rename to components/layout/ProfilePopup.vue diff --git a/components/SideBar.vue b/components/layout/SideBar.vue similarity index 100% rename from components/SideBar.vue rename to components/layout/SideBar.vue diff --git a/composables/useQueue.js b/composables/useQueue.js index 1a342fb..59a452c 100644 --- a/composables/useQueue.js +++ b/composables/useQueue.js @@ -1,53 +1,55 @@ // composables/useQueue.js -import { ref, computed } from 'vue'; -import { useQueueStore } from '../stores/queueStore'; +import { ref, computed } from "vue"; +import { useQueueStore } from "../stores/queueStore"; -export const useQueue = (adminType = 'loket') => { +export const useQueue = (adminType = "loket") => { const queueStore = useQueueStore(); - + // Local state const snackbar = ref(false); - const snackbarText = ref(''); - const snackbarColor = ref('success'); + const snackbarText = ref(""); + const snackbarColor = ref("success"); // Dialog states const showKlinikDialog = ref(false); const showPenunjangDialog = ref(false); const showChangeKlinikDialog = ref(false); - const klinikSearch = ref(''); - const penunjangSearch = ref(''); - const changeKlinikSearch = ref(''); + const klinikSearch = ref(""); + const penunjangSearch = ref(""); + const changeKlinikSearch = ref(""); const selectedPatientForPenunjang = ref(null); - // Computed from store - filtered by stage - const currentProcessingPatient = queueStore.getCurrentProcessing(adminType); - - // Get patients based on admin type stage - ISOLATED PER ADMIN + // FIXED: Get stage patients once, then derive others from it const stagePatients = computed(() => { - return queueStore.getPatientsByStage(adminType).value; + // Don't use .value here - getPatientsByStage returns a computed already + const patients = queueStore.getPatientsByStage(adminType); + return patients.value; }); - // Tabel "Di Loket" - hanya untuk stage admin ini - const diLoketPatients = computed(() => stagePatients.value.diLoket); + // Computed from store - filtered by stage + const currentProcessingPatient = computed(() => { + return queueStore.currentProcessingPatient[adminType]; + }); + + // Derive from stagePatients + const diLoketPatients = computed(() => stagePatients.value.diLoket || []); - // Tabel "Terlambat" - hanya untuk stage admin ini - const terlambatPatients = computed(() => stagePatients.value.terlambat); + const terlambatPatients = computed(() => stagePatients.value.terlambat || []); - // Tabel "Pending" - hanya untuk stage admin ini - const pendingPatients = computed(() => stagePatients.value.pending); - - // Pasien waiting - hanya untuk stage admin ini - const waitingPatients = computed(() => stagePatients.value.waiting); + const pendingPatients = computed(() => stagePatients.value.pending || []); + const waitingPatients = computed(() => stagePatients.value.waiting || []); + const nextPatient = computed(() => { return waitingPatients.value[0] || null; }); // Total pasien hanya untuk stage admin ini - const totalPasien = computed(() => - queueStore.getTotalPasienByStage(adminType).value - ); - + const totalPasien = computed(() => { + const total = queueStore.getTotalPasienByStage(adminType); + return total.value; + }); + const quotaUsed = computed(() => queueStore.quotaUsed); // Filtered lists @@ -73,7 +75,7 @@ export const useQueue = (adminType = 'loket') => { }); // Methods - const showSnackbar = (text, color = 'success') => { + const showSnackbar = (text, color = "success") => { snackbarText.value = text; snackbarColor.value = color; snackbar.value = true; @@ -81,27 +83,27 @@ export const useQueue = (adminType = 'loket') => { const callNext = () => { const result = queueStore.callNext(adminType); - showSnackbar(result.message, result.success ? 'success' : 'warning'); + showSnackbar(result.message, result.success ? "success" : "warning"); }; const callMultiplePatients = (count) => { const result = queueStore.callMultiplePatients(count, adminType); - showSnackbar(result.message, result.success ? 'success' : 'warning'); + showSnackbar(result.message, result.success ? "success" : "warning"); }; const processPatient = (patient, action) => { const result = queueStore.processPatient(patient, action, adminType); - - let color = 'success'; - if (action === 'terlambat') color = 'warning'; - else if (action === 'pending') color = 'info'; - + + let color = "success"; + if (action === "terlambat") color = "warning"; + else if (action === "pending") color = "info"; + showSnackbar(result.message, color); }; const selectKlinik = (klinik) => { const result = queueStore.createAntreanKlinik(klinik, adminType); - showSnackbar(result.message, 'success'); + showSnackbar(result.message, "success"); showKlinikDialog.value = false; }; @@ -111,7 +113,7 @@ export const useQueue = (adminType = 'loket') => { selectedPatientForPenunjang.value, adminType ); - showSnackbar(result.message, 'success'); + showSnackbar(result.message, "success"); showPenunjangDialog.value = false; selectedPatientForPenunjang.value = null; }; @@ -128,16 +130,16 @@ export const useQueue = (adminType = 'loket') => { klinik, adminType ); - showSnackbar(result.message, result.success ? 'success' : 'error'); + showSnackbar(result.message, result.success ? "success" : "error"); showChangeKlinikDialog.value = false; } }; const getRowClass = (item) => { - if (item.status === 'current') { - return 'text-success font-weight-bold'; + if (item.status === "current") { + return "text-success font-weight-bold"; } - return ''; + return ""; }; return { @@ -152,7 +154,7 @@ export const useQueue = (adminType = 'loket') => { penunjangSearch, changeKlinikSearch, selectedPatientForPenunjang, - + // Computed currentProcessingPatient, diLoketPatients, @@ -166,7 +168,7 @@ export const useQueue = (adminType = 'loket') => { filteredPenunjangs, filteredChangeKliniks, stagePatients, - + // Methods showSnackbar, callNext, diff --git a/layouts/default.vue b/layouts/default.vue index 3793d5c..dd0c9f6 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -15,7 +15,7 @@ + \ No newline at end of file diff --git a/pages/AdminLoket.vue b/pages/AdminLoket.vue index 18e7060..86199de 100644 --- a/pages/AdminLoket.vue +++ b/pages/AdminLoket.vue @@ -1,362 +1,228 @@ - - + \ No newline at end of file diff --git a/pages/AdminPenunjang.vue b/pages/AdminPenunjang.vue index 9785a61..c160a87 100644 --- a/pages/AdminPenunjang.vue +++ b/pages/AdminPenunjang.vue @@ -1,338 +1,225 @@ \ No newline at end of file diff --git a/pages/Anjungan/Anjungan.vue b/pages/Anjungan/Anjungan.vue index 06a25f7..1f51995 100644 --- a/pages/Anjungan/Anjungan.vue +++ b/pages/Anjungan/Anjungan.vue @@ -43,7 +43,7 @@ elevation="2" > -
+