update klinik ruang

This commit is contained in:
bagus-arie05
2026-01-08 12:53:41 +07:00
parent ed43c69a1d
commit ca5913c4e6
3 changed files with 39 additions and 92 deletions
+7 -30
View File
@@ -741,18 +741,10 @@ export const useQueueStore = defineStore('queue', () => {
switch (action) {
case "proses":
// Set as current processing for this room
if (!currentProcessingPatient.value[key]) {
// Use Vue's reactive assignment
currentProcessingPatient.value = {
...currentProcessingPatient.value,
[key]: {}
};
}
// Update nested property reactively
currentProcessingPatient.value[key] = {
...currentProcessingPatient.value[key],
[patient.tipeLayanan]: allPatients.value[patientIndex]
// Set as current processing for this room (1 pasien, tidak dipisah per tipe layanan)
currentProcessingPatient.value = {
...currentProcessingPatient.value,
[key]: allPatients.value[patientIndex]
};
message = `Memproses pasien ${patientCode}`;
break;
@@ -763,12 +755,7 @@ export const useQueueStore = defineStore('queue', () => {
status: "processed"
};
// Clear current processing
if (currentProcessingPatient.value[key]) {
currentProcessingPatient.value[key] = {
...currentProcessingPatient.value[key],
[patient.tipeLayanan]: null
};
}
currentProcessingPatient.value[key] = null;
message = `Pasien ${patientCode} selesai diproses`;
break;
@@ -777,12 +764,7 @@ export const useQueueStore = defineStore('queue', () => {
...allPatients.value[patientIndex],
status: "terlambat"
};
if (currentProcessingPatient.value[key]) {
currentProcessingPatient.value[key] = {
...currentProcessingPatient.value[key],
[patient.tipeLayanan]: null
};
}
currentProcessingPatient.value[key] = null;
message = `Pasien ${patientCode} ditandai terlambat`;
break;
@@ -791,12 +773,7 @@ export const useQueueStore = defineStore('queue', () => {
...allPatients.value[patientIndex],
status: "pending"
};
if (currentProcessingPatient.value[key]) {
currentProcessingPatient.value[key] = {
...currentProcessingPatient.value[key],
[patient.tipeLayanan]: null
};
}
currentProcessingPatient.value[key] = null;
message = `Pasien ${patientCode} di-pending`;
break;
}