fix: prefer canonical service staff field
This commit is contained in:
parent
0ca34dc5d8
commit
daa8744db4
@ -105,6 +105,9 @@ type Appt = {
|
|||||||
petName?: string
|
petName?: string
|
||||||
petType?: string
|
petType?: string
|
||||||
serviceType?: string
|
serviceType?: string
|
||||||
|
customerUserId?: number
|
||||||
|
createdByUserId?: number
|
||||||
|
assignedStaffId?: number
|
||||||
assignedUserId?: number
|
assignedUserId?: number
|
||||||
staffName?: string
|
staffName?: string
|
||||||
customerName?: string
|
customerName?: string
|
||||||
@ -176,7 +179,7 @@ async function load() {
|
|||||||
let list = Array.isArray(res.data) ? (res.data as Appt[]) : []
|
let list = Array.isArray(res.data) ? (res.data as Appt[]) : []
|
||||||
list = list.filter((a) => inDateRange(a.appointmentTime))
|
list = list.filter((a) => inDateRange(a.appointmentTime))
|
||||||
if (staffId.value != null) {
|
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) {
|
if (missingReport.value) {
|
||||||
list = list.filter((a) => a.status === 'doing' && !a.hasReport)
|
list = list.filter((a) => a.status === 'doing' && !a.hasReport)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user