-
Notifications
You must be signed in to change notification settings - Fork 121
[POS Orders] Hook createdVia from networking to business layer
#15847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,9 +78,17 @@ struct OrderListCellViewModel { | |
|
|
||
| /// Textual representation of the sales channel | ||
| /// | ||
| var salesChannel: String { | ||
| // Temporarily hardcoded. Will be handled on WOOMOB-661 | ||
| return "POS" | ||
| var salesChannel: String? { | ||
| guard let createdVia = order.createdVia else { | ||
| return nil | ||
| } | ||
|
|
||
| switch createdVia { | ||
| case "pos-rest-api": | ||
| return "POS" | ||
| default: | ||
| return nil | ||
| } | ||
|
Comment on lines
+81
to
+91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: the sales channel implementation detail could live in Yosemite, like an extension of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense 🤔 , I'll go ahead and merge this one for now, then take a spin to your suggestion in #15848 |
||
| } | ||
|
|
||
| /// The localized unabbreviated total for a given order item, which includes the currency. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👁️