File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
WooCommerce/Classes/ViewRelated/Bookings/Booking Details Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ struct BookingDetailsView: View {
77 @State private var showingOptions = false
88 @State private var showingStatusSheet = false
99 @State private var showingCancelAlert = false
10+ @State private var notice : Notice ?
1011
1112 @ObservedObject private var viewModel : BookingDetailsViewModel
1213
@@ -95,6 +96,7 @@ struct BookingDetailsView: View {
9596 } message: {
9697 Text ( viewModel. cancellationAlertMessage)
9798 }
99+ . notice ( $notice)
98100 }
99101}
100102
@@ -144,7 +146,9 @@ private extension BookingDetailsView {
144146 case . attendance( let content) :
145147 attendanceView ( with: content)
146148 case . customer( let content) :
147- CustomerDetailsView ( content: content)
149+ CustomerDetailsView ( content: content, showNotice: {
150+ notice = $0
151+ } )
148152 case . payment( let content) :
149153 paymentDetailsView ( with: content)
150154 case . bookingNotes:
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import SwiftUI
44extension BookingDetailsView {
55 struct CustomerDetailsView : View {
66 @ObservedObject var content : BookingDetailsViewModel . CustomerContent
7+ let showNotice : ( Notice ) -> Void
78
89 private enum Row : Hashable {
910 case name( String )
@@ -77,8 +78,12 @@ extension BookingDetailsView {
7778 . padding ( . vertical, Layout . rowTextVerticalPadding)
7879 . tappable {
7980 emailText. sendToPasteboard ( )
80- let notice = Notice ( title: Localization . emailCopiedMessage, feedbackType: . success)
81- ServiceLocator . noticePresenter. enqueue ( notice: notice)
81+ showNotice (
82+ Notice (
83+ title: Localization . emailCopiedMessage,
84+ feedbackType: . success
85+ )
86+ )
8287 }
8388 }
8489
You can’t perform that action at this time.
0 commit comments