This commit is contained in:
2020-06-24 13:25:29 +00:00
parent 5078e80a20
commit 223975310b

View File

@@ -27,6 +27,38 @@
@input="fieldValueChanged('name')"
></v-text-field>
</v-col>
<!-- ----------------------- -->
<v-col cols="12">
<div>
<v-data-table
:headers="[
{
text: 'Key',
align: 'start',
sortable: false,
value: 'key'
},
{ text: 'Display', value: 'display' }
]"
:items="filteredItems()"
>
<template v-slot:item.name="props">
<v-edit-dialog :return-value.sync="props.item.display">
{{ props.item.display }}
<template v-slot:input>
<v-text-field
v-model="props.item.display"
label="Edit"
single-line
counter
></v-text-field>
</template>
</v-edit-dialog>
</template>
</v-data-table>
</div>
</v-col>
<!-- ------------------- -->
</v-row>
</v-form>
</v-col>
@@ -165,6 +197,9 @@ export default {
}
},
methods: {
filteredItems() {
return this.obj.translationItems;
},
canDuplicate: function() {
return this.formState.valid && !this.formState.dirty && vm.rights.change;
},
@@ -239,7 +274,7 @@ export default {
window.$gz.form.deleteAllErrorBoxErrors(vm);
let res = await window.$gz.api.upsert(url, vm.obj);
console.log(res)
console.log(res);
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);