Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f41bed1
feat: #93: add away with make-up time endpoints without implementatio…
MDI74 Jun 1, 2026
c15917c
chore(js-client): Update js-client by OpenAPI
Jun 1, 2026
abd69f3
docs(readme): bring test coverage score up to date
Jun 1, 2026
5729bde
feat: #93: add required for some property
MDI74 Jun 2, 2026
81418ee
chore(js-client): Update js-client by OpenAPI
Jun 2, 2026
08392b2
refactor: #93: remove required from MakeUpTimeEntry and TrackedEntryBase
MDI74 Jun 2, 2026
be04aa4
Merge branch 'feature/#93-add-way-with-make-up-time-endpoints-without…
MDI74 Jun 2, 2026
b7767f3
chore(js-client): Update js-client by OpenAPI
Jun 2, 2026
7da7459
fix: #93: add required attribute to TrackedEntryBase for StartTime an…
MDI74 Jun 2, 2026
093b094
chore(js-client): Update js-client by OpenAPI
Jun 2, 2026
03bd28a
refactor: #93: add MakeUpTimeEntryDto and remove required attributes …
MDI74 Jun 3, 2026
63c75bd
Merge branch 'feature/#93-add-way-with-make-up-time-endpoints-without…
MDI74 Jun 3, 2026
6ef3002
chore(js-client): Update js-client by OpenAPI
Jun 3, 2026
be3ec00
docs(readme): bring test coverage score up to date
Jun 3, 2026
2c1b245
refactor: #93: move MakeUpTimeEntryDto to SharedDtos and remove redun…
MDI74 Jun 3, 2026
01c2878
Merge branch 'feature/#93-add-way-with-make-up-time-endpoints-without…
MDI74 Jun 3, 2026
a04abcf
cleanup: #93: remove MakeUpTime from EntryType
MDI74 Jun 3, 2026
2ac8dcc
chore(js-client): Update js-client by OpenAPI
Jun 3, 2026
963137c
format: #93: remove empty line
MDI74 Jun 3, 2026
d68c4ba
docs(readme): bring test coverage score up to date
Jun 3, 2026
0a0fac2
Merge branch 'feature/#93-add-way-with-make-up-time-endpoints-without…
MDI74 Jun 3, 2026
1f5792d
Apply suggestion from @fpandyz
fpandyz Jun 4, 2026
fbd6e92
Apply suggestion from @fpandyz
fpandyz Jun 4, 2026
03b4909
chore(js-client): Update js-client by OpenAPI
Jun 4, 2026
4ef0de4
chore(js-client): Update js-client by OpenAPI
Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Api/Features/Tracking/TrackingController.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -52,6 +54,16 @@ [FromServices] CreateUnwellEntryHandler createUnwellEntryHandler
return createUnwellEntryHandler.HandleAsync(createUnwellRequest);
}

[EndpointSummary("Create an away with make up time entry")]
[RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)]
[HttpPost("away-with-make-up-time-entries")]
public Task<CreateAwayWithMakeUpTimeEntryResponse> CreateAwayWithMakeUpTimeEntryAsync(
[Required][FromBody] CreateAwayWithMakeUpTimeEntryRequest createAwayWithMakeUpTimeEntryRequest
)
{
throw new NotImplementedException();
}

[EndpointSummary("Update a task entry")]
[RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)]
[HttpPost("task-entries/{taskEntryId}")]
Expand All @@ -76,6 +88,17 @@ [FromServices] UpdateUnwellEntryHandler updateUnwellEntryHandler
return updateUnwellEntryHandler.HandleAsync(unwellEntryId, updateUnwellEntryRequest);
}

[EndpointSummary("Update an away with make up time entry")]
[RequiresPermission(UserClaimsProvider.CanManagePersonalTimeTracker)]
[HttpPost("away-with-make-up-time-entries/{awayWithMakeUpTimeEntryId}")]
public Task<CreateAwayWithMakeUpTimeEntryResponse> 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")]
Expand Down
Original file line number Diff line number Diff line change
@@ -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<MakeUpTimeEntryDto> MakeUpTimeList { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Application.Features.Tracking.CreateAwayWithMakeUpTimeEntry;

public class CreateAwayWithMakeUpTimeEntryResponse
{
public required long NewAwayWithMakeUpTimeEntryId { get; set; }
}
Original file line number Diff line number Diff line change
@@ -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<MakeUpTimeEntryDto> MakeUpTimeList { get; set; }
}
10 changes: 10 additions & 0 deletions Application/SharedDtos/MakeUpTimeEntryDto.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# inner-circle-time-api

<!-- auto-generated -->
[![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.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)
<!-- auto-generated -->

This repo contains Inner Circle Time API.
Expand Down
75 changes: 75 additions & 0 deletions js-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
* ---------------------------------------------------------------
*/

export interface CreateAwayWithMakeUpTimeEntryRequest {
/** @format date-time */
startTime: string;
/** @format date-time */
endTime: string;
description: string;
makeUpTimeList: MakeUpTimeEntryDto[];
}

export interface CreateAwayWithMakeUpTimeEntryResponse {
/** @format int64 */
newAwayWithMakeUpTimeEntryId: number;
}

export interface CreateTaskEntryRequest {
title: string;
/** @format date-time */
Expand Down Expand Up @@ -79,6 +93,13 @@ export interface GetPersonalReportResponse {
unwellHours: number;
}

export interface MakeUpTimeEntryDto {
/** @format date-time */
startTime: string;
/** @format date-time */
endTime: string;
}

export interface ProjectDto {
/** @format int64 */
id: number;
Expand Down Expand Up @@ -142,6 +163,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: MakeUpTimeEntryDto[];
}

export interface UpdateTaskEntryRequest {
/** @format int64 */
id?: number;
Expand Down Expand Up @@ -416,6 +448,27 @@ export class Api<
...params,
}),

/**
* No description
*
* @tags Tracking
* @name TrackingCreateAwayWithMakeUpTimeEntry
* @summary Create an away with make up time entry
* @request POST:/api/tracking/away-with-make-up-time-entries
*/
trackingCreateAwayWithMakeUpTimeEntry: (
data: CreateAwayWithMakeUpTimeEntryRequest,
params: RequestParams = {},
) =>
this.request<CreateAwayWithMakeUpTimeEntryResponse, any>({
path: `/api/tracking/away-with-make-up-time-entries`,
method: "POST",
body: data,
type: ContentType.Json,
format: "json",
...params,
}),

/**
* No description
*
Expand Down Expand Up @@ -458,6 +511,28 @@ export class Api<
...params,
}),

/**
* No description
*
* @tags Tracking
* @name TrackingUpdateAwayWithMakeUpTimeEntry
* @summary Update an 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<CreateAwayWithMakeUpTimeEntryResponse, any>({
path: `/api/tracking/away-with-make-up-time-entries/${awayWithMakeUpTimeEntryId}`,
method: "POST",
body: data,
type: ContentType.Json,
format: "json",
...params,
}),

/**
* No description
*
Expand Down
Loading