-
Notifications
You must be signed in to change notification settings - Fork 27
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
ASUB-8301 OrderInformation #2048
ASUB-8301 OrderInformation #2048
Conversation
]); | ||
const allValidUntil = offer?.campaigns?.map(c => c.validUntil !== undefined && !Number.isNaN(c.validUntil)); | ||
const maxEndDate = allValidUntil.length ? Math.max(allValidUntil) : null; | ||
const liveCampaing = offer?.campaigns?.find(c => c.validUntil === null || c.validUntil === maxEndDate); |
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.
typo liveCampaign
const allValidUntil = offer?.campaigns?.map(c => c.validUntil !== undefined && !Number.isNaN(c.validUntil)); | ||
const maxEndDate = allValidUntil.length ? Math.max(allValidUntil) : null; | ||
const liveCampaing = offer?.campaigns?.find(c => c.validUntil === null || c.validUntil === maxEndDate); | ||
localStorage.setItem(ARCXP_CAMPAIGN, liveCampaing?.name); |
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.
The ticket says save the offer campaign, in session storage ArcXP_campaignName.
Do we want to store in localStorage?
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.
@edwardcho1231 yes, by default we are using rememberMe true for login or signUp, for this reason, we need to save this info on localStorage. Thus, if the user opens a new page, the info is available
.then(() => { | ||
if (isLoggedIn) { | ||
window.location.href = checkoutURL; | ||
return; | ||
} | ||
window.location.href = `${loginURL}?redirect=${checkoutURL}`; | ||
localStorage.setItem(ARCXP_CART, JSON.stringify({sku, priceCode})); |
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.
same as above
showPriceDescription, | ||
showProductFeatures, | ||
orderDetails, | ||
className, |
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.
The ticket mentions passing
b. paymentType: ‘stripeIntents’ || ‘paypal’ || undefined
c. campaignName
Do we no longer needs these passed to OrderInformation component?
|
||
const campaignNameStored = localStorage.getItem(ARCXP_CAMPAIGN); | ||
setCampaignName(campaignNameStored); | ||
// eslint-disable-next-line |
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.
By any chance have you checked with Vito on what's the process for ignoring one off linting errors like this?
If you have not filled out the checklist below, the pr is not ready for review.
Description
save the offer campaign, in session storage ArcXP_campaignName.
*** Campaigns are unique, if the offer contains more than a single campaign save the one with the oldest end date, the same offer information will be returned when calling GET /retail/public/v1/offer/live/{campaignName} regardless of the campaign) for any of these campaigns
***We need a way to retrieve retail info, e.g. price/product description, product/price features, since those will be rendered into the component
Once the item is added. If the user is anonymous then save the sku & priceCode on the session storage ArcXP_cart. Currently, we don't have a way to transfer carts from anonymous user to logged In user. It is causing an anonymous user to be enforced to add the item into the cart again, once he/she is logged In
a. orderDetail: cart or order detail
d. offerURL
e. showOfferURL (boolean)
f. showPriceDescription (boolean)
g. ShowProductFeatures (boolean)
IF we have the orderDetail info render subtotal, tax & total based on the orderDetail. Otherwise render subtotal, tax & total from getCart();
Price description, product attributes/features & offerURL can be shown/hidden based on custom fields.
IF the user click on “View subscription offer“ redirect to offerURL
Jira Ticket
ASUB-8301
Acceptance Criteria
copy from ticket
Test Steps
git checkout {ASUB-8301_OrderInformation}
Make sure you have an item in the cart or IF an order was created, you will need to pass the orderNumber if it's the case
Effect Of Changes
Before
Example: When I clicked the search button, the button turned red.
[include screenshot or gif or link to video, storybook would be awesome]
After
Example: When I clicked the search button, the button turned green.
[include screenshot or gif or link to video, storybook would be awesome]
Dependencies or Side Effects
Examples of dependencies or side effects are:
Author Checklist
The author of the PR should fill out the following sections to ensure this PR is ready for review.
npm run lint
to check for errors. Often,npm run lint:fix
will fix those errors and warnings.npm run test:coverage
to see your progress.npm run test
, made sure all tests are passingplease explain why (so that we can fix it whenever it gets refactored).
Reviewer Checklist
The reviewer of the PR should copy-paste this template into the review comments on review.