-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implemented: details page for pre-order catalog (#85zt0m4qc) #128
Conversation
…bs section and improved code to show skeleton text (#85zt0m4qc)
src/store/modules/job/actions.ts
Outdated
|
||
requests.push(JobService.fetchJobInformation(params).catch((error: any) => error)) | ||
|
||
resp = await Promise.all(requests) |
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.
We should use allSettled()
src/store/modules/job/actions.ts
Outdated
if (!hasError(resp[1])) { | ||
const pendingJobs = Object.values(resp[1].data.docs.reduce((jobs: [any], job: any) => { | ||
// keeping the job with the highest runTime | ||
if (!jobs[job.systemJobEnumId] || job.runTime > jobs[job.systemJobEnumId].runTime) { |
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.
We should sort by runtime and then || job.runTime > jobs[job.systemJobEnumId].runTime
will not be required
src/store/modules/user/actions.ts
Outdated
@@ -124,6 +125,9 @@ const actions: ActionTree<UserState, RootState> = { | |||
} | |||
commit(types.USER_CURRENT_ECOM_STORE_UPDATED, userPrefStore); | |||
commit(types.USER_INFO_UPDATED, userProfile); | |||
this.dispatch('util/getServiceStatusDesc') | |||
await dispatch('getReserveInvConfig', userPrefStore.productStoreId) |
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.
Get this config on page load
src/store/modules/user/actions.ts
Outdated
*/ | ||
async updatePreOrdPhyInvHoldStatus({ dispatch, state }, payload) { | ||
// Handled initial programmatical update | ||
// When storing boolean values, it is stored as string. Further comparison needs conversion |
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.
This should handled from UI
src/store/modules/user/actions.ts
Outdated
/** | ||
Update preorder physical inventory hold config | ||
*/ | ||
async updatePreOrdPhyInvHoldStatus({ dispatch, state }, payload) { |
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.
async updatePreOrdPhyInvHoldStatus({ dispatch, state }, payload) { | |
async updatePreOrdPhyInvHoldConfig({ dispatch, state }, payload) { |
src/store/modules/user/actions.ts
Outdated
@@ -153,6 +157,8 @@ const actions: ActionTree<UserState, RootState> = { | |||
'userPrefTypeId': 'SELECTED_BRAND', | |||
'userPrefValue': payload.eComStore.productStoreId | |||
}); | |||
await dispatch('getReserveInvConfig', payload.eComStore.productStoreId) | |||
await dispatch('getPreOrdPhyInvHoldConfig', payload.eComStore.productStoreId) |
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.
I think we should clear here
</div> | ||
|
||
<div> | ||
<ion-card v-if="pOAndATPDetails.isLoaded && pOSummary.isLoaded"> |
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.
isLoaded
use purpose specific properties to handle it
…ed naming (#85zt0m4qc)
… accordingly (#85zt0m4qc)
…pty values and no responses in the UI (#85zt0m4qc)
// get last active PO ID if active PO ID is not found | ||
payload = { | ||
"inputFields": { | ||
"productId": this.$route.params.variantId, |
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.
Ensure that if user hits the URL without variantId, there are no API calls
…ing configs and logic for fetching jobs (#85zt0m4qc)
// fetch fromDate only for active POs in pre-order/back-order category | ||
if (this.poSummary.isActivePo) { | ||
if (this.poSummary.categoryId) { | ||
let resp: any = await OrderService.getPoFromDate({ |
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.
Need to check if we could use fromDate field from ProductCategoryDcsnRsn
// TODO - internationalize header after getting generic strings | ||
if (!hasError(resp)) { | ||
const fromDate = resp.data.docs[0].fromDate | ||
if (this.configsByStores.length > this.poSummary.listedCount) { |
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.
Need to simplify this logic, use flags to determine decision variable and then prepare messages
Related Issues
Closes #125
Short Description and Why It's Useful
Screenshots of Visual Changes before/after (If There Are Any)
IMPORTANT NOTICE - Remember to update
CHANGELOG.md
with description of your changeContribution and Currently Important Rules Acceptance