🐛 Fix selected day not handled, 💄 Show Place description in item dialog comment

This commit is contained in:
itskovacs 2025-08-25 18:13:55 +02:00
parent c6bb75a55f
commit f64cb1c8cc

View File

@ -101,7 +101,7 @@ export class TripCreateDayItemModalComponent {
}); });
if (data.selectedDay) if (data.selectedDay)
this.itemForm.get("day_id")?.setValue(data.selectedDay); this.itemForm.get("day_id")?.setValue([data.selectedDay]);
} }
this.itemForm this.itemForm
@ -122,6 +122,8 @@ export class TripCreateDayItemModalComponent {
this.itemForm.get("price")?.setValue(p.price || 0); this.itemForm.get("price")?.setValue(p.price || 0);
if (!this.itemForm.get("text")?.value) if (!this.itemForm.get("text")?.value)
this.itemForm.get("text")?.setValue(p.name); this.itemForm.get("text")?.setValue(p.name);
if (p.description && !this.itemForm.get("comment")?.value)
this.itemForm.get("comment")?.setValue(p.description);
} }
}, },
}); });