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="
(v) => {
if (!workItems[currentWorkIndex].attributes.workflowId) {
if (
!workItems[currentWorkIndex].attributes.workflowId &&
!dialogService
) {
workItems[currentWorkIndex].attributes.workflowId = v.id;
workItems[currentWorkIndex].attributes.workflowStep.forEach((s) => {
if (!s.hasOwnProperty('productId')) {
s.productsId = workItems[currentWorkIndex].product.map(
(p) => p.id,
);
}
});
return;
workItems[currentWorkIndex].attributes.workflowStep.forEach(
(step) => {
if (!step.hasOwnProperty('productId')) {
console.log(1.1);
step.productsId = workItems[currentWorkIndex].product.map(
(p) => p.id,
);
}
},
);
}
if (dialogService) {