From 78de0418e11185f668bb9b5cd02bc10080ed6e13 Mon Sep 17 00:00:00 2001 From: bagus-arie05 Date: Tue, 16 Dec 2025 09:58:25 +0700 Subject: [PATCH] update logika dan flow anjungan, master, store --- components/ProfilePopup2.txt | 416 ------ components/features/queue/PatientCard.vue | 249 ++-- .../features/queue/TabelPatientData.vue | 258 +++- components/layout/AppBar.vue.txt | 107 -- composables/useQueue.js | 27 +- layouts/bagus.vue.txt | 286 ----- pages/AdminLoket.vue | 36 +- pages/Anjungan/{Anjungan.vue => Anjungan.txt} | 609 +++++---- pages/Anjungan/Anjungan/[id].vue | 928 ++++++++++++++ pages/Anjungan/Anjungan/index.vue | 352 ++++++ .../[id].vue} | 75 +- pages/Anjungan/AntrianKlinik/index.vue | 356 ++++++ .../[kodeKlinik].vue} | 148 ++- pages/Anjungan/AntrianKlinikRuang/index.vue | 381 ++++++ pages/Anjungan/klinik | 543 -------- pages/Profile/Pengaturan.vue.txt | 1126 ----------------- pages/Setting/MasterAnjungan.vue | 547 ++++++++ pages/Setting/Screen.vue | 72 +- stores/anjunganStore.js | 87 ++ stores/clinicStore.js | 357 ++++++ stores/navItems1.ts | 1 + stores/queueStore.js | 91 +- stores/screenStore.js | 90 ++ 23 files changed, 4169 insertions(+), 2973 deletions(-) delete mode 100644 components/ProfilePopup2.txt delete mode 100644 components/layout/AppBar.vue.txt delete mode 100644 layouts/bagus.vue.txt rename pages/Anjungan/{Anjungan.vue => Anjungan.txt} (70%) create mode 100644 pages/Anjungan/Anjungan/[id].vue create mode 100644 pages/Anjungan/Anjungan/index.vue rename pages/Anjungan/{AntrianKlinik.vue => AntrianKlinik/[id].vue} (90%) create mode 100644 pages/Anjungan/AntrianKlinik/index.vue rename pages/Anjungan/{AntrianKlinikRuang.vue => AntrianKlinikRuang/[kodeKlinik].vue} (77%) create mode 100644 pages/Anjungan/AntrianKlinikRuang/index.vue delete mode 100644 pages/Anjungan/klinik delete mode 100644 pages/Profile/Pengaturan.vue.txt create mode 100644 pages/Setting/MasterAnjungan.vue create mode 100644 stores/anjunganStore.js create mode 100644 stores/clinicStore.js create mode 100644 stores/screenStore.js diff --git a/components/ProfilePopup2.txt b/components/ProfilePopup2.txt deleted file mode 100644 index 8727b93..0000000 --- a/components/ProfilePopup2.txt +++ /dev/null @@ -1,416 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/features/queue/PatientCard.vue b/components/features/queue/PatientCard.vue index 441ad19..3d4806a 100644 --- a/components/features/queue/PatientCard.vue +++ b/components/features/queue/PatientCard.vue @@ -1,106 +1,83 @@ diff --git a/composables/useQueue.js b/composables/useQueue.js index 59a452c..82b5e31 100644 --- a/composables/useQueue.js +++ b/composables/useQueue.js @@ -31,12 +31,28 @@ export const useQueue = (adminType = "loket") => { return queueStore.currentProcessingPatient[adminType]; }); - // Derive from stagePatients - const diLoketPatients = computed(() => stagePatients.value.diLoket || []); + // Derive from stagePatients - ADD DEBUG LOGS + const diLoketPatients = computed(() => { + const patients = stagePatients.value.diLoket || []; + console.log('🔍 useQueue - diLoketPatients:', patients.length); + if (patients.length > 0) { + console.log('🔍 First diLoket patient:', patients[0]); + console.log('🔍 First diLoket patient fastTrack:', patients[0].fastTrack); + } + return patients; + }); - const terlambatPatients = computed(() => stagePatients.value.terlambat || []); + const terlambatPatients = computed(() => { + const patients = stagePatients.value.terlambat || []; + console.log('🔍 useQueue - terlambatPatients:', patients.length); + return patients; + }); - const pendingPatients = computed(() => stagePatients.value.pending || []); + const pendingPatients = computed(() => { + const patients = stagePatients.value.pending || []; + console.log('🔍 useQueue - pendingPatients:', patients.length); + return patients; + }); const waitingPatients = computed(() => stagePatients.value.waiting || []); @@ -52,6 +68,9 @@ export const useQueue = (adminType = "loket") => { const quotaUsed = computed(() => queueStore.quotaUsed); + // Expose dev helper to refresh seed data + const resetPatients = () => queueStore.resetPatients(); + // Filtered lists const filteredKliniks = computed(() => { if (!klinikSearch.value) return queueStore.kliniks; diff --git a/layouts/bagus.vue.txt b/layouts/bagus.vue.txt deleted file mode 100644 index fbd484d..0000000 --- a/layouts/bagus.vue.txt +++ /dev/null @@ -1,286 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/AdminLoket.vue b/pages/AdminLoket.vue index 12f2ac5..3fd5bb2 100644 --- a/pages/AdminLoket.vue +++ b/pages/AdminLoket.vue @@ -59,7 +59,7 @@ { - const diLoket = (diLoketPatients.value || []).map(p => ({ ...p, status: 'diloket' })); - const terlambat = (terlambatPatients.value || []).map(p => ({ ...p, status: 'terlambat' })); - const pending = (pendingPatients.value || []).map(p => ({ ...p, status: 'pending' })); +// Combine all patients with status - PRESERVE ALL PROPERTIES +const allPatientsForStage = computed(() => { + const diLoket = (diLoketPatients.value || []).map(p => ({ + ...p, // Spread all properties first + status: 'diloket' // Then override only status + })); + const terlambat = (terlambatPatients.value || []).map(p => ({ + ...p, + status: 'terlambat' + })); + const pending = (pendingPatients.value || []).map(p => ({ + ...p, + status: 'pending' + })); - return [...diLoket, ...terlambat, ...pending]; + // Do not show waiting patients in the table until called + const combined = [...diLoket, ...terlambat, ...pending]; + + // Debug: check if fastTrack property exists + console.log('📊 AdminLoket - allPatientsForStage:', combined.length); + if (combined.length > 0) { + console.log('📊 First patient:', combined[0]); + console.log('📊 First patient has fastTrack?', 'fastTrack' in combined[0]); + console.log('📊 First patient fastTrack value:', combined[0].fastTrack); + console.log('📊 All fastTrack values:', combined.map(p => p.fastTrack)); + } + + return combined; }); const handlePatientAction = (action) => { diff --git a/pages/Anjungan/Anjungan.vue b/pages/Anjungan/Anjungan.txt similarity index 70% rename from pages/Anjungan/Anjungan.vue rename to pages/Anjungan/Anjungan.txt index 186de69..9d9bac6 100644 --- a/pages/Anjungan/Anjungan.vue +++ b/pages/Anjungan/Anjungan.txt @@ -11,16 +11,21 @@

