This commit is contained in:
2020-06-25 00:09:19 +00:00
parent fe6ae68834
commit a8f2972850
2 changed files with 57 additions and 5 deletions

View File

@@ -5,13 +5,14 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route chang
todo: Administration - translation
todo: Administration - translation
- Replace function
Search and replace
- Export function (download as file I guess)
- Import function
On Translation editor form
- Import function
On Translations list form
todo: Translation - check can't delete in use translation
todo: help links for User, Users, Translations, Translation

View File

@@ -2,6 +2,41 @@
<v-container fluid>
<gz-report-selector ref="reportSelector"></gz-report-selector>
<!-- {{ formState }} -->
<v-row justify="center">
<v-dialog v-model="replaceDialog" persistent max-width="600px">
<v-card>
<v-card-title>
<span class="headline">{{ $ay.t("FindAndReplace") }}</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<v-col cols="12">
<v-text-field :label="$ay.t('Find')" required></v-text-field>
</v-col>
bind find and replace to fields so is sticky
add OK button bound method to do the replace
<v-col cols="12">
<v-text-field
:label="$ay.t('Replace')"
required
></v-text-field>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="replaceDialog = false">{{
$ay.t("Cancel")
}}</v-btn>
<v-btn color="blue darken-1" text @click="replaceDialog = false">{{
$ay.t("OK")
}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-row>
<v-row v-if="formState.ready">
<v-col>
<v-form ref="form">
@@ -170,6 +205,7 @@ export default {
return {
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
search: "",
replaceDialog: false,
editingActiveTranslation: false,
obj: {},
formState: {
@@ -449,6 +485,9 @@ async function clickHandler(menuItem) {
case "save":
m.vm.submit();
break;
case "replace":
m.vm.replaceDialog = true;
break;
case "delete":
m.vm.remove();
break;
@@ -566,6 +605,15 @@ function generateMenu(vm) {
});
}
if (vm.rights.change && vm.obj.stock != true) {
menuOptions.menuItems.push({
title: "FindAndReplace",
icon: null,
key: FORM_KEY + ":replace",
vm: vm
});
}
window.$gz.eventBus.$emit("menu-change", menuOptions);
}
@@ -589,7 +637,10 @@ async function fetchTranslatedText(vm) {
"Translation",
"Name",
"TranslationKey",
"TranslationDisplayText"
"TranslationDisplayText",
"FindAndReplace",
"Find",
"Replace"
]);
}