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