This commit is contained in:
@@ -27,6 +27,38 @@
|
|||||||
@input="fieldValueChanged('name')"
|
@input="fieldValueChanged('name')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-col>
|
</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-row>
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -165,6 +197,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
filteredItems() {
|
||||||
|
return this.obj.translationItems;
|
||||||
|
},
|
||||||
canDuplicate: function() {
|
canDuplicate: function() {
|
||||||
return this.formState.valid && !this.formState.dirty && vm.rights.change;
|
return this.formState.valid && !this.formState.dirty && vm.rights.change;
|
||||||
},
|
},
|
||||||
@@ -239,7 +274,7 @@ export default {
|
|||||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||||
|
|
||||||
let res = await window.$gz.api.upsert(url, vm.obj);
|
let res = await window.$gz.api.upsert(url, vm.obj);
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
vm.formState.serverError = res.error;
|
vm.formState.serverError = res.error;
|
||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
|
|||||||
Reference in New Issue
Block a user