Skip to content

Commit f64cb1c

Browse files
committed
🐛 Fix selected day not handled, 💄 Show Place description in item dialog comment
1 parent c6bb75a commit f64cb1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/src/app/modals/trip-create-day-item-modal/trip-create-day-item-modal.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class TripCreateDayItemModalComponent {
101101
});
102102

103103
if (data.selectedDay)
104-
this.itemForm.get("day_id")?.setValue(data.selectedDay);
104+
this.itemForm.get("day_id")?.setValue([data.selectedDay]);
105105
}
106106

107107
this.itemForm
@@ -122,6 +122,8 @@ export class TripCreateDayItemModalComponent {
122122
this.itemForm.get("price")?.setValue(p.price || 0);
123123
if (!this.itemForm.get("text")?.value)
124124
this.itemForm.get("text")?.setValue(p.name);
125+
if (p.description && !this.itemForm.get("comment")?.value)
126+
this.itemForm.get("comment")?.setValue(p.description);
125127
}
126128
},
127129
});

0 commit comments

Comments
 (0)