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

6393 add product chooser to system chooser screen #33

Merged
merged 7 commits into from
Jan 14, 2025

Conversation

cp-at-mit
Copy link
Contributor

@cp-at-mit cp-at-mit commented Jan 13, 2025

What are the relevant tickets?

https://github.com/mitodl/hq/issues/6393

Description (What does it do?)

Adds the ability to adds products from a the selected system to the cart.

How can this be tested?

  1. Go to the cart page for a system, such as http://ue.odl.local:8072/?system=test-system-2
  2. Verify that the products in the drop-down are only products that are associated with the system specified in step 1.
  3. Select a product from the drop-down.
  4. Click add to cart button.
  5. Verify that the item shows in the cart, and the cart total is updated.
  6. Verify that you cannot add an item to the cart multiple times.

@cp-at-mit cp-at-mit marked this pull request as ready for review January 14, 2025 14:56
@cp-at-mit cp-at-mit requested a review from jkachel January 14, 2025 14:56
@cp-at-mit cp-at-mit added the Needs Review An open Pull Request that is ready for review label Jan 14, 2025
@jkachel jkachel self-assigned this Jan 14, 2025
Copy link
Contributor

@jkachel jkachel left a comment

Choose a reason for hiding this comment

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

Looks pretty good - a couple minor things to take care of.

src/app/page.tsx Outdated
<p>Loading systems...</p>
)}
</SelectSystemContainer>
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be wrapped, it can just be the SelectSystemContainer component.

src/app/page.tsx Outdated
import { styled } from "@mitodl/smoot-design";
import { Typography } from "@mui/material";
import { Typography, Button } from "@mui/material";
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a Button in smoot-design - this should use that so it matches the visual style of the rest of the app(s). (The props are pretty much the same between the two, I think, so this should be just swapping the imports. You can also pull in styled from smoot-design if you want to apply custom CSS to it too. See https://github.com/mitodl/unified-ecommerce-frontend/blob/main/src/page-components/CartSummary/CartSummary.tsx to see in action.)

@cp-at-mit cp-at-mit requested a review from jkachel January 14, 2025 19:00
Copy link
Contributor

@jkachel jkachel left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@cp-at-mit cp-at-mit merged commit 219adce into main Jan 14, 2025
5 checks passed
@cp-at-mit cp-at-mit deleted the 6393-add-product-chooser-to-system-chooser-screen branch January 14, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review An open Pull Request that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants