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

Add <LineItems> component #292

Merged
merged 4 commits into from
Aug 14, 2023
Merged

Add <LineItems> component #292

merged 4 commits into from
Aug 14, 2023

Conversation

marcomontalbano
Copy link
Member

What I did

I created a new <LineItems> component. This component is able to render an array of line_items, parcel_line_items, and stock_line_items and we could add more in the future (e.g. return_line_items).

There's an editable prop that works only for line_items. When true you can update the lineItem quantity or remove the lineItem.

<LineItems items={[]} editable />
Order.LineItems.mov

Relevant changes

  • <OrderSummary> has been updated and now it uses the LineItems component.
  • <ShipmentParcels> has been updated and now it uses the LineItems component.

Next Steps

  • There're other components in our app-* that implement a custom LineItem, we should remove them and start using <LineItems> instead.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

Copy link
Contributor

@malessani malessani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 It looks like a very good component that is going to simplify the applications that will require line items component!

@marcomontalbano marcomontalbano merged commit 845b025 into main Aug 14, 2023
1 check passed
@marcomontalbano marcomontalbano deleted the line-items branch August 14, 2023 16:21
@marcomontalbano marcomontalbano added the enhancement New feature or request label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants