update klinik ruang
This commit is contained in:
+7
-30
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user