diff --git a/src/models/workTimes.mocks.ts b/src/models/workTimes.mocks.ts index e9b32320..6aa92af0 100644 --- a/src/models/workTimes.mocks.ts +++ b/src/models/workTimes.mocks.ts @@ -105,22 +105,26 @@ const createChangeRequest = ({ date, id, status = WorkTimeChangeRequestStatus.Requested, + createdAt, }: { date: Date; id: number; status?: WorkTimeChangeRequestStatus; + createdAt?: Date; }): WorkTimeChangeRequest => { const changes = generateChangeRequestChanges({ count: faker.datatype.number({ min: 1, max: 4 }), date, }); const isoDate = isoDateFromDateTime(date); + const isoCreatedAt = isoDateFromDateTime(createdAt ?? new Date()); return { id, date: isoDate, usersId: 0, changes, + createdAt: isoCreatedAt, ...(status === WorkTimeChangeRequestStatus.Declined ? { status: WorkTimeChangeRequestStatus.Declined, diff --git a/src/models/workTimes.ts b/src/models/workTimes.ts index 549bb07b..a061840f 100644 --- a/src/models/workTimes.ts +++ b/src/models/workTimes.ts @@ -21,6 +21,7 @@ export type WorkTimeChangeRequest = { id: number; date: IsoDate; usersId: number; + createdAt: IsoDate; changes: Array; } & ( | {