fix: теперь отображаемая дата будет выглядеть лучше

This commit is contained in:
mfnefd 2024-12-09 00:00:17 +04:00
parent 83b75bed07
commit f67ea24260
4 changed files with 8 additions and 8 deletions

View File

@ -8,8 +8,8 @@ public static class ChangeRecordMapper
public static ChangeRecordViewModel ToView(this ChangeRecordDto dto)
=> new()
{
Id = dto.Id,
Sum = dto.Sum,
ChangedAt = dto.ChangedAt
Id = dto.Id,
Sum = dto.Sum,
ChangedAt = dto.ChangedAt.ToString("dd.MM.yyyy"),
};
}

View File

@ -9,8 +9,8 @@ public static class SpendingPlanMapper
=> new()
{
Id = dto.Id,
StartAt = dto.StartAt,
EndAt = dto.EndAt,
StartAt = dto.StartAt.ToString("dd.MM.yyyy"),
EndAt = dto.EndAt.ToString("dd.MM.yyyy"),
Sum = dto.Sum
};
}

View File

@ -4,5 +4,5 @@ public class ChangeRecordViewModel
{
public Guid Id { get; set; }
public decimal Sum { get; set; }
public DateTime ChangedAt { get; set; }
public string ChangedAt { get; set; } = null!;
}

View File

@ -3,7 +3,7 @@ namespace Contracts.ViewModels;
public class SpendingPlanViewModel
{
public Guid Id { get; set; }
public DateTime StartAt { get; set; }
public DateTime EndAt { get; set; }
public string StartAt { get; set; } = null!;
public string EndAt { get; set; } = null!;
public decimal Sum { get; set; }
}