mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Exclude falsy product_id in product filter
This commit is contained in:
@@ -731,7 +731,9 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
||||
(currentIdx: number) => {
|
||||
const selectedProductIds =
|
||||
formik.values.products
|
||||
?.filter((p, idx) => idx !== currentIdx && p.product_id !== 0)
|
||||
?.filter((p, idx) => {
|
||||
return idx !== currentIdx && p.product_id && p.product_id !== 0;
|
||||
})
|
||||
.map((p) => p.product_id) || [];
|
||||
|
||||
return productWarehouseOptions.filter(
|
||||
|
||||
Reference in New Issue
Block a user