diff --git a/src/angular/hq/src/app/models/projects/get-project-activity-v1.ts b/src/angular/hq/src/app/models/projects/get-project-activity-v1.ts index 0b25cf43..96d652fa 100644 --- a/src/angular/hq/src/app/models/projects/get-project-activity-v1.ts +++ b/src/angular/hq/src/app/models/projects/get-project-activity-v1.ts @@ -1,12 +1,13 @@ import { PagedResponseV1 } from '../common/paged-response-v1'; export interface GetProjectActivityRequestV1 { - projectId: string | null; + projectId?: string | null; } export interface GetProjectActivityRecordV1 { id: string; name: string; sequence: number; + projectId: string; } export interface GetProjectActivityRecordsV1 { diff --git a/src/angular/hq/src/app/models/staff-dashboard/get-dashboard-time-v1.ts b/src/angular/hq/src/app/models/staff-dashboard/get-dashboard-time-v1.ts index 1bfde571..08b4c0bf 100644 --- a/src/angular/hq/src/app/models/staff-dashboard/get-dashboard-time-v1.ts +++ b/src/angular/hq/src/app/models/staff-dashboard/get-dashboard-time-v1.ts @@ -23,10 +23,9 @@ export interface GetDashboardTimeV1Response { previousDate: string; nextDate: string; dates: GetDashboardTimeV1TimeForDate[]; - chargeCodes: GetDashboardTimeV1ChargeCode[]; - clients: GetDashboardTimeV1Client[]; rejectedCount: number; canSubmit: boolean; + timeEntryCutoffDate: string; } export interface GetDashboardTimeV1TimeForDate { @@ -54,29 +53,3 @@ export interface GetDashboardTimeV1TimeForDateTimes { timeStatus: TimeStatus | null; rejectionNotes: string | null; } - -export interface GetDashboardTimeV1ChargeCode { - id: string; - clientId: string; - projectId: string; - code: string; -} - -export interface GetDashboardTimeV1Client { - id: string; - name: string; - projects: GetDashboardTimeV1Project[]; -} - -export interface GetDashboardTimeV1Project { - id: string; - chargeCodeId: string | null; - chargeCode: string | null; - name: string; - activities: GetDashboardTimeV1ProjectActivity[]; -} - -export interface GetDashboardTimeV1ProjectActivity { - id: string; - name: string; -} diff --git a/src/angular/hq/src/app/staff-dashboard/service/staff-dashboard.service.ts b/src/angular/hq/src/app/staff-dashboard/service/staff-dashboard.service.ts index 91be118f..8eb0b93a 100644 --- a/src/angular/hq/src/app/staff-dashboard/service/staff-dashboard.service.ts +++ b/src/angular/hq/src/app/staff-dashboard/service/staff-dashboard.service.ts @@ -19,15 +19,16 @@ import { takeUntil, tap, } from 'rxjs'; -import { - GetDashboardTimeV1ChargeCode, - GetDashboardTimeV1Client, - GetDashboardTimeV1Response, -} from '../../models/staff-dashboard/get-dashboard-time-v1'; +import { GetDashboardTimeV1Response } from '../../models/staff-dashboard/get-dashboard-time-v1'; import { localISODate } from '../../common/functions/local-iso-date'; import { TimeStatus } from '../../enums/time-status'; import { Period } from '../../enums/period'; import { HQRole } from '../../enums/hqrole'; +import { + GetChargeCodeRecordV1, + SortColumn, +} from '../../models/charge-codes/get-chargecodes-v1'; +import { GetProjectActivityRecordV1 } from '../../models/projects/get-project-activity-v1'; @Injectable({ providedIn: 'root', @@ -48,18 +49,15 @@ export class StaffDashboardService implements OnDestroy { private destroyed$: ReplaySubject = new ReplaySubject(1); canSubmitSubject = new BehaviorSubject(false); canSubmit$: Observable = this.canSubmitSubject.asObservable(); - + timeEntryCutoffDate$: Observable; time$: Observable; - chargeCodes$: Observable; - clients$: Observable; + chargeCodes$: Observable; showAllRejectedTimes$ = new BehaviorSubject(false); rejectedCount$: Observable; - staffId$: Observable; + activities$: Observable; private staffIdSubject = new BehaviorSubject(null); - refresh$ = new Subject(); - canEdit$: Observable; canEditPoints$: Observable; @@ -94,6 +92,19 @@ export class StaffDashboardService implements OnDestroy { ].some((role) => t.roles.includes(role)), ), ); + const chargeCodeResponse$ = this.staffId$.pipe( + switchMap((staffId) => + this.hqService.getChargeCodeseV1({ + active: true, + staffId, + sortBy: SortColumn.IsProjectMember, + }), + ), + ); + this.chargeCodes$ = chargeCodeResponse$.pipe( + map((chargeCode) => chargeCode.records), + shareReplay({ bufferSize: 1, refCount: false }), + ); this.canEdit$ = combineLatest({ staffId: this.staffId$, @@ -141,6 +152,12 @@ export class StaffDashboardService implements OnDestroy { this.date.setValue(response.startDate, { emitEvent: false }), ), ); + this.activities$ = this.hqService + .getprojectActivitiesV1({ projectId: null }) + .pipe( + map((t) => t.records), + shareReplay({ bufferSize: 1, refCount: false }), + ); const refreshTime$ = this.refresh$.pipe(switchMap(() => time$)); @@ -152,11 +169,12 @@ export class StaffDashboardService implements OnDestroy { next: (t) => this.canSubmitSubject.next(t.canSubmit), error: console.error, }); + this.timeEntryCutoffDate$ = this.time$.pipe( + map((t) => t.timeEntryCutoffDate), + shareReplay({ bufferSize: 1, refCount: false }), + ); this.rejectedCount$ = this.time$.pipe(map((t) => t.rejectedCount)); - - this.chargeCodes$ = this.time$.pipe(map((t) => t.chargeCodes)); - this.clients$ = this.time$.pipe(map((t) => t.clients)); } refresh() { @@ -166,6 +184,11 @@ export class StaffDashboardService implements OnDestroy { setStaffId(staffId: string) { this.staffIdSubject.next(staffId); } + resetFilters() { + this.period.setValue(Period.Today); + this.search.setValue(''); + this.date.setValue(localISODate()); + } ngOnDestroy(): void { this.destroyed$.next(true); diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.html b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.html index 340cb420..fcc5f58c 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.html +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.html @@ -54,7 +54,7 @@ hq-staff-dashboard-planning-point [editMode]="editPlanButton$ | async" [point]="point" - [chargeCodes]="chargeCodes$ | async" + [chargeCodes]="staffDashboardService.chargeCodes$ | async" class="even:bg-gray-850 odd:bg-black-alt" cdkDrag > @@ -63,7 +63,7 @@ hq-staff-dashboard-planning-point [point]="point" [editMode]="editPlanButton$ | async" - [chargeCodes]="chargeCodes$ | async" + [chargeCodes]="staffDashboardService.chargeCodes$ | async" class="even:bg-gray-850 odd:bg-black-alt" > } diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.ts b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.ts index 603ddac7..3b99eb31 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.ts +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-planning/staff-dashboard-planning.component.ts @@ -50,10 +50,6 @@ import { PlanningPoint, } from '../../models/Points/get-points-v1'; import { PointForm } from '../staff-dashboard.component'; -import { - GetChargeCodeRecordV1, - SortColumn, -} from '../../models/charge-codes/get-chargecodes-v1'; import { localISODate } from '../../common/functions/local-iso-date'; import { OidcSecurityService } from 'angular-auth-oidc-client'; import { HQService } from '../../services/hq.service'; @@ -89,7 +85,6 @@ export class StaffDashboardPlanningComponent implements OnInit, OnDestroy { planningPointsChildren!: QueryList; planningPoints$: Observable; points: PlanningPoint[] = []; - chargeCodes$: Observable; private staffId$: Observable; private planningPointsRequest$: Observable; private planningPointsRequestTrigger$ = new Subject(); @@ -138,20 +133,6 @@ export class StaffDashboardPlanningComponent implements OnInit, OnDestroy { trigger: this.planningPointsRequestTrigger$.pipe(startWith(0)), }).pipe(shareReplay({ bufferSize: 1, refCount: true })); - const chargeCodeResponse$ = this.staffDashboardService.staffId$.pipe( - switchMap((staffId) => - this.hqService.getChargeCodeseV1({ - active: true, - staffId, - sortBy: SortColumn.IsProjectMember, - }), - ), - ); - - this.chargeCodes$ = chargeCodeResponse$.pipe( - map((chargeCode) => chargeCode.records), - shareReplay({ bufferSize: 1, refCount: false }), - ); this.planningPoints$ = this.planningPointsRequest$.pipe( switchMap(({ date, staffId }) => { return this.hqService.getPlanningPointsV1({ date, staffId }).pipe( diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.html b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.html index bb36cd68..9843ac04 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.html +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.html @@ -59,4 +59,11 @@ +
+
+ Reset +
+
diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.ts b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.ts index 9a72e391..5b716840 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.ts +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-search-filter/staff-dashboard-search-filter.component.ts @@ -2,11 +2,12 @@ import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { StaffDashboardService } from '../service/staff-dashboard.service'; +import { ButtonComponent } from '../../core/components/button/button.component'; @Component({ selector: 'hq-staff-dashboard-search-filter', standalone: true, - imports: [CommonModule, ReactiveFormsModule, FormsModule], + imports: [CommonModule, ReactiveFormsModule, FormsModule, ButtonComponent], templateUrl: './staff-dashboard-search-filter.component.html', }) export class StaffDashboardSearchFilterComponent { diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.html b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.html index fbda2124..4a887799 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.html +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.html @@ -108,7 +108,7 @@ - @if (activities$ | async; as activities) { + @if (filteredActivities$ | async; as activities) { @if (activities.length > 0) {
diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.ts b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.ts index 915ac757..0542ea9a 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.ts +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard-time-entry/staff-dashboard-time-entry.component.ts @@ -14,11 +14,7 @@ import { SimpleChanges, ViewChild, } from '@angular/core'; -import { - GetDashboardTimeV1Project, - GetDashboardTimeV1ProjectActivity, - GetDashboardTimeV1TimeForDateTimes, -} from '../../models/staff-dashboard/get-dashboard-time-v1'; +import { GetDashboardTimeV1TimeForDateTimes } from '../../models/staff-dashboard/get-dashboard-time-v1'; import { StaffDashboardService } from '../service/staff-dashboard.service'; import { FormControl, @@ -30,17 +26,15 @@ import { CommonModule } from '@angular/common'; import { Observable, Subject, - combineLatest, concat, - debounceTime, defer, distinctUntilChanged, firstValueFrom, map, of, shareReplay, - startWith, takeUntil, + combineLatest, } from 'rxjs'; import { roundToNextQuarter } from '../../common/functions/round-to-next-quarter'; import { chargeCodeToColor } from '../../common/functions/charge-code-to-color'; @@ -48,6 +42,7 @@ import { ModalService } from '../../services/modal.service'; import { TimeStatus } from '../../enums/time-status'; import { DateInputComponent } from '../../core/components/date-input/date-input.component'; import { GetChargeCodeRecordV1 } from '../../models/charge-codes/get-chargecodes-v1'; +import { GetProjectActivityRecordV1 } from '../../models/projects/get-project-activity-v1'; export interface HQTimeChangeEvent { id?: string | null; @@ -150,13 +145,10 @@ export class StaffDashboardTimeEntryComponent activityId: new FormControl(null), }); - projects$: Observable; - activities$: Observable; projectName$: Observable; clientName$: Observable; - timeStatus = TimeStatus; - + filteredActivities$: Observable; ngOnInit(): void { this.staffDashboardService.canEdit$ .pipe(takeUntil(this.destroyed$)) @@ -211,10 +203,6 @@ export class StaffDashboardTimeEntryComponent this.form.valueChanges, ).pipe(shareReplay({ bufferSize: 1, refCount: false })); - const clientId$ = form$.pipe( - map((t) => t.clientId), - distinctUntilChanged(), - ); this.projectName$ = form$.pipe( map((t) => t.projectName), distinctUntilChanged(), @@ -224,9 +212,11 @@ export class StaffDashboardTimeEntryComponent distinctUntilChanged(), ); - const projectId$ = form$.pipe( - map((t) => t.projectId), - distinctUntilChanged(), + this.filteredActivities$ = combineLatest({ + activities: staffDashboardService.activities$, + form: form$, + }).pipe( + map((t) => t.activities.filter((x) => x.projectId === t.form.projectId)), ); const hours$ = form$.pipe( @@ -234,38 +224,6 @@ export class StaffDashboardTimeEntryComponent distinctUntilChanged(), ); - const client$ = combineLatest({ - clientId: clientId$, - clients: this.staffDashboardService.clients$, - }).pipe(map((t) => t.clients.find((x) => x.id == t.clientId))); - - this.projects$ = client$.pipe(map((t) => t?.projects ?? [])); - - const project$ = combineLatest({ - projectId: projectId$, - client: client$, - }).pipe(map((t) => t.client?.projects?.find((x) => x.id == t.projectId))); - - this.activities$ = project$.pipe( - map((t) => t?.activities ?? []), - startWith([]), - ); - - this.activities$ - .pipe(debounceTime(500), takeUntil(this.destroyed$)) - .subscribe({ - next: (activities) => { - if (activities.length > 0) { - this.form.controls.activityId.addValidators(Validators.required); - } else { - this.form.controls.activityId.removeValidators(Validators.required); - } - - this.form.controls.activityId.updateValueAndValidity(); - }, - error: console.error, - }); - // clientId$.pipe(takeUntil(this.destroyed$)).subscribe({ // next: () => { // this.form.patchValue( @@ -364,10 +322,33 @@ export class StaffDashboardTimeEntryComponent this.hqTimeDelete.emit({ id }); } } - duplicateTime() { - const time = { ...this.form.value }; - time.id = null; // to create a new time - this.hqTimeDuplicate.emit(time); + async duplicateTime() { + const newDate = await firstValueFrom( + this.modalService.chooseDate( + 'Duplicate Time Entry', + 'Choose the date where you would like to duplicate this time entry to', + this.form.controls.date.value ?? '', + ), + ); + if (newDate) { + const cutoffDate = await firstValueFrom( + this.staffDashboardService.timeEntryCutoffDate$, + ); + if (newDate >= cutoffDate) { + const time = { ...this.form.value }; + time.date = newDate; + time.id = null; // to create a new time + this.hqTimeDuplicate.emit(time); + this.staffDashboardService.date.setValue(time.date); + } else { + await firstValueFrom( + this.modalService.alert( + 'Error', + 'Cannot copy outside of current week period', + ), + ); + } + } } resetTime() { this.form.reset({ date: this.form.controls.date.value }); diff --git a/src/angular/hq/src/app/staff-dashboard/staff-dashboard.component.html b/src/angular/hq/src/app/staff-dashboard/staff-dashboard.component.html index e6c23489..a7dc164b 100644 --- a/src/angular/hq/src/app/staff-dashboard/staff-dashboard.component.html +++ b/src/angular/hq/src/app/staff-dashboard/staff-dashboard.component.html @@ -283,7 +283,7 @@ ; prevPlan$: Observable; prevPSRReportButtonState: ButtonState = ButtonState.Disabled; - chargeCodes$: Observable; canEdit$: Observable; private destroyed$: ReplaySubject = new ReplaySubject(1); @@ -174,19 +172,7 @@ export class StaffDashboardComponent implements OnInit, OnDestroy, OnChanges { private cdr: ChangeDetectorRef, ) { this.canEdit$ = this.staffDashboardService.canEdit$; - const chargeCodeResponse$ = this.staffDashboardService.staffId$.pipe( - switchMap((staffId) => - this.hqService.getChargeCodeseV1({ - active: true, - staffId, - sortBy: SortColumn.IsProjectMember, - }), - ), - ); - this.chargeCodes$ = chargeCodeResponse$.pipe( - map((chargeCode) => chargeCode.records), - shareReplay({ bufferSize: 1, refCount: false }), - ); + const staffId$ = this.staffDashboardService.staffId$; const date$ = staffDashboardService.date.valueChanges .pipe(startWith(staffDashboardService.date.value)) diff --git a/src/dotnet/HQ.Abstractions/Projects/GetProjectActivitiesV1.cs b/src/dotnet/HQ.Abstractions/Projects/GetProjectActivitiesV1.cs index a76e02ac..964f61bc 100644 --- a/src/dotnet/HQ.Abstractions/Projects/GetProjectActivitiesV1.cs +++ b/src/dotnet/HQ.Abstractions/Projects/GetProjectActivitiesV1.cs @@ -14,7 +14,7 @@ public class GetProjectActivitiesV1 { public class Request { - public Guid ProjectId { get; set; } + public Guid? ProjectId { get; set; } } public class Response @@ -27,5 +27,7 @@ public class Record public Guid Id { get; set; } public string Name { get; set; } = null!; public int Sequence { get; set; } + public Guid ProjectId { get; set; } + } } \ No newline at end of file diff --git a/src/dotnet/HQ.Abstractions/Times/GetDashboardTimeV1.cs b/src/dotnet/HQ.Abstractions/Times/GetDashboardTimeV1.cs index 7bbc15cf..edcd1760 100644 --- a/src/dotnet/HQ.Abstractions/Times/GetDashboardTimeV1.cs +++ b/src/dotnet/HQ.Abstractions/Times/GetDashboardTimeV1.cs @@ -1,4 +1,6 @@ -using HQ.Abstractions.Enumerations; +using System.Diagnostics; + +using HQ.Abstractions.Enumerations; namespace HQ.Abstractions.Times; @@ -22,8 +24,6 @@ public class Response public DateOnly PreviousDate { get; set; } public DateOnly NextDate { get; set; } public List Dates { get; set; } = new(); - public List ChargeCodes { get; set; } = new(); - public List Clients { get; set; } = new(); public decimal HoursThisWeek { get; set; } public decimal HoursThisMonth { get; set; } public decimal HoursLastWeek { get; set; } @@ -32,36 +32,7 @@ public class Response public int RejectedCount { get; set; } public bool CanSubmit { get; set; } - } - - public class ChargeCode - { - public Guid Id { get; set; } - public Guid? ClientId { get; set; } - public Guid? ProjectId { get; set; } - public string Code { get; set; } = null!; - } - - public class Client - { - public Guid Id { get; set; } - public string Name { get; set; } = null!; - public List Projects { get; set; } = null!; - } - - public class Project - { - public Guid Id { get; set; } - public string Name { get; set; } = null!; - public List Activities { get; set; } = new(); - public Guid? ChargeCodeId { get; set; } - public string? ChargeCode { get; set; } - } - - public class Activities - { - public Guid Id { get; set; } - public string Name { get; set; } = null!; + public DateOnly? TimeEntryCutoffDate { get; set; } } public class TimeForDate diff --git a/src/dotnet/HQ.Server/Services/ProjectServiceV1.cs b/src/dotnet/HQ.Server/Services/ProjectServiceV1.cs index 8e0fb337..32f729d2 100644 --- a/src/dotnet/HQ.Server/Services/ProjectServiceV1.cs +++ b/src/dotnet/HQ.Server/Services/ProjectServiceV1.cs @@ -468,12 +468,13 @@ public ProjectServiceV1(ChargeCodeServiceV1 chargeCodeServiceV1, HQDbContext con } public async Task> GetProjectActivitiesV1(GetProjectActivitiesV1.Request request, CancellationToken ct = default) { - var records = _context.ProjectActivities.Where(t => t.ProjectId == request.ProjectId) + var records = _context.ProjectActivities.Where(t => request.ProjectId == null || t.ProjectId == request.ProjectId) .Select(t => new GetProjectActivitiesV1.Record() { Id = t.Id, Name = t.Name, - Sequence = t.Sequence + Sequence = t.Sequence, + ProjectId = t.ProjectId }) .OrderBy(t => t.Name); return new GetProjectActivitiesV1.Response() diff --git a/src/dotnet/HQ.Server/Services/TimeEntryServiceV1.cs b/src/dotnet/HQ.Server/Services/TimeEntryServiceV1.cs index d561c1e8..dc62c38d 100644 --- a/src/dotnet/HQ.Server/Services/TimeEntryServiceV1.cs +++ b/src/dotnet/HQ.Server/Services/TimeEntryServiceV1.cs @@ -597,47 +597,7 @@ public TimeEntryServiceV1(HQDbContext context, ILogger logge .GroupBy(t => t.Date) .ToDictionaryAsync(t => t.Key, t => t.OrderByDescending(x => x.CreatedAt).ToList()); - var chargeCodes = await _context.ChargeCodes - .Where(t => t.Active == true) - .AsNoTracking() - .OrderBy(t => t.Code) - .Select(t => new GetDashboardTimeV1.ChargeCode() - { - Id = t.Id, - Code = t.Code, - ClientId = t.Project != null ? t.Project.ClientId : null, - ProjectId = t.ProjectId - }) - .ToListAsync(ct); - - var clients = await _context.Clients - .AsNoTracking() - .Where(t => !t.Projects.All(x => x.ChargeCode!.Active == false)) - .OrderBy(t => t.Name) - .Include(t => t.Projects) - .ThenInclude(t => t.Activities) - .Select(t => new GetDashboardTimeV1.Client() - { - Id = t.Id, - Name = t.Name, - Projects = t.Projects.Where(x => x.ChargeCode!.Active == true).OrderBy(x => x.Name).Select(x => new Abstractions.Times.GetDashboardTimeV1.Project() - { - Id = x.Id, - ChargeCodeId = x.ChargeCode != null ? x.ChargeCode.Id : null, - ChargeCode = x.ChargeCode != null ? x.ChargeCode.Code : null, - Name = x.Name, - Activities = x.Activities.Select(y => new Abstractions.Times.GetDashboardTimeV1.Activities() - { - Id = y.Id, - Name = y.Name - }).ToList() - }).ToList() - }) - .ToListAsync(ct); - var response = new GetDashboardTimeV1.Response(); - response.ChargeCodes = chargeCodes; - response.Clients = clients; response.StartDate = startDate; response.EndDate = endDate; response.TotalHours = await timesQuery.SumAsync(t => t.Hours, ct); @@ -650,7 +610,7 @@ public TimeEntryServiceV1(HQDbContext context, ILogger logge response.PreviousDate = previousDate; response.StaffName = staff.Name; response.RejectedCount = await _context.Times.Where(t => t.StaffId == request.StaffId && t.Status == TimeStatus.Rejected).CountAsync(ct); - + response.TimeEntryCutoffDate = staff.TimeEntryCutoffDate; if (request.Status.HasValue) { foreach (var date in times)