feat(dashboard): Draft orders create (#6680)

**What**
- Adds Create draft order form
- Updates draft order details page to also display "custom" items.

**Note**
- Currently, the form is missing a way to input a discount code. Need to rethink this a bit, as the we can't implement the design in Figma.
- The current design is missing a way to select from a customers existing shipping addresses, we should add that to keep the features we have today.
- This PR uses `useInfiniteQuery` which does not work on our staging (due to duplicate dependencies as a result of building straight from the monorepo), so you will need to test locally.
This commit is contained in:
Kasper Fabricius Kristensen
2024-03-25 17:18:24 +00:00
committed by GitHub
parent 20132d7cea
commit 26531c5a38
54 changed files with 3414 additions and 536 deletions
@@ -62,7 +62,8 @@
"edit": "Edit",
"download": "Download",
"clearAll": "Clear all",
"apply": "Apply"
"apply": "Apply",
"add": "Add"
},
"filters": {
"date": {
@@ -391,6 +392,34 @@
"status": {
"open": "Open",
"completed": "Completed"
},
"create": {
"createDraftOrder": "Create Draft Order",
"createDraftOrderHint": "Create a new draft order to manage the details of an order before it is placed.",
"chooseRegionHint": "Choose region",
"existingItemsLabel": "Existing items",
"existingItemsHint": "Add existing products to the draft order.",
"customItemsLabel": "Custom items",
"customItemsHint": "Add custom items to the draft order.",
"addExistingItemsAction": "Add existing items",
"addCustomItemAction": "Add custom item",
"noCustomItemsAddedLabel": "No custom items added yet",
"noExistingItemsAddedLabel": "No existing items added yet",
"chooseRegionTooltip": "Choose a region first",
"useExistingCustomerLabel": "Use existing customer",
"addShippingMethodsAction": "Add shipping methods",
"unitPriceOverrideLabel": "Unit price override",
"shippingOptionLabel": "Shipping option",
"shippingOptionHint": "Choose the shipping option for the draft order.",
"shippingPriceOverrideLabel": "Shipping price override",
"shippingPriceOverrideHint": "Override the shipping price for the draft order.",
"sendNotificationLabel": "Send notification",
"sendNotificationHint": "Send a notification to the customer when the draft order is created."
},
"validation": {
"requiredEmailOrCustomer": "Email or customer is required.",
"requiredItems": "At least one item is required.",
"invalidEmail": "Email must be a valid email address."
}
},
"discounts": {
@@ -846,6 +875,7 @@
"orders": "Orders",
"account": "Account",
"total": "Total",
"totalExclTax": "Total excl. tax",
"subtotal": "Subtotal",
"shipping": "Shipping",
"tax": "Tax",
@@ -887,6 +917,7 @@
"thumbnail": "Thumbnail",
"sku": "SKU",
"managedInventory": "Managed inventory",
"allowBackorder": "Allow backorder",
"inStock": "In stock",
"location": "Location",
"quantity": "Quantity",
@@ -896,9 +927,11 @@
"maxSubtotal": "Max. Subtotal",
"shippingProfile": "Shipping Profile",
"summary": "Summary",
"details": "Details",
"label": "Label",
"rate": "Rate",
"requiresShipping": "Requires shipping",
"unitPrice": "Unit price",
"startDate": "Start date",
"endDate": "End date",
"draft": "Draft"