push loket baru
This commit is contained in:
No files matched your search
+14
-2
@@ -366,9 +366,15 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
}
|
||||
|
||||
// Update status dari 'menunggu' menjadi 'waiting' (sudah dipanggil, bisa check-in)
|
||||
// Track waktu panggilan untuk multiple calls detection
|
||||
const callTimestamp = new Date().toISOString();
|
||||
const index = allPatients.value.findIndex(p => p.no === nextPatient.no);
|
||||
if (index !== -1) {
|
||||
allPatients.value[index] = { ...allPatients.value[index], status: "waiting" };
|
||||
allPatients.value[index] = {
|
||||
...allPatients.value[index],
|
||||
status: "waiting",
|
||||
lastCalledAt: callTimestamp // Track waktu panggilan untuk multiple calls
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -421,10 +427,16 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
const patientsToCall = combinedList.slice(0, maxCallable);
|
||||
|
||||
// Update status dari 'menunggu' menjadi 'waiting' (sudah dipanggil, bisa check-in)
|
||||
// Track waktu panggilan untuk multiple calls detection - semua dipanggil dengan timestamp yang sama
|
||||
const callTimestamp = new Date().toISOString();
|
||||
patientsToCall.forEach((patient) => {
|
||||
const index = allPatients.value.findIndex(p => p.no === patient.no);
|
||||
if (index !== -1) {
|
||||
allPatients.value[index] = { ...allPatients.value[index], status: "waiting" };
|
||||
allPatients.value[index] = {
|
||||
...allPatients.value[index],
|
||||
status: "waiting",
|
||||
lastCalledAt: callTimestamp // Track waktu panggilan untuk multiple calls
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user