Skip to content

Commit

Permalink
feat: Add testData property to targethoursRow (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns authored Nov 6, 2023
2 parents 8916f42 + f8fd575 commit 9c2e511
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/models/__snapshots__/targethours.mocks.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Array [
"dateUntil": "2019-04-30",
"id": 0,
"monthlyTarget": 48093,
"testData": false,
"type": "monthly",
"usersId": 0,
"workdayFriday": true,
Expand All @@ -24,6 +25,7 @@ Array [
"dateUntil": "2019-07-31",
"id": 1,
"monthlyTarget": 44025,
"testData": false,
"type": "monthly",
"usersId": 0,
"workdayFriday": true,
Expand All @@ -40,6 +42,7 @@ Array [
"dateUntil": "2019-09-30",
"id": 2,
"monthlyTarget": 65472,
"testData": false,
"type": "monthly",
"usersId": 0,
"workdayFriday": false,
Expand All @@ -61,6 +64,7 @@ Array [
"monday": 0,
"saturday": 4,
"sunday": 0,
"testData": false,
"thursday": 4.16,
"tuesday": 24,
"type": "weekly",
Expand All @@ -78,6 +82,7 @@ Array [
"monday": 24,
"saturday": 0,
"sunday": 24,
"testData": false,
"thursday": 2.74,
"tuesday": 3,
"type": "weekly",
Expand All @@ -95,6 +100,7 @@ Array [
"monday": 5.36,
"saturday": 0,
"sunday": 5.36,
"testData": false,
"thursday": 6,
"tuesday": 0,
"type": "weekly",
Expand All @@ -112,6 +118,7 @@ Array [
"monday": 6.11,
"saturday": 24,
"sunday": 6.11,
"testData": false,
"thursday": 0,
"tuesday": 1,
"type": "weekly",
Expand All @@ -129,6 +136,7 @@ Array [
"monday": 0,
"saturday": 24,
"sunday": 0,
"testData": false,
"thursday": 5.02,
"tuesday": 4,
"type": "weekly",
Expand All @@ -146,6 +154,7 @@ Array [
"monday": 1,
"saturday": 1.22,
"sunday": 1,
"testData": false,
"thursday": 0,
"tuesday": 0,
"type": "weekly",
Expand All @@ -163,6 +172,7 @@ Array [
"monday": 5,
"saturday": 24,
"sunday": 5,
"testData": false,
"thursday": 2,
"tuesday": 0,
"type": "weekly",
Expand All @@ -180,6 +190,7 @@ Array [
"monday": 24,
"saturday": 6,
"sunday": 24,
"testData": false,
"thursday": 0,
"tuesday": 2,
"type": "weekly",
Expand All @@ -197,6 +208,7 @@ Array [
"monday": 1.21,
"saturday": 0,
"sunday": 1.21,
"testData": false,
"thursday": 8,
"tuesday": 3,
"type": "weekly",
Expand All @@ -214,6 +226,7 @@ Array [
"monday": 24,
"saturday": 0,
"sunday": 24,
"testData": false,
"thursday": 6,
"tuesday": 3,
"type": "weekly",
Expand All @@ -231,6 +244,7 @@ Array [
"monday": 24,
"saturday": 8,
"sunday": 24,
"testData": false,
"thursday": 3,
"tuesday": 6.84,
"type": "weekly",
Expand All @@ -248,6 +262,7 @@ Array [
"monday": 0,
"saturday": 4,
"sunday": 0,
"testData": false,
"thursday": 2.71,
"tuesday": 4,
"type": "weekly",
Expand All @@ -265,6 +280,7 @@ Array [
"monday": 7.25,
"saturday": 4,
"sunday": 7.25,
"testData": false,
"thursday": 24,
"tuesday": 7,
"type": "weekly",
Expand All @@ -282,6 +298,7 @@ Array [
"monday": 0,
"saturday": 2.06,
"sunday": 0,
"testData": false,
"thursday": 24,
"tuesday": 0,
"type": "weekly",
Expand All @@ -299,6 +316,7 @@ Array [
"monday": 0,
"saturday": 24,
"sunday": 0,
"testData": false,
"thursday": 0,
"tuesday": 4,
"type": "weekly",
Expand All @@ -316,6 +334,7 @@ Array [
"monday": 0,
"saturday": 24,
"sunday": 0,
"testData": false,
"thursday": 0,
"tuesday": 3.6,
"type": "weekly",
Expand All @@ -333,6 +352,7 @@ Array [
"monday": 24,
"saturday": 0,
"sunday": 24,
"testData": false,
"thursday": 0,
"tuesday": 3.66,
"type": "weekly",
Expand Down
1 change: 1 addition & 0 deletions src/models/targethours.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const createCommonTargethoursRowMock = (dateSince: Date) => {
dateUntil: null,
compensationMonthly: faker.datatype.number({ min: 0, max: 8 }),
usersId: 0,
testData: false,
};
};

Expand Down
2 changes: 2 additions & 0 deletions src/models/targethours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand Down

0 comments on commit 9c2e511

Please sign in to comment.