refactor(04): service properties acceptation

This commit is contained in:
puriphatt 2024-09-05 16:19:37 +07:00
parent 4f4de866b0
commit 6ec60cc95a
2 changed files with 22 additions and 10 deletions

View file

@ -3807,7 +3807,9 @@ watch([currentStatusList, productMode], async () => {
@work-properties="
(index) => {
currentWorkIndex = index;
tempValueProperties = workItems[index].attributes;
tempValueProperties = JSON.parse(
JSON.stringify(workItems[index].attributes),
);
openPropertiesDialog('work');
}
"
@ -3823,7 +3825,9 @@ watch([currentStatusList, productMode], async () => {
v-model:service-attributes="formDataProductService.attributes"
@service-properties="
() => {
tempValueProperties = formDataProductService.attributes;
tempValueProperties = JSON.parse(
JSON.stringify(formDataProductService.attributes),
);
openPropertiesDialog('service');
}
"
@ -3842,10 +3846,14 @@ watch([currentStatusList, productMode], async () => {
:submit="
() => {
if (currentPropertiesMode === 'service') {
formDataProductService.attributes = tempValueProperties;
formDataProductService.attributes = JSON.parse(
JSON.stringify(tempValueProperties),
);
}
if (currentPropertiesMode === 'work') {
workItems[currentWorkIndex].attributes = tempValueProperties;
workItems[currentWorkIndex].attributes = JSON.parse(
JSON.stringify(tempValueProperties),
);
}
propertiesDialog = false;
@ -4103,7 +4111,9 @@ watch([currentStatusList, productMode], async () => {
@work-properties="
(index) => {
currentWorkIndex = index;
tempValueProperties = workItems[index].attributes;
tempValueProperties = JSON.parse(
JSON.stringify(workItems[index].attributes),
);
openPropertiesDialog('work');
}
"
@ -4120,7 +4130,9 @@ watch([currentStatusList, productMode], async () => {
v-model:service-attributes="formDataProductService.attributes"
@service-properties="
() => {
tempValueProperties = formDataProductService.attributes;
tempValueProperties = JSON.parse(
JSON.stringify(formDataProductService.attributes),
);
openPropertiesDialog('service');
}
"