File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
ViewModels/Booking Details
ViewRelated/Bookings/Booking Details Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ final class BookingDetailsViewModel: ObservableObject {
2727
2828 @Published private( set) var navigationTitle = " "
2929 @Published private( set) var sections : [ Section ] = [ ]
30+ @Published var notice : Notice ?
3031
3132 var bookingAttendanceStatus : BookingAttendanceStatus {
3233 booking. attendanceStatus
@@ -243,12 +244,12 @@ extension BookingDetailsViewModel {
243244 }
244245
245246 private func displayAttendanceStatusUpdatedErrorNotice( status: BookingAttendanceStatus ) {
246- let title = String . localizedStringWithFormat (
247+ let text = String . localizedStringWithFormat (
247248 Localization . bookingAttendanceStatusUpdateFailedMessage,
248249 booking. bookingID
249250 )
250- let notice = Notice (
251- title : title ,
251+ self . notice = Notice (
252+ message : text ,
252253 feedbackType: . error,
253254 actionTitle: Localization . retryActionTitle
254255 ) { [ weak self] in
@@ -258,8 +259,6 @@ extension BookingDetailsViewModel {
258259
259260 updateAttendanceStatus ( to: status)
260261 }
261-
262- ServiceLocator . noticePresenter. enqueue ( notice: notice)
263262 }
264263}
265264
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ struct BookingDetailsView: View {
103103 Text ( viewModel. cancellationAlertMessage)
104104 }
105105 . notice ( $notice)
106+ . notice ( $viewModel. notice)
106107 }
107108}
108109
You can’t perform that action at this time.
0 commit comments