Skip to content

Commit

Permalink
feat: junior add to sl
Browse files Browse the repository at this point in the history
  • Loading branch information
b3aton authored and kris-liu-smile committed Mar 10, 2023
1 parent b504656 commit 4e881be
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,10 @@ export const OrderShoppingList = (props: orderShoppingListProps) => {
},
}: CustomFieldItems = await getShoppingList(params)

let newList = null
if (+role === 2) {
newList = list.filter((item: CustomFieldItems) => (item.node.status === 30))

setList(newList)
if (!isB2BUser) {
setList(list)
} else {
newList = list.filter((item: CustomFieldItems) => (isB2BUser ? item.node.status === 0 : true))

const newList = list.filter((item: CustomFieldItems) => (item.node.status === +(role === 2 ? 30 : 0)))
setList(newList)
}
} finally {
Expand Down

0 comments on commit 4e881be

Please sign in to comment.