mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
UBERF-4264 Show only employees from selected departments (#3979)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
4c3ba1fbc4
commit
0a16c2ff88
@ -178,15 +178,14 @@
|
||||
function updateStaff (
|
||||
staff: Staff[],
|
||||
departments: Ref<Department>[],
|
||||
employeeRequests: Map<Ref<Staff>, Request[]>,
|
||||
descendants: Map<Ref<Department>, Department[]>,
|
||||
departmentById: Map<Ref<Department>, Department>
|
||||
) {
|
||||
departmentStaff = staff.filter((p) => departments.includes(p.department) || employeeRequests.has(p._id))
|
||||
departmentStaff = staff.filter((p) => departments.includes(p.department))
|
||||
updateEditableList(departmentById, departmentStaff, descendants)
|
||||
}
|
||||
|
||||
$: updateStaff(staff, departments, employeeRequests, descendants, departmentById)
|
||||
$: updateStaff(staff, departments, descendants, departmentById)
|
||||
|
||||
const reportQuery = createQuery()
|
||||
|
||||
@ -290,15 +289,12 @@
|
||||
<MonthView
|
||||
{departmentStaff}
|
||||
{employeeRequests}
|
||||
{types}
|
||||
{startDate}
|
||||
{endDate}
|
||||
{editableList}
|
||||
{currentDate}
|
||||
{timeReports}
|
||||
{holidays}
|
||||
{department}
|
||||
{departments}
|
||||
{departmentById}
|
||||
{staffDepartmentMap}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user