This commit is contained in:
@@ -30,7 +30,7 @@ function dealWithError(msg, vm) {
|
||||
if (vm) {
|
||||
if (vm.$gzdevmode()) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!vm.$_.has(vm, "formState.appError")) {
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,16 +61,16 @@ export default {
|
||||
confirmDelete(vm) {
|
||||
//https://github.com/yariksav/vuetify-dialog#readme
|
||||
return vm.$dialog.warning({
|
||||
text: vm.$gzlocale.get("DeletePrompt"),
|
||||
title: vm.$gzlocale.get("Delete"),
|
||||
text: window.$gz.locale.get("DeletePrompt"),
|
||||
title: window.$gz.locale.get("Delete"),
|
||||
icon: "fa-exclamation-triangle",
|
||||
actions: [
|
||||
{
|
||||
text: vm.$gzlocale.get("Cancel"),
|
||||
text: window.$gz.locale.get("Cancel"),
|
||||
key: false
|
||||
},
|
||||
{
|
||||
text: vm.$gzlocale.get("Delete"),
|
||||
text: window.$gz.locale.get("Delete"),
|
||||
color: "red",
|
||||
key: true
|
||||
}
|
||||
@@ -81,16 +81,16 @@ export default {
|
||||
//
|
||||
confirmLeaveUnsaved(vm) {
|
||||
return vm.$dialog.warning({
|
||||
text: vm.$gzlocale.get("AreYouSureUnsavedChanges"),
|
||||
title: vm.$gzlocale.get("Leave"),
|
||||
text: window.$gz.locale.get("AreYouSureUnsavedChanges"),
|
||||
title: window.$gz.locale.get("Leave"),
|
||||
icon: "fa-exclamation-triangle",
|
||||
actions: [
|
||||
{
|
||||
text: vm.$gzlocale.get("Cancel"),
|
||||
text: window.$gz.locale.get("Cancel"),
|
||||
key: false
|
||||
},
|
||||
{
|
||||
text: vm.$gzlocale.get("Leave"),
|
||||
text: window.$gz.locale.get("Leave"),
|
||||
color: "red",
|
||||
key: true
|
||||
}
|
||||
@@ -103,12 +103,12 @@ export default {
|
||||
displayLTErrorMessage(vm, ltKeyText, ltKeyTitle = undefined) {
|
||||
//https://github.com/yariksav/vuetify-dialog#readme
|
||||
return vm.$dialog.error({
|
||||
text: ltKeyText ? vm.$gzlocale.get(ltKeyText) : "",
|
||||
title: ltKeyTitle ? vm.$gzlocale.get(ltKeyTitle) : "",
|
||||
text: ltKeyText ? window.$gz.locale.get(ltKeyText) : "",
|
||||
title: ltKeyTitle ? window.$gz.locale.get(ltKeyTitle) : "",
|
||||
icon: "fa-exclamation-triangle",
|
||||
actions: [
|
||||
{
|
||||
text: vm.$gzlocale.get("OK"),
|
||||
text: window.$gz.locale.get("OK"),
|
||||
key: true
|
||||
}
|
||||
]
|
||||
@@ -119,9 +119,9 @@ export default {
|
||||
async getReportChoice(vm, reports, preselected) {
|
||||
const result = await vm.$dialog.showAndWait(reportChooser, {
|
||||
reports: reports,
|
||||
title: vm.$gzlocale.get("Report"),
|
||||
oktext: vm.$gzlocale.get("Print"),
|
||||
canceltext: vm.$gzlocale.get("Cancel"),
|
||||
title: window.$gz.locale.get("Report"),
|
||||
oktext: window.$gz.locale.get("Print"),
|
||||
canceltext: window.$gz.locale.get("Cancel"),
|
||||
selectedvalue: preselected
|
||||
});
|
||||
return result;
|
||||
|
||||
@@ -80,11 +80,11 @@ function getControlLabel(ctrl) {
|
||||
function getErrorsForField(vm, ref) {
|
||||
var ret = [];
|
||||
if (ref == "errorbox") {
|
||||
ret = vm.$_.filter(vm.formState.serverError.details, function(o) {
|
||||
ret = window.$gz._.filter(vm.formState.serverError.details, function(o) {
|
||||
return !o.target;
|
||||
});
|
||||
} else {
|
||||
ret = vm.$_.filter(vm.formState.serverError.details, function(o) {
|
||||
ret = window.$gz._.filter(vm.formState.serverError.details, function(o) {
|
||||
if (!o.target) {
|
||||
return false;
|
||||
}
|
||||
@@ -142,11 +142,11 @@ export default {
|
||||
}
|
||||
|
||||
// "ErrorRequiredFieldEmpty": "{0} is a required field. Please enter a value for {0}",
|
||||
var err = vm.$gzlocale.get("ErrorRequiredFieldEmpty");
|
||||
var err = window.$gz.locale.get("ErrorRequiredFieldEmpty");
|
||||
var fieldName = getControlLabel(ctrl);
|
||||
err = vm.$_.replace(err, "{0}", fieldName);
|
||||
err = window.$gz._.replace(err, "{0}", fieldName);
|
||||
//lodash replace only replaces first instance so need to do it twice
|
||||
err = vm.$_.replace(err, "{0}", fieldName);
|
||||
err = window.$gz._.replace(err, "{0}", fieldName);
|
||||
//Update the form status
|
||||
this.setFormState({
|
||||
vm: vm,
|
||||
@@ -174,10 +174,10 @@ export default {
|
||||
if (value.length > max) {
|
||||
//get the localized rule text
|
||||
// "ErrorFieldLengthExceeded": "{0} can not exceed {1} characters.",
|
||||
var err = vm.$gzlocale.get("ErrorFieldLengthExceeded");
|
||||
var err = window.$gz.locale.get("ErrorFieldLengthExceeded");
|
||||
var fieldName = getControlLabel(ctrl);
|
||||
err = vm.$_.replace(err, "{0}", fieldName);
|
||||
err = vm.$_.replace(err, "{1}", max);
|
||||
err = window.$gz._.replace(err, "{0}", fieldName);
|
||||
err = window.$gz._.replace(err, "{1}", max);
|
||||
//Update the form status
|
||||
this.setFormState({
|
||||
vm: vm,
|
||||
@@ -235,7 +235,7 @@ export default {
|
||||
|
||||
if (valueStart.isAfter(valueEnd)) {
|
||||
// "ErrorStartDateAfterEndDate": "Start date must be earlier than stop / end date",
|
||||
var err = vm.$gzlocale.get("ErrorStartDateAfterEndDate");
|
||||
var err = window.$gz.locale.get("ErrorStartDateAfterEndDate");
|
||||
//Update the form status
|
||||
this.setFormState({
|
||||
vm: vm,
|
||||
@@ -271,7 +271,7 @@ export default {
|
||||
}
|
||||
|
||||
// "ErrorFieldValueNotInteger": "Value must be an integer"
|
||||
var err = vm.$gzlocale.get("ErrorFieldValueNotInteger");
|
||||
var err = window.$gz.locale.get("ErrorFieldValueNotInteger");
|
||||
//Update the form status
|
||||
this.setFormState({
|
||||
vm: vm,
|
||||
@@ -288,7 +288,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
//TODO: Handle commas and spaces in numbers
|
||||
//as per vm.$gzlocale rules for numbers
|
||||
//as per window.$gz.locale rules for numbers
|
||||
|
||||
var ctrl = getControl(vm, ref);
|
||||
if (typeof ctrl == "undefined") {
|
||||
@@ -308,7 +308,7 @@ export default {
|
||||
}
|
||||
|
||||
// "ErrorFieldValueNotDecimal": "Value must be a number"
|
||||
var err = vm.$gzlocale.get("ErrorFieldValueNotDecimal");
|
||||
var err = window.$gz.locale.get("ErrorFieldValueNotDecimal");
|
||||
//Update the form status
|
||||
this.setFormState({
|
||||
vm: vm,
|
||||
@@ -324,22 +324,22 @@ export default {
|
||||
//CHECK PREREQUISITES IN DEV MODE TO ENSURE FORM ISN"T MISSING NEEDED DATA ATTRIBUTES ETC
|
||||
if (vm.$gzdevmode()) {
|
||||
//make sure formState.serverErrors is defined on data
|
||||
if (!vm.$_.has(vm, "formState.serverError")) {
|
||||
if (!window.$gz._.has(vm, "formState.serverError")) {
|
||||
throw "DEV ERROR gzform::formState.serverErrors -> formState.serverError seems to be missing from form's vue data object";
|
||||
}
|
||||
|
||||
//make sure formState.appError is defined on data
|
||||
if (!vm.$_.has(vm, "formState.appError")) {
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR gzform::formState.serverErrors -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
|
||||
//make sure formState.errorBoxMessage is defined on data
|
||||
if (!vm.$_.has(vm, "formState.errorBoxMessage")) {
|
||||
if (!window.$gz._.has(vm, "formState.errorBoxMessage")) {
|
||||
throw "DEV ERROR gzform::formState.serverErrors -> formState.errorBoxMessage seems to be missing from form's vue data object";
|
||||
}
|
||||
|
||||
//ensure the error returned is in an expected format to catch coding errors at the server end
|
||||
if (!vm.$_.isEmpty(vm.formState.serverError)) {
|
||||
if (!window.$gz._.isEmpty(vm.formState.serverError)) {
|
||||
//Make sure there is an error code if there is an error collection
|
||||
if (!vm.formState.serverError.code) {
|
||||
throw "DEV ERROR gzform::formState.serverErrors -> server returned error without code";
|
||||
@@ -349,7 +349,7 @@ export default {
|
||||
var ret = [];
|
||||
|
||||
//check for errors if we have any errors
|
||||
if (!vm.$_.isEmpty(vm.formState.serverError)) {
|
||||
if (!window.$gz._.isEmpty(vm.formState.serverError)) {
|
||||
//debugger;
|
||||
//First let's get the top level error code
|
||||
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
//GENERAL ERROR
|
||||
if (ref == "errorbox") {
|
||||
//Add any general errors to ret
|
||||
var err = vm.$gzlocale.get("ErrorAPI" + apiErrorCode.toString());
|
||||
var err = window.$gz.locale.get("ErrorAPI" + apiErrorCode.toString());
|
||||
if (vm.formState.serverError.message) {
|
||||
err = err + "\r\n" + vm.formState.serverError.message;
|
||||
}
|
||||
@@ -372,17 +372,17 @@ export default {
|
||||
//DETAIL ERRORS
|
||||
//{"error":{"code":"2200","details":[{"message":"Exception: Error converting value \"\" to type 'AyaNova.Biz.AUTHORIZATION_ROLES'. Path 'roles', line 1, position 141.","target":"roles","error":"2203"}],"message":"Object did not pass validation"}}
|
||||
//Specific field validation errors are in an array in "details" key
|
||||
if (!vm.$_.isEmpty(vm.formState.serverError.details)) {
|
||||
if (!window.$gz._.isEmpty(vm.formState.serverError.details)) {
|
||||
//See if this key is in the details array
|
||||
var errorsForField = getErrorsForField(vm, ref);
|
||||
|
||||
if (errorsForField.length > 0) {
|
||||
//iterate the errorsForField object and add each to return array of errors
|
||||
vm.$_.each(errorsForField, function(ve) {
|
||||
window.$gz._.each(errorsForField, function(ve) {
|
||||
var fldErr = "";
|
||||
var fldErrorCode = parseInt(ve.error);
|
||||
fldErr =
|
||||
vm.$gzlocale.get("ErrorAPI" + fldErrorCode.toString()) +
|
||||
window.$gz.locale.get("ErrorAPI" + fldErrorCode.toString()) +
|
||||
" [" +
|
||||
ve.error +
|
||||
"]";
|
||||
@@ -443,7 +443,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
//If ref appears in the formState.serverErrors details collection, remove each one
|
||||
var m = vm.$_.remove(vm.formState.serverError.details, function(o) {
|
||||
var m = window.$gz._.remove(vm.formState.serverError.details, function(o) {
|
||||
if (!o.target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
|
||||
//LOGOUT
|
||||
vm.appBar.menuItems.push({
|
||||
title: vm.$gzlocale.get("Logout"),
|
||||
title: window.$gz.locale.get("Logout"),
|
||||
icon: "sign-out-alt",
|
||||
key: "app:logout"
|
||||
});
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
|
||||
//HELP
|
||||
vm.appBar.menuItems.push({
|
||||
title: vm.$gzlocale.get("MenuHelp"),
|
||||
title: window.$gz.locale.get("MenuHelp"),
|
||||
icon: "question-circle",
|
||||
key: "app:help",
|
||||
data: vm.appBar.helpUrl
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
|
||||
//ABOUT
|
||||
vm.appBar.menuItems.push({
|
||||
title: vm.$gzlocale.get("HelpAboutAyaNova"),
|
||||
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
||||
icon: "info-circle",
|
||||
key: "app:nav:abt",
|
||||
data: "about"
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
vm.appBar.menuItems.push({ divider: true, inset: false });
|
||||
//customize
|
||||
vm.appBar.menuItems.push({
|
||||
title: vm.$gzlocale.get("Customize"),
|
||||
title: window.$gz.locale.get("Customize"),
|
||||
icon: "sliders-h",
|
||||
data: ctx.formData.ayaType,
|
||||
key: "app:customize"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</v-flex>
|
||||
<v-flex mb-4 v-if="this.formReady">
|
||||
<h1 class="display-2 font-weight-bold mb-3">
|
||||
{{ this.$gzlocale.get("Welcome") }}
|
||||
{{ lt("Welcome") }}
|
||||
</h1>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
@@ -21,7 +21,7 @@
|
||||
<script>
|
||||
export default {
|
||||
created() {
|
||||
this.$gzlocale
|
||||
window.$gz.locale
|
||||
.fetch(["Welcome"])
|
||||
.then(() => (this.formReady = true))
|
||||
.catch(err => {
|
||||
@@ -31,6 +31,11 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return { formReady: false };
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="this.$store.state.formCustomTemplate[formKey]">
|
||||
<span class="v-label v-label--active theme--light">
|
||||
{{ this.$gzlocale.get("ObjectCustomFieldCustomGrid") }}
|
||||
{{ lt("ObjectCustomFieldCustomGrid") }}
|
||||
</span>
|
||||
<!-- <div>
|
||||
<h5>FORMKEY: {{ formKey }}</h5>
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
lt: function(ltkey) {
|
||||
return this.$gzlocale.get(ltkey);
|
||||
return window.$gz.locale.get(ltkey);
|
||||
},
|
||||
GetValueForField: function(dataKey) {
|
||||
if (!this.value) {
|
||||
@@ -171,11 +171,11 @@ export default {
|
||||
// console.log("custom-fields-control::BEFORECREATE: TOP");
|
||||
//check pre-requisites exist just in case
|
||||
if (this.$gzdevmode()) {
|
||||
if (!this.$_) {
|
||||
throw "custom-fields-control: $_ (lodash) is required and missing";
|
||||
if (!window.$gz._) {
|
||||
throw "custom-fields-control: $gz._ (lodash) is required and missing";
|
||||
}
|
||||
if (!this.$gzlocale) {
|
||||
throw "custom-fields-control: $gzlocale is required and missing";
|
||||
if (!window.$gz.locale) {
|
||||
throw "custom-fields-control: $gz.locale is required and missing";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
throw "DateTimeControl: the DayJS library is required and missing";
|
||||
}
|
||||
if (!window.$gz.locale) {
|
||||
throw "DateTimeControl: $gzlocale is required and missing";
|
||||
throw "DateTimeControl: $gz.locale is required and missing";
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -102,24 +102,24 @@ export default {
|
||||
return this.value
|
||||
? window.$gz.dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortDateAndTime)
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format(window.$gz.locale.format().shortDateAndTime)
|
||||
: "";
|
||||
},
|
||||
formatDate() {
|
||||
return this.value
|
||||
? window.$gz.dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortDate)
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format(window.$gz.locale.format().shortDate)
|
||||
: "";
|
||||
},
|
||||
formatTime() {
|
||||
return this.value
|
||||
? window.$gz.dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.format(this.$gzlocale.format().shortTime)
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format(window.$gz.locale.format().shortTime)
|
||||
: "";
|
||||
},
|
||||
dateOnly: {
|
||||
@@ -128,20 +128,20 @@ export default {
|
||||
var defaultDateString = window.$gz
|
||||
.dayjs()
|
||||
.utc()
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format("YYYY-MM-DD");
|
||||
|
||||
return this.value
|
||||
? window.$gz.dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format("YYYY-MM-DD")
|
||||
: defaultDateString;
|
||||
},
|
||||
set(value) {
|
||||
this.date = window.$gz.dayjs
|
||||
.utc(value + " " + this.timeOnly)
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.subtract(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.toISOString();
|
||||
}
|
||||
},
|
||||
@@ -150,20 +150,20 @@ export default {
|
||||
//TODO: this will likely need an improvement for forms where there should be an automatic pre-set time chosen like workorder labor;
|
||||
var defaultTimeString = window.$gz.dayjs
|
||||
.utc()
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format("HH:mm:ss");
|
||||
|
||||
return this.value
|
||||
? window.$gz.dayjs
|
||||
.utc(this.value)
|
||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.add(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.format("HH:mm:ss")
|
||||
: defaultTimeString;
|
||||
},
|
||||
set(value) {
|
||||
this.date = window.$gz.dayjs
|
||||
.utc(this.dateOnly + " " + value)
|
||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||
.subtract(window.$gz.locale.format().timeZoneOffset, "hour")
|
||||
.toISOString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
<v-toolbar flat>
|
||||
<v-toolbar-title>
|
||||
<v-icon large color="primary">fa-splotch</v-icon>
|
||||
<span class="hidden-sm-and-down">{{
|
||||
this.$gzlocale.get("WidgetList")
|
||||
}}</span>
|
||||
<span class="hidden-sm-and-down">{{ lt("WidgetList") }}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn v-if="this.rights.change" icon @click="newItem()">
|
||||
@@ -45,7 +43,7 @@
|
||||
:total-items="totalItems"
|
||||
:loading="loading"
|
||||
:rows-per-page-items="rowsPerPageItems"
|
||||
:rows-per-page-text="this.$gzlocale.get('RowsPerPage')"
|
||||
:rows-per-page-text="lt('RowsPerPage')"
|
||||
class="elevation-1"
|
||||
select-all
|
||||
>
|
||||
@@ -93,7 +91,7 @@ export default {
|
||||
beforeCreate() {
|
||||
var that = this;
|
||||
|
||||
this.$gzlocale
|
||||
window.$gz.locale
|
||||
.fetch([
|
||||
"Widget",
|
||||
"WidgetList",
|
||||
@@ -108,8 +106,10 @@ export default {
|
||||
"RowsPerPage"
|
||||
])
|
||||
.then(() => {
|
||||
that.$_.forEach(that.headers, function setHeaderLocalizedText(header) {
|
||||
header.text = that.$gzlocale.get(header.text);
|
||||
window.$gz._.forEach(that.headers, function setHeaderLocalizedText(
|
||||
header
|
||||
) {
|
||||
header.text = window.$gz.locale.get(header.text);
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
@@ -194,6 +194,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
},
|
||||
newItem() {
|
||||
this.$router.push({
|
||||
name: "inventory-widget-edit",
|
||||
@@ -247,8 +253,9 @@ export default {
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
var listUrl = "Widget/ListWidgets?" + this.$gzapi.buildQuery(listOptions);
|
||||
this.$gzapi.get(listUrl).then(res => {
|
||||
var listUrl =
|
||||
"Widget/ListWidgets?" + window.$gz.api.buildQuery(listOptions);
|
||||
window.$gz.api.get(listUrl).then(res => {
|
||||
that.loading = false;
|
||||
that.Items = res.data;
|
||||
that.totalItems = res.paging.count;
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
vm.tagSearchUnderway = true;
|
||||
vm.$gzapi
|
||||
window.$gz.api
|
||||
.get("TagList/picklist?query=" + val) //roles
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
},
|
||||
normalizeTag(tagName) {
|
||||
//kebab case takes care of all the things we need for tags in one go
|
||||
tagName = this.$_.kebabCase(tagName);
|
||||
tagName = window.$gz._.kebabCase(tagName);
|
||||
//No longer than 255 characters
|
||||
tagName = tagName.length > 255 ? tagName.substr(0, 255 - 1) : tagName;
|
||||
return tagName;
|
||||
@@ -104,11 +104,11 @@ export default {
|
||||
beforeCreate() {
|
||||
//check pre-requisites exist just in case
|
||||
if (this.$gzdevmode()) {
|
||||
if (!this.$_) {
|
||||
throw "tag-picker: $_ (lodash) is required and missing";
|
||||
if (!window.$gz._) {
|
||||
throw "tag-picker: $gz._ (lodash) is required and missing";
|
||||
}
|
||||
if (!this.$gzlocale) {
|
||||
throw "tag-picker: $gzlocale is required and missing";
|
||||
if (!window.$gz.locale) {
|
||||
throw "tag-picker: $gz.locale is required and missing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@ window.$gz = {
|
||||
//Object.defineProperty(Vue.prototype, "$gzdialog", { value: gzdialog });
|
||||
//Object.defineProperty(Vue.prototype, "$gzutil", { value: gzutil });
|
||||
//Object.defineProperty(Vue.prototype, "$dayjs", { value: dayjs });
|
||||
Object.defineProperty(Vue.prototype, "$_", { value: lodash });
|
||||
Object.defineProperty(Vue.prototype, "$gzlocale", { value: locale });
|
||||
Object.defineProperty(Vue.prototype, "$gzapi", { value: gzapi });
|
||||
//Object.defineProperty(Vue.prototype, "$_", { value: lodash });
|
||||
//Object.defineProperty(Vue.prototype, "$gzlocale", { value: locale });
|
||||
//Object.defineProperty(Vue.prototype, "$gzapi", { value: gzapi });
|
||||
Object.defineProperty(Vue.prototype, "$gzform", { value: gzform });
|
||||
Object.defineProperty(Vue.prototype, "$gzformcustomtemplate", {
|
||||
value: gzformcustomtemplate
|
||||
|
||||
@@ -15,143 +15,109 @@
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-card id="aboutinfocard">
|
||||
<v-subheader>{{ this.$gzlocale.get("ClientApp") }}</v-subheader>
|
||||
<v-subheader>{{ lt("ClientApp") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-4 body-1">{{ this.$gzlocale.get("Version") }}:</span>
|
||||
<span class="ml-4 body-1">{{ lt("Version") }}:</span>
|
||||
<span class="body-2">{{ clientInfo.version }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1">{{ this.$gzlocale.get("User") }}:</span>
|
||||
<span class="ml-4 body-1">{{ lt("User") }}:</span>
|
||||
<span class="body-2">{{ this.$store.state.userName }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("UserTimeZoneOffset") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("UserTimeZoneOffset") }}:</span>
|
||||
<span class="body-2">
|
||||
{{ this.$gzlocale.format().timeZoneOffset }}
|
||||
{{ ltFormat().timeZoneOffset }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("DecimalSeparator") }}:</span
|
||||
>
|
||||
<span class="body-2">{{
|
||||
this.$gzlocale.format().decimalSeparator
|
||||
}}</span>
|
||||
<span class="ml-4 body-1">{{ lt("DecimalSeparator") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().decimalSeparator }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("CurrencySymbol") }}:</span
|
||||
>
|
||||
<span class="body-2">{{
|
||||
this.$gzlocale.format().currencySymbol
|
||||
}}</span>
|
||||
<span class="ml-4 body-1">{{ lt("CurrencySymbol") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().currencySymbol }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("ShortDateFormat") }}:</span
|
||||
>
|
||||
<span class="body-2">{{ this.$gzlocale.format().shortDate }}</span>
|
||||
<span class="ml-4 body-1">{{ lt("ShortDateFormat") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().shortDate }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("ShortTimeFormat") }}:</span
|
||||
>
|
||||
<span class="body-2">{{ this.$gzlocale.format().shortTime }}</span>
|
||||
<span class="ml-4 body-1">{{ lt("ShortTimeFormat") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().shortTime }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("ShortDateAndTimeFormat") }}:
|
||||
</span>
|
||||
<span class="body-2">{{
|
||||
this.$gzlocale.format().shortDateAndTime
|
||||
}}</span>
|
||||
<span class="ml-4 body-1">{{ lt("ShortDateAndTimeFormat") }}: </span>
|
||||
<span class="body-2">{{ ltFormat().shortDateAndTime }}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-4"></v-divider>
|
||||
<v-subheader>{{ this.$gzlocale.get("Browser") }}</v-subheader>
|
||||
<v-subheader>{{ lt("Browser") }}</v-subheader>
|
||||
<div v-for="(value, name) in clientInfo.browser" :key="name">
|
||||
<span class="ml-4 body-1">{{ name }}:</span>
|
||||
<span class="body-2">{{ value }}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-4"></v-divider>
|
||||
<v-subheader>{{ this.$gzlocale.get("Server") }}</v-subheader>
|
||||
<v-subheader>{{ lt("Server") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("ServerAddress") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("ServerAddress") }}:</span>
|
||||
<span class="body-2">{{ this.$store.state.apiUrl }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1">{{ this.$gzlocale.get("Version") }}:</span>
|
||||
<span class="ml-4 body-1">{{ lt("Version") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.serverVersion }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("SchemaVersion") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("SchemaVersion") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.dbSchemaVersion }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("ServerTime") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("ServerTime") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.serverLocalTime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1">{{ this.$gzlocale.get("TimeZone") }}:</span>
|
||||
<span class="ml-4 body-1">{{ lt("TimeZone") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.serverTimeZone }}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-4"></v-divider>
|
||||
<v-subheader>{{ this.$gzlocale.get("HelpLicense") }}</v-subheader>
|
||||
<v-subheader>{{ lt("HelpLicense") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("RegisteredUser") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("RegisteredUser") }}:</span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.licensedTo
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("DatabaseID") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("DatabaseID") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("LicenseSerial") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("LicenseSerial") }}:</span>
|
||||
<span class="body-2">{{ serverInfo.license.license.keySerial }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("LicenseExpiration") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("LicenseExpiration") }}:</span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.licenseExpiration
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-4 body-1"
|
||||
>{{ this.$gzlocale.get("SupportedUntil") }}:</span
|
||||
>
|
||||
<span class="ml-4 body-1">{{ lt("SupportedUntil") }}:</span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.maintenanceExpiration
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-4"></v-divider>
|
||||
<v-subheader>{{ this.$gzlocale.get("LicensedOptions") }}</v-subheader>
|
||||
<v-subheader>{{ lt("LicensedOptions") }}</v-subheader>
|
||||
|
||||
<div
|
||||
v-for="item in serverInfo.license.license.features"
|
||||
@@ -187,7 +153,7 @@ function clickHandler(menuItem) {
|
||||
var text = element.innerText || element.textContent;
|
||||
|
||||
var logText = "";
|
||||
this.$_.forEach(m.vm.$store.state.logArray, function appendLogItem(
|
||||
window.$gz._.forEach(m.vm.$store.state.logArray, function appendLogItem(
|
||||
value
|
||||
) {
|
||||
logText += value + "\n";
|
||||
@@ -206,7 +172,7 @@ function clickHandler(menuItem) {
|
||||
export default {
|
||||
beforeCreate() {
|
||||
var vm = this;
|
||||
this.$gzlocale
|
||||
window.$gz.locale
|
||||
.fetch([
|
||||
"HelpAboutAyaNova",
|
||||
"ClientApp",
|
||||
@@ -239,17 +205,17 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: false,
|
||||
icon: "fa-info-circle",
|
||||
title: vm.$gzlocale.get("HelpAboutAyaNova"),
|
||||
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
||||
menuItems: [
|
||||
{
|
||||
title: vm.$gzlocale.get("Copy"),
|
||||
title: window.$gz.locale.get("Copy"),
|
||||
icon: "copy",
|
||||
surface: true,
|
||||
key: "about:copysupportinfo",
|
||||
vm: vm
|
||||
},
|
||||
{
|
||||
title: vm.$gzlocale.get("Log"),
|
||||
title: window.$gz.locale.get("Log"),
|
||||
icon: "glasses",
|
||||
surface: true,
|
||||
key: "app:nav:log",
|
||||
@@ -265,7 +231,7 @@ export default {
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.$gzapi
|
||||
window.$gz.api
|
||||
.get("ServerInfo")
|
||||
.then(response => {
|
||||
this.serverInfo = response.data;
|
||||
@@ -291,6 +257,14 @@ export default {
|
||||
serverError: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-home",
|
||||
title: this.$gzlocale.get("Home")
|
||||
title: window.$gz.locale.get("Home")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-file-invoice-dollar",
|
||||
title: this.$gzlocale.get("Accounting")
|
||||
title: window.$gz.locale.get("Accounting")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-user-tie",
|
||||
title: this.$gzlocale.get("Administration")
|
||||
title: window.$gz.locale.get("Administration")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "sliders-h",
|
||||
title: this.$gzlocale.get("Customize")
|
||||
title: window.$gz.locale.get("Customize")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-shipping-fast",
|
||||
title: this.$gzlocale.get("Dispatch")
|
||||
title: window.$gz.locale.get("Dispatch")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
clearable
|
||||
@click:clear="onChange('name')"
|
||||
:counter="255"
|
||||
:label="this.$gzlocale.get('WidgetName')"
|
||||
:label="lt('WidgetName')"
|
||||
:rules="[
|
||||
this.$gzform.max255(this, 'name'),
|
||||
this.$gzform.required(this, 'name')
|
||||
@@ -40,7 +40,7 @@
|
||||
clearable
|
||||
@click:clear="onChange('serial')"
|
||||
:counter="10"
|
||||
:label="this.$gzlocale.get('WidgetSerial')"
|
||||
:label="lt('WidgetSerial')"
|
||||
:rules="[this.$gzform.maxLength(this, 'serial', 10)]"
|
||||
:error-messages="this.$gzform.serverErrors(this, 'serial')"
|
||||
ref="serial"
|
||||
@@ -54,7 +54,7 @@
|
||||
clearable
|
||||
@click:clear="onChange('count')"
|
||||
:counter="10"
|
||||
:label="this.$gzlocale.get('WidgetCount')"
|
||||
:label="lt('WidgetCount')"
|
||||
ref="count"
|
||||
:rules="[
|
||||
this.$gzform.integerValid(this, 'count'),
|
||||
@@ -71,8 +71,8 @@
|
||||
<v-text-field
|
||||
v-model="obj.dollarAmount"
|
||||
:readonly="this.formState.readOnly"
|
||||
:prefix="this.$gzlocale.format().currencySymbol"
|
||||
:label="this.$gzlocale.get('WidgetDollarAmount')"
|
||||
:prefix="ltFormat().currencySymbol"
|
||||
:label="lt('WidgetDollarAmount')"
|
||||
ref="dollarAmount"
|
||||
required
|
||||
:rules="[
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<gz-date-time-picker
|
||||
:label="this.$gzlocale.get('WidgetStartDate')"
|
||||
:label="lt('WidgetStartDate')"
|
||||
v-model="obj.startDate"
|
||||
:readonly="this.formState.readOnly"
|
||||
ref="startDate"
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<gz-date-time-picker
|
||||
:label="this.$gzlocale.get('WidgetEndDate')"
|
||||
:label="lt('WidgetEndDate')"
|
||||
:rules="[
|
||||
this.$gzform.datePrecedence(this, 'startDate', 'endDate')
|
||||
]"
|
||||
@@ -113,7 +113,7 @@
|
||||
<v-checkbox
|
||||
v-model="obj.active"
|
||||
:readonly="this.formState.readOnly"
|
||||
:label="this.$gzlocale.get('Active')"
|
||||
:label="lt('Active')"
|
||||
ref="active"
|
||||
:error-messages="this.$gzform.serverErrors(this, 'active')"
|
||||
required
|
||||
@@ -127,7 +127,7 @@
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:readonly="this.formState.readOnly"
|
||||
:label="this.$gzlocale.get('WidgetRoles')"
|
||||
:label="lt('WidgetRoles')"
|
||||
ref="roles"
|
||||
:rules="[
|
||||
this.$gzform.integerValid(this, 'roles'),
|
||||
@@ -143,7 +143,7 @@
|
||||
<v-textarea
|
||||
v-model="obj.notes"
|
||||
:readonly="this.formState.readOnly"
|
||||
:label="this.$gzlocale.get('WidgetNotes')"
|
||||
:label="lt('WidgetNotes')"
|
||||
:error-messages="this.$gzform.serverErrors(this, 'notes')"
|
||||
ref="notes"
|
||||
@change="onChange('notes')"
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
<v-flex xs12 px-2>
|
||||
<gz-tag-picker
|
||||
:label="this.$gzlocale.get('Tags')"
|
||||
:label="lt('Tags')"
|
||||
v-model="obj.tags"
|
||||
:readonly="this.formState.readOnly"
|
||||
ref="tags"
|
||||
@@ -389,6 +389,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
},
|
||||
onChange(ref) {
|
||||
if (!this.formState.loading && !this.formState.readOnly) {
|
||||
this.$gzform.onChange(this, ref);
|
||||
@@ -403,7 +409,7 @@ export default {
|
||||
var vm = this;
|
||||
this.$gzform.deleteAllErrorBoxErrors(this);
|
||||
|
||||
this.$gzapi
|
||||
window.$gz.api
|
||||
.get(url)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
@@ -450,7 +456,7 @@ export default {
|
||||
|
||||
//clear any errors vm might be around from previous submit
|
||||
this.$gzform.deleteAllErrorBoxErrors(this);
|
||||
this.$gzapi
|
||||
window.$gz.api
|
||||
.upsert(url, this.obj)
|
||||
.then(res => {
|
||||
vm.formState.loading = false;
|
||||
@@ -504,7 +510,7 @@ export default {
|
||||
var url = FORM_BASE_URL + vm.$route.params.id;
|
||||
|
||||
vm.$gzform.deleteAllErrorBoxErrors(vm);
|
||||
vm.$gzapi
|
||||
window.$gz.api
|
||||
.remove(url)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
@@ -538,7 +544,7 @@ export default {
|
||||
|
||||
//clear any errors vm might be around from previous submit
|
||||
this.$gzform.deleteAllErrorBoxErrors(this);
|
||||
this.$gzapi
|
||||
window.$gz.api
|
||||
.duplicate(url)
|
||||
.then(res => {
|
||||
// debugger;
|
||||
@@ -549,7 +555,10 @@ export default {
|
||||
} else {
|
||||
//Navigate to new record
|
||||
vm.$router.push(
|
||||
vm.$gzapi.replaceAfterLastSlash(vm.$route.fullPath, res.data.id)
|
||||
window.$gz.api.replaceAfterLastSlash(
|
||||
vm.$route.fullPath,
|
||||
res.data.id
|
||||
)
|
||||
);
|
||||
}
|
||||
})
|
||||
@@ -612,7 +621,7 @@ function generateMenu(vm) {
|
||||
var menuOptions = {
|
||||
isMain: false,
|
||||
icon: "fa-splotch",
|
||||
title: vm.$gzlocale.get("Widget"),
|
||||
title: window.$gz.locale.get("Widget"),
|
||||
helpUrl: "intro/#searching",
|
||||
formData: { formKey: FORM_KEY, ayaType: window.$gz.type.Widget },
|
||||
menuItems: []
|
||||
@@ -620,7 +629,7 @@ function generateMenu(vm) {
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$gzlocale.get("Save"),
|
||||
title: window.$gz.locale.get("Save"),
|
||||
icon: "save",
|
||||
surface: true,
|
||||
key: FORM_KEY + ":save",
|
||||
@@ -630,7 +639,7 @@ function generateMenu(vm) {
|
||||
|
||||
if (vm.rights.delete) {
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$gzlocale.get("Delete"),
|
||||
title: window.$gz.locale.get("Delete"),
|
||||
icon: "trash-alt",
|
||||
surface: true,
|
||||
key: FORM_KEY + ":delete",
|
||||
@@ -640,7 +649,7 @@ function generateMenu(vm) {
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$gzlocale.get("Duplicate"),
|
||||
title: window.$gz.locale.get("Duplicate"),
|
||||
icon: "clone",
|
||||
key: FORM_KEY + ":duplicate",
|
||||
vm: vm
|
||||
@@ -650,7 +659,7 @@ function generateMenu(vm) {
|
||||
//STUB REPORTS
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: vm.$gzlocale.get("Print"),
|
||||
title: window.$gz.locale.get("Print"),
|
||||
icon: "print",
|
||||
key: FORM_KEY + ":report",
|
||||
vm: vm
|
||||
@@ -680,12 +689,14 @@ function initForm(vm) {
|
||||
//
|
||||
//
|
||||
function populatePickLists(vm) {
|
||||
return vm.$gzapi.get("AyaEnumPickList/list/authorizationroles").then(res => {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
}
|
||||
vm.pickLists.roles = res.data;
|
||||
});
|
||||
return window.$gz.api
|
||||
.get("AyaEnumPickList/list/authorizationroles")
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
}
|
||||
vm.pickLists.roles = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
@@ -721,7 +732,7 @@ function populatePickLists(vm) {
|
||||
// "WidgetCustom16"
|
||||
// ];
|
||||
|
||||
// return vm.$gzlocale.fetch(ltKeysRequired);
|
||||
// return window.$gz.locale.fetch(ltKeysRequired);
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import PartAssemblyTop from "../components/inventorypartassemblytop";
|
||||
|
||||
export default {
|
||||
beforeCreate() {
|
||||
this.$gzlocale
|
||||
window.$gz.locale
|
||||
.fetch(["Inventory"])
|
||||
.then(() => (this.formState.ready = true))
|
||||
.catch(err => {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-dolly",
|
||||
title: this.$gzlocale.get("Inventory")
|
||||
title: window.$gz.locale.get("Inventory")
|
||||
});
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -26,10 +26,10 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: false,
|
||||
icon: "fa-info-circle",
|
||||
title: this.$gzlocale.get("Log"),
|
||||
title: window.$gz.locale.get("Log"),
|
||||
menuItems: [
|
||||
// {
|
||||
// title: this.$gzlocale.get("Log"),
|
||||
// title: window.$gz.locale.get("Log"),
|
||||
// icon: "glasses",
|
||||
// surface: true,
|
||||
// key: "app:nav:log",
|
||||
@@ -39,11 +39,13 @@ export default {
|
||||
});
|
||||
|
||||
var outText = "";
|
||||
this.$_.forEach(this.$store.state.logArray, function appendLogItem(value) {
|
||||
window.$gz._.forEach(this.$store.state.logArray, function appendLogItem(
|
||||
value
|
||||
) {
|
||||
outText += value + "\n";
|
||||
});
|
||||
this.logText = outText;
|
||||
this.$gzlocale
|
||||
window.$gz.locale
|
||||
.fetch(["Log"])
|
||||
.then(() => (this.formState.ready = true))
|
||||
.catch(err => {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="text-xs-center">
|
||||
<v-icon color="red" size="100">fa-dragon</v-icon>
|
||||
<div class="headline">
|
||||
{{ "404 - " + this.$gzlocale.get("ErrorAPI2010") }}
|
||||
{{ "404 - " + window.$gz.locale.get("ErrorAPI2010") }}
|
||||
</div>
|
||||
</div>
|
||||
</v-flex>
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-dragon",
|
||||
title: "404 - " + this.$gzlocale.get("ErrorAPI2010")
|
||||
title: "404 - " + window.$gz.locale.get("ErrorAPI2010")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-cogs",
|
||||
title: this.$gzlocale.get("Operations")
|
||||
title: window.$gz.locale.get("Operations")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
window.$gz.eventbus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
icon: "fa-toolbox",
|
||||
title: this.$gzlocale.get("Service")
|
||||
title: window.$gz.locale.get("Service")
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user