refactor(04): service properties acceptation
This commit is contained in:
parent
4f4de866b0
commit
6ec60cc95a
2 changed files with 22 additions and 10 deletions
|
|
@ -17,25 +17,25 @@ const formServiceProperties = defineModel<Attributes>('formServiceProperties');
|
||||||
|
|
||||||
const typeOption = ref([
|
const typeOption = ref([
|
||||||
{
|
{
|
||||||
label: t('text'),
|
label: 'Text',
|
||||||
value: 'string',
|
value: 'string',
|
||||||
color: 'var(--pink-6-hsl)',
|
color: 'var(--pink-6-hsl)',
|
||||||
icon: 'mdi-alpha-t',
|
icon: 'mdi-alpha-t',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('number'),
|
label: 'Number',
|
||||||
value: 'number',
|
value: 'number',
|
||||||
color: 'var(--purple-11-hsl)',
|
color: 'var(--purple-11-hsl)',
|
||||||
icon: 'mdi-numeric',
|
icon: 'mdi-numeric',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('date'),
|
label: 'Date',
|
||||||
value: 'date',
|
value: 'date',
|
||||||
color: 'var(--green-9-hsl)',
|
color: 'var(--green-9-hsl)',
|
||||||
icon: 'mdi-calendar-blank-outline',
|
icon: 'mdi-calendar-blank-outline',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('selection'),
|
label: 'Selection',
|
||||||
value: 'array',
|
value: 'array',
|
||||||
color: 'var(--indigo-7-hsl)',
|
color: 'var(--indigo-7-hsl)',
|
||||||
icon: 'mdi-code-array',
|
icon: 'mdi-code-array',
|
||||||
|
|
|
||||||
|
|
@ -3807,7 +3807,9 @@ watch([currentStatusList, productMode], async () => {
|
||||||
@work-properties="
|
@work-properties="
|
||||||
(index) => {
|
(index) => {
|
||||||
currentWorkIndex = index;
|
currentWorkIndex = index;
|
||||||
tempValueProperties = workItems[index].attributes;
|
tempValueProperties = JSON.parse(
|
||||||
|
JSON.stringify(workItems[index].attributes),
|
||||||
|
);
|
||||||
openPropertiesDialog('work');
|
openPropertiesDialog('work');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
@ -3823,7 +3825,9 @@ watch([currentStatusList, productMode], async () => {
|
||||||
v-model:service-attributes="formDataProductService.attributes"
|
v-model:service-attributes="formDataProductService.attributes"
|
||||||
@service-properties="
|
@service-properties="
|
||||||
() => {
|
() => {
|
||||||
tempValueProperties = formDataProductService.attributes;
|
tempValueProperties = JSON.parse(
|
||||||
|
JSON.stringify(formDataProductService.attributes),
|
||||||
|
);
|
||||||
openPropertiesDialog('service');
|
openPropertiesDialog('service');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
@ -3842,10 +3846,14 @@ watch([currentStatusList, productMode], async () => {
|
||||||
:submit="
|
:submit="
|
||||||
() => {
|
() => {
|
||||||
if (currentPropertiesMode === 'service') {
|
if (currentPropertiesMode === 'service') {
|
||||||
formDataProductService.attributes = tempValueProperties;
|
formDataProductService.attributes = JSON.parse(
|
||||||
|
JSON.stringify(tempValueProperties),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (currentPropertiesMode === 'work') {
|
if (currentPropertiesMode === 'work') {
|
||||||
workItems[currentWorkIndex].attributes = tempValueProperties;
|
workItems[currentWorkIndex].attributes = JSON.parse(
|
||||||
|
JSON.stringify(tempValueProperties),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
propertiesDialog = false;
|
propertiesDialog = false;
|
||||||
|
|
@ -4103,7 +4111,9 @@ watch([currentStatusList, productMode], async () => {
|
||||||
@work-properties="
|
@work-properties="
|
||||||
(index) => {
|
(index) => {
|
||||||
currentWorkIndex = index;
|
currentWorkIndex = index;
|
||||||
tempValueProperties = workItems[index].attributes;
|
tempValueProperties = JSON.parse(
|
||||||
|
JSON.stringify(workItems[index].attributes),
|
||||||
|
);
|
||||||
openPropertiesDialog('work');
|
openPropertiesDialog('work');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
@ -4120,7 +4130,9 @@ watch([currentStatusList, productMode], async () => {
|
||||||
v-model:service-attributes="formDataProductService.attributes"
|
v-model:service-attributes="formDataProductService.attributes"
|
||||||
@service-properties="
|
@service-properties="
|
||||||
() => {
|
() => {
|
||||||
tempValueProperties = formDataProductService.attributes;
|
tempValueProperties = JSON.parse(
|
||||||
|
JSON.stringify(formDataProductService.attributes),
|
||||||
|
);
|
||||||
openPropertiesDialog('service');
|
openPropertiesDialog('service');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue