fix: package => disable work product step checkbox when readonly

This commit is contained in:
puriphatt 2024-11-19 17:38:43 +07:00
parent f6645b0a86
commit 2784922557

View file

@ -108,16 +108,6 @@ watch(
} }
}, },
); );
watch(
() => attributes.value.workflowId,
() => {
if (props.readonly) return;
attributes.value.workflowStep.forEach((s) => {
s.productsId = productItems.value.map((p) => p.id);
});
},
);
</script> </script>
<template> <template>
<div class="bordered rounded"> <div class="bordered rounded">
@ -619,7 +609,10 @@ watch(
].productsId.includes(product.id) ].productsId.includes(product.id)
" "
@click=" @click="
toggleCheckProductInStep(product.id, stepIndex) () => {
if (readonly) return;
toggleCheckProductInStep(product.id, stepIndex);
}
" "
size="xs" size="xs"
/> />