Skip to content

Commit 27852a4

Browse files
committed
refactor: update DateOfBirth type to DateOnly across contact person models and validators; update frontend technology descriptions
1 parent a2eff71 commit 27852a4

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

backend/Contact.Api/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Scalar.AspNetCore;
99
using System.Text;
1010

11-
1211
var builder = WebApplication.CreateBuilder(args);
1312

1413
builder.AddServiceDefaults();

backend/Contact.Application/UseCases/ContactPerson/ContactPersonResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class ContactPersonResponse
66

77
public required string FirstName { get; set; }
88
public required string LastName { get; set; }
9-
public DateTime DateOfBirth { get; set; }
9+
public DateOnly DateOfBirth { get; set; }
1010
public required string Mobile { get; set; }
1111
public required string Email { get; set; }
1212
public required string City { get; set; }

backend/Contact.Application/UseCases/ContactPerson/CreateContactPerson.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class CreateContactPerson
44
{
55
public required string FirstName { get; set; }
66
public required string LastName { get; set; }
7-
public required DateTime DateOfBirth { get; set; }
7+
public required DateOnly DateOfBirth { get; set; }
88
public required string Mobile { get; set; }
99
public required string Email { get; set; }
1010
public required string City { get; set; }

backend/Contact.Application/UseCases/ContactPerson/CreateContactPersonValidator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public CreateContactPersonValidator()
3232
.MaximumLength(10).WithMessage("Postal code cannot exceed 10 characters");
3333

3434
RuleFor(x => x.DateOfBirth)
35-
.LessThanOrEqualTo(DateTime.UtcNow).WithMessage("Date of birth cannot be in the future");
35+
.Must(date => date <= DateOnly.FromDateTime(DateTime.UtcNow))
36+
.WithMessage("Date of birth cannot be in the future");
3637
}
3738
}

backend/Contact.Application/UseCases/ContactPerson/UpdateContactPerson.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class UpdateContactPerson
55
public Guid Id { get; set; }
66
public required string FirstName { get; set; }
77
public required string LastName { get; set; }
8-
public DateTime DateOfBirth { get; set; }
8+
public DateOnly DateOfBirth { get; set; }
99
public required string Mobile { get; set; }
1010
public required string Email { get; set; }
1111
public required string City { get; set; }

backend/Contact.Domain/Entities/ContactPerson.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class ContactPerson : BaseEntity
44
{
55
public required string FirstName { get; set; }
66
public required string LastName { get; set; }
7-
public required DateTime DateOfBirth { get; set; }
7+
public required DateOnly DateOfBirth { get; set; }
88
public required string Mobile { get; set; }
99
public required string Email { get; set; }
1010
public required string City { get; set; }

frontend/src/app/feature/user/home/home.component.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,32 @@ export class HomeComponent implements OnInit {
4747
{
4848
icon: 'code',
4949
iconType: 'material',
50-
title: '.NET 9',
51-
description: 'Authentication and all REST services are developed using .NET 9 with Clean Architecture.'
50+
title: '.NET 10',
51+
description: 'Authentication and all REST services are developed using .NET 10 with Clean Architecture.'
5252
},
5353
{
5454
icon: 'web',
5555
iconType: 'material',
56-
title: 'Angular 20',
57-
description: 'Front end interfaces built with Angular 20 using signals and functional components.'
56+
title: 'Angular 21',
57+
description: 'Front end interfaces built with Angular 21 using signals and functional components.'
58+
},
59+
{
60+
icon: 'hub',
61+
iconType: 'material',
62+
title: '.NET Aspire',
63+
description: 'Cloud-ready orchestration with service discovery, health monitoring, and integrated dashboard.'
5864
},
5965
{
6066
icon: 'palette',
6167
iconType: 'material',
6268
title: 'Material Design',
63-
description: 'UI components from Angular Material with custom theming for consistent look and feel.'
69+
description: 'Material Design System with TailwindCSS v4 for modern, consistent UI.'
6470
},
6571
{
6672
icon: 'integration_instructions',
6773
iconType: 'material',
6874
title: 'Docker',
6975
description: 'Containerized application for consistent development, testing, and production environments.'
70-
},
71-
{
72-
icon: 'published_with_changes',
73-
iconType: 'material',
74-
title: 'CI/CD',
75-
description: 'Automated testing, building, and deployment of the application using GitHub Actions.'
7676
}
7777
]);
7878

0 commit comments

Comments
 (0)