fix: properties workflow when create package

This commit is contained in:
puriphatt 2024-11-25 09:57:35 +07:00
parent 10534f2f25
commit 1df27aeed0

View file

@ -4144,16 +4144,21 @@ watch(
" "
@submit=" @submit="
(v) => { (v) => {
if (!workItems[currentWorkIndex].attributes.workflowId) { if (
!workItems[currentWorkIndex].attributes.workflowId &&
!dialogService
) {
workItems[currentWorkIndex].attributes.workflowId = v.id; workItems[currentWorkIndex].attributes.workflowId = v.id;
workItems[currentWorkIndex].attributes.workflowStep.forEach((s) => { workItems[currentWorkIndex].attributes.workflowStep.forEach(
if (!s.hasOwnProperty('productId')) { (step) => {
s.productsId = workItems[currentWorkIndex].product.map( if (!step.hasOwnProperty('productId')) {
console.log(1.1);
step.productsId = workItems[currentWorkIndex].product.map(
(p) => p.id, (p) => p.id,
); );
} }
}); },
return; );
} }
if (dialogService) { if (dialogService) {