origin/main #1

Merged
francescoalbano merged 8 commits from origin/main into main 2025-11-12 15:49:52 +01:00
Showing only changes of commit d364052b4d - Show all commits

View File

@ -2027,13 +2027,16 @@ export class TripComponent implements AfterViewInit {
next: () => { next: () => {
this.trip!.attachments = this.trip?.attachments?.filter((att) => att.id != attachmentId); this.trip!.attachments = this.trip?.attachments?.filter((att) => att.id != attachmentId);
let modifiedItem = false; let modifiedItem = false;
this.trip?.days.forEach(d => d.items.forEach(i => { this.trip?.days.forEach((d) =>
d.items.forEach((i) => {
if (i.attachments?.length) { if (i.attachments?.length) {
i.attachments = i.attachments.filter(attachment => attachment.id != attachmentId); i.attachments = i.attachments.filter((attachment) => attachment.id != attachmentId);
modifiedItem = true; modifiedItem = true;
} }
})) }),
if (this.selectedItem?.attachments?.length) this.selectedItem.attachments = this.selectedItem.attachments.filter((a) => a.id != attachmentId); );
if (this.selectedItem?.attachments?.length)
this.selectedItem.attachments = this.selectedItem.attachments.filter((a) => a.id != attachmentId);
if (modifiedItem) this.flattenTripDayItems(); if (modifiedItem) this.flattenTripDayItems();
}, },
}); });