Small fixes and improvements:

- GuestDocument - At least one contact field is required.
- GuestDocument - List Page - Hide not useful columns: "version"
- StayEntry - Show stayEntry ID in UI msg after creation.
- StayEntry - Create Page - Time fields don't reset anymore when dates change.
- Show local times in UI instead of UTC times.
- Validators - Use expresions for dates so they are recalculated each time.
This commit is contained in:
Daniel-Garmig committed 2026-09-12 15:28:25 +02:00
1 parent 491ecc4cd1
commit c5d8487046
9 files changed
+26 -15

No files matched your search

@@ -25,7 +25,7 @@ public class GuestDocumentDTOValidator : ValueValidator<GuestDocumentDTO>
.Cascade(CascadeMode.Stop)
.NotEmpty()
.When(x => x.Nationality != GuestConsts.CountryCode_ESP)
.LessThanOrEqualTo(DateTime.Today);
.LessThanOrEqualTo(x => DateTime.Today);
RuleFor(x => x.SupportNum)
.Cascade(CascadeMode.Stop)
@@ -49,7 +49,7 @@ public class GuestDocumentDTOValidator : ValueValidator<GuestDocumentDTO>
RuleFor(x => x.BirthDate)
.NotEmpty()
.LessThanOrEqualTo(DateTime.Today);
.LessThanOrEqualTo(x => DateTime.Today);
RuleFor(x => x.Nationality)
.Cascade(CascadeMode.Stop)
@@ -66,6 +66,12 @@ public class GuestDocumentDTOValidator : ValueValidator<GuestDocumentDTO>
.Matches(RegexUtils.RegexPhoneNumber()).WithMessage("Invalid format")
.When(x => !string.IsNullOrEmpty(x.PhoneNumber));
// Phone is required if mail is empty.
RuleFor(x => x.PhoneNumber)
.NotNull()
.When(x => string.IsNullOrEmpty(x.EmailAddress))
.WithMessage("At least 1 contact field (phone or email) is required!");
RuleFor(x => x.AddressCountry)
.NotEmpty()
.Must(val => val != null && dataListService.IsValueInList(GuestConsts.DataList_CountryCodes, val));