fix: allow save if data is empty

This commit is contained in:
2025-02-06 16:41:43 +03:00
parent 2f9d552e43
commit 74a7fe7eb6

View File

@ -69,9 +69,9 @@ export class SkipUpdateScheduleComponent {
}
validateSaveButton(): boolean {
return this.dateItems.some(item =>
return (this.dateItems.length == 0 || this.dateItems.some(item =>
(item.start && item.end) || item.date
) && JSON.stringify(this.dateItems) != JSON.stringify(this.dateItemsBefore);
)) && JSON.stringify(this.dateItems) != JSON.stringify(this.dateItemsBefore);
}
saveFunction() {