From f8fd5756a936d61c5ed9b91059b36a56476ccb63 Mon Sep 17 00:00:00 2001 From: Dominik Sumer Date: Thu, 19 Oct 2023 16:06:54 +0200 Subject: [PATCH] added field that defines if a targethoursRow was generated as test data --- .../targethours.mocks.test.ts.snap | 20 +++++++++++++++++++ src/models/targethours.mocks.ts | 1 + src/models/targethours.ts | 2 ++ 3 files changed, 23 insertions(+) diff --git a/src/models/__snapshots__/targethours.mocks.test.ts.snap b/src/models/__snapshots__/targethours.mocks.test.ts.snap index f12eebce..77a134b4 100644 --- a/src/models/__snapshots__/targethours.mocks.test.ts.snap +++ b/src/models/__snapshots__/targethours.mocks.test.ts.snap @@ -8,6 +8,7 @@ Array [ "dateUntil": "2019-04-30", "id": 0, "monthlyTarget": 48093, + "testData": false, "type": "monthly", "usersId": 0, "workdayFriday": true, @@ -24,6 +25,7 @@ Array [ "dateUntil": "2019-07-31", "id": 1, "monthlyTarget": 44025, + "testData": false, "type": "monthly", "usersId": 0, "workdayFriday": true, @@ -40,6 +42,7 @@ Array [ "dateUntil": "2019-09-30", "id": 2, "monthlyTarget": 65472, + "testData": false, "type": "monthly", "usersId": 0, "workdayFriday": false, @@ -61,6 +64,7 @@ Array [ "monday": 0, "saturday": 4, "sunday": 0, + "testData": false, "thursday": 4.16, "tuesday": 24, "type": "weekly", @@ -78,6 +82,7 @@ Array [ "monday": 24, "saturday": 0, "sunday": 24, + "testData": false, "thursday": 2.74, "tuesday": 3, "type": "weekly", @@ -95,6 +100,7 @@ Array [ "monday": 5.36, "saturday": 0, "sunday": 5.36, + "testData": false, "thursday": 6, "tuesday": 0, "type": "weekly", @@ -112,6 +118,7 @@ Array [ "monday": 6.11, "saturday": 24, "sunday": 6.11, + "testData": false, "thursday": 0, "tuesday": 1, "type": "weekly", @@ -129,6 +136,7 @@ Array [ "monday": 0, "saturday": 24, "sunday": 0, + "testData": false, "thursday": 5.02, "tuesday": 4, "type": "weekly", @@ -146,6 +154,7 @@ Array [ "monday": 1, "saturday": 1.22, "sunday": 1, + "testData": false, "thursday": 0, "tuesday": 0, "type": "weekly", @@ -163,6 +172,7 @@ Array [ "monday": 5, "saturday": 24, "sunday": 5, + "testData": false, "thursday": 2, "tuesday": 0, "type": "weekly", @@ -180,6 +190,7 @@ Array [ "monday": 24, "saturday": 6, "sunday": 24, + "testData": false, "thursday": 0, "tuesday": 2, "type": "weekly", @@ -197,6 +208,7 @@ Array [ "monday": 1.21, "saturday": 0, "sunday": 1.21, + "testData": false, "thursday": 8, "tuesday": 3, "type": "weekly", @@ -214,6 +226,7 @@ Array [ "monday": 24, "saturday": 0, "sunday": 24, + "testData": false, "thursday": 6, "tuesday": 3, "type": "weekly", @@ -231,6 +244,7 @@ Array [ "monday": 24, "saturday": 8, "sunday": 24, + "testData": false, "thursday": 3, "tuesday": 6.84, "type": "weekly", @@ -248,6 +262,7 @@ Array [ "monday": 0, "saturday": 4, "sunday": 0, + "testData": false, "thursday": 2.71, "tuesday": 4, "type": "weekly", @@ -265,6 +280,7 @@ Array [ "monday": 7.25, "saturday": 4, "sunday": 7.25, + "testData": false, "thursday": 24, "tuesday": 7, "type": "weekly", @@ -282,6 +298,7 @@ Array [ "monday": 0, "saturday": 2.06, "sunday": 0, + "testData": false, "thursday": 24, "tuesday": 0, "type": "weekly", @@ -299,6 +316,7 @@ Array [ "monday": 0, "saturday": 24, "sunday": 0, + "testData": false, "thursday": 0, "tuesday": 4, "type": "weekly", @@ -316,6 +334,7 @@ Array [ "monday": 0, "saturday": 24, "sunday": 0, + "testData": false, "thursday": 0, "tuesday": 3.6, "type": "weekly", @@ -333,6 +352,7 @@ Array [ "monday": 24, "saturday": 0, "sunday": 24, + "testData": false, "thursday": 0, "tuesday": 3.66, "type": "weekly", diff --git a/src/models/targethours.mocks.ts b/src/models/targethours.mocks.ts index 3b64d2ac..d7ceda99 100644 --- a/src/models/targethours.mocks.ts +++ b/src/models/targethours.mocks.ts @@ -32,6 +32,7 @@ const createCommonTargethoursRowMock = (dateSince: Date) => { dateUntil: null, compensationMonthly: faker.datatype.number({ min: 0, max: 8 }), usersId: 0, + testData: false, }; }; diff --git a/src/models/targethours.ts b/src/models/targethours.ts index dd2dc048..b5b58ff7 100644 --- a/src/models/targethours.ts +++ b/src/models/targethours.ts @@ -22,6 +22,8 @@ type CommonTargethoursRow = { compensationMonthly: number; /** The related employee's ID */ usersId: number; + /** Defines if the Targethoursrow was generated as test data */ + testData: boolean; }; export type TargethoursRowWeekly = CommonTargethoursRow & {