new query for my shifts

This commit is contained in:
José Salazar
2026-02-19 15:40:34 -05:00
parent 97e3410f7f
commit e6b3eca16d
4 changed files with 96 additions and 6 deletions

View File

@@ -95,11 +95,12 @@ class ShiftsRepositoryImpl
DateTime? end,
}) async {
final staffId = await _service.getStaffId();
var query = _service.connector.getApplicationsByStaffId(staffId: staffId);
var query = _service.connector.getMyApplicationsByStaffId(staffId: staffId);
if (start != null && end != null) {
query = query.dayStart(_service.toTimestamp(start)).dayEnd(_service.toTimestamp(end));
}
final fdc.QueryResult<dc.GetApplicationsByStaffIdData, dc.GetApplicationsByStaffIdVariables> response = await _service.executeProtected(() => query.execute());
final fdc.QueryResult<dc.GetMyApplicationsByStaffIdData, dc.GetMyApplicationsByStaffIdVariables> response =
await _service.executeProtected(() => query.execute());
final apps = response.data.applications;
final List<Shift> shifts = [];