diff --git a/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs b/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs index 359abe9..18ba10d 100644 --- a/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs +++ b/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs @@ -163,7 +163,7 @@ public class AllocationService : IAllocationService Unit = unit, TotalQuota = totalQuota, CreatedByUnitId = createdByUnitId, - CreatedAt = DateTime.UtcNow + CreatedAt = DateTime.Now }; _context.MaterialAllocations.Add(allocation); diff --git a/src/frontend/src/views/allocations/AllocationList.vue b/src/frontend/src/views/allocations/AllocationList.vue index 8f41aa6..32105de 100644 --- a/src/frontend/src/views/allocations/AllocationList.vue +++ b/src/frontend/src/views/allocations/AllocationList.vue @@ -436,6 +436,7 @@ const filteredAllocations = computed(() => { }) function formatDate(dateStr: string): string { + if (!dateStr) return '-' const date = new Date(dateStr) const year = date.getFullYear() const month = String(date.getMonth() + 1).padStart(2, '0')