This commit is contained in:
2021-07-21 23:09:04 +00:00
parent 38d1f386c6
commit 91d0692fd8
2 changed files with 23 additions and 22 deletions

View File

@@ -463,6 +463,8 @@ CASES TODO:
bugbug: data tables are showing the translation key, not the translation in the top of the list, however the page title is correctly translated
wtf?
AdministrationGlobalSettings showing instead of translation? Is this valid
3721 1: make labor rate mandatory on workorderitemlabor record and import v7 with some kind of dummy rate if not filled in there
um...be sure about this, mandatory stuff kind of sucks, what's up in that case?
@@ -1244,5 +1246,6 @@ BUILD 116
seeds the default loan item list to show the shadow units
this is all to more easily illustrate how to use this feature for evaluators
- Application title bar fixed regression bug where it was not showing translation for main data table forms but was showing translation key instead
it should show the data table list name when it's a main data table list and if it's an individual record opened then it should show the record name or closest equivalent (serial for wo etc)

View File

@@ -145,11 +145,9 @@
></v-app-bar-nav-icon>
<v-toolbar-title class="ml-n5 ml-sm-0 pl-sm-4">
<v-icon>{{ appBar.icon }}</v-icon>
<span
v-if="appBar.title"
class="text-subtitle-2 ml-2 text-sm-h6 ml-sm-4"
>{{ appBar.title }}</span
>
<span class="text-subtitle-2 ml-2 text-sm-h6 ml-sm-4">{{
titleDisplay
}}</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<!-- All users can see this, they may not be able to subscribe to notifications but they may see direct or system notifications for any account so this is always available -->
@@ -383,28 +381,28 @@ export default {
},
helpUrl() {
return this.$store.state.helpUrl;
},
titleDisplay() {
if (this.appBar.title == null) {
return null;
}
if (this.appBar.title.includes(":")) {
const t = this.appBar.title.split(":");
return t[1] + " " + this.$ay.t(t[0]);
}
if (this.appBar.isMain) {
//if ismain then it's a translation key
return this.$ay.t(this.appBar.title);
} else {
//if not ismain then it's a record name
return this.appBar.title;
}
}
},
props: {
source: { type: String, default: null }
},
methods: {
titleDisplay() {
//Allow for extra info in title
if (this.appBar.title == null) {
return null;
}
if (this.appBar.title.includes(":")) {
const t = this.appBar.title.split(":");
// if (this.$vuetify.breakpoint.smAndUp) {
// return this.$ay.t(t[0]) + " " + t[1];
// } else {
return t[1] + " " + this.$ay.t(t[0]);
//}
}
return this.$ay.t(this.appBar.title);
},
afterLeave() {
this.$root.$emit("triggerScroll");
},