@@ -239,17 +239,29 @@ private extension BookingDetailsView {
239239 }
240240
241241 func bookingNotesView( ) -> some View {
242- HStack ( spacing: Layout . contentSidePadding) {
243- Image ( systemName: " plus " )
244- . font ( . title3. weight ( . medium) )
245- Text ( Localization . bookingNotesRowText)
246- . rowTextStyle ( )
247- Spacer ( )
248- }
249- . foregroundStyle ( Color . accentColor)
250- . padding ( . vertical, Layout . rowTextVerticalPadding)
251- . tappable {
252- print ( " On Add a note tap " )
242+ NavigationLink {
243+ // TODO: push booking notes editor
244+ Text ( viewModel. note)
245+ } label: {
246+ HStack ( alignment: . center, spacing: Layout . contentSidePadding) {
247+ if viewModel. note. isEmpty {
248+ Image ( systemName: " plus " )
249+ . font ( . title3. weight ( . medium) )
250+
251+ Text ( Localization . bookingNotesRowText)
252+ . rowTextStyle ( )
253+ . foregroundColor ( . accentColor)
254+ } else {
255+ Text ( viewModel. note)
256+ . rowTextStyle ( )
257+ . multilineTextAlignment ( . leading)
258+ }
259+
260+ Spacer ( )
261+
262+ DisclosureIndicator ( )
263+ }
264+ . padding ( . vertical, Layout . rowTextVerticalPadding)
253265 }
254266 }
255267}
@@ -305,9 +317,9 @@ extension BookingDetailsView {
305317
306318 /// Booking notes
307319 static let bookingNotesRowText = NSLocalizedString (
308- " BookingDetailsView.bookingNotes .addANoteRow.title " ,
320+ " BookingDetailsView.bookingNote .addANoteRow.title " ,
309321 value: " Add a note " ,
310- comment: " Add a note row title in booking notes section in booking details view. "
322+ comment: " Add a booking note section in booking details view. "
311323 )
312324 }
313325}
@@ -338,7 +350,8 @@ struct BookingDetailsView_Previews: PreviewProvider {
338350 localTimezone: " America/New_York " ,
339351 currency: " USD " ,
340352 orderInfo: nil ,
341- note: " "
353+ // note: ""
354+ note: " note note 123 note note note note note note note note note note note note note n312 ote note note note note note note note 123 note note note note note note note note note note note note note note note note note note note note note note note note note note "
342355 )
343356 let viewModel = BookingDetailsViewModel ( booking: sampleBooking)
344357 return BookingDetailsView ( viewModel)
0 commit comments