apple ID setup cmd, backend API tweaks

This commit is contained in:
Dobromir Popov
2024-04-02 01:13:08 +03:00
parent 164c64f5df
commit 5901c11761
2 changed files with 10 additions and 6 deletions

View File

@ -593,13 +593,10 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
// Check if dayOfMonth is null and match by day of week using the enum (Assigments every week)
// This includes availabilities from previous assignments but not with preference
{
dayOfMonth: null,
dayOfMonth: null, // includes monthly and weekly repeats
dayofweek: dayOfWeekEnum,
// ToDo: and weekOfMonth
//startTime: { gte: currentMonthStart },
},
{
repeatWeekly: true,
}
]
}
@ -620,7 +617,6 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
dayOfMonth: null,
dayofweek: dayOfWeekEnum,
}
]
}
};
}
@ -741,6 +737,11 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
return avail.dayOfMonth != null && avail.startTime >= currentMonthStart; // && avail.startTime <= currentMonthEnd;
});
//if pub has availabilities for the current day
pub.hasAvailabilityForCurrentDay = pub.availabilities?.some(avail => {
return avail.startTime >= filterDate && avail.startTime <= filterDateEnd;
});
});
if (filterDate && useDateFilter) {