Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public async Task GetRegistrationSitesByCurrentUser_Success_MapsSitesToGrpcRespo
FourthShiftActive = false,
FifthShiftActive = true,
SnapshotEnabled = false,
UseOneMinuteIntervals = true,
Resigned = false,
ResignedAtDate = DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc),
AvatarUrl = "https://example.com/avatar1.png",
Expand All @@ -74,6 +75,7 @@ public async Task GetRegistrationSitesByCurrentUser_Success_MapsSitesToGrpcRespo
FourthShiftActive = true,
FifthShiftActive = false,
SnapshotEnabled = true,
UseOneMinuteIntervals = false,
Resigned = true,
ResignedAtDate = new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc),
AvatarUrl = "https://example.com/avatar2.png",
Expand Down Expand Up @@ -113,6 +115,7 @@ public async Task GetRegistrationSitesByCurrentUser_Success_MapsSitesToGrpcRespo
Assert.That(site1.FourthShiftActive, Is.False);
Assert.That(site1.FifthShiftActive, Is.True);
Assert.That(site1.SnapshotEnabled, Is.False);
Assert.That(site1.UseOneMinuteIntervals, Is.True);
Assert.That(site1.Resigned, Is.False);
Assert.That(site1.AvatarUrl, Is.EqualTo("https://example.com/avatar1.png"));
Assert.That(site1.PhoneNumber, Is.EqualTo("+4512345678"));
Expand All @@ -136,6 +139,7 @@ public async Task GetRegistrationSitesByCurrentUser_Success_MapsSitesToGrpcRespo
Assert.That(site2.FourthShiftActive, Is.True);
Assert.That(site2.FifthShiftActive, Is.False);
Assert.That(site2.SnapshotEnabled, Is.True);
Assert.That(site2.UseOneMinuteIntervals, Is.False);
Assert.That(site2.Resigned, Is.True);
Assert.That(site2.AvatarUrl, Is.EqualTo("https://example.com/avatar2.png"));
Assert.That(site2.PhoneNumber, Is.EqualTo("+4587654321"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
public bool Resigned { get; set; }

public DateTime ResignedAtDate { get; set; }
public string? PhoneNumber { get; set; }

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (g, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServicePhoneNumberTests|FullyQual...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (f, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServiceExtendedTests|FullyQualifi...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (a, FullyQualifiedName=TimePlanning.Pn.Test.AbsenceRequestServiceTests|FullyQualified...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (c, FullyQualifiedName=TimePlanning.Pn.Test.PlanningServiceMultiShiftTests|FullyQuali...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (e, FullyQualifiedName=TimePlanning.Pn.Test.PushNotificationIntegrationTests|FullyQua...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (h, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServiceTests|FullyQualifiedName=T...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (d, FullyQualifiedName=TimePlanning.Pn.Test.PlanRegistrationVersionHistoryTests|Fully...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 30 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Settings/Site.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (b, FullyQualifiedName=TimePlanning.Pn.Test.PictureSnapshotServiceTests|FullyQualifie...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public bool UseOneMinuteIntervals { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ message Site {
bool resigned = 20;
google.protobuf.Timestamp resigned_at_date = 21;
string phone_number = 22;
bool use_one_minute_intervals = 23;
}

// Response wrappers matching C# OperationDataResult<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
ResignedAtDate = Timestamp.FromDateTime(
DateTime.SpecifyKind(site.ResignedAtDate, DateTimeKind.Utc)),
PhoneNumber = site.PhoneNumber ?? "",
UseOneMinuteIntervals = site.UseOneMinuteIntervals,
};
response.Model.Add(grpcSite);
}
Expand Down Expand Up @@ -318,6 +319,7 @@
ResignedAtDate = Timestamp.FromDateTime(
DateTime.SpecifyKind(site.ResignedAtDate, DateTimeKind.Utc)),
PhoneNumber = site.PhoneNumber ?? "",
UseOneMinuteIntervals = site.UseOneMinuteIntervals,
};
response.Model.Add(grpcSite);
}
Expand All @@ -326,7 +328,7 @@
return response;
}

private static Grpc.BreakDaySettings MapBreakDay(Infrastructure.Models.Settings.Day? day)

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (g, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServicePhoneNumberTests|FullyQual...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (f, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServiceExtendedTests|FullyQualifi...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (a, FullyQualifiedName=TimePlanning.Pn.Test.AbsenceRequestServiceTests|FullyQualified...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (c, FullyQualifiedName=TimePlanning.Pn.Test.PlanningServiceMultiShiftTests|FullyQuali...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (e, FullyQualifiedName=TimePlanning.Pn.Test.PushNotificationIntegrationTests|FullyQua...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (h, FullyQualifiedName=TimePlanning.Pn.Test.SettingsServiceTests|FullyQualifiedName=T...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (d, FullyQualifiedName=TimePlanning.Pn.Test.PlanRegistrationVersionHistoryTests|Fully...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 331 in eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/GrpcServices/TimePlanningSettingsGrpcService.cs

View workflow job for this annotation

GitHub Actions / test-dotnet (b, FullyQualifiedName=TimePlanning.Pn.Test.PictureSnapshotServiceTests|FullyQualifie...

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
if (day == null) return new Grpc.BreakDaySettings();
return new Grpc.BreakDaySettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ planRegistrationForToday is
FifthShiftActive = assignedSite.FifthShiftActive,
Resigned = assignedSite.Resigned,
ResignedAtDate = assignedSite.ResignedAtDate,
SnapshotEnabled = assignedSite.SnapshotEnabled
SnapshotEnabled = assignedSite.SnapshotEnabled,
UseOneMinuteIntervals = assignedSite.UseOneMinuteIntervals
};
var workerEmail = (worker.Email ?? "").Trim().ToLower();
var user = baseDbContext == null || string.IsNullOrEmpty(workerEmail) ? null : await baseDbContext.Users
Expand Down Expand Up @@ -617,7 +618,8 @@ planRegistrationForToday is
FifthShiftActive = assignedSite.FifthShiftActive,
Resigned = assignedSite.Resigned,
ResignedAtDate = assignedSite.ResignedAtDate,
SnapshotEnabled = assignedSite.SnapshotEnabled
SnapshotEnabled = assignedSite.SnapshotEnabled,
UseOneMinuteIntervals = assignedSite.UseOneMinuteIntervals
};
var workerEmail = (worker.Email ?? "").Trim().ToLower();
var user = baseDbContext == null || string.IsNullOrEmpty(workerEmail) ? null : await baseDbContext.Users
Expand Down Expand Up @@ -892,6 +894,7 @@ planRegistrationForToday is
FifthShiftActive = assignedSite.FifthShiftActive,
Resigned = assignedSite.Resigned,
ResignedAtDate = assignedSite.ResignedAtDate,
UseOneMinuteIntervals = assignedSite.UseOneMinuteIntervals,
};
var workerEmail = (worker.Email ?? "").Trim().ToLower();
var user = baseDbContext == null || string.IsNullOrEmpty(workerEmail) ? null : await baseDbContext.Users
Expand Down
Loading