From 5c142273aabde23012da8942b8105e758abda0ab Mon Sep 17 00:00:00 2001 From: Fanrouver Date: Mon, 12 Jan 2026 11:52:45 +0700 Subject: [PATCH] perubahan tiket dan alur antrean --- .env example | 6 +- .../features/master/loket/LoketFormDialog.vue | 2 +- composables/useThermalPrint.ts | 102 ++- pages/Anjungan/Anjungan/[id].vue | 195 +++-- pages/Anjungan/AntreanMasuk/[id].vue | 2 +- pages/Anjungan/AntreanMasuk/index.vue | 9 +- pages/Anjungan/AntrianLoket/[id].vue | 2 +- pages/Anjungan/AntrianLoket/index.vue | 9 +- pages/CheckInPasien/checkIn.vue | 793 +++++++++++++----- pages/Setting/MasterLoket.vue | 2 +- server/api/queue/patients.ts.txt | 13 +- stores/loketStore.js | 28 +- stores/queueStore.js | 227 +++-- 13 files changed, 997 insertions(+), 393 deletions(-) diff --git a/.env example b/.env example index c39cd55..7f4462c 100644 --- a/.env example +++ b/.env example @@ -35,15 +35,15 @@ KEYCLOAK_ISSUER="https://auth.rssa.top/realms/sandbox" # AUTH_ORIGIN="http://localhost:3000" # AUTH_ORIGIN="http://10.10.150.175:3001" # AUTH_ORIGIN="http://0.0.0.0:3000" -# AUTH_ORIGIN="https://antrean.dev.rssa.id/ -# AUTH_ORIGIN="https://antrean.rssa.id/ +# AUTH_ORIGIN="https://antrean.dev.rssa.id" +# AUTH_ORIGIN="https://antrean.rssa.id" #nuxt config.ts dev server host and port # HOST="localhost" # PORT=3000 # HOST="http://10.10.150.175:3000" # PORT=3000 -# HOST="http://0.0.0.0:3000" +# HOST="0.0.0.0" # PORT=3000 # HOST="https://antrean.dev.rssa.id/" # PORT=3000 diff --git a/components/features/master/loket/LoketFormDialog.vue b/components/features/master/loket/LoketFormDialog.vue index 2c367d8..980fd54 100644 --- a/components/features/master/loket/LoketFormDialog.vue +++ b/components/features/master/loket/LoketFormDialog.vue @@ -22,7 +22,7 @@ :rules="[v => !!v || 'Nama loket harus diisi']" hide-details="auto" class="mb-3 input-field" - placeholder="Loket 1" + placeholder="Loket A" /> { /** * Format date untuk tampilan + * Format: senin, 12 Jan 2026 */ const formatDate = (dateString: string): string => { try { - const date = dateString ? new Date(dateString) : new Date(); + let date = dateString ? new Date(dateString) : new Date(); if (isNaN(date.getTime())) { - return new Date().toLocaleDateString('id-ID', { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }); + date = new Date(); } - return date.toLocaleDateString('id-ID', { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }); + + // Array nama hari dalam bahasa Indonesia (lowercase) + const days = ['minggu', 'senin', 'selasa', 'rabu', 'kamis', 'jumat', 'sabtu']; + // Array nama bulan singkat (title case) + const months = ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des']; + + const dayName = days[date.getDay()]; + const day = date.getDate(); + const month = months[date.getMonth()]; + const year = date.getFullYear(); // Tahun 4 digit + + return `${dayName}, ${day} ${month} ${year}`; } catch (error) { - return new Date().toLocaleDateString('id-ID', { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }); + // Fallback jika error + const date = new Date(); + const days = ['minggu', 'senin', 'selasa', 'rabu', 'kamis', 'jumat', 'sabtu']; + const months = ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des']; + const dayName = days[date.getDay()]; + const day = date.getDate(); + const month = months[date.getMonth()]; + const year = date.getFullYear(); + return `${dayName}, ${day} ${month} ${year}`; } }; @@ -203,7 +208,8 @@ export const useThermalPrint = () => { } .qr-code-section { - margin: 3mm 0; + margin-top: -1.5mm; + margin-bottom: 1mm; text-align: center; } @@ -211,8 +217,8 @@ export const useThermalPrint = () => { width: 50mm; height: 50mm; margin: 0 auto; - border: 1px solid #000; - padding: 2mm; + border: none; + padding: 0.5mm; background: white; } @@ -225,7 +231,7 @@ export const useThermalPrint = () => { .barcode-number { font-size: 10px; font-weight: bold; - margin-top: 1mm; + margin-top: -1mm; word-break: break-all; } @@ -243,30 +249,43 @@ export const useThermalPrint = () => { display: flex; justify-content: space-between; align-items: flex-start; - gap: 4mm; padding: 0; } - .info-label { + .info-label-text { font-weight: bold; font-size: 10px; - flex: 0 0 38%; + text-align: left; text-transform: uppercase; word-break: keep-all; } + .info-colon { + font-weight: bold; + font-size: 10px; + margin-left: auto; + padding-right: 2mm; + } + + .info-label-wrapper { + display: flex; + width: 22mm; + flex-shrink: 0; + align-items: flex-start; + gap: 1mm; + } + .info-value { font-size: 10px; font-weight: bold; - flex: 1; text-align: right; word-break: break-word; } .no-antrian { - font-size: 18px; + font-size: 28px; font-weight: bold; - margin: 2mm 0; + margin: 0.5mm 0; letter-spacing: 2px; text-transform: uppercase; } @@ -274,8 +293,11 @@ export const useThermalPrint = () => { .klinik-name { font-size: 14px; font-weight: bold; - margin: 2mm 0; + margin-top: 0.5mm; + margin-bottom: 0; + padding-bottom: 0; text-transform: uppercase; + overflow: visible; } .footer { @@ -373,28 +395,38 @@ export const useThermalPrint = () => {
- Tanggal: +
+ Tanggal: +
${data.tanggal}
- Waktu: +
+ Waktu: +
${data.waktu}
- Shift: +
+ Shift: +
${data.shift}
- Pembayaran: +
+ Pembayaran: +
${data.pembayaran}
${data.namaDokter ? `
- Dokter: +
+ Dokter: +
${data.namaDokter}
` : ''} diff --git a/pages/Anjungan/Anjungan/[id].vue b/pages/Anjungan/Anjungan/[id].vue index 5853818..63a2379 100644 --- a/pages/Anjungan/Anjungan/[id].vue +++ b/pages/Anjungan/Anjungan/[id].vue @@ -487,13 +487,13 @@ Cetak Nomor Antrian - -
+ +
mdi-ticket-confirmation

Tiket Berhasil Dibuat

- Nomor antrean Anda: {{ lastRegisteredPatient.noAntrian.split(" |")[0] }} + Nomor antrean Anda: {{ lastRegisteredPatient.noAntrian?.split(" |")[0] || lastRegisteredPatient.noAntrian || 'N/A' }}

@@ -502,19 +502,19 @@
Klinik: - {{ lastRegisteredPatient.klinik }} + {{ lastRegisteredPatient.klinik || 'N/A' }}
Shift: - {{ lastRegisteredPatient.shift }} + {{ lastRegisteredPatient.shift || 'N/A' }}
Pembayaran: - {{ lastRegisteredPatient.pembayaran }} + {{ lastRegisteredPatient.pembayaran || 'N/A' }}
Barcode: - {{ lastRegisteredPatient.barcode }} + {{ lastRegisteredPatient.barcode || 'N/A' }}
@@ -532,6 +532,10 @@
+
+ +

Memuat data tiket...

+
@@ -580,7 +584,7 @@