Skip to content
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

Order Details view #7

Closed
astralbodies opened this issue Nov 13, 2017 · 3 comments
Closed

Order Details view #7

astralbodies opened this issue Nov 13, 2017 · 3 comments
Labels
feature: order details Related to order details.

Comments

@astralbodies
Copy link
Contributor

astralbodies commented Nov 13, 2017

4.1-Order-details.jpg

@astralbodies astralbodies changed the title View customer order details (product purchased, price, shipping info, customer sales history) View order details Jan 4, 2018
@astralbodies astralbodies changed the title View order details Order Details view Feb 8, 2018
@astralbodies astralbodies added this to the Sprint 3 milestone Feb 8, 2018
@AmandaRiu
Copy link
Contributor

@aforcier I've been thinking about the design of this specific page and was curious how you envision my fetching the data from fluxC. There are a couple ways I see this working:

Option 1
I send fluxC an orderNumber and you return a large object with all the data I would need to populate each card. So one fluxC request/response would satisfy everything the order detail view would need. The advantage of this design would be simplicity.

Option 2
I send fluxC an orderNum for each card type and get back the info required for that specific card. The advantage of this design would be card reusability. For example, the top 4 cards in the order detail view:

  • OrderDetailOrderCard
  • OrderDetailProductCard
  • OrderDetailPaymentCard
  • OrderDetailCustomerCard

Here’s a screenshot of what the above cards would cover:
Screen Shot 2018-02-20 at 2.26.20 PM.png

I could potentially have a separate FluxC call for each card such as getOrderDetailOrder(orderNum) and getOrderDetailProduct(orderNum) - and this way we could use those cards anywhere else if needed without fetching large objects.

I’m good with either option, I just wanted to throw them out there and get your feedback. Please let me know your thoughts.

@aforcier
Copy link
Contributor

@AmandaRiu since the order details will actually be contained in the OrderModels already obtained earlier in the order list view, I think it's simplest to just pass that object down to the list detail view (when an item in the list is tapped) and populate the fields directly from that object. I'm not sure the added complexity of fetching some fields separately is necessary (also we try to avoid passing around pieces of models or returning partially filled models from FluxC).

I'll try to get an updated model going for you as soon as possible for reference on the various getter methods.

@AmandaRiu
Copy link
Contributor

Order details have been implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: order details Related to order details.
Projects
None yet
Development

No branches or pull requests

3 participants