Added validation for InspectionDate and set a maximum year restriction in InspectionView.

This commit is contained in:
retr0volkov
2025-07-30 13:10:25 +03:00 Unverified
parent 08eaa30209
commit c1f0c8714f
5 changed files with 12 additions and 9 deletions
+2
View File
@@ -66,6 +66,8 @@ public partial class InspectionViewModel : ViewModelBase
{
Inspection.Name = Name;
Inspection.CreationDate = CreationDate;
if (InspectionDate.Year > 2500)
InspectionDate = DateTimeOffset.Now;
Inspection.InspectionDate = InspectionDate;
Inspection.PeriodType = PeriodType.ToDescription();
Inspection.PeriodValue = PeriodValue;