fix broken filter (#2876)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-04-03 22:26:57 +05:00 committed by GitHub
parent 085d66fab3
commit e7483daa00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@
const currentEmployee = (getCurrentAccount() as EmployeeAccount).employee
let staff: Staff[] = []
let reqests: Request[] = []
let requests: Request[] = []
let types: Map<Ref<RequestType>, RequestType> = new Map<Ref<RequestType>, RequestType>()
typeQuery.query(hr.class.RequestType, {}, (res) => {
@ -95,10 +95,11 @@
hr.class.Request,
{
'tzDueDate.year': { $gte: startDate.getFullYear() },
'tzDate.year': { $lte: endDate.getFullYear() }
'tzDate.year': { $lte: endDate.getFullYear() },
space: { $in: departments }
},
(res) => {
reqests = res
requests = res
}
)
}
@ -120,7 +121,7 @@
employeeRequests = employeeRequests
}
$: updateRequest(reqests, startDate, endDate)
$: updateRequest(requests, startDate, endDate)
function pushChilds (
department: Ref<Department>,