moved t function to global and misc cleanup

This commit is contained in:
2020-04-04 17:06:25 +00:00
parent 90c388ecc2
commit 43de3c8fb0
20 changed files with 242 additions and 286 deletions

View File

@@ -17,7 +17,7 @@
:items="selectLists.listViews"
item-text="name"
item-value="id"
:label="t('DataListView')"
:label="$ay.t('DataListView')"
@input="listViewChanged"
data-cy="selectlistview"
>
@@ -37,7 +37,7 @@
class="headline ml-3 accent--text"
v-if="!loading && records.length < 1"
>
{{ t("NoData") }}
{{ $ay.t("NoData") }}
</div>
<!-- WIDE TABLE VIEW -->
<template v-if="$vuetify.breakpoint.smAndUp">
@@ -55,11 +55,11 @@
showCurrentPage: true,
showFirstLastPage: true,
itemsPerPageOptions: rowsPerPageItems,
itemsPerPageText: t('RowsPerPage'),
pageText: t('PageOfPageText')
itemsPerPageText: $ay.t('RowsPerPage'),
pageText: $ay.t('PageOfPageText')
}"
:loading-text="t('Loading')"
:no-data-text="t('NoData')"
:loading-text="$ay.t('Loading')"
:no-data-text="$ay.t('NoData')"
class="elevation-1"
data-cy="datatable-wide"
>
@@ -173,15 +173,15 @@
showCurrentPage: true,
showFirstLastPage: true,
itemsPerPageOptions: rowsPerPageItems,
itemsPerPageText: t('RowsPerPage'),
pageText: t('PageOfPageText')
itemsPerPageText: $ay.t('RowsPerPage'),
pageText: $ay.t('PageOfPageText')
}"
:loading-text="t('Loading')"
:loading-text="$ay.t('Loading')"
class="elevation-1"
data-cy="datatable-mobile"
>
<template v-slot:header="props">
<!-- Mimic the full width data table select all toggle :no-data-text="t('NoData')"-->
<!-- Mimic the full width data table select all toggle :no-data-text="$ay.t('NoData')"-->
<div
id="divSelectAll"
@click="props.toggleSelectAll(!props.everyItem)"
@@ -492,9 +492,6 @@ export default {
//i is the actual AyaNova index of vm record so we have all we need to open vm object
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
},
t(tKey) {
return window.$gz.translation.get(tKey);
},
getDataFromApi() {
let vm = this;
if (vm.loading) {
@@ -867,7 +864,7 @@ function loadFormSettings(vm) {
//add UNSAVED FILTER if -1
vm.selectLists.listViews.unshift({
name: vm.t("FilterUnsaved"),
name: vm.$ay.t("FilterUnsaved"),
id: -1
});