Skip to content

Commit 5e2842e

Browse files
author
Егор Сухоруков
committed
fix web app data
1 parent 64be198 commit 5e2842e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/endpoint/Timesheet.Create/FlowStep/Step.ConfirmTimesheet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ private static string BuildWebAppUrl(this TimesheetCreateFlowState state)
105105
{
106106
var timesheet = new WebAppDataTimesheetCreateJson
107107
{
108+
Id = state.TimesheetId,
108109
Description = state.Description?.Value.OrEmpty(),
109110
Duration = state.ValueHours.GetValueOrDefault(),
110111
Project = state.Project

src/endpoint/Timesheet.Create/Internal.Json/WebAppDataTimesheetCreateJson.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
using Newtonsoft.Json;
2+
using System;
23

34
namespace GarageGroup.Internal.Timesheet;
45

56
internal readonly record struct WebAppDataTimesheetCreateJson
67
{
8+
[JsonProperty("id")]
9+
public Guid? Id { get; init; }
10+
711
[JsonProperty("duration")]
812
public decimal Duration { get; init; }
913

src/endpoint/Timesheet.Create/Internal.Json/WebAppDataTimesheetUpdateJson.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ namespace GarageGroup.Internal.Timesheet;
77
internal sealed record class WebAppDataTimesheetUpdateJson
88
{
99
[JsonProperty("id")]
10-
public Guid Id { get; init; }
10+
public Guid? Id { get; init; }
1111

1212
[JsonProperty("duration")]
13-
public decimal Duration { get; init; }
13+
public decimal? Duration { get; init; }
1414

1515
[JsonProperty("project")]
1616
public TimesheetProjectState? Project { get; init; }

0 commit comments

Comments
 (0)