Pilih Klinik untuk Pendaftaran

-
- - mdi-help-circle - Bantuan - +
+
+
+ 1 + Pilih Poli (Hijau = Buka, Merah = Tutup) +
+
+ 2 + Pilih: Daftar Sekarang atau Jadwal Lain +
+
+ 3 + Pilih Jenis Pembayaran +
+
@@ -90,71 +95,6 @@ - - - - mdi-help-circle - Panduan Penggunaan Anjungan - - - -
-

Cara Menggunakan Anjungan Pendaftaran:

- -
-
1
-
-

Pilih Klinik/Poliklinik

-

Sentuh card klinik yang Anda tuju. Card HIJAU menandakan klinik tersedia, card MERAH menandakan klinik tutup.

-
-
- -
-
2
-
-

Pilih Jenis Kunjungan

-

SEKARANG: Untuk berobat hari ini
- PESAN: Untuk membuat janji di hari lain
- FAST TRACK: Untuk kasus mendesak

-
-
- -
-
3
-
-

Pilih Jenis Pembayaran

-

Pilih BPJS atau UMUM/JKMM/SPM/DLL sesuai dengan kartu jaminan kesehatan Anda.

-
-
- -
-
4
-
-

Lengkapi Formulir

-

Isi data yang diminta sesuai jenis kunjungan yang Anda pilih.

-
-
- - - -
- mdi-information -

Informasi Tambahan:
- • Periksa ketersediaan dokter pada setiap card klinik
- • Pastikan datang 15 menit sebelum jadwal yang dipilih
- • Bawa kartu identitas dan kartu BPJS (jika menggunakan BPJS)

-
-
-
- - - - Mengerti - - -
-
- @@ -183,14 +123,16 @@ -

Shift: {{ selectedClinic.shift }}

-

- Jadwal: {{ selectedClinic.schedule }} -

-

- Status: - Tersedia -

+ +
+

Kuota Hari Ini (Shift {{ getCurrentShiftNumber() }}):

+
+ {{ getCurrentShiftQuota() }} + pasien tersedia +
+
+ +

Jadwal: {{ selectedClinic.schedule }}

@@ -198,15 +140,33 @@ - - SEKARANG - - - PESAN - - - FAST TRACK - + + + + DAFTAR SEKARANG + +

Kuota hari ini habis

+
+ + + JADWAL LAIN + + +
@@ -217,7 +177,7 @@
- + Jenis Pembayaran @@ -237,10 +197,10 @@ - + - Pemesanan Antrian Poliklinik + Pilih Jadwal Kunjungan @@ -252,12 +212,16 @@ density="compact" required class="mb-3" + :min="getMinDate()" + :max="getMaxDate()" > - - - - Form Fast Track - - - - - - - - - - - - - - - - - - Tutup - - - Simpan - - - - - {{ snackbarText }}