fix: cannot search shared product

This commit is contained in:
Methapon Metanipat 2024-11-08 15:13:33 +07:00
parent 9f7b4340eb
commit c44914c22f

View file

@ -522,13 +522,13 @@ async function searchProduct(isAdd: boolean = true) {
const res = await fetchListProduct({
query: inputSearchWorkProduct.value,
productGroupId: currentIdGroup.value,
shared: true,
});
if (res) {
if (isAdd) {
resultSearchProduct.value = res.result;
}
if (!isAdd) {
product.value = res.result.map((v) => {
return {