fix: prefer canonical service staff field

This commit is contained in:
malei 2026-08-01 20:31:53 +08:00
parent 0ca34dc5d8
commit daa8744db4

View File

@ -105,6 +105,9 @@ type Appt = {
petName?: string
petType?: string
serviceType?: string
customerUserId?: number
createdByUserId?: number
assignedStaffId?: number
assignedUserId?: number
staffName?: string
customerName?: string
@ -176,7 +179,7 @@ async function load() {
let list = Array.isArray(res.data) ? (res.data as Appt[]) : []
list = list.filter((a) => inDateRange(a.appointmentTime))
if (staffId.value != null) {
list = list.filter((a) => a.assignedUserId === staffId.value)
list = list.filter((a) => (a.assignedStaffId ?? a.assignedUserId) === staffId.value)
}
if (missingReport.value) {
list = list.filter((a) => a.status === 'doing' && !a.hasReport)