Skip to content

Commit

Permalink
fix: quote and shoppingList back issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and CarlLiu2023 committed Jun 6, 2023
1 parent 66fdf5a commit 1648afc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/storefront/src/pages/quote/QuoteDraft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ function QuoteDraft({ setOpenPage }: QuoteDraftProps) {
}

const backText = () => {
let text = +role === 100 ? 'Back' : 'to quote lists'
let text = +role === 100 ? 'Back' : 'Back to quote lists'
if (openAPPParams?.quoteBtn === 'open') {
text = 'Back'
} else if (openAPPParams?.quoteBtn === 'add') {
Expand Down
14 changes: 14 additions & 0 deletions apps/storefront/src/pages/quote/QuotesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ function QuotesList() {
customer,
companyInfo: { id: companyB2BId },
salesRepCompanyId,
openAPPParams,
},
dispatch,
} = useContext(GlobaledContext)

useEffect(() => {
Expand All @@ -201,6 +203,18 @@ function QuotesList() {
}

initFilter()

if (openAPPParams.quoteBtn) {
dispatch({
type: 'common',
payload: {
openAPPParams: {
quoteBtn: '',
shoppingListBtn: '',
},
},
})
}
}, [])

const goToDetail = (item: ListItem, status: number) => {
Expand Down
14 changes: 14 additions & 0 deletions apps/storefront/src/pages/shoppingLists/ShoppingLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ function ShoppingLists() {
currentChannelId,
companyInfo: { id: companyB2BId },
salesRepCompanyId,
openAPPParams,
},
dispatch,
} = useContext(GlobaledContext)

useEffect(() => {
Expand All @@ -68,6 +70,18 @@ function ShoppingLists() {
}

initFilter()

if (openAPPParams.shoppingListBtn) {
dispatch({
type: 'common',
payload: {
openAPPParams: {
quoteBtn: '',
shoppingListBtn: '',
},
},
})
}
}, [])

const isExtraLarge = useCardListColumn()
Expand Down

0 comments on commit 1648afc

Please sign in to comment.