re-factor / cleanup

This commit is contained in:
2022-01-11 22:08:38 +00:00
parent e871708b20
commit e0be8a7cfe
251 changed files with 14680 additions and 15693 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div>
<v-row>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<gz-error :error-box-message="formState.errorBoxMessage" />
<v-col cols="12">
<gz-data-table
v-if="!jobActive"
@@ -10,17 +10,12 @@
:show-select="true"
:single-select="false"
:reload="reload"
@selection-change="handleSelected"
data-cy="attachTable"
>
</gz-data-table>
@selection-change="handleSelected"
/>
<template v-if="jobActive">
<v-progress-circular
indeterminate
color="primary"
:size="60"
></v-progress-circular>
<v-progress-circular indeterminate color="primary" :size="60" />
</template>
</v-col>
</v-row>
@@ -37,25 +32,25 @@
item-text="name"
item-value="id"
:label="$ay.t('AyaType')"
></v-select>
/>
<gz-pick-list
v-if="moveType != 0"
v-model="moveId"
:aya-type="moveType"
:show-edit-icon="false"
:include-inactive="true"
v-model="moveId"
label="Id"
></gz-pick-list>
/>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="moveDialog = false">{{
$ay.t("Cancel")
}}</v-btn>
<v-btn color="blue darken-1" text @click="moveSelected()">{{
$ay.t("OK")
}}</v-btn>
<v-spacer />
<v-btn color="blue darken-1" text @click="moveDialog = false">
{{ $ay.t("Cancel") }}
</v-btn>
<v-btn color="blue darken-1" text @click="moveSelected()">
{{ $ay.t("OK") }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
@@ -65,17 +60,6 @@
<script>
const FORM_KEY = "adm-attachments";
export default {
async created() {
this.rights = window.$gz.role.getRights(window.$gz.type.FileAttachment);
window.$gz.eventBus.$on("menu-click", clickHandler);
await fetchTranslatedText(this);
await populateSelectionLists(this);
generateMenu(this);
this.handleSelected([]); //start out read only no selection state for batch ops options
},
beforeDestroy() {
window.$gz.eventBus.$off("menu-click", clickHandler);
},
data() {
return {
jobActive: false,
@@ -100,6 +84,17 @@ export default {
}
};
},
async created() {
this.rights = window.$gz.role.getRights(window.$gz.type.FileAttachment);
window.$gz.eventBus.$on("menu-click", clickHandler);
await fetchTranslatedText(this);
await populateSelectionLists(this);
generateMenu(this);
this.handleSelected([]); //start out read only no selection state for batch ops options
},
beforeDestroy() {
window.$gz.eventBus.$off("menu-click", clickHandler);
},
methods: {
canBatchOp() {
return (
@@ -294,7 +289,7 @@ function generateMenu(vm) {
//
// Ensures UI translated text is available
//
async function fetchTranslatedText(vm) {
async function fetchTranslatedText() {
await window.$gz.translation.cacheTranslations([
"StartAttachmentMaintenanceJob",
"JobExclusiveWarning",