@@ -68,38 +68,52 @@ struct POSOrdersView: View {
6868
6969 @ViewBuilder
7070 private func errorView( _ error: PointOfSaleErrorState ) -> some View {
71- VStack ( spacing: 0 ) {
72- POSPageHeaderView (
73- title: POSOrderListView . Localization. ordersTitle,
74- backButtonConfiguration: . init( state: . enabled, action: {
75- isPresented = false
76- } ) )
77- . posHeaderBackButtonIcon ( systemName: " xmark " )
71+ ZStack {
72+ VStack {
73+ POSPageHeaderView (
74+ title: POSOrderListView . Localization. ordersTitle,
75+ backButtonConfiguration: . init( state: . enabled, action: {
76+ isPresented = false
77+ } ) )
78+ . posHeaderBackButtonIcon ( systemName: " xmark " )
79+ Spacer ( )
80+ }
7881
79- POSListErrorView ( error: error) {
80- Task { @MainActor in
81- await orderListModel. ordersController. loadOrders ( )
82+ VStack {
83+ Spacer ( )
84+ POSListErrorView ( error: error) {
85+ Task { @MainActor in
86+ await orderListModel. ordersController. loadOrders ( )
87+ }
8288 }
89+ Spacer ( )
8390 }
8491 }
8592 }
8693
8794 @ViewBuilder
8895 private func emptyView( ) -> some View {
89- VStack ( spacing: 0 ) {
90- POSPageHeaderView (
91- title: POSOrderListView . Localization. ordersTitle,
92- backButtonConfiguration: . init( state: . enabled, action: {
93- isPresented = false
94- } ) )
95- . posHeaderBackButtonIcon ( systemName: " xmark " )
96-
97- POSListEmptyView (
98- viewModel: POSOrderListEmptyViewModel ( isSearching: false )
99- ) {
100- Task { @MainActor in
101- await orderListModel. ordersController. loadOrders ( )
96+ ZStack {
97+ VStack {
98+ POSPageHeaderView (
99+ title: POSOrderListView . Localization. ordersTitle,
100+ backButtonConfiguration: . init( state: . enabled, action: {
101+ isPresented = false
102+ } ) )
103+ . posHeaderBackButtonIcon ( systemName: " xmark " )
104+ Spacer ( )
105+ }
106+
107+ VStack {
108+ Spacer ( )
109+ POSListEmptyView (
110+ viewModel: POSOrderListEmptyViewModel ( isSearching: false )
111+ ) {
112+ Task { @MainActor in
113+ await orderListModel. ordersController. loadOrders ( )
114+ }
102115 }
116+ Spacer ( )
103117 }
104118 }
105119 }
0 commit comments