This commit is contained in:
@@ -44,7 +44,7 @@ EDGE desktop
|
|||||||
=-=-=-=-=- OLD STUFF =-=-=-=-
|
=-=-=-=-=- OLD STUFF =-=-=-=-
|
||||||
- does it update automatically
|
- does it update automatically
|
||||||
- No localization bugs
|
- No localization bugs
|
||||||
- Login as different locale users and confirm no ?? showing
|
- Login as different translation users and confirm no ?? showing
|
||||||
- Menu
|
- Menu
|
||||||
- surfaces properly given size changes
|
- surfaces properly given size changes
|
||||||
- enabled works
|
- enabled works
|
||||||
|
|||||||
@@ -45,18 +45,19 @@ CURRENT TODOs
|
|||||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||||
|
|
||||||
|
|
||||||
todo: locale is a confusing term, can it be surfaced with something a little more on the nose?
|
todo: translation is a confusing term, can it be surfaced with something a little more on the nose?
|
||||||
- "Translation"
|
- "Translation"
|
||||||
|
|
||||||
|
todo: move the now properly "locale" settings for the browser OUT of translation.js into somewhere more appropriate and fixup calling code appropriately
|
||||||
|
|
||||||
|
|
||||||
todo: move locale setting for user to useroptions object
|
todo: move translation setting for user to useroptions object
|
||||||
- then put on form and document
|
- then put on form and document
|
||||||
- also, any other things in User that should be in UserOptions? (like user configurable stuff)
|
- also, any other things in User that should be in UserOptions? (like user configurable stuff)
|
||||||
|
|
||||||
todo: User settings && password change documentation
|
todo: User settings && password change documentation
|
||||||
- do it now?
|
- do it now?
|
||||||
- needs section explaining about how locale is displayed so can link to it from other places
|
- needs section explaining about how translation is displayed so can link to it from other places
|
||||||
- is that it's own page? (maybe because each subject should be short and focused and look clean with lots of whitespace, clear large text)
|
- is that it's own page? (maybe because each subject should be short and focused and look clean with lots of whitespace, clear large text)
|
||||||
- If I do it in parallel it will be done when I'm done
|
- If I do it in parallel it will be done when I'm done
|
||||||
- If I wait I won't waste time with changes needing to be udpated
|
- If I wait I won't waste time with changes needing to be udpated
|
||||||
@@ -128,8 +129,8 @@ todo: ANY TIME - SIDE v7 STUFF DataDump plugin needs an explanation of what it i
|
|||||||
=================== FINALIZATION OF EDIT FORM BEFORE "STAMPING" OUT MORE ===========================================
|
=================== FINALIZATION OF EDIT FORM BEFORE "STAMPING" OUT MORE ===========================================
|
||||||
todo: VET translations
|
todo: VET translations
|
||||||
- There are still a large number of non translated lt's in the non english stock languages (i.e. "More...")
|
- There are still a large number of non translated lt's in the non english stock languages (i.e. "More...")
|
||||||
- Make it easy to dump the local storage locale text for vetting the translations
|
- Make it easy to dump the local storage translation text for vetting the translations
|
||||||
- Login as each language, exercise the entire UI and then dump all the locale text that was fetched from the server and look for non english words
|
- Login as each language, exercise the entire UI and then dump all the translation text that was fetched from the server and look for non english words
|
||||||
|
|
||||||
|
|
||||||
todo: REPORT LIST
|
todo: REPORT LIST
|
||||||
@@ -173,7 +174,7 @@ todo: AUTOMATIC TEST *** SUPER IMPORTANT *****
|
|||||||
- Ideally it will test every input component and validate the entire record round trips properly, maybe it needs to also try different states like creating new, editing etc
|
- Ideally it will test every input component and validate the entire record round trips properly, maybe it needs to also try different states like creating new, editing etc
|
||||||
- Also function as a "smoke" test that will heavily exercise the server and client repeatedly for as long as I let it run which will reveal issues before releases
|
- Also function as a "smoke" test that will heavily exercise the server and client repeatedly for as long as I let it run which will reveal issues before releases
|
||||||
|
|
||||||
todo: Locale page with locale settings
|
todo: translation page with translation settings
|
||||||
|
|
||||||
todo: Trial route ui support in client (ON HOLD NEEDS BACKEND WORK)
|
todo: Trial route ui support in client (ON HOLD NEEDS BACKEND WORK)
|
||||||
- Went to do this but found it's a bit of a maze and has some hacked temp code in the license fetch route etc for development purposes
|
- Went to do this but found it's a bit of a maze and has some hacked temp code in the license fetch route etc for development purposes
|
||||||
@@ -264,7 +265,7 @@ todo: INVESTIGATE - Dark mode / theming (dark with a half moon icon)
|
|||||||
- Also see how to allow theming maybe or colour choices? Nah, dark mode is the most useful; I should decide the colours and stick with them it's part of our image
|
- Also see how to allow theming maybe or colour choices? Nah, dark mode is the most useful; I should decide the colours and stick with them it's part of our image
|
||||||
|
|
||||||
|
|
||||||
#locale stuff
|
#translation stuff
|
||||||
|
|
||||||
todo: LOCALIZATION form
|
todo: LOCALIZATION form
|
||||||
- Dedicated area for localization adjustments
|
- Dedicated area for localization adjustments
|
||||||
@@ -273,11 +274,11 @@ todo: LOCALIZATION form
|
|||||||
|
|
||||||
|
|
||||||
todo: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix
|
todo: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix
|
||||||
todo: code the user options with the currency symbol etc on the server and then update client to fetch them. Use static values instad in locale.
|
todo: code the user options with the currency symbol etc on the server and then update client to fetch them. Use static values instad in translation.
|
||||||
Locale should fetch those settings the first time it sees they are not present so that they are refreshed upon use and are not stored in localstorage
|
translation should fetch those settings the first time it sees they are not present so that they are refreshed upon use and are not stored in localstorage
|
||||||
(or should they be? anyway, can work that out later)
|
(or should they be? anyway, can work that out later)
|
||||||
todo: Local user settings page / UI where can
|
todo: Local user settings page / UI where can
|
||||||
- set locale choices and values
|
- set translation choices and values
|
||||||
- Reset to default form settings
|
- Reset to default form settings
|
||||||
- Other shit I can't think of right now but there will be a lot
|
- Other shit I can't think of right now but there will be a lot
|
||||||
|
|
||||||
@@ -331,7 +332,7 @@ MAYBE: AUTO-LOGOUT EXPIRED SESSION?
|
|||||||
- first off, is this really an issue?
|
- first off, is this really an issue?
|
||||||
- No, actually it's kind of useful for keeping on working when a server needs a restart or something
|
- No, actually it's kind of useful for keeping on working when a server needs a restart or something
|
||||||
- Only real issue is cached data mismatch so perhaps when detected it should toss cached data forcing a reload
|
- Only real issue is cached data mismatch so perhaps when detected it should toss cached data forcing a reload
|
||||||
- Or is this really an issue either? things cached are form customization and locale text which in the normal course of things won't change much
|
- Or is this really an issue either? things cached are form customization and translation text which in the normal course of things won't change much
|
||||||
|
|
||||||
- Right now a user can simply close the browser in the middle of a session, re-open it any amount of time later and it will just keep working, however it might have outdatd cached data from the server
|
- Right now a user can simply close the browser in the middle of a session, re-open it any amount of time later and it will just keep working, however it might have outdatd cached data from the server
|
||||||
- What about a time limit after which a session needs to login again just to protect the users from themselves?
|
- What about a time limit after which a session needs to login again just to protect the users from themselves?
|
||||||
@@ -367,11 +368,11 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
|
|||||||
- Don't want to solve any problems that should have been solved with this form later as I will inevitably be full on copy and pasting once I get it down and so it needs to be as solid as possible First
|
- Don't want to solve any problems that should have been solved with this form later as I will inevitably be full on copy and pasting once I get it down and so it needs to be as solid as possible First
|
||||||
- TEST SMALL and LARGE device layout regularly, don't get too far ahead of the testing
|
- TEST SMALL and LARGE device layout regularly, don't get too far ahead of the testing
|
||||||
- Every type of entry field fully localized properly including numeric, date, time, tags etc
|
- Every type of entry field fully localized properly including numeric, date, time, tags etc
|
||||||
- Client: initialize after login sets locale formats for everything.
|
- Client: initialize after login sets translation formats for everything.
|
||||||
- Best to do this useroptions stuff after a form is in place that I can play with at the client and experiment to see what is possible
|
- Best to do this useroptions stuff after a form is in place that I can play with at the client and experiment to see what is possible
|
||||||
- How much flexibility do we have to set things like numeric / currency input / display format?
|
- How much flexibility do we have to set things like numeric / currency input / display format?
|
||||||
- First it gets useroptions to know what to override or not, then sets defaults based on browser or override settings in central client area for all display/parsing etc
|
- First it gets useroptions to know what to override or not, then sets defaults based on browser or override settings in central client area for all display/parsing etc
|
||||||
- All numeric and date displays and input in locale format
|
- All numeric and date displays and input in translation format
|
||||||
- numeric inputs need to be set as such so that the number keyboard appears
|
- numeric inputs need to be set as such so that the number keyboard appears
|
||||||
- And all specialty inputs of course
|
- And all specialty inputs of course
|
||||||
- Custom fields implemented!
|
- Custom fields implemented!
|
||||||
@@ -416,7 +417,7 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
|
|||||||
- Override browser with these numeric format settings instead (see below)
|
- Override browser with these numeric format settings instead (see below)
|
||||||
- Digit grouping symbol i.e. the , in 1,000,000
|
- Digit grouping symbol i.e. the , in 1,000,000
|
||||||
- decimalValid symbol i.e. the . in 1.00
|
- decimalValid symbol i.e. the . in 1.00
|
||||||
- Currency symbol string (may be more than one character in some locales i.e. "Eur")
|
- Currency symbol string (may be more than one character in some translations i.e. "Eur")
|
||||||
- negative display format one of these: -1.1, (1.1), 1.1-
|
- negative display format one of these: -1.1, (1.1), 1.1-
|
||||||
- Use browser Datetime format
|
- Use browser Datetime format
|
||||||
- Override browser datetime with these settings instead (see below)
|
- Override browser datetime with these settings instead (see below)
|
||||||
@@ -456,13 +457,13 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
|
|||||||
TESTING TODO
|
TESTING TODO
|
||||||
Localized input and parsing and validation
|
Localized input and parsing and validation
|
||||||
- Going to need to handle localized numeric entry formats
|
- Going to need to handle localized numeric entry formats
|
||||||
- Deal with this once form is in good shape and worth testing with different locales
|
- Deal with this once form is in good shape and worth testing with different translations
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
TODO AFTER CLIENT block ABOVE:
|
TODO AFTER CLIENT block ABOVE:
|
||||||
ON UPDATE: have an url that opens automatically or a notification and link to one after a new version has been detected just like visual studio does in order to show what is new in this version
|
ON UPDATE: have an url that opens automatically or a notification and link to one after a new version has been detected just like visual studio does in order to show what is new in this version
|
||||||
|
|
||||||
ABOUT form - add the user settings such as timezone offset, locale formatting patterns etc, will be useful for troubleshooting
|
ABOUT form - add the user settings such as timezone offset, translation formatting patterns etc, will be useful for troubleshooting
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export default {
|
|||||||
window.$gz.menu.wireUpEventHandlers(this);
|
window.$gz.menu.wireUpEventHandlers(this);
|
||||||
window.$gz.dialog.wireUpEventHandlers(this);
|
window.$gz.dialog.wireUpEventHandlers(this);
|
||||||
openObjectHandler.wireUpEventHandlers(this);
|
openObjectHandler.wireUpEventHandlers(this);
|
||||||
window.$gz.locale.setVuetifyDefaultLanguageElements(this);
|
window.$gz.translation.setVuetifyDefaultLanguageElements(this);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function dealWithError(msg, vm) {
|
|||||||
lastMessageHash = newHash;
|
lastMessageHash = newHash;
|
||||||
|
|
||||||
//localize as necessary
|
//localize as necessary
|
||||||
msg = window.$gz.locale.translateString(msg);
|
msg = window.$gz.translation.translateString(msg);
|
||||||
|
|
||||||
//In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found
|
//In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found
|
||||||
//so it's not as weird looking to the user
|
//so it's not as weird looking to the user
|
||||||
@@ -126,6 +126,6 @@ API specific (logic) error codes are all in the range of 2000 to 3000
|
|||||||
CLIENT ERROR CODES:
|
CLIENT ERROR CODES:
|
||||||
E16 - ErrorUserNotAuthenticated
|
E16 - ErrorUserNotAuthenticated
|
||||||
E17 - ErrorServerUnresponsive
|
E17 - ErrorServerUnresponsive
|
||||||
E18 - Misc error without a locale key, unexpected throws etc or api error during server call, details in the message / Any error without a locale key defined basically
|
E18 - Misc error without a translation key, unexpected throws etc or api error during server call, details in the message / Any error without a translation key defined basically
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function handleError(action, error, route, reject) {
|
|||||||
window.$gz.store.commit("logItem", "Not authorized, redirecting to HOME");
|
window.$gz.store.commit("logItem", "Not authorized, redirecting to HOME");
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
window.$gz.locale.get("ErrorUserNotAuthorized")
|
window.$gz.translation.get("ErrorUserNotAuthorized")
|
||||||
);
|
);
|
||||||
router.push(window.$gz.store.state.homePage);
|
router.push(window.$gz.store.state.homePage);
|
||||||
return reject("[ErrorUserNotAuthorized]");
|
return reject("[ErrorUserNotAuthorized]");
|
||||||
@@ -68,7 +68,7 @@ function handleError(action, error, route, reject) {
|
|||||||
);
|
);
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-error",
|
"notify-error",
|
||||||
window.$gz.locale.get("ErrorUserNotAuthenticated")
|
window.$gz.translation.get("ErrorUserNotAuthenticated")
|
||||||
);
|
);
|
||||||
auth.logout();
|
auth.logout();
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
@@ -86,9 +86,9 @@ function handleError(action, error, route, reject) {
|
|||||||
window.$gz.store.commit("logItem", "Network error");
|
window.$gz.store.commit("logItem", "Network error");
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-error",
|
"notify-error",
|
||||||
window.$gz.locale.get("ErrorServerUnresponsive")
|
window.$gz.translation.get("ErrorServerUnresponsive")
|
||||||
);
|
);
|
||||||
//note: using locale key in square brackets
|
//note: using translation key in square brackets
|
||||||
return reject("[ErrorServerUnresponsive]");
|
return reject("[ErrorServerUnresponsive]");
|
||||||
//throw "Error: unable to contact server";
|
//throw "Error: unable to contact server";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ export default {
|
|||||||
//
|
//
|
||||||
confirmDelete() {
|
confirmDelete() {
|
||||||
return VM_LOCAL.$root.$gzconfirm({
|
return VM_LOCAL.$root.$gzconfirm({
|
||||||
message: window.$gz.locale.get("DeletePrompt"),
|
message: window.$gz.translation.get("DeletePrompt"),
|
||||||
yesButtonText: window.$gz.locale.get("Delete"),
|
yesButtonText: window.$gz.translation.get("Delete"),
|
||||||
noButtonText: window.$gz.locale.get("Cancel")
|
noButtonText: window.$gz.translation.get("Cancel")
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
@@ -97,9 +97,9 @@ export default {
|
|||||||
//
|
//
|
||||||
confirmLeaveUnsaved() {
|
confirmLeaveUnsaved() {
|
||||||
return VM_LOCAL.$root.$gzconfirm({
|
return VM_LOCAL.$root.$gzconfirm({
|
||||||
message: window.$gz.locale.get("AreYouSureUnsavedChanges"),
|
message: window.$gz.translation.get("AreYouSureUnsavedChanges"),
|
||||||
yesButtonText: window.$gz.locale.get("Leave"),
|
yesButtonText: window.$gz.translation.get("Leave"),
|
||||||
noButtonText: window.$gz.locale.get("Cancel")
|
noButtonText: window.$gz.translation.get("Cancel")
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
@@ -107,9 +107,9 @@ export default {
|
|||||||
//
|
//
|
||||||
displayLTErrorMessage(ltKeyText, ltKeyTitle = undefined) {
|
displayLTErrorMessage(ltKeyText, ltKeyTitle = undefined) {
|
||||||
return VM_LOCAL.$root.$gzconfirm({
|
return VM_LOCAL.$root.$gzconfirm({
|
||||||
message: ltKeyText ? window.$gz.locale.get(ltKeyText) : "",
|
message: ltKeyText ? window.$gz.translation.get(ltKeyText) : "",
|
||||||
title: ltKeyTitle ? window.$gz.locale.get(ltKeyTitle) : "",
|
title: ltKeyTitle ? window.$gz.translation.get(ltKeyTitle) : "",
|
||||||
yesButtonText: window.$gz.locale.get("OK")
|
yesButtonText: window.$gz.translation.get("OK")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//TODO: Implement the following as it's own re-usable component instead of here
|
//TODO: Implement the following as it's own re-usable component instead of here
|
||||||
@@ -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: window.$gz.locale.get("Report"),
|
// title: window.$gz.translation.get("Report"),
|
||||||
// oktext: window.$gz.locale.get("Print"),
|
// oktext: window.$gz.translation.get("Print"),
|
||||||
// canceltext: window.$gz.locale.get("Cancel"),
|
// canceltext: window.$gz.translation.get("Cancel"),
|
||||||
// selectedvalue: preselected
|
// selectedvalue: preselected
|
||||||
// });
|
// });
|
||||||
// return result;
|
// return result;
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
// dirty and change tracking
|
// dirty and change tracking
|
||||||
// and also general error display in forms
|
// and also general error display in forms
|
||||||
//probably should be broken up more
|
//probably should be broken up more
|
||||||
// All locale keys for validation *MUST* be fetched prior to this being used as it assumes all keys are fetched first
|
// All translation keys for validation *MUST* be fetched prior to this being used as it assumes all keys are fetched first
|
||||||
// Add any new keys used to the block in locale.js=>commonKeysEditForm
|
// Add any new keys used to the block in translation.js=>commonKeysEditForm
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
|
|
||||||
var triggeringChange = false;
|
var triggeringChange = false;
|
||||||
@@ -161,7 +161,7 @@ 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 = window.$gz.locale.get("ErrorRequiredFieldEmpty");
|
var err = window.$gz.translation.get("ErrorRequiredFieldEmpty");
|
||||||
var fieldName = getControlLabel(ctrl);
|
var fieldName = getControlLabel(ctrl);
|
||||||
err = window.$gz._.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
|
||||||
@@ -193,7 +193,7 @@ 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 = window.$gz.locale.get("ErrorFieldLengthExceeded");
|
var err = window.$gz.translation.get("ErrorFieldLengthExceeded");
|
||||||
var fieldName = getControlLabel(ctrl);
|
var fieldName = getControlLabel(ctrl);
|
||||||
err = window.$gz._.replace(err, "{0}", fieldName);
|
err = window.$gz._.replace(err, "{0}", fieldName);
|
||||||
err = window.$gz._.replace(err, "{1}", max);
|
err = window.$gz._.replace(err, "{1}", max);
|
||||||
@@ -255,7 +255,7 @@ export default {
|
|||||||
|
|
||||||
if (valueStart > valueEnd) {
|
if (valueStart > valueEnd) {
|
||||||
// "ErrorStartDateAfterEndDate": "Start date must be earlier than stop / end date",
|
// "ErrorStartDateAfterEndDate": "Start date must be earlier than stop / end date",
|
||||||
var err = window.$gz.locale.get("ErrorStartDateAfterEndDate");
|
var err = window.$gz.translation.get("ErrorStartDateAfterEndDate");
|
||||||
//Update the form status
|
//Update the form status
|
||||||
this.setFormState({
|
this.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -287,7 +287,7 @@ export default {
|
|||||||
var valueSecond = getControlValue(ctrlSecond);
|
var valueSecond = getControlValue(ctrlSecond);
|
||||||
|
|
||||||
if (valueFirst != valueSecond) {
|
if (valueFirst != valueSecond) {
|
||||||
var err = window.$gz.locale.get("ErrorNoMatch");
|
var err = window.$gz.translation.get("ErrorNoMatch");
|
||||||
//Update the form status
|
//Update the form status
|
||||||
this.setFormState({
|
this.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -323,7 +323,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// "ErrorFieldValueNotInteger": "Value must be an integer"
|
// "ErrorFieldValueNotInteger": "Value must be an integer"
|
||||||
var err = window.$gz.locale.get("ErrorFieldValueNotInteger");
|
var err = window.$gz.translation.get("ErrorFieldValueNotInteger");
|
||||||
//Update the form status
|
//Update the form status
|
||||||
this.setFormState({
|
this.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -340,7 +340,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//TODO: Handle commas and spaces in numbers
|
//TODO: Handle commas and spaces in numbers
|
||||||
//as per window.$gz.locale rules for numbers
|
//as per window.$gz.translation rules for numbers
|
||||||
|
|
||||||
var ctrl = getControl(vm, ref);
|
var ctrl = getControl(vm, ref);
|
||||||
if (typeof ctrl == "undefined") {
|
if (typeof ctrl == "undefined") {
|
||||||
@@ -360,7 +360,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// "ErrorFieldValueNotDecimal": "Value must be a number"
|
// "ErrorFieldValueNotDecimal": "Value must be a number"
|
||||||
var err = window.$gz.locale.get("ErrorFieldValueNotDecimal");
|
var err = window.$gz.translation.get("ErrorFieldValueNotDecimal");
|
||||||
//Update the form status
|
//Update the form status
|
||||||
this.setFormState({
|
this.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
@@ -407,7 +407,7 @@ 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 = window.$gz.locale.get("ErrorRequiredFieldEmpty");
|
var err = window.$gz.translation.get("ErrorRequiredFieldEmpty");
|
||||||
var fieldName = getControlLabel(ctrl);
|
var fieldName = getControlLabel(ctrl);
|
||||||
err = window.$gz._.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
|
||||||
@@ -447,7 +447,7 @@ export default {
|
|||||||
//It's empty and it's required so return error
|
//It's empty and it's required so return error
|
||||||
|
|
||||||
// "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 = window.$gz.locale.get("ErrorRequiredFieldEmpty");
|
var err = window.$gz.translation.get("ErrorRequiredFieldEmpty");
|
||||||
//var fieldName = getControlLabel(ctrl);
|
//var fieldName = getControlLabel(ctrl);
|
||||||
err = window.$gz._.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
|
||||||
@@ -500,7 +500,9 @@ 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 = window.$gz.locale.get("ErrorAPI" + apiErrorCode.toString());
|
var err = window.$gz.translation.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;
|
||||||
}
|
}
|
||||||
@@ -524,7 +526,7 @@ export default {
|
|||||||
var fldErr = "";
|
var fldErr = "";
|
||||||
var fldErrorCode = parseInt(ve.error);
|
var fldErrorCode = parseInt(ve.error);
|
||||||
fldErr =
|
fldErr =
|
||||||
window.$gz.locale.get("ErrorAPI" + fldErrorCode.toString()) +
|
window.$gz.translation.get("ErrorAPI" + fldErrorCode.toString()) +
|
||||||
" [" +
|
" [" +
|
||||||
ve.error +
|
ve.error +
|
||||||
"]";
|
"]";
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ export default {
|
|||||||
//there will be few exceptions so they will be coded in later if needed but assume anything with an id and a type
|
//there will be few exceptions so they will be coded in later if needed but assume anything with an id and a type
|
||||||
if (isCoreBizObject) {
|
if (isCoreBizObject) {
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("Attachments"),
|
title: window.$gz.translation.get("Attachments"),
|
||||||
icon: "paperclip",
|
icon: "paperclip",
|
||||||
key: "app:attachments",
|
key: "app:attachments",
|
||||||
data: { ayaType: formAyaType, recordId: formRecordId }
|
data: { ayaType: formAyaType, recordId: formRecordId }
|
||||||
});
|
});
|
||||||
|
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("WikiPage"),
|
title: window.$gz.translation.get("WikiPage"),
|
||||||
icon: "feather",
|
icon: "feather",
|
||||||
key: "app:wiki",
|
key: "app:wiki",
|
||||||
data: { ayaType: formAyaType, recordId: formRecordId }
|
data: { ayaType: formAyaType, recordId: formRecordId }
|
||||||
@@ -72,7 +72,7 @@ export default {
|
|||||||
//basically it's now a "Reminder" type of object but it's own thing with separate collection
|
//basically it's now a "Reminder" type of object but it's own thing with separate collection
|
||||||
|
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("Review"),
|
title: window.$gz.translation.get("Review"),
|
||||||
icon: "calendar-check",
|
icon: "calendar-check",
|
||||||
key: "app:review",
|
key: "app:review",
|
||||||
data: { ayaType: formAyaType, recordId: formRecordId }
|
data: { ayaType: formAyaType, recordId: formRecordId }
|
||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
//AFAIK right now any item with an id and a type can have a history
|
//AFAIK right now any item with an id and a type can have a history
|
||||||
//anything not would be the exception rather than the rule
|
//anything not would be the exception rather than the rule
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("History"),
|
title: window.$gz.translation.get("History"),
|
||||||
icon: "history",
|
icon: "history",
|
||||||
key: "app:history",
|
key: "app:history",
|
||||||
data: { ayaType: formAyaType, recordId: formRecordId }
|
data: { ayaType: formAyaType, recordId: formRecordId }
|
||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//CUSTOMIZE
|
//CUSTOMIZE
|
||||||
//set custom fields and link to locale text editor
|
//set custom fields and link to translation text editor
|
||||||
|
|
||||||
if (
|
if (
|
||||||
ctx.formData &&
|
ctx.formData &&
|
||||||
@@ -106,7 +106,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: window.$gz.locale.get("Customize"),
|
title: window.$gz.translation.get("Customize"),
|
||||||
icon: "sliders-h",
|
icon: "sliders-h",
|
||||||
data: ctx.formData.formCustomTemplateKey,
|
data: ctx.formData.formCustomTemplateKey,
|
||||||
key: "app:customize"
|
key: "app:customize"
|
||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
if (isCoreBizObject && ctx.icon != "fa-search") {
|
if (isCoreBizObject && ctx.icon != "fa-search") {
|
||||||
//For all forms but not on the search form itself; if this is necessary for others then make a nosearch or something flag controlled by incoming ctx but if not then this should suffice
|
//For all forms but not on the search form itself; if this is necessary for others then make a nosearch or something flag controlled by incoming ctx but if not then this should suffice
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("Search"),
|
title: window.$gz.translation.get("Search"),
|
||||||
icon: "search",
|
icon: "search",
|
||||||
key: "app:search",
|
key: "app:search",
|
||||||
data: formAyaType
|
data: formAyaType
|
||||||
@@ -137,7 +137,7 @@ export default {
|
|||||||
|
|
||||||
//HELP
|
//HELP
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("MenuHelp"),
|
title: window.$gz.translation.get("MenuHelp"),
|
||||||
icon: "question-circle",
|
icon: "question-circle",
|
||||||
key: "app:help",
|
key: "app:help",
|
||||||
data: vm.appBar.helpUrl
|
data: vm.appBar.helpUrl
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
//ABOUT
|
//ABOUT
|
||||||
if (ctx.helpUrl != "form-ay-about") {
|
if (ctx.helpUrl != "form-ay-about") {
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
title: window.$gz.translation.get("HelpAboutAyaNova"),
|
||||||
icon: "info-circle",
|
icon: "info-circle",
|
||||||
key: "app:nav:abt",
|
key: "app:nav:abt",
|
||||||
data: "ay-about"
|
data: "ay-about"
|
||||||
@@ -155,7 +155,7 @@ export default {
|
|||||||
|
|
||||||
//LOGOUT
|
//LOGOUT
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: window.$gz.locale.get("Logout"),
|
title: window.$gz.translation.get("Logout"),
|
||||||
icon: "sign-out-alt",
|
icon: "sign-out-alt",
|
||||||
key: "app:logout"
|
key: "app:logout"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ export default function initialize() {
|
|||||||
var promise = new Promise(function(resolve) {
|
var promise = new Promise(function(resolve) {
|
||||||
if (window.$gz.store.state.authenticated) {
|
if (window.$gz.store.state.authenticated) {
|
||||||
//Fetch the core localized text keys that will always be required by user
|
//Fetch the core localized text keys that will always be required by user
|
||||||
window.$gz.locale
|
window.$gz.translation
|
||||||
.fetch(window.$gz.locale.coreKeys)
|
.fetch(window.$gz.translation.coreKeys)
|
||||||
.then(function initializeNavPanel() {
|
.then(function initializeNavPanel() {
|
||||||
var key = 0;
|
var key = 0;
|
||||||
var sub = [];
|
var sub = [];
|
||||||
@@ -44,7 +44,7 @@ export default function initialize() {
|
|||||||
) {
|
) {
|
||||||
//DASHBOARD
|
//DASHBOARD
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Dashboard"),
|
title: window.$gz.translation.get("Dashboard"),
|
||||||
icon: "tachometer-alt",
|
icon: "tachometer-alt",
|
||||||
route: "/home-dashboard",
|
route: "/home-dashboard",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -70,7 +70,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Search"),
|
title: window.$gz.translation.get("Search"),
|
||||||
icon: "search",
|
icon: "search",
|
||||||
route: "/home-search",
|
route: "/home-search",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -79,7 +79,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//SCHEDULE (personal)
|
//SCHEDULE (personal)
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Schedule"),
|
title: window.$gz.translation.get("Schedule"),
|
||||||
icon: "calendar-day",
|
icon: "calendar-day",
|
||||||
route: "/home-schedule",
|
route: "/home-schedule",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -87,7 +87,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//MEMOS
|
//MEMOS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("MemoList"),
|
title: window.$gz.translation.get("MemoList"),
|
||||||
icon: "inbox",
|
icon: "inbox",
|
||||||
route: "/home-memos",
|
route: "/home-memos",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -95,7 +95,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//REMINDERS (SCHEDULE MARKERS)
|
//REMINDERS (SCHEDULE MARKERS)
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ReminderList"),
|
title: window.$gz.translation.get("ReminderList"),
|
||||||
icon: "sticky-note",
|
icon: "sticky-note",
|
||||||
route: "/home-reminders",
|
route: "/home-reminders",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -103,7 +103,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//USER SETTINGS
|
//USER SETTINGS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("UserSettings"),
|
title: window.$gz.translation.get("UserSettings"),
|
||||||
icon: "user-cog",
|
icon: "user-cog",
|
||||||
route: "/home-user-settings",
|
route: "/home-user-settings",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -112,15 +112,15 @@ export default function initialize() {
|
|||||||
//Moved these two into user settings
|
//Moved these two into user settings
|
||||||
// //USER LOCALE
|
// //USER LOCALE
|
||||||
// sub.push({
|
// sub.push({
|
||||||
// title: window.$gz.locale.get("Locale"),
|
// title: window.$gz.translation.get("Locale"),
|
||||||
// icon: "language",
|
// icon: "language",
|
||||||
// route: "/home-locale",
|
// route: "/home-translation",
|
||||||
// key: key++
|
// key: key++
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// //SET LOGIN
|
// //SET LOGIN
|
||||||
// sub.push({
|
// sub.push({
|
||||||
// title: window.$gz.locale.get("SetLoginPassword"),
|
// title: window.$gz.translation.get("SetLoginPassword"),
|
||||||
// icon: "key",
|
// icon: "key",
|
||||||
// route: "/home-password",
|
// route: "/home-password",
|
||||||
// key: key++
|
// key: key++
|
||||||
@@ -144,7 +144,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("NotifySubscriptionList"),
|
title: window.$gz.translation.get("NotifySubscriptionList"),
|
||||||
icon: "bullhorn",
|
icon: "bullhorn",
|
||||||
route: "/home-notify-subscriptions",
|
route: "/home-notify-subscriptions",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -153,7 +153,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//HOME
|
//HOME
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Home"),
|
window.$gz.translation.get("Home"),
|
||||||
"home",
|
"home",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -180,7 +180,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//CUSTOMERS subitem
|
//CUSTOMERS subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ClientList"),
|
title: window.$gz.translation.get("ClientList"),
|
||||||
icon: "address-card",
|
icon: "address-card",
|
||||||
route: "/cust-customers",
|
route: "/cust-customers",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -188,7 +188,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//HEAD OFFICES subitem
|
//HEAD OFFICES subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("HeadOfficeList"),
|
title: window.$gz.translation.get("HeadOfficeList"),
|
||||||
icon: "sitemap",
|
icon: "sitemap",
|
||||||
route: "/cust-headoffices",
|
route: "/cust-headoffices",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -196,7 +196,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// ** CUSTOMER (TOP)
|
// ** CUSTOMER (TOP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("ClientList"),
|
window.$gz.translation.get("ClientList"),
|
||||||
"address-book",
|
"address-book",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -231,7 +231,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Schedule"),
|
title: window.$gz.translation.get("Schedule"),
|
||||||
icon: "calendar-alt",
|
icon: "calendar-alt",
|
||||||
route: "/svc-schedule",
|
route: "/svc-schedule",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -250,7 +250,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("WorkorderServiceList"),
|
title: window.$gz.translation.get("WorkorderServiceList"),
|
||||||
icon: "tools",
|
icon: "tools",
|
||||||
route: "/svc-workorders",
|
route: "/svc-workorders",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -261,7 +261,7 @@ export default function initialize() {
|
|||||||
//this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy
|
//this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy
|
||||||
//there used to be an array for 3rd level shit but that's whack yo! ;)
|
//there used to be an array for 3rd level shit but that's whack yo! ;)
|
||||||
// subSub.push({
|
// subSub.push({
|
||||||
// title: window.$gz.locale.get("WorkorderServiceTemplate"),
|
// title: window.$gz.translation.get("WorkorderServiceTemplate"),
|
||||||
// icon: "stamp",
|
// icon: "stamp",
|
||||||
// route: "/svc-workorder-templates",
|
// route: "/svc-workorder-templates",
|
||||||
// key: key++
|
// key: key++
|
||||||
@@ -271,7 +271,7 @@ export default function initialize() {
|
|||||||
//NOTE: this is the only item in this service level area that is visible to Sales
|
//NOTE: this is the only item in this service level area that is visible to Sales
|
||||||
//so there is no separate role check here as the service group role check supersedes this
|
//so there is no separate role check here as the service group role check supersedes this
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("WorkorderQuoteList"),
|
title: window.$gz.translation.get("WorkorderQuoteList"),
|
||||||
icon: "edit",
|
icon: "edit",
|
||||||
route: "/svc-quotes",
|
route: "/svc-quotes",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -289,7 +289,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get(
|
title: window.$gz.translation.get(
|
||||||
"WorkorderPreventiveMaintenanceList"
|
"WorkorderPreventiveMaintenanceList"
|
||||||
),
|
),
|
||||||
icon: "business-time",
|
icon: "business-time",
|
||||||
@@ -310,7 +310,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("UnitList"),
|
title: window.$gz.translation.get("UnitList"),
|
||||||
icon: "fan",
|
icon: "fan",
|
||||||
route: "/svc-units",
|
route: "/svc-units",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -318,7 +318,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//UNIT MODELS subitem
|
//UNIT MODELS subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("UnitModels"),
|
title: window.$gz.translation.get("UnitModels"),
|
||||||
icon: "dice-d20",
|
icon: "dice-d20",
|
||||||
route: "/svc-unit-models",
|
route: "/svc-unit-models",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -336,7 +336,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("LoanItemList"),
|
title: window.$gz.translation.get("LoanItemList"),
|
||||||
icon: "plug",
|
icon: "plug",
|
||||||
route: "/svc-loaners",
|
route: "/svc-loaners",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -355,7 +355,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ContractList"),
|
title: window.$gz.translation.get("ContractList"),
|
||||||
icon: "file-contract",
|
icon: "file-contract",
|
||||||
route: "/svc-contracts",
|
route: "/svc-contracts",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -374,7 +374,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ClientServiceRequestList"),
|
title: window.$gz.translation.get("ClientServiceRequestList"),
|
||||||
icon: "child",
|
icon: "child",
|
||||||
route: "/svc-csr-list",
|
route: "/svc-csr-list",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -383,7 +383,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//**** Service (TOP GROUP)
|
//**** Service (TOP GROUP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Service"),
|
window.$gz.translation.get("Service"),
|
||||||
"toolbox",
|
"toolbox",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -405,7 +405,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//PARTS (part list)
|
//PARTS (part list)
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("PartList"),
|
title: window.$gz.translation.get("PartList"),
|
||||||
icon: "boxes",
|
icon: "boxes",
|
||||||
route: "/inv-parts",
|
route: "/inv-parts",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -413,7 +413,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//INVENTORY
|
//INVENTORY
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("PartByWarehouseInventoryList"),
|
title: window.$gz.translation.get("PartByWarehouseInventoryList"),
|
||||||
icon: "pallet",
|
icon: "pallet",
|
||||||
route: "/inv-part-inventory",
|
route: "/inv-part-inventory",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -421,7 +421,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//PART REQUESTS
|
//PART REQUESTS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("WorkorderItemPartRequestList"),
|
title: window.$gz.translation.get("WorkorderItemPartRequestList"),
|
||||||
icon: "paper-plane",
|
icon: "paper-plane",
|
||||||
route: "/inv-part-requests",
|
route: "/inv-part-requests",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -429,7 +429,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//PURCHASE ORDERS
|
//PURCHASE ORDERS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("InventoryPurchaseOrders"),
|
title: window.$gz.translation.get("InventoryPurchaseOrders"),
|
||||||
icon: "shipping-fast",
|
icon: "shipping-fast",
|
||||||
route: "/inv-purchase-orders",
|
route: "/inv-purchase-orders",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -439,7 +439,9 @@ export default function initialize() {
|
|||||||
|
|
||||||
//PURCHASE ORDER RECEIPTS
|
//PURCHASE ORDER RECEIPTS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("InventoryPurchaseOrderReceipts"),
|
title: window.$gz.translation.get(
|
||||||
|
"InventoryPurchaseOrderReceipts"
|
||||||
|
),
|
||||||
icon: "dolly-flatbed",
|
icon: "dolly-flatbed",
|
||||||
route: "/inv-purchase-order-receipts",
|
route: "/inv-purchase-order-receipts",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -451,7 +453,9 @@ export default function initialize() {
|
|||||||
|
|
||||||
//ADJUSTMENTS
|
//ADJUSTMENTS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("InventoryPartInventoryAdjustments"),
|
title: window.$gz.translation.get(
|
||||||
|
"InventoryPartInventoryAdjustments"
|
||||||
|
),
|
||||||
icon: "dolly",
|
icon: "dolly",
|
||||||
route: "/inv-adjustments",
|
route: "/inv-adjustments",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -459,7 +463,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//**** INVENTORY (TOP GROUP)
|
//**** INVENTORY (TOP GROUP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Inventory"),
|
window.$gz.translation.get("Inventory"),
|
||||||
"box",
|
"box",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -480,7 +484,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("VendorList"),
|
window.$gz.translation.get("VendorList"),
|
||||||
"store",
|
"store",
|
||||||
"/vendors",
|
"/vendors",
|
||||||
[],
|
[],
|
||||||
@@ -500,7 +504,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//FAKE subitem as is still TBD
|
//FAKE subitem as is still TBD
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Accounting"),
|
title: window.$gz.translation.get("Accounting"),
|
||||||
icon: "calculator",
|
icon: "calculator",
|
||||||
route: "/acc-accounting",
|
route: "/acc-accounting",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -508,7 +512,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// ** ACCOUNTING (TOP)
|
// ** ACCOUNTING (TOP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Accounting"),
|
window.$gz.translation.get("Accounting"),
|
||||||
"calculator",
|
"calculator",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -528,7 +532,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// GLOBAL SETTINGS
|
// GLOBAL SETTINGS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("AdministrationGlobalSettings"),
|
title: window.$gz.translation.get("AdministrationGlobalSettings"),
|
||||||
icon: "cogs",
|
icon: "cogs",
|
||||||
route: "/adm-global-settings",
|
route: "/adm-global-settings",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -536,7 +540,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// LICENSE
|
// LICENSE
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("HelpLicense"),
|
title: window.$gz.translation.get("HelpLicense"),
|
||||||
icon: "ticket-alt",
|
icon: "ticket-alt",
|
||||||
route: "/adm-license",
|
route: "/adm-license",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -544,7 +548,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// USERS
|
// USERS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("UserList"),
|
title: window.$gz.translation.get("UserList"),
|
||||||
icon: "users",
|
icon: "users",
|
||||||
route: "/adm-users",
|
route: "/adm-users",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -554,7 +558,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//LOCALIZED TEXT DESIGNER
|
//LOCALIZED TEXT DESIGNER
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("LocalizedTextDesign"),
|
title: window.$gz.translation.get("LocalizedTextDesign"),
|
||||||
icon: "language",
|
icon: "language",
|
||||||
route: "/adm-localized-text",
|
route: "/adm-localized-text",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -562,7 +566,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//REPORT TEMPLATES
|
//REPORT TEMPLATES
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ReportList"),
|
title: window.$gz.translation.get("ReportList"),
|
||||||
icon: "th-list",
|
icon: "th-list",
|
||||||
route: "/adm-report-templates",
|
route: "/adm-report-templates",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -570,7 +574,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//FILES IN DATABASE
|
//FILES IN DATABASE
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Attachments"),
|
title: window.$gz.translation.get("Attachments"),
|
||||||
icon: "folder",
|
icon: "folder",
|
||||||
route: "/adm-attachments",
|
route: "/adm-attachments",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -578,7 +582,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//EVENT LOG / HISTORY
|
//EVENT LOG / HISTORY
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("History"),
|
title: window.$gz.translation.get("History"),
|
||||||
icon: "history",
|
icon: "history",
|
||||||
route: "/adm-history",
|
route: "/adm-history",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -586,7 +590,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//KPI / METRICS / CHARTS AND STUFF
|
//KPI / METRICS / CHARTS AND STUFF
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Statistics"),
|
title: window.$gz.translation.get("Statistics"),
|
||||||
icon: "chart-line",
|
icon: "chart-line",
|
||||||
route: "/adm-statistics",
|
route: "/adm-statistics",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -594,7 +598,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// ** ADMINISTRATION (TOP)
|
// ** ADMINISTRATION (TOP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Administration"),
|
window.$gz.translation.get("Administration"),
|
||||||
"user-tie",
|
"user-tie",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -614,7 +618,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// ARCHIVE
|
// ARCHIVE
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("Backup"),
|
title: window.$gz.translation.get("Backup"),
|
||||||
icon: "file-archive",
|
icon: "file-archive",
|
||||||
route: "/ops-backup",
|
route: "/ops-backup",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -628,7 +632,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// JOBS
|
// JOBS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ServerJobs"),
|
title: window.$gz.translation.get("ServerJobs"),
|
||||||
icon: "robot",
|
icon: "robot",
|
||||||
route: "/ops-jobs",
|
route: "/ops-jobs",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -636,7 +640,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// LOGS
|
// LOGS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ServerLog"),
|
title: window.$gz.translation.get("ServerLog"),
|
||||||
icon: "history",
|
icon: "history",
|
||||||
route: "/ops-log",
|
route: "/ops-log",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -644,7 +648,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//METRICS
|
//METRICS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ServerMetrics"),
|
title: window.$gz.translation.get("ServerMetrics"),
|
||||||
icon: "file-medical-alt",
|
icon: "file-medical-alt",
|
||||||
route: "/ops-metrics",
|
route: "/ops-metrics",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -652,7 +656,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//NOTIFICATION CONFIG AND HISTORY
|
//NOTIFICATION CONFIG AND HISTORY
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("NotificationSettings"),
|
title: window.$gz.translation.get("NotificationSettings"),
|
||||||
icon: "bullhorn",
|
icon: "bullhorn",
|
||||||
route: "/ops-notification-settings",
|
route: "/ops-notification-settings",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -660,7 +664,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
// ** OPERATIONS (TOP)
|
// ** OPERATIONS (TOP)
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Operations"),
|
window.$gz.translation.get("Operations"),
|
||||||
"server",
|
"server",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -680,7 +684,7 @@ export default function initialize() {
|
|||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("WidgetList"),
|
window.$gz.translation.get("WidgetList"),
|
||||||
"vial",
|
"vial",
|
||||||
"/widgets",
|
"/widgets",
|
||||||
[],
|
[],
|
||||||
@@ -705,7 +709,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//CSR LIST subitem
|
//CSR LIST subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ClientServiceRequestList"),
|
title: window.$gz.translation.get("ClientServiceRequestList"),
|
||||||
icon: "child",
|
icon: "child",
|
||||||
route: "/customer-csr-list",
|
route: "/customer-csr-list",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -713,7 +717,7 @@ export default function initialize() {
|
|||||||
|
|
||||||
//WORKORDERS subitem
|
//WORKORDERS subitem
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("WorkorderServiceList"),
|
title: window.$gz.translation.get("WorkorderServiceList"),
|
||||||
icon: "tools",
|
icon: "tools",
|
||||||
route: "/customer-workorders",
|
route: "/customer-workorders",
|
||||||
key: key++
|
key: key++
|
||||||
@@ -722,7 +726,7 @@ export default function initialize() {
|
|||||||
//** CUSTOMER LOGIN HOME (TOP)
|
//** CUSTOMER LOGIN HOME (TOP)
|
||||||
|
|
||||||
addNavItem(
|
addNavItem(
|
||||||
window.$gz.locale.get("Home"),
|
window.$gz.translation.get("Home"),
|
||||||
"home",
|
"home",
|
||||||
undefined,
|
undefined,
|
||||||
sub,
|
sub,
|
||||||
@@ -758,12 +762,12 @@ export default function initialize() {
|
|||||||
//get language to use, try user set override first, if empty then browser set, if empty then default to en-us
|
//get language to use, try user set override first, if empty then browser set, if empty then default to en-us
|
||||||
l.languageOverride =
|
l.languageOverride =
|
||||||
res.data.languageOverride ||
|
res.data.languageOverride ||
|
||||||
window.$gz.locale.getBrowserFirstLanguage() ||
|
window.$gz.translation.getBrowserFirstLanguage() ||
|
||||||
"en-US";
|
"en-US";
|
||||||
|
|
||||||
l.timeZoneOverride =
|
l.timeZoneOverride =
|
||||||
res.data.timeZoneOverride ||
|
res.data.timeZoneOverride ||
|
||||||
window.$gz.locale.getBrowserTimeZoneName() ||
|
window.$gz.translation.getBrowserTimeZoneName() ||
|
||||||
"America/New_York";
|
"America/New_York";
|
||||||
|
|
||||||
//No browser setting for this so meh
|
//No browser setting for this so meh
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
export default {
|
export default {
|
||||||
get(key) {
|
get(key) {
|
||||||
// debugger;
|
// debugger;
|
||||||
if (!window.$gz._.has(window.$gz.store.state.localeText, key)) {
|
if (!window.$gz._.has(window.$gz.store.state.translationText, key)) {
|
||||||
return "??" + key;
|
return "??" + key;
|
||||||
}
|
}
|
||||||
return window.$gz.store.state.localeText[key];
|
return window.$gz.store.state.translationText[key];
|
||||||
},
|
},
|
||||||
fetch(keys) {
|
fetch(keys) {
|
||||||
return new Promise(function fetchLocaleKeysFromServer(resolve) {
|
return new Promise(function fetchLocaleKeysFromServer(resolve) {
|
||||||
@@ -16,7 +16,9 @@ export default {
|
|||||||
//for example datatables have dynamic column names so they need to fetch on demand
|
//for example datatables have dynamic column names so they need to fetch on demand
|
||||||
var needIt = [];
|
var needIt = [];
|
||||||
for (var i = 0; i < keys.length; i++) {
|
for (var i = 0; i < keys.length; i++) {
|
||||||
if (!window.$gz._.has(window.$gz.store.state.localeText, keys[i])) {
|
if (
|
||||||
|
!window.$gz._.has(window.$gz.store.state.translationText, keys[i])
|
||||||
|
) {
|
||||||
needIt.push(keys[i]);
|
needIt.push(keys[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +30,7 @@ export default {
|
|||||||
|
|
||||||
//step 2: get it
|
//step 2: get it
|
||||||
fetch(
|
fetch(
|
||||||
window.$gz.api.APIUrl("locale/subset"),
|
window.$gz.api.APIUrl("translation/subset"),
|
||||||
window.$gz.api.fetchPostOptions(needIt)
|
window.$gz.api.fetchPostOptions(needIt)
|
||||||
)
|
)
|
||||||
.then(window.$gz.api.status)
|
.then(window.$gz.api.status)
|
||||||
@@ -37,7 +39,7 @@ export default {
|
|||||||
window.$gz._.forEach(
|
window.$gz._.forEach(
|
||||||
response.data,
|
response.data,
|
||||||
function commitFetchedLTItemToStore(item) {
|
function commitFetchedLTItemToStore(item) {
|
||||||
window.$gz.store.commit("addLocaleText", item);
|
window.$gz.store.commit("addTranslationText", item);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -162,7 +164,7 @@ export default {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
// Take in a string that contains one or more
|
// Take in a string that contains one or more
|
||||||
//locale keys between square brackets
|
//translation keys between square brackets
|
||||||
//translate each and return the string translated
|
//translate each and return the string translated
|
||||||
//
|
//
|
||||||
translateString(s) {
|
translateString(s) {
|
||||||
@@ -27,8 +27,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formattedValue: this.value,
|
formattedValue: this.value,
|
||||||
currencyName: window.$gz.locale.getCurrencyName(),
|
currencyName: window.$gz.translation.getCurrencyName(),
|
||||||
languageName: window.$gz.locale.getBrowserFirstLanguage()
|
languageName: window.$gz.translation.getBrowserFirstLanguage()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -48,10 +48,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
},
|
},
|
||||||
handleInput(value) {
|
handleInput(value) {
|
||||||
this.$emit(
|
this.$emit(
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
lt: function(ltkey) {
|
lt: function(ltkey) {
|
||||||
return window.$gz.locale.get(ltkey);
|
return window.$gz.translation.get(ltkey);
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
//nothing
|
//nothing
|
||||||
@@ -430,8 +430,8 @@ export default {
|
|||||||
if (!window.$gz._) {
|
if (!window.$gz._) {
|
||||||
throw "custom-fields-control: $gz._ (lodash) is required and missing";
|
throw "custom-fields-control: $gz._ (lodash) is required and missing";
|
||||||
}
|
}
|
||||||
if (!window.$gz.locale) {
|
if (!window.$gz.translation) {
|
||||||
throw "custom-fields-control: $gz.locale is required and missing";
|
throw "custom-fields-control: $gz.translation is required and missing";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,9 +45,11 @@ export default {
|
|||||||
oldDate: null,
|
oldDate: null,
|
||||||
dlgdate: false,
|
dlgdate: false,
|
||||||
//cache display format stuff
|
//cache display format stuff
|
||||||
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
|
timeZoneName: window.$gz.translation.getBrowserTimeZoneName(),
|
||||||
languageName: window.$gz.locale.getBrowserLanguages(),
|
languageName: window.$gz.translation.getBrowserLanguages(),
|
||||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
|
defaultLocale: window.$gz.translation
|
||||||
|
.getBrowserFirstLanguage()
|
||||||
|
.split("-", 1)[0]
|
||||||
}),
|
}),
|
||||||
props: {
|
props: {
|
||||||
label: String,
|
label: String,
|
||||||
@@ -61,7 +63,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -84,7 +86,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
formatDateTime() {
|
formatDateTime() {
|
||||||
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -92,14 +94,14 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
formatDate() {
|
formatDate() {
|
||||||
return window.$gz.locale.utcDateToShortDateLocalized(
|
return window.$gz.translation.utcDateToShortDateLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName
|
this.languageName
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
formatTime() {
|
formatTime() {
|
||||||
return window.$gz.locale.utcDateToShortTimeLocalized(
|
return window.$gz.translation.utcDateToShortTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -109,7 +111,7 @@ export default {
|
|||||||
dateOnly: {
|
dateOnly: {
|
||||||
get() {
|
get() {
|
||||||
//return date only portion converted to local working time zone: YYYY-MM-DD
|
//return date only portion converted to local working time zone: YYYY-MM-DD
|
||||||
return window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601DateOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -120,7 +122,7 @@ export default {
|
|||||||
if (!TimePortion) {
|
if (!TimePortion) {
|
||||||
TimePortion = "00:00:00";
|
TimePortion = "00:00:00";
|
||||||
}
|
}
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
value + "T" + TimePortion,
|
value + "T" + TimePortion,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -130,7 +132,7 @@ export default {
|
|||||||
//expects just the hours minutes seconds portion: 18:18:49
|
//expects just the hours minutes seconds portion: 18:18:49
|
||||||
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
||||||
get() {
|
get() {
|
||||||
return window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601TimeOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -152,7 +154,7 @@ export default {
|
|||||||
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
DatePortion + "T" + value,
|
DatePortion + "T" + value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -85,11 +85,13 @@ export default {
|
|||||||
dlgdate: false,
|
dlgdate: false,
|
||||||
dlgtime: false,
|
dlgtime: false,
|
||||||
//cache display format stuff
|
//cache display format stuff
|
||||||
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
|
timeZoneName: window.$gz.translation.getBrowserTimeZoneName(),
|
||||||
languageName: window.$gz.locale.getBrowserLanguages(),
|
languageName: window.$gz.translation.getBrowserLanguages(),
|
||||||
hour12: window.$gz.locale.getHour12(),
|
hour12: window.$gz.translation.getHour12(),
|
||||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
|
defaultLocale: window.$gz.translation
|
||||||
// ampmFormat: window.$gz.locale.getHour12() ? "ampm" : "24hr"
|
.getBrowserFirstLanguage()
|
||||||
|
.split("-", 1)[0]
|
||||||
|
// ampmFormat: window.$gz.translation.getHour12() ? "ampm" : "24hr"
|
||||||
//:format="ampmFormat"
|
//:format="ampmFormat"
|
||||||
}),
|
}),
|
||||||
props: {
|
props: {
|
||||||
@@ -104,7 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -127,7 +129,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
formatDateTime() {
|
formatDateTime() {
|
||||||
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -135,14 +137,14 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
formatDate() {
|
formatDate() {
|
||||||
return window.$gz.locale.utcDateToShortDateLocalized(
|
return window.$gz.translation.utcDateToShortDateLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName
|
this.languageName
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
formatTime() {
|
formatTime() {
|
||||||
return window.$gz.locale.utcDateToShortTimeLocalized(
|
return window.$gz.translation.utcDateToShortTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -152,7 +154,7 @@ export default {
|
|||||||
dateOnly: {
|
dateOnly: {
|
||||||
get() {
|
get() {
|
||||||
//return date only portion converted to local working time zone: YYYY-MM-DD
|
//return date only portion converted to local working time zone: YYYY-MM-DD
|
||||||
return window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601DateOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -163,7 +165,7 @@ export default {
|
|||||||
if (!TimePortion) {
|
if (!TimePortion) {
|
||||||
TimePortion = "00:00:00";
|
TimePortion = "00:00:00";
|
||||||
}
|
}
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
value + "T" + TimePortion,
|
value + "T" + TimePortion,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -173,7 +175,7 @@ export default {
|
|||||||
//expects just the hours minutes seconds portion: 18:18:49
|
//expects just the hours minutes seconds portion: 18:18:49
|
||||||
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
||||||
get() {
|
get() {
|
||||||
return window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601TimeOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -195,7 +197,7 @@ export default {
|
|||||||
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
DatePortion + "T" + value,
|
DatePortion + "T" + value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formattedValue: this.value,
|
formattedValue: this.value,
|
||||||
languageName: window.$gz.locale.getBrowserFirstLanguage()
|
languageName: window.$gz.translation.getBrowserFirstLanguage()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -48,10 +48,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
},
|
},
|
||||||
handleInput(value) {
|
handleInput(value) {
|
||||||
this.$emit(
|
this.$emit(
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
||||||
},
|
},
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
getDataFromApi() {
|
getDataFromApi() {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
@@ -534,8 +534,8 @@ export default {
|
|||||||
(async function() {
|
(async function() {
|
||||||
//Save a copy of the server columns data for handling button clicks etc later
|
//Save a copy of the server columns data for handling button clicks etc later
|
||||||
vm.serverColumns = res.columns;
|
vm.serverColumns = res.columns;
|
||||||
//Make sure the locale keys are fetched
|
//Make sure the translation keys are fetched
|
||||||
await fetchLocalizedHeaderNames(res.columns); //Note can use await here because it's wrapped inside an async function call, it will wait then resume next stuff below
|
await fetchTranslatedHeaderNames(res.columns); //Note can use await here because it's wrapped inside an async function call, it will wait then resume next stuff below
|
||||||
await fetchEnums(res.columns);
|
await fetchEnums(res.columns);
|
||||||
|
|
||||||
//build vm.headers here
|
//build vm.headers here
|
||||||
@@ -584,7 +584,7 @@ function buildHeaders(columnData) {
|
|||||||
for (var i = 0; i < columnData.length; i++) {
|
for (var i = 0; i < columnData.length; i++) {
|
||||||
var cm = columnData[i];
|
var cm = columnData[i];
|
||||||
var h = {};
|
var h = {};
|
||||||
h.text = window.$gz.locale.get(cm.cm);
|
h.text = window.$gz.translation.get(cm.cm);
|
||||||
h.value = "columns.c" + i.toString(); //+".v";
|
h.value = "columns.c" + i.toString(); //+".v";
|
||||||
ret.push(h);
|
ret.push(h);
|
||||||
}
|
}
|
||||||
@@ -594,7 +594,7 @@ function buildHeaders(columnData) {
|
|||||||
|
|
||||||
//Called by getDataFromApi on retrieval of list with columnData
|
//Called by getDataFromApi on retrieval of list with columnData
|
||||||
function buildRecords(listData, columndefinitions) {
|
function buildRecords(listData, columndefinitions) {
|
||||||
//iterate data, build each object keyed with index name and display set to correct locale filter and then return
|
//iterate data, build each object keyed with index name and display set to correct translated filter and then return
|
||||||
|
|
||||||
var ret = [];
|
var ret = [];
|
||||||
if (!listData) {
|
if (!listData) {
|
||||||
@@ -602,8 +602,8 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//cache display format stuff
|
//cache display format stuff
|
||||||
var timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
|
var timeZoneName = window.$gz.translation.getBrowserTimeZoneName();
|
||||||
var languageName = window.$gz.locale.getBrowserLanguages();
|
var languageName = window.$gz.translation.getBrowserLanguages();
|
||||||
var hour12 = window.$gz.store.state.locale.hour12;
|
var hour12 = window.$gz.store.state.locale.hour12;
|
||||||
var currencyName = window.$gz.store.state.locale.currencyName;
|
var currencyName = window.$gz.store.state.locale.currencyName;
|
||||||
|
|
||||||
@@ -640,7 +640,7 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
*/
|
*/
|
||||||
switch (dataType) {
|
switch (dataType) {
|
||||||
case 1: //datetime format to shortdatetime
|
case 1: //datetime format to shortdatetime
|
||||||
display = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
display = window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||||
display,
|
display,
|
||||||
timeZoneName,
|
timeZoneName,
|
||||||
languageName,
|
languageName,
|
||||||
@@ -648,14 +648,14 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 2: //date only
|
case 2: //date only
|
||||||
display = window.$gz.locale.utcDateToShortDateLocalized(
|
display = window.$gz.translation.utcDateToShortDateLocalized(
|
||||||
display,
|
display,
|
||||||
timeZoneName,
|
timeZoneName,
|
||||||
languageName
|
languageName
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 3: //time only
|
case 3: //time only
|
||||||
display = window.$gz.locale.utcDateToShortTimeLocalized(
|
display = window.$gz.translation.utcDateToShortTimeLocalized(
|
||||||
display,
|
display,
|
||||||
timeZoneName,
|
timeZoneName,
|
||||||
languageName,
|
languageName,
|
||||||
@@ -663,10 +663,13 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 7: //decimal
|
case 7: //decimal
|
||||||
display = window.$gz.locale.decimalLocalized(display, languageName);
|
display = window.$gz.translation.decimalLocalized(
|
||||||
|
display,
|
||||||
|
languageName
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 8: //currency
|
case 8: //currency
|
||||||
display = window.$gz.locale.currencyLocalized(
|
display = window.$gz.translation.currencyLocalized(
|
||||||
display,
|
display,
|
||||||
languageName,
|
languageName,
|
||||||
currencyName
|
currencyName
|
||||||
@@ -717,9 +720,9 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Ensures column names are present in locale table
|
// Ensures column names are present in translation table
|
||||||
//
|
//
|
||||||
async function fetchLocalizedHeaderNames(columnData) {
|
async function fetchTranslatedHeaderNames(columnData) {
|
||||||
if (!columnData) {
|
if (!columnData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -729,7 +732,7 @@ async function fetchLocalizedHeaderNames(columnData) {
|
|||||||
headerKeys.push(cm.cm);
|
headerKeys.push(cm.cm);
|
||||||
}
|
}
|
||||||
//Now fetch all the keys and await the response before returning
|
//Now fetch all the keys and await the response before returning
|
||||||
await window.$gz.locale.fetch(headerKeys).then(() => {
|
await window.$gz.translation.fetch(headerKeys).then(() => {
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{{ currentNotification.message }}
|
{{ currentNotification.message }}
|
||||||
</v-alert>
|
</v-alert>
|
||||||
<v-btn text v-if="currentNotification.helpUrl" @click="helpClick()">
|
<v-btn text v-if="currentNotification.helpUrl" @click="helpClick()">
|
||||||
{{ this.$root.$gz.locale.get("More") }}
|
{{ this.$root.$gz.translation.get("More") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
<!-- </v-scale-transition> -->
|
<!-- </v-scale-transition> -->
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
lt: function(ltkey) {
|
lt: function(ltkey) {
|
||||||
return window.$gz.locale.get(ltkey);
|
return window.$gz.translation.get(ltkey);
|
||||||
},
|
},
|
||||||
addTag() {
|
addTag() {
|
||||||
var theTag = this.tagSearchEntry;
|
var theTag = this.tagSearchEntry;
|
||||||
@@ -127,8 +127,8 @@ export default {
|
|||||||
if (!window.$gz._) {
|
if (!window.$gz._) {
|
||||||
throw "tag-picker: $gz._ (lodash) is required and missing";
|
throw "tag-picker: $gz._ (lodash) is required and missing";
|
||||||
}
|
}
|
||||||
if (!window.$gz.locale) {
|
if (!window.$gz.translation) {
|
||||||
throw "tag-picker: $gz.locale is required and missing";
|
throw "tag-picker: $gz.translation is required and missing";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,10 +49,12 @@ export default {
|
|||||||
oldDate: null,
|
oldDate: null,
|
||||||
dlgtime: false,
|
dlgtime: false,
|
||||||
//cache display format stuff
|
//cache display format stuff
|
||||||
timeZoneName: window.$gz.locale.getBrowserTimeZoneName(),
|
timeZoneName: window.$gz.translation.getBrowserTimeZoneName(),
|
||||||
languageName: window.$gz.locale.getBrowserLanguages(),
|
languageName: window.$gz.translation.getBrowserLanguages(),
|
||||||
hour12: window.$gz.locale.getHour12(),
|
hour12: window.$gz.translation.getHour12(),
|
||||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
|
defaultLocale: window.$gz.translation
|
||||||
|
.getBrowserFirstLanguage()
|
||||||
|
.split("-", 1)[0]
|
||||||
}),
|
}),
|
||||||
props: {
|
props: {
|
||||||
label: String,
|
label: String,
|
||||||
@@ -66,7 +68,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -89,7 +91,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
formatDateTime() {
|
formatDateTime() {
|
||||||
return window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
return window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -97,7 +99,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
formatTime() {
|
formatTime() {
|
||||||
return window.$gz.locale.utcDateToShortTimeLocalized(
|
return window.$gz.translation.utcDateToShortTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName,
|
this.timeZoneName,
|
||||||
this.languageName,
|
this.languageName,
|
||||||
@@ -107,7 +109,7 @@ export default {
|
|||||||
dateOnly: {
|
dateOnly: {
|
||||||
get() {
|
get() {
|
||||||
//return date only portion converted to local working time zone: YYYY-MM-DD
|
//return date only portion converted to local working time zone: YYYY-MM-DD
|
||||||
return window.$gz.locale.utcDateStringToLocal8601DateOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601DateOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -118,7 +120,7 @@ export default {
|
|||||||
if (!TimePortion) {
|
if (!TimePortion) {
|
||||||
TimePortion = "00:00:00";
|
TimePortion = "00:00:00";
|
||||||
}
|
}
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
value + "T" + TimePortion,
|
value + "T" + TimePortion,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -128,7 +130,7 @@ export default {
|
|||||||
//expects just the hours minutes seconds portion: 18:18:49
|
//expects just the hours minutes seconds portion: 18:18:49
|
||||||
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
//Needs to convert into and out of the desired time zone or the control will show the UTC time instead
|
||||||
get() {
|
get() {
|
||||||
return window.$gz.locale.utcDateStringToLocal8601TimeOnlyString(
|
return window.$gz.translation.utcDateStringToLocal8601TimeOnlyString(
|
||||||
this.value,
|
this.value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
@@ -150,7 +152,7 @@ export default {
|
|||||||
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
DatePortion = fullYear + "-" + fullMonth + "-" + fullDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.date = window.$gz.locale.localTimeDateStringToUTC8601String(
|
this.date = window.$gz.translation.localTimeDateStringToUTC8601String(
|
||||||
DatePortion + "T" + value,
|
DatePortion + "T" + value,
|
||||||
this.timeZoneName
|
this.timeZoneName
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import gzeventbus from "./api/eventbus";
|
|||||||
import gzmenu from "./api/gzmenu";
|
import gzmenu from "./api/gzmenu";
|
||||||
import gzdialog from "./api/gzdialog";
|
import gzdialog from "./api/gzdialog";
|
||||||
import gzutil from "./api/gzutil";
|
import gzutil from "./api/gzutil";
|
||||||
import locale from "./api/locale";
|
import translation from "./api/translation";
|
||||||
import gzapi from "./api/gzapi";
|
import gzapi from "./api/gzapi";
|
||||||
import gzreport from "./api/gzreport";
|
import gzreport from "./api/gzreport";
|
||||||
import gzform from "./api/gzform";
|
import gzform from "./api/gzform";
|
||||||
@@ -51,7 +51,7 @@ import errorhandler from "./api/errorhandler";
|
|||||||
//
|
//
|
||||||
|
|
||||||
window.$gz = {
|
window.$gz = {
|
||||||
locale: locale,
|
translation: translation,
|
||||||
formCustomTemplate: gzformcustomtemplate,
|
formCustomTemplate: gzformcustomtemplate,
|
||||||
type: gztype,
|
type: gztype,
|
||||||
role: authorizationroles,
|
role: authorizationroles,
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ export default new Router({
|
|||||||
import(/* webpackChunkName: "home" */ "./views/home-user-settings.vue")
|
import(/* webpackChunkName: "home" */ "./views/home-user-settings.vue")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/home-locale",
|
path: "/home-translation",
|
||||||
name: "home-locale",
|
name: "home-translation",
|
||||||
component: () =>
|
component: () =>
|
||||||
import(/* webpackChunkName: "home" */ "./views/home-locale.vue")
|
import(/* webpackChunkName: "home" */ "./views/home-translation.vue")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/home-password",
|
path: "/home-password",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default new Vuex.Store({
|
|||||||
roles: 0,
|
roles: 0,
|
||||||
userType: 0,
|
userType: 0,
|
||||||
homePage: undefined,
|
homePage: undefined,
|
||||||
localeText: {},
|
translationText: {},
|
||||||
enums: {}, //all enum values with localized text to match stored as key e.g. enums:={AuthorizationRoles:{0:"no role",1:"Limited role"},UserTypes:{0:"Technician",1:"Client user"}}
|
enums: {}, //all enum values with localized text to match stored as key e.g. enums:={AuthorizationRoles:{0:"no role",1:"Limited role"},UserTypes:{0:"Technician",1:"Client user"}}
|
||||||
locale: {
|
locale: {
|
||||||
languageOverride: "en-US",
|
languageOverride: "en-US",
|
||||||
@@ -56,7 +56,7 @@ export default new Vuex.Store({
|
|||||||
state.userType = 0;
|
state.userType = 0;
|
||||||
state.homePage = undefined;
|
state.homePage = undefined;
|
||||||
state.navItems = [];
|
state.navItems = [];
|
||||||
state.localeText = {};
|
state.translationText = {};
|
||||||
state.enums = {};
|
state.enums = {};
|
||||||
state.formCustomTemplate = {};
|
state.formCustomTemplate = {};
|
||||||
state.apiUrl = "";
|
state.apiUrl = "";
|
||||||
@@ -68,8 +68,8 @@ export default new Vuex.Store({
|
|||||||
addNavItem(state, data) {
|
addNavItem(state, data) {
|
||||||
state.navItems.push(data);
|
state.navItems.push(data);
|
||||||
},
|
},
|
||||||
addLocaleText(state, data) {
|
addTranslationText(state, data) {
|
||||||
state.localeText[data.key] = data.value;
|
state.translationText[data.key] = data.value;
|
||||||
},
|
},
|
||||||
setFormCustomTemplateItem(state, data) {
|
setFormCustomTemplateItem(state, data) {
|
||||||
state.formCustomTemplate[data.formKey + "_concurrencyToken"] =
|
state.formCustomTemplate[data.formKey + "_concurrencyToken"] =
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "calculator",
|
icon: "calculator",
|
||||||
title: window.$gz.locale.get("Accounting"),
|
title: window.$gz.translation.get("Accounting"),
|
||||||
helpUrl: "form-acc-accounting"
|
helpUrl: "form-acc-accounting"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "folder",
|
icon: "folder",
|
||||||
title: window.$gz.locale.get("Attachments"),
|
title: window.$gz.translation.get("Attachments"),
|
||||||
helpUrl: "form-adm-attachments"
|
helpUrl: "form-adm-attachments"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "cogs",
|
icon: "cogs",
|
||||||
title: window.$gz.locale.get("AdministrationGlobalSettings"),
|
title: window.$gz.translation.get("AdministrationGlobalSettings"),
|
||||||
helpUrl: "form-adm-global-settings"
|
helpUrl: "form-adm-global-settings"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "history",
|
icon: "history",
|
||||||
title: window.$gz.locale.get("History"),
|
title: window.$gz.translation.get("History"),
|
||||||
helpUrl: "form-adm-history"
|
helpUrl: "form-adm-history"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "ticket-alt",
|
icon: "ticket-alt",
|
||||||
title: window.$gz.locale.get("HelpLicense"),
|
title: window.$gz.translation.get("HelpLicense"),
|
||||||
helpUrl: "form-adm-license"
|
helpUrl: "form-adm-license"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "language",
|
icon: "language",
|
||||||
title: window.$gz.locale.get("LocalizedTextDesign"),
|
title: window.$gz.translation.get("LocalizedTextDesign"),
|
||||||
helpUrl: "form-adm-localized-text"
|
helpUrl: "form-adm-localized-text"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "th-list",
|
icon: "th-list",
|
||||||
title: window.$gz.locale.get("ReportList"),
|
title: window.$gz.translation.get("ReportList"),
|
||||||
helpUrl: "form-adm-report-templates"
|
helpUrl: "form-adm-report-templates"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "chart-line",
|
icon: "chart-line",
|
||||||
title: window.$gz.locale.get("Statistics"),
|
title: window.$gz.translation.get("Statistics"),
|
||||||
helpUrl: "form-adm-statistics"
|
helpUrl: "form-adm-statistics"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "users",
|
icon: "users",
|
||||||
title: window.$gz.locale.get("UserList"),
|
title: window.$gz.translation.get("UserList"),
|
||||||
helpUrl: "form-adm-users"
|
helpUrl: "form-adm-users"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,25 +27,27 @@
|
|||||||
<div>
|
<div>
|
||||||
<span class="ml-6 body-1">12h: </span>
|
<span class="ml-6 body-1">12h: </span>
|
||||||
<span class="body-2">
|
<span class="body-2">
|
||||||
{{ locale().getHour12() }}
|
{{ translation().getHour12() }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="ml-6 body-1">{{ lt("TimeZone") }}: </span>
|
<span class="ml-6 body-1">{{ lt("TimeZone") }}: </span>
|
||||||
<span class="body-2">
|
<span class="body-2">
|
||||||
{{ locale().getBrowserTimeZoneName() }}
|
{{ translation().getBrowserTimeZoneName() }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="ml-6 body-1">{{ lt("LanguageCode") }}: </span>
|
<span class="ml-6 body-1">{{ lt("LanguageCode") }}: </span>
|
||||||
<span class="body-2">{{ locale().getBrowserFirstLanguage() }}</span>
|
<span class="body-2">{{
|
||||||
|
translation().getBrowserFirstLanguage()
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="ml-6 body-1">{{ lt("CurrencyCode") }}: </span>
|
<span class="ml-6 body-1">{{ lt("CurrencyCode") }}: </span>
|
||||||
<span class="body-2">{{ locale().getCurrencyName() }}</span>
|
<span class="body-2">{{ translation().getCurrencyName() }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-divider class="mt-6"></v-divider>
|
<v-divider class="mt-6"></v-divider>
|
||||||
@@ -167,10 +169,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -182,18 +184,18 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "fa-info-circle",
|
icon: "fa-info-circle",
|
||||||
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
title: window.$gz.translation.get("HelpAboutAyaNova"),
|
||||||
helpUrl: "form-ay-about",
|
helpUrl: "form-ay-about",
|
||||||
menuItems: [
|
menuItems: [
|
||||||
{
|
{
|
||||||
title: window.$gz.locale.get("Copy"),
|
title: window.$gz.translation.get("Copy"),
|
||||||
icon: "copy",
|
icon: "copy",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: "about:copysupportinfo",
|
key: "about:copysupportinfo",
|
||||||
vm: vm
|
vm: vm
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: window.$gz.locale.get("Log"),
|
title: window.$gz.translation.get("Log"),
|
||||||
icon: "glasses",
|
icon: "glasses",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: "app:nav:log",
|
key: "app:nav:log",
|
||||||
@@ -284,7 +286,7 @@ function fetchUILocalizedText(vm) {
|
|||||||
"CurrencyCode"
|
"CurrencyCode"
|
||||||
];
|
];
|
||||||
|
|
||||||
return window.$gz.locale.fetch(ltKeysRequired);
|
return window.$gz.translation.fetch(ltKeysRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "paperclip",
|
icon: "paperclip",
|
||||||
title: window.$gz.locale.get("Attachments"),
|
title: window.$gz.translation.get("Attachments"),
|
||||||
helpUrl: "form-ay-attachments"
|
helpUrl: "form-ay-attachments"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
lt: function(ltkey) {
|
lt: function(ltkey) {
|
||||||
return window.$gz.locale.get(ltkey);
|
return window.$gz.translation.get(ltkey);
|
||||||
},
|
},
|
||||||
visibleChanged: function(item) {
|
visibleChanged: function(item) {
|
||||||
//Note: stock items can't be changed so no need to take that into account
|
//Note: stock items can't be changed so no need to take that into account
|
||||||
@@ -298,7 +298,7 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "fa-sliders-h",
|
icon: "fa-sliders-h",
|
||||||
title: window.$gz.locale.get("Customize"),
|
title: window.$gz.translation.get("Customize"),
|
||||||
helpUrl: "form-ay-customize",
|
helpUrl: "form-ay-customize",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.FormCustom,
|
ayaType: window.$gz.type.FormCustom,
|
||||||
@@ -309,7 +309,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Save"),
|
title: window.$gz.translation.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":save",
|
key: FORM_KEY + ":save",
|
||||||
@@ -320,7 +320,7 @@ function generateMenu(vm) {
|
|||||||
//Extra link to it here so people can stumble their way onto it
|
//Extra link to it here so people can stumble their way onto it
|
||||||
//plus it's related to this form and people think Customize for the whole shebang
|
//plus it's related to this form and people think Customize for the whole shebang
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("LocalizedTextDesign"),
|
title: window.$gz.translation.get("LocalizedTextDesign"),
|
||||||
icon: "language",
|
icon: "language",
|
||||||
data: "adm-localized-text",
|
data: "adm-localized-text",
|
||||||
key: "app:nav"
|
key: "app:nav"
|
||||||
@@ -367,7 +367,7 @@ function fetchUILocalizedText(vm) {
|
|||||||
"UiFieldDataTypesTrueFalse"
|
"UiFieldDataTypesTrueFalse"
|
||||||
];
|
];
|
||||||
|
|
||||||
return window.$gz.locale.fetch(ltKeysRequired);
|
return window.$gz.translation.fetch(ltKeysRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
@@ -435,7 +435,7 @@ function initDataObject(vm) {
|
|||||||
|
|
||||||
var objItem = {
|
var objItem = {
|
||||||
key: faf.fieldKey,
|
key: faf.fieldKey,
|
||||||
title: window.$gz.locale.get(faf.ltKey),
|
title: window.$gz.translation.get(faf.ltKey),
|
||||||
stockRequired: !faf.hideable,
|
stockRequired: !faf.hideable,
|
||||||
custom: faf.isCustomField,
|
custom: faf.isCustomField,
|
||||||
required: faf.hideable === false || templateItem.required === true,
|
required: faf.hideable === false || templateItem.required === true,
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt: function(ltkey) {
|
lt: function(ltkey) {
|
||||||
return window.$gz.locale.get(ltkey);
|
return window.$gz.translation.get(ltkey);
|
||||||
},
|
},
|
||||||
enumPickList: function(enumKey) {
|
enumPickList: function(enumKey) {
|
||||||
return window.$gz.enums.getPickList(enumKey);
|
return window.$gz.enums.getPickList(enumKey);
|
||||||
@@ -931,7 +931,7 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "filter",
|
icon: "filter",
|
||||||
title: window.$gz.locale.get("DataListView"),
|
title: window.$gz.translation.get("DataListView"),
|
||||||
helpUrl: "form-ay-data-list-view",
|
helpUrl: "form-ay-data-list-view",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.FormCustom,
|
ayaType: window.$gz.type.FormCustom,
|
||||||
@@ -942,7 +942,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Save"),
|
title: window.$gz.translation.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":save",
|
key: FORM_KEY + ":save",
|
||||||
@@ -951,7 +951,7 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
if (vm.rights.delete) {
|
if (vm.rights.delete) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Delete"),
|
title: window.$gz.translation.get("Delete"),
|
||||||
icon: "trash-alt",
|
icon: "trash-alt",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":delete",
|
key: FORM_KEY + ":delete",
|
||||||
@@ -960,7 +960,7 @@ function generateMenu(vm) {
|
|||||||
}
|
}
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Duplicate"),
|
title: window.$gz.translation.get("Duplicate"),
|
||||||
icon: "clone",
|
icon: "clone",
|
||||||
key: FORM_KEY + ":duplicate",
|
key: FORM_KEY + ":duplicate",
|
||||||
vm: vm
|
vm: vm
|
||||||
@@ -979,7 +979,7 @@ function initForm(vm) {
|
|||||||
await fetchUILocalizedText(vm);
|
await fetchUILocalizedText(vm);
|
||||||
await populatePickLists(vm);
|
await populatePickLists(vm);
|
||||||
await populateFieldDefinitions(vm);
|
await populateFieldDefinitions(vm);
|
||||||
await fetchLocalizedFieldNames(vm);
|
await fetchTranslatedFieldNames(vm);
|
||||||
await setEffectiveListView(vm);
|
await setEffectiveListView(vm);
|
||||||
await initDataObject(vm);
|
await initDataObject(vm);
|
||||||
await fetchEnums(vm);
|
await fetchEnums(vm);
|
||||||
@@ -1043,7 +1043,7 @@ function fetchUILocalizedText(vm) {
|
|||||||
"Name"
|
"Name"
|
||||||
];
|
];
|
||||||
|
|
||||||
return window.$gz.locale.fetch(ltKeysRequired);
|
return window.$gz.translation.fetch(ltKeysRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
@@ -1210,16 +1210,16 @@ function populateFieldDefinitions(vm) {
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Ensures column names are present in locale table
|
// Ensures column names are present in translation table
|
||||||
//
|
//
|
||||||
function fetchLocalizedFieldNames(vm) {
|
function fetchTranslatedFieldNames(vm) {
|
||||||
var columnKeys = [];
|
var columnKeys = [];
|
||||||
for (var i = 1; i < vm.fieldDefinitions.length; i++) {
|
for (var i = 1; i < vm.fieldDefinitions.length; i++) {
|
||||||
var cm = vm.fieldDefinitions[i];
|
var cm = vm.fieldDefinitions[i];
|
||||||
columnKeys.push(cm.ltKey);
|
columnKeys.push(cm.ltKey);
|
||||||
}
|
}
|
||||||
//Now fetch all the keys and await the response before returning
|
//Now fetch all the keys and await the response before returning
|
||||||
return window.$gz.locale.fetch(columnKeys).then(() => {
|
return window.$gz.translation.fetch(columnKeys).then(() => {
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1462,15 +1462,15 @@ function getDisplayForFilter(
|
|||||||
var valueDisplay = "selected value";
|
var valueDisplay = "selected value";
|
||||||
switch (uiFieldDataType) {
|
switch (uiFieldDataType) {
|
||||||
case 1: //date localize
|
case 1: //date localize
|
||||||
valueDisplay = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
valueDisplay = window.$gz.translation.utcDateToShortDateAndTimeLocalized(
|
||||||
filterValue
|
filterValue
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 8: //currency localize
|
case 8: //currency localize
|
||||||
valueDisplay = window.$gz.locale.currencyLocalized(filterValue);
|
valueDisplay = window.$gz.translation.currencyLocalized(filterValue);
|
||||||
break;
|
break;
|
||||||
case 7: //decimal localize
|
case 7: //decimal localize
|
||||||
valueDisplay = window.$gz.locale.decimalLocalized(filterValue);
|
valueDisplay = window.$gz.translation.decimalLocalized(filterValue);
|
||||||
break;
|
break;
|
||||||
case 6: //BOOL localize
|
case 6: //BOOL localize
|
||||||
//debugger;
|
//debugger;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "history",
|
icon: "history",
|
||||||
title: window.$gz.locale.get("History"),
|
title: window.$gz.translation.get("History"),
|
||||||
helpUrl: "form-ay-history"
|
helpUrl: "form-ay-history"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ 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: window.$gz.locale.get("Log"),
|
title: window.$gz.translation.get("Log"),
|
||||||
helpUrl: "form-ay-log",
|
helpUrl: "form-ay-log",
|
||||||
|
|
||||||
menuItems: [
|
menuItems: [
|
||||||
// {
|
// {
|
||||||
// title: window.$gz.locale.get("Log"),
|
// title: window.$gz.translation.get("Log"),
|
||||||
// icon: "glasses",
|
// icon: "glasses",
|
||||||
// surface: true,
|
// surface: true,
|
||||||
// key: "app:nav:log",
|
// key: "app:nav:log",
|
||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
outText += value + "\n";
|
outText += value + "\n";
|
||||||
});
|
});
|
||||||
this.logText = outText;
|
this.logText = outText;
|
||||||
window.$gz.locale
|
window.$gz.translation
|
||||||
.fetch(["Log"])
|
.fetch(["Log"])
|
||||||
.then(() => (vm.formState.ready = true))
|
.then(() => (vm.formState.ready = true))
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "calendar-check",
|
icon: "calendar-check",
|
||||||
title: window.$gz.locale.get("Review"),
|
title: window.$gz.translation.get("Review"),
|
||||||
helpUrl: "form-ay-review"
|
helpUrl: "form-ay-review"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "feather",
|
icon: "feather",
|
||||||
title: window.$gz.locale.get("WikiPage"),
|
title: window.$gz.translation.get("WikiPage"),
|
||||||
helpUrl: "form-ay-wiki"
|
helpUrl: "form-ay-wiki"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "address-card",
|
icon: "address-card",
|
||||||
title: window.$gz.locale.get("ClientList"),
|
title: window.$gz.translation.get("ClientList"),
|
||||||
helpUrl: "form-cust-customers"
|
helpUrl: "form-cust-customers"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "sitemap",
|
icon: "sitemap",
|
||||||
title: window.$gz.locale.get("HeadOfficeList"),
|
title: window.$gz.translation.get("HeadOfficeList"),
|
||||||
helpUrl: "form-cust-headoffices"
|
helpUrl: "form-cust-headoffices"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "child",
|
icon: "child",
|
||||||
title: window.$gz.locale.get("ClientServiceRequestList"),
|
title: window.$gz.translation.get("ClientServiceRequestList"),
|
||||||
helpUrl: "form-customer-csr-list"
|
helpUrl: "form-customer-csr-list"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "tools",
|
icon: "tools",
|
||||||
title: window.$gz.locale.get("WorkorderServiceList"),
|
title: window.$gz.translation.get("WorkorderServiceList"),
|
||||||
helpUrl: "form-customer-workorders"
|
helpUrl: "form-customer-workorders"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "tachometer-alt",
|
icon: "tachometer-alt",
|
||||||
title: window.$gz.locale.get("Dashboard"),
|
title: window.$gz.translation.get("Dashboard"),
|
||||||
helpUrl: "form-home-dashboard"
|
helpUrl: "form-home-dashboard"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "inbox",
|
icon: "inbox",
|
||||||
title: window.$gz.locale.get("MemoList"),
|
title: window.$gz.translation.get("MemoList"),
|
||||||
helpUrl: "form-home-memos"
|
helpUrl: "form-home-memos"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "bullhorn",
|
icon: "bullhorn",
|
||||||
title: window.$gz.locale.get("NotifySubscriptionList"),
|
title: window.$gz.translation.get("NotifySubscriptionList"),
|
||||||
helpUrl: "form-home-notify-subscriptions"
|
helpUrl: "form-home-notify-subscriptions"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,10 +188,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
@@ -266,14 +266,14 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "key",
|
icon: "key",
|
||||||
title: window.$gz.locale.get("SetLoginPassword"),
|
title: window.$gz.translation.get("SetLoginPassword"),
|
||||||
helpUrl: "form-home-password",
|
helpUrl: "form-home-password",
|
||||||
menuItems: []
|
menuItems: []
|
||||||
};
|
};
|
||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Save"),
|
title: window.$gz.translation.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":save",
|
key: FORM_KEY + ":save",
|
||||||
@@ -305,7 +305,7 @@ function initForm(vm) {
|
|||||||
// Ensures UI localized text is available
|
// Ensures UI localized text is available
|
||||||
//
|
//
|
||||||
function fetchUILocalizedText(vm) {
|
function fetchUILocalizedText(vm) {
|
||||||
return window.$gz.locale.fetch([
|
return window.$gz.translation.fetch([
|
||||||
"UserLogin",
|
"UserLogin",
|
||||||
"OldPassword",
|
"OldPassword",
|
||||||
"NewPassword",
|
"NewPassword",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "sticky-note",
|
icon: "sticky-note",
|
||||||
title: window.$gz.locale.get("ReminderList"),
|
title: window.$gz.translation.get("ReminderList"),
|
||||||
helpUrl: "form-home-reminders"
|
helpUrl: "form-home-reminders"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "calendar-day",
|
icon: "calendar-day",
|
||||||
title: window.$gz.locale.get("Schedule"),
|
title: window.$gz.translation.get("Schedule"),
|
||||||
helpUrl: "form-home-schedule"
|
helpUrl: "form-home-schedule"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "search",
|
icon: "search",
|
||||||
title: window.$gz.locale.get("Search"),
|
title: window.$gz.translation.get("Search"),
|
||||||
helpUrl: "form-home-search"
|
helpUrl: "form-home-search"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "language",
|
icon: "language",
|
||||||
title: window.$gz.locale.get("Locale"),
|
title: window.$gz.translation.get("Locale"),
|
||||||
helpUrl: "form-home-locale"
|
helpUrl: "form-home-locale"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="obj.languageOverride"
|
v-model="obj.languageOverride"
|
||||||
:placeholder="locale().getBrowserFirstLanguage()"
|
:placeholder="translation().getBrowserFirstLanguage()"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
clearable
|
clearable
|
||||||
@click:clear="onChange('languageOverride')"
|
@click:clear="onChange('languageOverride')"
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="obj.timeZoneOverride"
|
v-model="obj.timeZoneOverride"
|
||||||
:placeholder="locale().getBrowserTimeZoneName()"
|
:placeholder="translation().getBrowserTimeZoneName()"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
clearable
|
clearable
|
||||||
@click:clear="onChange('timeZoneOverride')"
|
@click:clear="onChange('timeZoneOverride')"
|
||||||
@@ -208,10 +208,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
@@ -357,7 +357,7 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "user-cog",
|
icon: "user-cog",
|
||||||
title: window.$gz.locale.get("UserSettings"),
|
title: window.$gz.translation.get("UserSettings"),
|
||||||
helpUrl: "form-home-user-settings",
|
helpUrl: "form-home-user-settings",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.UserOptions
|
ayaType: window.$gz.type.UserOptions
|
||||||
@@ -367,7 +367,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Save"),
|
title: window.$gz.translation.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":save",
|
key: FORM_KEY + ":save",
|
||||||
@@ -377,7 +377,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
//change password and login
|
//change password and login
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("SetLoginPassword"),
|
title: window.$gz.translation.get("SetLoginPassword"),
|
||||||
icon: "key",
|
icon: "key",
|
||||||
data: "home-password",
|
data: "home-password",
|
||||||
key: "app:nav"
|
key: "app:nav"
|
||||||
@@ -409,7 +409,7 @@ function initForm(vm) {
|
|||||||
// Ensures UI localized text is available
|
// Ensures UI localized text is available
|
||||||
//
|
//
|
||||||
function fetchUILocalizedText(vm) {
|
function fetchUILocalizedText(vm) {
|
||||||
return window.$gz.locale.fetch([
|
return window.$gz.translation.fetch([
|
||||||
"CurrencyCode",
|
"CurrencyCode",
|
||||||
"LanguageCode",
|
"LanguageCode",
|
||||||
"TimeZone",
|
"TimeZone",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "dolly",
|
icon: "dolly",
|
||||||
title: window.$gz.locale.get("InventoryPartInventoryAdjustments"),
|
title: window.$gz.translation.get("InventoryPartInventoryAdjustments"),
|
||||||
helpUrl: "form-inv-adjustments"
|
helpUrl: "form-inv-adjustments"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "pallet",
|
icon: "pallet",
|
||||||
title: window.$gz.locale.get("PartByWarehouseInventoryList"),
|
title: window.$gz.translation.get("PartByWarehouseInventoryList"),
|
||||||
helpUrl: "form-inv-part-inventory"
|
helpUrl: "form-inv-part-inventory"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "paper-plane",
|
icon: "paper-plane",
|
||||||
title: window.$gz.locale.get("WorkorderItemPartRequestList"),
|
title: window.$gz.translation.get("WorkorderItemPartRequestList"),
|
||||||
helpUrl: "form-inv-part-requests"
|
helpUrl: "form-inv-part-requests"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "boxes",
|
icon: "boxes",
|
||||||
title: window.$gz.locale.get("PartList"),
|
title: window.$gz.translation.get("PartList"),
|
||||||
helpUrl: "form-inv-parts"
|
helpUrl: "form-inv-parts"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "dolly-flatbed",
|
icon: "dolly-flatbed",
|
||||||
title: window.$gz.locale.get("InventoryPurchaseOrderReceipts"),
|
title: window.$gz.translation.get("InventoryPurchaseOrderReceipts"),
|
||||||
helpUrl: "form-inv-purchase-order-receipts"
|
helpUrl: "form-inv-purchase-order-receipts"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "shipping-fast",
|
icon: "shipping-fast",
|
||||||
title: window.$gz.locale.get("InventoryPurchaseOrders"),
|
title: window.$gz.translation.get("InventoryPurchaseOrders"),
|
||||||
helpUrl: "form-inv-purchase-orders"
|
helpUrl: "form-inv-purchase-orders"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ export default {
|
|||||||
!window ||
|
!window ||
|
||||||
!window.$gz ||
|
!window.$gz ||
|
||||||
!window.$gz.eventBus ||
|
!window.$gz.eventBus ||
|
||||||
!window.$gz.locale ||
|
!window.$gz.translation ||
|
||||||
!window.$gz.store
|
!window.$gz.store
|
||||||
) {
|
) {
|
||||||
this.msg = '404 - NOT FOUND: "' + badPath + '"';
|
this.msg = '404 - NOT FOUND: "' + badPath + '"';
|
||||||
} else {
|
} else {
|
||||||
var notFoundLocalized = window.$gz.locale.get("ErrorAPI2010");
|
var notFoundLocalized = window.$gz.translation.get("ErrorAPI2010");
|
||||||
//format the message
|
//format the message
|
||||||
this.msg = "404 - " + notFoundLocalized + ': "' + badPath + '"';
|
this.msg = "404 - " + notFoundLocalized + ': "' + badPath + '"';
|
||||||
//log it in case we need to see it in tech support
|
//log it in case we need to see it in tech support
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "file-archive",
|
icon: "file-archive",
|
||||||
title: window.$gz.locale.get("Backup"),
|
title: window.$gz.translation.get("Backup"),
|
||||||
helpUrl: "form-ops-backup"
|
helpUrl: "form-ops-backup"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "robot",
|
icon: "robot",
|
||||||
title: window.$gz.locale.get("ServerJobs"),
|
title: window.$gz.translation.get("ServerJobs"),
|
||||||
helpUrl: "form-ops-jobs"
|
helpUrl: "form-ops-jobs"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "history",
|
icon: "history",
|
||||||
title: window.$gz.locale.get("ServerLog"),
|
title: window.$gz.translation.get("ServerLog"),
|
||||||
helpUrl: "form-ops-log"
|
helpUrl: "form-ops-log"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "file-medical-alt",
|
icon: "file-medical-alt",
|
||||||
title: window.$gz.locale.get("ServerMetrics"),
|
title: window.$gz.translation.get("ServerMetrics"),
|
||||||
helpUrl: "form-ops-metrics"
|
helpUrl: "form-ops-metrics"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "bullhorn",
|
icon: "bullhorn",
|
||||||
title: window.$gz.locale.get("NotificationSettings"),
|
title: window.$gz.translation.get("NotificationSettings"),
|
||||||
helpUrl: "form-ops-notification-settings"
|
helpUrl: "form-ops-notification-settings"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "file-contract",
|
icon: "file-contract",
|
||||||
title: window.$gz.locale.get("ContractList"),
|
title: window.$gz.translation.get("ContractList"),
|
||||||
helpUrl: "form-svc-contracts"
|
helpUrl: "form-svc-contracts"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "child",
|
icon: "child",
|
||||||
title: window.$gz.locale.get("ClientServiceRequestList"),
|
title: window.$gz.translation.get("ClientServiceRequestList"),
|
||||||
helpUrl: "form-svc-csr-list"
|
helpUrl: "form-svc-csr-list"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "plug",
|
icon: "plug",
|
||||||
title: window.$gz.locale.get("LoanItemList"),
|
title: window.$gz.translation.get("LoanItemList"),
|
||||||
helpUrl: "form-svc-loaners"
|
helpUrl: "form-svc-loaners"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "business-time",
|
icon: "business-time",
|
||||||
title: window.$gz.locale.get("WorkorderPreventiveMaintenanceList"),
|
title: window.$gz.translation.get("WorkorderPreventiveMaintenanceList"),
|
||||||
helpUrl: "form-svc-pm-list"
|
helpUrl: "form-svc-pm-list"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "stamp",
|
icon: "stamp",
|
||||||
title: window.$gz.locale.get("WorkorderPreventiveMaintenanceTemplate"),
|
title: window.$gz.translation.get(
|
||||||
|
"WorkorderPreventiveMaintenanceTemplate"
|
||||||
|
),
|
||||||
helpUrl: "form-svc-pm-templates"
|
helpUrl: "form-svc-pm-templates"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "stamp",
|
icon: "stamp",
|
||||||
title: window.$gz.locale.get("WorkorderQuoteTemplate"),
|
title: window.$gz.translation.get("WorkorderQuoteTemplate"),
|
||||||
helpUrl: "form-svc-quote-templates"
|
helpUrl: "form-svc-quote-templates"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "edit",
|
icon: "edit",
|
||||||
title: window.$gz.locale.get("WorkorderQuoteList"),
|
title: window.$gz.translation.get("WorkorderQuoteList"),
|
||||||
helpUrl: "form-svc-quotes"
|
helpUrl: "form-svc-quotes"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "calendar-alt",
|
icon: "calendar-alt",
|
||||||
title: window.$gz.locale.get("Schedule"),
|
title: window.$gz.translation.get("Schedule"),
|
||||||
helpUrl: "form-svc-schedule"
|
helpUrl: "form-svc-schedule"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "dice-d20",
|
icon: "dice-d20",
|
||||||
title: window.$gz.locale.get("UnitModels"),
|
title: window.$gz.translation.get("UnitModels"),
|
||||||
helpUrl: "form-svc-unit-models"
|
helpUrl: "form-svc-unit-models"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "fan",
|
icon: "fan",
|
||||||
title: window.$gz.locale.get("UnitList"),
|
title: window.$gz.translation.get("UnitList"),
|
||||||
helpUrl: "form-svc-units"
|
helpUrl: "form-svc-units"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "stamp",
|
icon: "stamp",
|
||||||
title: window.$gz.locale.get("WorkorderServiceTemplate"),
|
title: window.$gz.translation.get("WorkorderServiceTemplate"),
|
||||||
helpUrl: "form-svc-workorder-templates"
|
helpUrl: "form-svc-workorder-templates"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "tools",
|
icon: "tools",
|
||||||
title: window.$gz.locale.get("WorkorderServiceList"),
|
title: window.$gz.translation.get("WorkorderServiceList"),
|
||||||
helpUrl: "form-svc-workorders"
|
helpUrl: "form-svc-workorders"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "store",
|
icon: "store",
|
||||||
title: window.$gz.locale.get("VendorList"),
|
title: window.$gz.translation.get("VendorList"),
|
||||||
helpUrl: "form-vendors"
|
helpUrl: "form-vendors"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,10 +348,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lt(ltKey) {
|
lt(ltKey) {
|
||||||
return window.$gz.locale.get(ltKey);
|
return window.$gz.translation.get(ltKey);
|
||||||
},
|
},
|
||||||
locale() {
|
translation() {
|
||||||
return window.$gz.locale;
|
return window.$gz.translation;
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
@@ -585,7 +585,7 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "fa-splotch",
|
icon: "fa-splotch",
|
||||||
title: window.$gz.locale.get("Widget"),
|
title: window.$gz.translation.get("Widget"),
|
||||||
helpUrl: "form-widget",
|
helpUrl: "form-widget",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.Widget,
|
ayaType: window.$gz.type.Widget,
|
||||||
@@ -597,7 +597,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Save"),
|
title: window.$gz.translation.get("Save"),
|
||||||
icon: "save",
|
icon: "save",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":save",
|
key: FORM_KEY + ":save",
|
||||||
@@ -607,7 +607,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.delete) {
|
if (vm.rights.delete) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Delete"),
|
title: window.$gz.translation.get("Delete"),
|
||||||
icon: "trash-alt",
|
icon: "trash-alt",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":delete",
|
key: FORM_KEY + ":delete",
|
||||||
@@ -618,7 +618,7 @@ function generateMenu(vm) {
|
|||||||
//STUB REPORTS
|
//STUB REPORTS
|
||||||
//Report not Print, print is a further option
|
//Report not Print, print is a further option
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Report"),
|
title: window.$gz.translation.get("Report"),
|
||||||
icon: "file-alt",
|
icon: "file-alt",
|
||||||
key: FORM_KEY + ":report",
|
key: FORM_KEY + ":report",
|
||||||
vm: vm
|
vm: vm
|
||||||
@@ -633,7 +633,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Duplicate"),
|
title: window.$gz.translation.get("Duplicate"),
|
||||||
icon: "clone",
|
icon: "clone",
|
||||||
key: FORM_KEY + ":duplicate",
|
key: FORM_KEY + ":duplicate",
|
||||||
vm: vm
|
vm: vm
|
||||||
@@ -668,7 +668,7 @@ function initForm(vm) {
|
|||||||
// Ensures UI localized text is available
|
// Ensures UI localized text is available
|
||||||
//
|
//
|
||||||
function fetchUILocalizedText(vm) {
|
function fetchUILocalizedText(vm) {
|
||||||
return window.$gz.locale.fetch([
|
return window.$gz.translation.fetch([
|
||||||
"Widget",
|
"Widget",
|
||||||
"WidgetName",
|
"WidgetName",
|
||||||
"WidgetSerial",
|
"WidgetSerial",
|
||||||
|
|||||||
@@ -74,14 +74,14 @@ function generateMenu(vm) {
|
|||||||
var menuOptions = {
|
var menuOptions = {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "vial",
|
icon: "vial",
|
||||||
title: window.$gz.locale.get("WidgetList"),
|
title: window.$gz.translation.get("WidgetList"),
|
||||||
helpUrl: "form-ay-data-list-view",
|
helpUrl: "form-ay-data-list-view",
|
||||||
menuItems: []
|
menuItems: []
|
||||||
};
|
};
|
||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("New"),
|
title: window.$gz.translation.get("New"),
|
||||||
icon: "plus",
|
icon: "plus",
|
||||||
surface: true,
|
surface: true,
|
||||||
key: FORM_KEY + ":new",
|
key: FORM_KEY + ":new",
|
||||||
@@ -92,7 +92,7 @@ function generateMenu(vm) {
|
|||||||
//STUB REPORTS
|
//STUB REPORTS
|
||||||
//Report not Print, print is a further option
|
//Report not Print, print is a further option
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.locale.get("Report"),
|
title: window.$gz.translation.get("Report"),
|
||||||
icon: "file-alt",
|
icon: "file-alt",
|
||||||
key: FORM_KEY + ":report",
|
key: FORM_KEY + ":report",
|
||||||
vm: vm
|
vm: vm
|
||||||
|
|||||||
Reference in New Issue
Block a user