Skip to content

Commit

Permalink
Comments cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kaulex99 committed Feb 25, 2024
1 parent e9fc2be commit 797ea6b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
1 change: 1 addition & 0 deletions WaiterRobot/Ui/Billing/BillingScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct BillingScreen: View {
}
}
}
// TODO: make only half screen when ios 15 is dropped
.sheet(isPresented: $showPayDialog) {
PayDialog(viewModel: viewModel)
}
Expand Down
2 changes: 1 addition & 1 deletion WaiterRobot/Ui/Core/FloatingActionButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct FloatingActionButton: View {
Image(systemName: icon)
.imageScale(.large)
.foregroundColor(.white)
// .fontWeight(.semibold) // TODO enable when dropped ios 15
// .fontWeight(.semibold) // TODO: enable when dropped ios 15
}
}
.buttonStyle(FloatingActionButtonStyle())
Expand Down
2 changes: 1 addition & 1 deletion WaiterRobot/Ui/Core/Navigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension View {
if let icon {
HStack {
Image(systemName: icon)
// .fontWeight(.semibold) // TODO enable when dropped iOS15
// .fontWeight(.semibold) // TODO: enable when dropped iOS15
}
.padding(.trailing, 4)
}
Expand Down
1 change: 1 addition & 0 deletions WaiterRobot/Ui/Order/OrderListItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct OrderListItem: View {
}
.foregroundColor(.blackWhite)
}
// TODO: make only half screen when ios 15 is dropped
.sheet(isPresented: $editNote) {
NavigationView {
VStack {
Expand Down
10 changes: 4 additions & 6 deletions WaiterRobot/Ui/Order/Search/ProductSearch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ struct ProductSearch: View {
var body: some View {
NavigationView {
switch onEnum(of: viewModel.state.productGroups) {
case let .loading(resource):
case .loading:
ProgressView()
case let .error(resource):
productGroupsError()
productGroupsError(error: resource)
case let .success(resource):
if let productGroups = resource.data {
productsGroupsList(productGroups: productGroups)
} else {
productGroupsError()
}
}
}
Expand Down Expand Up @@ -88,8 +86,8 @@ struct ProductSearch: View {
}
}

private func productGroupsError() -> some View {
Text("Something went wrong") // TODO: fix
private func productGroupsError(error: ResourceError<KotlinArray<ProductGroup>>) -> some View {
Text(error.userMessage)
}

private func getGroupNames(_ productGroups: [ProductGroup]) -> [String] {
Expand Down
10 changes: 1 addition & 9 deletions WaiterRobot/Ui/TableDetail/TableDetailScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ struct TableDetailScreen: View {
.handleSideEffects(of: viewModel, navigator)
}

// TODO: add refreshing and loading indicator (also check android)
private func content() -> some View {
VStack {
switch onEnum(of: viewModel.state.orderedItemsResource) {
Expand All @@ -38,15 +39,6 @@ struct TableDetailScreen: View {
}
}
}

// TODO: add refreshing and loading indicator (also check android)
// ZStack {
// tableDetails()
//
// EmbeddedFloatingActionButton(icon: "plus") {
// viewModel.actual.openOrderScreen(initialItemId: nil)
// }
// }
}

func tableDetails(orderedItems: [OrderedItem]) -> some View {
Expand Down

0 comments on commit 797ea6b

Please sign in to comment.