re-factor / cleanup
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
<v-row>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-select
|
||||
ref="ayaType"
|
||||
v-model="ayaType"
|
||||
:items="selectLists.coreAyaTypes"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:label="$ay.t('AyaType')"
|
||||
ref="ayaType"
|
||||
data-cy="ayaType"
|
||||
></v-select>
|
||||
</v-col>
|
||||
@@ -46,17 +46,6 @@
|
||||
<script>
|
||||
const FORM_KEY = "adm-import";
|
||||
export default {
|
||||
async created() {
|
||||
//NOTE:Global is what is checked for initialize to show this form and at server to allow import
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Global);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
await fetchTranslatedText(this);
|
||||
await populateSelectionLists(this);
|
||||
generateMenu(this);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectLists: {
|
||||
@@ -69,6 +58,17 @@ export default {
|
||||
uploading: false
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
//NOTE:Global is what is checked for initialize to show this form and at server to allow import
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Global);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
await fetchTranslatedText(this);
|
||||
await populateSelectionLists(this);
|
||||
generateMenu(this);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
},
|
||||
methods: {
|
||||
async upload() {
|
||||
//similar code in wiki-control
|
||||
@@ -131,7 +131,7 @@ function clickHandler(menuItem) {
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
function generateMenu() {
|
||||
const menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$ayiFileImport",
|
||||
@@ -147,7 +147,7 @@ function generateMenu(vm) {
|
||||
//
|
||||
// Ensures UI translated text is available
|
||||
//
|
||||
async function fetchTranslatedText(vm) {
|
||||
async function fetchTranslatedText() {
|
||||
await window.$gz.translation.cacheTranslations(["AyaType"]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user