From f41bed14f9c198d08fd3af7c596c19fd63ab300a Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Mon, 1 Jun 2026 14:37:56 +0500 Subject: [PATCH 01/21] feat: #93: add away with make-up time endpoints without implementation to generate js-client for UI --- Api/Features/Tracking/TrackingController.cs | 23 +++++++++++++++++++ .../CreateAwayWithMakeUpTimeEntryRequest.cs | 18 +++++++++++++++ .../CreateAwayWithMakeUpTimeEntryResponse.cs | 7 ++++++ .../UpdateAwayWithMakeUpTimeEntryRequest.cs | 20 ++++++++++++++++ Core/Entities/EntryType.cs | 1 + Core/Entities/MakeUpTimeEntry.cs | 14 +++++++++++ 6 files changed, 83 insertions(+) create mode 100644 Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs create mode 100644 Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs create mode 100644 Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs create mode 100644 Core/Entities/MakeUpTimeEntry.cs diff --git a/Api/Features/Tracking/TrackingController.cs b/Api/Features/Tracking/TrackingController.cs index 72431805..e5d10a53 100644 --- a/Api/Features/Tracking/TrackingController.cs +++ b/Api/Features/Tracking/TrackingController.cs @@ -1,10 +1,12 @@ using System.ComponentModel.DataAnnotations; using Application.ExternalDeps.AssignmentsApi; +using Application.Features.Tracking.CreateAwayWithMakeUpTimeEntry; using Application.Features.Tracking.CreateTaskEntry; using Application.Features.Tracking.CreateUnwellEntry; using Application.Features.Tracking.GetEntriesByPeriod; using Application.Features.Tracking.HardDeleteEntry; using Application.Features.Tracking.SoftDeleteEntry; +using Application.Features.Tracking.UpdateAwayWithMakeUpTimeEntry; using Application.Features.Tracking.UpdateTaskEntry; using Application.Features.Tracking.UpdateUnwellEntry; using Microsoft.AspNetCore.Authorization; @@ -52,6 +54,16 @@ [FromServices] CreateUnwellEntryHandler createUnwellEntryHandler return createUnwellEntryHandler.HandleAsync(createUnwellRequest); } + [EndpointSummary("Create a away with make up time entry")] + [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] + [HttpPost("away-with-make-up-time-entries")] + public Task CreateAwayWithMakeUpTimeEntryAsync( + [Required][FromBody] CreateAwayWithMakeUpTimeEntryRequest createAwayWithMakeUpTimeEntryRequest + ) + { + throw new NotImplementedException(); + } + [EndpointSummary("Update a task entry")] [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] [HttpPost("task-entries/{taskEntryId}")] @@ -76,6 +88,17 @@ [FromServices] UpdateUnwellEntryHandler updateUnwellEntryHandler return updateUnwellEntryHandler.HandleAsync(unwellEntryId, updateUnwellEntryRequest); } + [EndpointSummary("Update a away with make up time entry")] + [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] + [HttpPost("away-with-make-up-time-entries/{awayWithMakeUpTimeEntryId}")] + public Task UpdateAwayWithMakeUpTimeEntryAsync( + [Required][FromRoute] long awayWithMakeUpTimeEntryId, + [Required][FromBody] UpdateAwayWithMakeUpTimeEntryRequest updateAwayWithMakeUpTimeEntryRequest + ) + { + throw new NotImplementedException(); + } + [EndpointSummary("Get employee projects by period")] [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] [HttpGet("task-entries/projects")] diff --git a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs new file mode 100644 index 00000000..178f0782 --- /dev/null +++ b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; + +namespace Application.Features.Tracking.CreateAwayWithMakeUpTimeEntry; + +public class CreateAwayWithMakeUpTimeEntryRequest +{ + [Required] + public required DateTime StartTime { get; set; } + + [Required] + public required DateTime EndTime { get; set; } + + [Required] + public required string Description { get; set; } + + [Required] + public required List MakeUpTimeList { get; set; } +} diff --git a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs new file mode 100644 index 00000000..b63b0727 --- /dev/null +++ b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs @@ -0,0 +1,7 @@ +namespace Application.Features.Tracking.CreateAwayWithMakeUpTimeEntry; + +public class CreateAwayWithMakeUpTimeEntryResponse +{ + public required long NewAwayWithMakeUpTimeEntryId { get; set; } +} + diff --git a/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs b/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs new file mode 100644 index 00000000..a93c4739 --- /dev/null +++ b/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace Application.Features.Tracking.UpdateAwayWithMakeUpTimeEntry; + +public class UpdateAwayWithMakeUpTimeEntryRequest +{ + public long Id { get; set; } + + [Required] + public required DateTime StartTime { get; set; } + + [Required] + public required DateTime EndTime { get; set; } + + [Required] + public required string Description { get; set; } + + [Required] + public required List MakeUpTimeList { get; set; } +} diff --git a/Core/Entities/EntryType.cs b/Core/Entities/EntryType.cs index cdb9dffc..d1a1c346 100644 --- a/Core/Entities/EntryType.cs +++ b/Core/Entities/EntryType.cs @@ -5,4 +5,5 @@ public enum EntryType Unspecified = 0, Task = 1, Unwell = 2, + MakeUpTime = 3, } diff --git a/Core/Entities/MakeUpTimeEntry.cs b/Core/Entities/MakeUpTimeEntry.cs new file mode 100644 index 00000000..13fe39a4 --- /dev/null +++ b/Core/Entities/MakeUpTimeEntry.cs @@ -0,0 +1,14 @@ +using Core.Entities; + +public class MakeUpTimeEntry : TrackedEntryBase +{ + // EntityFrameworkCore related empty default constructor +#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable. + public MakeUpTimeEntry() +#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable. + { + Type = EntryType.MakeUpTime; + } + + public long RelatedEntryId { get; set; } +} From c15917c113575fb436d8231939b5a3c45a751116 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Mon, 1 Jun 2026 09:39:42 +0000 Subject: [PATCH 02/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/js-client/index.ts b/js-client/index.ts index 49f1a8f1..b41d1add 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -10,6 +10,20 @@ * --------------------------------------------------------------- */ +export interface CreateAwayWithMakeUpTimeEntryRequest { + /** @format date-time */ + startTime: string; + /** @format date-time */ + endTime: string; + description: string; + makeUpTimeList: MakeUpTimeEntry[]; +} + +export interface CreateAwayWithMakeUpTimeEntryResponse { + /** @format int64 */ + newAwayWithMakeUpTimeEntryId: number; +} + export interface CreateTaskEntryRequest { title: string; /** @format date-time */ @@ -79,6 +93,28 @@ export interface GetPersonalReportResponse { unwellHours: number; } +export interface MakeUpTimeEntry { + /** @format int64 */ + relatedEntryId?: number; + /** @format int64 */ + employeeId?: number; + /** @format date-time */ + startTime?: string; + /** @format date-time */ + endTime?: string; + timeZoneId?: string | null; + /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ + duration?: string; + type?: EntryType; + /** @format date-time */ + deletedAtUtc?: string | null; + deletionReason?: string | null; + /** @format int64 */ + id?: number; + /** @format int64 */ + tenantId?: number; +} + export interface ProjectDto { /** @format int64 */ id: number; @@ -142,6 +178,17 @@ export interface UnwellEntryDto { type: EntryType; } +export interface UpdateAwayWithMakeUpTimeEntryRequest { + /** @format int64 */ + id?: number; + /** @format date-time */ + startTime: string; + /** @format date-time */ + endTime: string; + description: string; + makeUpTimeList: MakeUpTimeEntry[]; +} + export interface UpdateTaskEntryRequest { /** @format int64 */ id?: number; @@ -416,6 +463,27 @@ export class Api< ...params, }), + /** + * No description + * + * @tags Tracking + * @name TrackingCreateAwayWithMakeUpTimeEntry + * @summary Create a away with make up time entry + * @request POST:/api/tracking/away-with-make-up-time-entries + */ + trackingCreateAwayWithMakeUpTimeEntry: ( + data: CreateAwayWithMakeUpTimeEntryRequest, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/tracking/away-with-make-up-time-entries`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }), + /** * No description * @@ -458,6 +526,28 @@ export class Api< ...params, }), + /** + * No description + * + * @tags Tracking + * @name TrackingUpdateAwayWithMakeUpTimeEntry + * @summary Update a away with make up time entry + * @request POST:/api/tracking/away-with-make-up-time-entries/{awayWithMakeUpTimeEntryId} + */ + trackingUpdateAwayWithMakeUpTimeEntry: ( + awayWithMakeUpTimeEntryId: number, + data: UpdateAwayWithMakeUpTimeEntryRequest, + params: RequestParams = {}, + ) => + this.request({ + path: `/api/tracking/away-with-make-up-time-entries/${awayWithMakeUpTimeEntryId}`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }), + /** * No description * From abd69f323f71e293d806cd9dde5838b19c676a93 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Mon, 1 Jun 2026 09:41:20 +0000 Subject: [PATCH 03/21] docs(readme): bring test coverage score up to date --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index afe30445..712048f8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # inner-circle-time-api -[![coverage](https://img.shields.io/badge/e2e_coverage-27.66%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/units_coverage-24.71%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/integration_coverage-59.60%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/full_coverage-93.95%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/e2e_coverage-27.50%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/units_coverage-24.57%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/integration_coverage-59.25%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/full_coverage-93.40%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) This repo contains Inner Circle Time API. From 5729bde2d095be3e09c6990f975b3210ecd5aac1 Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Tue, 2 Jun 2026 10:04:13 +0500 Subject: [PATCH 04/21] feat: #93: add required for some property --- Core/Entities/MakeUpTimeEntry.cs | 2 +- Core/Entities/TrackedEntryBase.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Entities/MakeUpTimeEntry.cs b/Core/Entities/MakeUpTimeEntry.cs index 13fe39a4..31b64eb1 100644 --- a/Core/Entities/MakeUpTimeEntry.cs +++ b/Core/Entities/MakeUpTimeEntry.cs @@ -10,5 +10,5 @@ public MakeUpTimeEntry() Type = EntryType.MakeUpTime; } - public long RelatedEntryId { get; set; } + public required long RelatedEntryId { get; set; } } diff --git a/Core/Entities/TrackedEntryBase.cs b/Core/Entities/TrackedEntryBase.cs index 6b66d44a..dababb8e 100644 --- a/Core/Entities/TrackedEntryBase.cs +++ b/Core/Entities/TrackedEntryBase.cs @@ -9,11 +9,11 @@ public TrackedEntryBase() { } - public long EmployeeId { get; set; } + public required long EmployeeId { get; set; } - public DateTime StartTime { get; set; } + public required DateTime StartTime { get; set; } - public DateTime EndTime { get; set; } + public required DateTime EndTime { get; set; } // TODO: make it required when we add this prop to frontend public string? TimeZoneId { get; set; } From 81418eec01098058fa3bbfd29433c3f49eb49e79 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Tue, 2 Jun 2026 05:06:32 +0000 Subject: [PATCH 05/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js-client/index.ts b/js-client/index.ts index b41d1add..3360155c 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -95,13 +95,13 @@ export interface GetPersonalReportResponse { export interface MakeUpTimeEntry { /** @format int64 */ - relatedEntryId?: number; + relatedEntryId: number; /** @format int64 */ - employeeId?: number; + employeeId: number; /** @format date-time */ - startTime?: string; + startTime: string; /** @format date-time */ - endTime?: string; + endTime: string; timeZoneId?: string | null; /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ duration?: string; From 08392b2da5e0702522528983df1a17b0abeca51a Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Tue, 2 Jun 2026 10:08:58 +0500 Subject: [PATCH 06/21] refactor: #93: remove required from MakeUpTimeEntry and TrackedEntryBase --- Core/Entities/MakeUpTimeEntry.cs | 2 +- Core/Entities/TrackedEntryBase.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Entities/MakeUpTimeEntry.cs b/Core/Entities/MakeUpTimeEntry.cs index 31b64eb1..13fe39a4 100644 --- a/Core/Entities/MakeUpTimeEntry.cs +++ b/Core/Entities/MakeUpTimeEntry.cs @@ -10,5 +10,5 @@ public MakeUpTimeEntry() Type = EntryType.MakeUpTime; } - public required long RelatedEntryId { get; set; } + public long RelatedEntryId { get; set; } } diff --git a/Core/Entities/TrackedEntryBase.cs b/Core/Entities/TrackedEntryBase.cs index dababb8e..6b66d44a 100644 --- a/Core/Entities/TrackedEntryBase.cs +++ b/Core/Entities/TrackedEntryBase.cs @@ -9,11 +9,11 @@ public TrackedEntryBase() { } - public required long EmployeeId { get; set; } + public long EmployeeId { get; set; } - public required DateTime StartTime { get; set; } + public DateTime StartTime { get; set; } - public required DateTime EndTime { get; set; } + public DateTime EndTime { get; set; } // TODO: make it required when we add this prop to frontend public string? TimeZoneId { get; set; } From b7767f3f8f2e0398a3f40544428803c425dece61 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Tue, 2 Jun 2026 05:11:22 +0000 Subject: [PATCH 07/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js-client/index.ts b/js-client/index.ts index 3360155c..b41d1add 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -95,13 +95,13 @@ export interface GetPersonalReportResponse { export interface MakeUpTimeEntry { /** @format int64 */ - relatedEntryId: number; + relatedEntryId?: number; /** @format int64 */ - employeeId: number; + employeeId?: number; /** @format date-time */ - startTime: string; + startTime?: string; /** @format date-time */ - endTime: string; + endTime?: string; timeZoneId?: string | null; /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ duration?: string; From 7da74594928bc8daaf44252753cda6b2347d05c0 Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:16:50 +0500 Subject: [PATCH 08/21] fix: #93: add required attribute to TrackedEntryBase for StartTime and EndTime to generate correctly js client --- Core/Entities/TrackedEntryBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/Entities/TrackedEntryBase.cs b/Core/Entities/TrackedEntryBase.cs index 6b66d44a..3d83c9ea 100644 --- a/Core/Entities/TrackedEntryBase.cs +++ b/Core/Entities/TrackedEntryBase.cs @@ -1,3 +1,5 @@ +using System.ComponentModel.DataAnnotations; + namespace Core.Entities; public class TrackedEntryBase : EntityBase, IOwnedByEmployee, ICanBeDeleted @@ -11,8 +13,10 @@ public TrackedEntryBase() public long EmployeeId { get; set; } + [Required] public DateTime StartTime { get; set; } + [Required] public DateTime EndTime { get; set; } // TODO: make it required when we add this prop to frontend From 093b094f2a7b72236bf0928af22f9fcc53a56f36 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Tue, 2 Jun 2026 08:18:27 +0000 Subject: [PATCH 09/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js-client/index.ts b/js-client/index.ts index b41d1add..8ec82e82 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -99,9 +99,9 @@ export interface MakeUpTimeEntry { /** @format int64 */ employeeId?: number; /** @format date-time */ - startTime?: string; + startTime: string; /** @format date-time */ - endTime?: string; + endTime: string; timeZoneId?: string | null; /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ duration?: string; From 03bd28ac930a0b423608bedd0b1244b10fa57489 Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:44:40 +0500 Subject: [PATCH 10/21] refactor: #93: add MakeUpTimeEntryDto and remove required attributes from TrackedEntryBase --- .../CreateAwayWithMakeUpTimeEntryRequest.cs | 12 +++++++++++- Core/Entities/TrackedEntryBase.cs | 2 -- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs index 178f0782..84030fae 100644 --- a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs +++ b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs @@ -14,5 +14,15 @@ public class CreateAwayWithMakeUpTimeEntryRequest public required string Description { get; set; } [Required] - public required List MakeUpTimeList { get; set; } + public required List MakeUpTimeList { get; set; } +} + + +public class MakeUpTimeEntryDto +{ + [Required] + public required DateTime StartTime { get; set; } + + [Required] + public required DateTime EndTime { get; set; } } diff --git a/Core/Entities/TrackedEntryBase.cs b/Core/Entities/TrackedEntryBase.cs index 3d83c9ea..e4bf6c8d 100644 --- a/Core/Entities/TrackedEntryBase.cs +++ b/Core/Entities/TrackedEntryBase.cs @@ -13,10 +13,8 @@ public TrackedEntryBase() public long EmployeeId { get; set; } - [Required] public DateTime StartTime { get; set; } - [Required] public DateTime EndTime { get; set; } // TODO: make it required when we add this prop to frontend From 6ef30024a4ef7f2c8cc2a4f8944059188bd948b9 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Wed, 3 Jun 2026 09:46:27 +0000 Subject: [PATCH 11/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/js-client/index.ts b/js-client/index.ts index 8ec82e82..e3474dd5 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -16,7 +16,7 @@ export interface CreateAwayWithMakeUpTimeEntryRequest { /** @format date-time */ endTime: string; description: string; - makeUpTimeList: MakeUpTimeEntry[]; + makeUpTimeList: MakeUpTimeEntryDto[]; } export interface CreateAwayWithMakeUpTimeEntryResponse { @@ -99,9 +99,9 @@ export interface MakeUpTimeEntry { /** @format int64 */ employeeId?: number; /** @format date-time */ - startTime: string; + startTime?: string; /** @format date-time */ - endTime: string; + endTime?: string; timeZoneId?: string | null; /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ duration?: string; @@ -115,6 +115,13 @@ export interface MakeUpTimeEntry { tenantId?: number; } +export interface MakeUpTimeEntryDto { + /** @format date-time */ + startTime: string; + /** @format date-time */ + endTime: string; +} + export interface ProjectDto { /** @format int64 */ id: number; From be3ec00a53a54615c99dde7a1da4cd6a832a725f Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Wed, 3 Jun 2026 09:47:33 +0000 Subject: [PATCH 12/21] docs(readme): bring test coverage score up to date --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 712048f8..1a74dc93 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # inner-circle-time-api -[![coverage](https://img.shields.io/badge/e2e_coverage-27.50%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/units_coverage-24.57%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/integration_coverage-59.25%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/full_coverage-93.40%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/e2e_coverage-27.48%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/units_coverage-24.55%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/integration_coverage-59.21%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/full_coverage-93.35%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) This repo contains Inner Circle Time API. From 2c1b2454afa2628f0a431ca4e6aed299085b5cce Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:48:59 +0500 Subject: [PATCH 13/21] refactor: #93: move MakeUpTimeEntryDto to SharedDtos and remove redundant MakeUpTimeEntry entity --- .../CreateAwayWithMakeUpTimeEntryRequest.cs | 10 ---------- .../UpdateAwayWithMakeUpTimeEntryRequest.cs | 2 +- Application/SharedDtos/MakeUpTimeEntryDto.cs | 10 ++++++++++ Core/Entities/MakeUpTimeEntry.cs | 14 -------------- Core/Entities/TrackedEntryBase.cs | 2 -- 5 files changed, 11 insertions(+), 27 deletions(-) create mode 100644 Application/SharedDtos/MakeUpTimeEntryDto.cs delete mode 100644 Core/Entities/MakeUpTimeEntry.cs diff --git a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs index 84030fae..0dd7e470 100644 --- a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs +++ b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryRequest.cs @@ -16,13 +16,3 @@ public class CreateAwayWithMakeUpTimeEntryRequest [Required] public required List MakeUpTimeList { get; set; } } - - -public class MakeUpTimeEntryDto -{ - [Required] - public required DateTime StartTime { get; set; } - - [Required] - public required DateTime EndTime { get; set; } -} diff --git a/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs b/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs index a93c4739..0321711c 100644 --- a/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs +++ b/Application/Features/Tracking/UpdateAwayWithMakeUpTimeEntry/UpdateAwayWithMakeUpTimeEntryRequest.cs @@ -16,5 +16,5 @@ public class UpdateAwayWithMakeUpTimeEntryRequest public required string Description { get; set; } [Required] - public required List MakeUpTimeList { get; set; } + public required List MakeUpTimeList { get; set; } } diff --git a/Application/SharedDtos/MakeUpTimeEntryDto.cs b/Application/SharedDtos/MakeUpTimeEntryDto.cs new file mode 100644 index 00000000..80c4c5ec --- /dev/null +++ b/Application/SharedDtos/MakeUpTimeEntryDto.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +public class MakeUpTimeEntryDto +{ + [Required] + public required DateTime StartTime { get; set; } + + [Required] + public required DateTime EndTime { get; set; } +} diff --git a/Core/Entities/MakeUpTimeEntry.cs b/Core/Entities/MakeUpTimeEntry.cs deleted file mode 100644 index 13fe39a4..00000000 --- a/Core/Entities/MakeUpTimeEntry.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Core.Entities; - -public class MakeUpTimeEntry : TrackedEntryBase -{ - // EntityFrameworkCore related empty default constructor -#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable. - public MakeUpTimeEntry() -#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable. - { - Type = EntryType.MakeUpTime; - } - - public long RelatedEntryId { get; set; } -} diff --git a/Core/Entities/TrackedEntryBase.cs b/Core/Entities/TrackedEntryBase.cs index e4bf6c8d..6b66d44a 100644 --- a/Core/Entities/TrackedEntryBase.cs +++ b/Core/Entities/TrackedEntryBase.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; - namespace Core.Entities; public class TrackedEntryBase : EntityBase, IOwnedByEmployee, ICanBeDeleted From a04abcfb66087215a2c37d62ca8ea647a9a2e059 Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:50:41 +0500 Subject: [PATCH 14/21] cleanup: #93: remove MakeUpTime from EntryType --- Core/Entities/EntryType.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/Entities/EntryType.cs b/Core/Entities/EntryType.cs index d1a1c346..cdb9dffc 100644 --- a/Core/Entities/EntryType.cs +++ b/Core/Entities/EntryType.cs @@ -5,5 +5,4 @@ public enum EntryType Unspecified = 0, Task = 1, Unwell = 2, - MakeUpTime = 3, } From 2ac8dccb47df4cea20f892b5e15f2536ba2a2c52 Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Wed, 3 Jun 2026 09:50:52 +0000 Subject: [PATCH 15/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/js-client/index.ts b/js-client/index.ts index e3474dd5..ec7452be 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -93,28 +93,6 @@ export interface GetPersonalReportResponse { unwellHours: number; } -export interface MakeUpTimeEntry { - /** @format int64 */ - relatedEntryId?: number; - /** @format int64 */ - employeeId?: number; - /** @format date-time */ - startTime?: string; - /** @format date-time */ - endTime?: string; - timeZoneId?: string | null; - /** @pattern ^-?(\d+\.)?\d{2}:\d{2}:\d{2}(\.\d{1,7})?$ */ - duration?: string; - type?: EntryType; - /** @format date-time */ - deletedAtUtc?: string | null; - deletionReason?: string | null; - /** @format int64 */ - id?: number; - /** @format int64 */ - tenantId?: number; -} - export interface MakeUpTimeEntryDto { /** @format date-time */ startTime: string; @@ -193,7 +171,7 @@ export interface UpdateAwayWithMakeUpTimeEntryRequest { /** @format date-time */ endTime: string; description: string; - makeUpTimeList: MakeUpTimeEntry[]; + makeUpTimeList: MakeUpTimeEntryDto[]; } export interface UpdateTaskEntryRequest { From 963137c2992a928c38812d8da5a95878d978ec10 Mon Sep 17 00:00:00 2001 From: Dmitriy Myakotin <75628188+MDI74@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:52:06 +0500 Subject: [PATCH 16/21] format: #93: remove empty line --- .../CreateAwayWithMakeUpTimeEntryResponse.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs index b63b0727..914aa0ee 100644 --- a/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs +++ b/Application/Features/Tracking/CreateAwayWithMakeUpTimeEntry/CreateAwayWithMakeUpTimeEntryResponse.cs @@ -4,4 +4,3 @@ public class CreateAwayWithMakeUpTimeEntryResponse { public required long NewAwayWithMakeUpTimeEntryId { get; set; } } - From d68c4babb13d8e059f0c8905741bd140f0a7797d Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Wed, 3 Jun 2026 09:52:19 +0000 Subject: [PATCH 17/21] docs(readme): bring test coverage score up to date --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a74dc93..6d53e14c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # inner-circle-time-api -[![coverage](https://img.shields.io/badge/e2e_coverage-27.48%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/units_coverage-24.55%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/integration_coverage-59.21%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) -[![coverage](https://img.shields.io/badge/full_coverage-93.35%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/e2e_coverage-27.52%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/units_coverage-24.59%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/integration_coverage-59.30%25-crimson)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) +[![coverage](https://img.shields.io/badge/full_coverage-93.49%25-forestgreen)](https://github.com/TourmalineCore/inner-circle-time-api/actions/workflows/calculate-tests-coverage-on-pull-request.yml) This repo contains Inner Circle Time API. From 1f5792d35837d544e6d9e27849d4ff4e66834dbf Mon Sep 17 00:00:00 2001 From: fpandyz <5389368+fpandyz@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:00:51 +0500 Subject: [PATCH 18/21] Apply suggestion from @fpandyz --- Api/Features/Tracking/TrackingController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Api/Features/Tracking/TrackingController.cs b/Api/Features/Tracking/TrackingController.cs index e5d10a53..94661817 100644 --- a/Api/Features/Tracking/TrackingController.cs +++ b/Api/Features/Tracking/TrackingController.cs @@ -54,7 +54,7 @@ [FromServices] CreateUnwellEntryHandler createUnwellEntryHandler return createUnwellEntryHandler.HandleAsync(createUnwellRequest); } - [EndpointSummary("Create a away with make up time entry")] + [EndpointSummary("Create an away with make up time entry")] [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] [HttpPost("away-with-make-up-time-entries")] public Task CreateAwayWithMakeUpTimeEntryAsync( From fbd6e926087844af469f99be0995beef4067d4f2 Mon Sep 17 00:00:00 2001 From: fpandyz <5389368+fpandyz@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:01:17 +0500 Subject: [PATCH 19/21] Apply suggestion from @fpandyz --- Api/Features/Tracking/TrackingController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Api/Features/Tracking/TrackingController.cs b/Api/Features/Tracking/TrackingController.cs index 94661817..cc2d48b8 100644 --- a/Api/Features/Tracking/TrackingController.cs +++ b/Api/Features/Tracking/TrackingController.cs @@ -88,7 +88,7 @@ [FromServices] UpdateUnwellEntryHandler updateUnwellEntryHandler return updateUnwellEntryHandler.HandleAsync(unwellEntryId, updateUnwellEntryRequest); } - [EndpointSummary("Update a away with make up time entry")] + [EndpointSummary("Update an away with make up time entry")] [RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)] [HttpPost("away-with-make-up-time-entries/{awayWithMakeUpTimeEntryId}")] public Task UpdateAwayWithMakeUpTimeEntryAsync( From 03b49099dc53e4cf8a4d4531d7533c26efb2b75e Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Thu, 4 Jun 2026 09:02:30 +0000 Subject: [PATCH 20/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js-client/index.ts b/js-client/index.ts index ec7452be..c797b0b3 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -453,7 +453,7 @@ export class Api< * * @tags Tracking * @name TrackingCreateAwayWithMakeUpTimeEntry - * @summary Create a away with make up time entry + * @summary Create an away with make up time entry * @request POST:/api/tracking/away-with-make-up-time-entries */ trackingCreateAwayWithMakeUpTimeEntry: ( From 4ef0de44d5dfd024887b98118f17cdfbbab4a01a Mon Sep 17 00:00:00 2001 From: Workflow Action Date: Thu, 4 Jun 2026 09:03:30 +0000 Subject: [PATCH 21/21] chore(js-client): Update js-client by OpenAPI --- js-client/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js-client/index.ts b/js-client/index.ts index c797b0b3..5c4b819c 100644 --- a/js-client/index.ts +++ b/js-client/index.ts @@ -516,7 +516,7 @@ export class Api< * * @tags Tracking * @name TrackingUpdateAwayWithMakeUpTimeEntry - * @summary Update a away with make up time entry + * @summary Update an away with make up time entry * @request POST:/api/tracking/away-with-make-up-time-entries/{awayWithMakeUpTimeEntryId} */ trackingUpdateAwayWithMakeUpTimeEntry: (