case 4227

This commit is contained in:
2022-11-03 23:08:04 +00:00
parent 4a0dbb6895
commit 991a34a13d

View File

@@ -111,15 +111,15 @@
>
<v-edit-dialog
large
:return-value.sync="props.item.display"
:cancel-text="$ay.t('Cancel')"
:save-text="$ay.t('OK')"
@save="saveItem()"
@open="openEditDialog(props.item)"
>
{{ props.item.display }}
<template v-slot:input>
<v-text-field
v-model="props.item.display"
v-model="editText"
dense
single-line
></v-text-field>
@@ -167,7 +167,9 @@ export default {
serverError: {}
},
rights: window.$gz.role.defaultRightsObject(),
ayaType: window.$gz.type.Translation
ayaType: window.$gz.type.Translation,
editItem: {},
editText: ""
};
},
computed: {
@@ -283,11 +285,19 @@ export default {
this.replaceDialog = false;
},
saveItem() {
if (this.editText == null || this.editText == "") {
return;
}
this.editItem.display = this.editText;
window.$gz.form.setFormState({
vm: this,
dirty: true
});
},
openEditDialog(item) {
this.editItem = item;
this.editText = item.display;
},
canDuplicate: function() {
return (
this.formState.valid && !this.formState.dirty && this.rights.change