Skip to content

Commit c93c835

Browse files
authored
Merge pull request #5439 from woocommerce/issue/5405-new-order-screen
Order Creation: Basic UI for New Order screen
2 parents 1f95fdb + 291fd76 commit c93c835

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import SwiftUI
2+
3+
/// View to create a new manual order
4+
///
5+
struct NewOrder: View {
6+
var body: some View {
7+
ScrollView {
8+
EmptyView()
9+
}
10+
.background(Color(.listBackground))
11+
.ignoresSafeArea(.container, edges: [.horizontal, .bottom])
12+
.navigationTitle(Localization.title)
13+
.navigationBarTitleDisplayMode(.inline)
14+
.toolbar {
15+
ToolbarItem(placement: .confirmationAction) {
16+
Button(action: {
17+
// TODO-5405 - Add create order action
18+
}, label: {
19+
Text(Localization.createButton)
20+
})
21+
}
22+
}
23+
}
24+
}
25+
26+
// MARK: Constants
27+
private extension NewOrder {
28+
enum Localization {
29+
static let title = NSLocalizedString("New Order", comment: "Title for the order creation screen")
30+
static let createButton = NSLocalizedString("Create", comment: "Button to create an order on the New Order screen")
31+
}
32+
}
33+
34+
struct NewOrder_Previews: PreviewProvider {
35+
static var previews: some View {
36+
NavigationView {
37+
NewOrder()
38+
}
39+
}
40+
}

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,7 @@
10981098
CCFC010C23E9BD5500157A78 /* stats_orders-year.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E623E9BD5500157A78 /* stats_orders-year.json */; };
10991099
CCFC010D23E9BD5500157A78 /* stats_top_earners-month.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E723E9BD5500157A78 /* stats_top_earners-month.json */; };
11001100
CCFC010E23E9BD5500157A78 /* stats_visits-day.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E823E9BD5500157A78 /* stats_visits-day.json */; };
1101+
CCFC50552743BC0D001E505F /* NewOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCFC50542743BC0D001E505F /* NewOrder.swift */; };
11011102
CE0F17CF22A8105800964A63 /* ReadMoreTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0F17CD22A8105800964A63 /* ReadMoreTableViewCell.swift */; };
11021103
CE0F17D022A8105800964A63 /* ReadMoreTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE0F17CE22A8105800964A63 /* ReadMoreTableViewCell.xib */; };
11031104
CE0F17D222A8308900964A63 /* FancyAlertController+PurchaseNote.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0F17D122A8308900964A63 /* FancyAlertController+PurchaseNote.swift */; };
@@ -2572,6 +2573,7 @@
25722573
CCFC00E823E9BD5500157A78 /* stats_visits-day.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "stats_visits-day.json"; sourceTree = "<group>"; };
25732574
CCFC011023E9E3F400157A78 /* start.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = start.sh; sourceTree = "<group>"; };
25742575
CCFC011123E9E40B00157A78 /* stop.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = stop.sh; sourceTree = "<group>"; };
2576+
CCFC50542743BC0D001E505F /* NewOrder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewOrder.swift; sourceTree = "<group>"; };
25752577
CE0F17CD22A8105800964A63 /* ReadMoreTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMoreTableViewCell.swift; sourceTree = "<group>"; };
25762578
CE0F17CE22A8105800964A63 /* ReadMoreTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReadMoreTableViewCell.xib; sourceTree = "<group>"; };
25772579
CE0F17D122A8308900964A63 /* FancyAlertController+PurchaseNote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FancyAlertController+PurchaseNote.swift"; sourceTree = "<group>"; };
@@ -5898,6 +5900,14 @@
58985900
path = stats;
58995901
sourceTree = "<group>";
59005902
};
5903+
CCFC50532743BBBF001E505F /* Order Creation */ = {
5904+
isa = PBXGroup;
5905+
children = (
5906+
CCFC50542743BC0D001E505F /* NewOrder.swift */,
5907+
);
5908+
path = "Order Creation";
5909+
sourceTree = "<group>";
5910+
};
59015911
CE14452C2188C0EC00A991D8 /* Zendesk */ = {
59025912
isa = PBXGroup;
59035913
children = (
@@ -5925,6 +5935,7 @@
59255935
CEE006022077D0F80079161F /* Cells */,
59265936
CE35F1092343E482007B2A6B /* Order Details */,
59275937
2678897A270E6E3C00BD249E /* Simple Payments */,
5938+
CCFC50532743BBBF001E505F /* Order Creation */,
59285939
CEE005F52076C4040079161F /* Orders.storyboard */,
59295940
57C503DB23E8C70C00EC0790 /* OrdersTabbedViewController.swift */,
59305941
57C503DD23E8CE0D00EC0790 /* OrdersTabbedViewController.xib */,
@@ -8042,6 +8053,7 @@
80428053
DE68B81F26F86B1700C86CFB /* OfflineBannerView.swift in Sources */,
80438054
02D4564C231D05E2008CF0A9 /* BetaFeaturesViewController.swift in Sources */,
80448055
D8610BCC256F284700A5DF27 /* ULErrorViewModel.swift in Sources */,
8056+
CCFC50552743BC0D001E505F /* NewOrder.swift in Sources */,
80458057
4590CEE4249BA46700949F05 /* AddProductCategoryViewController.swift in Sources */,
80468058
CE37C04422984E81008DCB39 /* PickListTableViewCell.swift in Sources */,
80478059
020DD48D2322A617005822B1 /* ProductsTabProductViewModel.swift in Sources */,

0 commit comments

Comments
 (0)