diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index bcfc546b..6801fc96 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -132,8 +132,6 @@ Coded by importance ╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝ - -- 2 todo: ideally installer should have a commented out jwt secret that wont' take effect but has text like "EDITME AND UNCOMMENT" or whatever - 2 todo: subscribe to all sources of security vulnerabilities that could apply to users of AyaNOva 8 (and 7) Need an ongoing defined process to follow to ensure we are not caught by surprise with any security vulnerabilities Github watch and star all tools used for starters so get notifications via github about new releases etc @@ -154,8 +152,6 @@ Coded by importance -- 2 consolidate pages, in many cases I have too many pages that are too short, when it could be consolidated as the mkdocs has a nice toc to the right making it easy to find stuff and saving opening new pages a lot ot move around - ## MIGRATION ITEMS ███ ███ ██ ██████ ██████ █████ ████████ ███████ @@ -176,7 +172,7 @@ Coded by importance ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ --2 todo: check out this SPA memory leak detector, it *does* have a login ability btw in case it's not obvious, something about extras or ...? +-3 todo: check out this SPA memory leak detector, it *does* have a login ability btw in case it's not obvious, something about extras or ...? https://github.com/nolanlawson/fuite @@ -204,41 +200,6 @@ Coded by importance \_____|______|_____|______|_| \_| |_| -- 2 todo: CURRENCY / DECIMAL control, not too happy with them, considering rolling my own maybe here are some ideas: - -To get current use the latest version which is completely different and seems ok, here is a dude who implemented it with vuetify so would need to copy this -as it's too small to just use his I think: https://github.com/phiny1/v-currency-field/blob/master/src/VCurrencyField.vue - -For the record the current vue-currency being used is "vue-currency-input": "1.20.3", - https://stackoverflow.com/questions/43208012/how-do-i-format-currencies-in-a-vue-component - Also a good post about rounding on that page as well - There is currently no intnl aware parser for currency, however - Here is an excellent idea about using the tostring formatter to figure out the parsing code - https://stackoverflow.com/questions/59678901/using-parsefloat-in-different-locales - So use that concept, but also add to it for the currency one to remove the currency symbol entirely and replace it with nothing so it can then be parsed - - - -function localeParseFloat(s, locale) { - // Get the thousands and decimal separator characters used in the locale. - let [,thousandsSeparator,,,,decimalSeparator] = 1111.1.toLocaleString(locale); - // Remove thousand separators, and put a point where the decimal separator occurs - s = Array.from(s, c => c === thousandsSeparator ? "" - : c === decimalSeparator ? "." : c).join(""); - // Now it can be parsed - return parseFloat(s); -} - -console.log(parseFloat(localeParseFloat("1.100,9"))); // user's locale -console.log(parseFloat(localeParseFloat("1.100,9", "us"))); // US locale -console.log(parseFloat(localeParseFloat("1.100,9", "nl"))); // Dutch locale: reversed meaning of separators -// And the same but with separators switched: -console.log(parseFloat(localeParseFloat("1,100.9"))); // user's locale -console.log(parseFloat(localeParseFloat("1,100.9", "us"))); // US locale -console.log(parseFloat(localeParseFloat("1,100.9", "nl"))); // Dutch locale: reversed meaning of separators - - - -2 todo: why should user be able to open a part inventory transaction record in the first place? It opens to the history form, isn't that weird, theres nothing to see that isn't in the grid is there?? @@ -246,12 +207,10 @@ in the grid is there?? must be seconds or something, needs a round up in those cases, that's weird. To recreate try a start time of 11:21 and end time of 1:21pm which should be two hours but is 1.99 hours sometimes it just works, I'm guessing it's a milliseconds issue or something, round first maybe to remove ms then calc? -- 2 todo: when hide a section in wo like all tasks in customize should hide the add task woitem context menu item too -- 2: the home notify subscription table shows object types but without the square brackets around them and should for consistency -- 2: address "Required" uses street as the only required, however it should also alternatively accept latitude longitude instead of a street address for required validation - 2: reset to defaults button for form customize would be handy, especially on work order forms. -- 2: history form now shows user activity for a report which is ok but it shows like this: - "LT:Report id: "2" LT:Customer (1082) LT:User AyaNova SuperUser" + + + This is coming from the job log when the render job is submitted. not sure if this is good or bad or should be there but at least it should be translated To see this just run a report then view personal history. @@ -407,7 +366,38 @@ todo: 3 Schedule form reporting? as long as it has all appointments consolidated in single list Will need to support it at the server though, perhaps it bypasses normal report routes in some way - + - 2 todo: CURRENCY / DECIMAL control, not too happy with them, considering rolling my own maybe here are some ideas: + +To get current use the latest version which is completely different and seems ok, here is a dude who implemented it with vuetify so would need to copy this +as it's too small to just use his I think: https://github.com/phiny1/v-currency-field/blob/master/src/VCurrencyField.vue + +For the record the current vue-currency being used is "vue-currency-input": "1.20.3", + https://stackoverflow.com/questions/43208012/how-do-i-format-currencies-in-a-vue-component + Also a good post about rounding on that page as well + There is currently no intnl aware parser for currency, however + Here is an excellent idea about using the tostring formatter to figure out the parsing code + https://stackoverflow.com/questions/59678901/using-parsefloat-in-different-locales + So use that concept, but also add to it for the currency one to remove the currency symbol entirely and replace it with nothing so it can then be parsed + + + +function localeParseFloat(s, locale) { + // Get the thousands and decimal separator characters used in the locale. + let [,thousandsSeparator,,,,decimalSeparator] = 1111.1.toLocaleString(locale); + // Remove thousand separators, and put a point where the decimal separator occurs + s = Array.from(s, c => c === thousandsSeparator ? "" + : c === decimalSeparator ? "." : c).join(""); + // Now it can be parsed + return parseFloat(s); +} + +console.log(parseFloat(localeParseFloat("1.100,9"))); // user's locale +console.log(parseFloat(localeParseFloat("1.100,9", "us"))); // US locale +console.log(parseFloat(localeParseFloat("1.100,9", "nl"))); // Dutch locale: reversed meaning of separators +// And the same but with separators switched: +console.log(parseFloat(localeParseFloat("1,100.9"))); // user's locale +console.log(parseFloat(localeParseFloat("1,100.9", "us"))); // US locale +console.log(parseFloat(localeParseFloat("1,100.9", "nl"))); // Dutch locale: reversed meaning of separators @@ -825,3 +815,7 @@ Current v8 docs home: https://www.ayanova.com/docs/ BUILD 8.0.0-beta.0.15 CHANGES OF NOTE - restricted and low rights users and scheduled fixes; were able to attempt to modify sched user record or create new but would be prevented by server, removed ability in sched form +- Updated to the latest back and front end dependencies +- Known bug: the vuetify calendar component in Team view will show the header area with tech names as transparent so events scroll through them. I reported it, it does it on their official sample in the docs too. +- home notify subscription table now shows object types with the square brackets around them like other tables for types +- fixed bug history form not translating JOB description text (i.e. running jobs) \ No newline at end of file diff --git a/ayanova/src/api/translation.js b/ayanova/src/api/translation.js index c1d869e3..6629d324 100644 --- a/ayanova/src/api/translation.js +++ b/ayanova/src/api/translation.js @@ -297,7 +297,11 @@ export default { //translate each and replace and return the string translated // (fetch and cache any missing strings) async translateStringWithMultipleKeysAsync(s) { + if (s == null) { + return s; + } let ret = s; + const found = s.match(/LT:[\w]*/gm); if (found == null) { return ret; diff --git a/ayanova/src/views/ay-history.vue b/ayanova/src/views/ay-history.vue index b17c2dbe..b80a7eda 100644 --- a/ayanova/src/views/ay-history.vue +++ b/ayanova/src/views/ay-history.vue @@ -295,6 +295,13 @@ export default { ].name = await window.$gz.translation.translateStringWithMultipleKeysAsync( temp[i].name ); + + temp[ + i + ].textra = await window.$gz.translation.translateStringWithMultipleKeysAsync( + temp[i].textra + ); + temp[i].index = currentEventCount + i; } vm.obj = [...vm.obj, ...temp]; diff --git a/ayanova/src/views/home-notify-subscriptions.vue b/ayanova/src/views/home-notify-subscriptions.vue index e9cca252..bc90c327 100644 --- a/ayanova/src/views/home-notify-subscriptions.vue +++ b/ayanova/src/views/home-notify-subscriptions.vue @@ -109,7 +109,7 @@ export default { ret.push({ id: o.id, eventType: eventDisplay, - ayaType: window.$gz.enums.get("coreview", o.ayaType), + ayaType: `[${window.$gz.enums.get("coreview", o.ayaType)}]`, deliveryMethod: window.$gz.enums.get( "NotifyDeliveryMethod", o.deliveryMethod diff --git a/ayanova/src/views/svc-schedule-user.vue b/ayanova/src/views/svc-schedule-user.vue index e54af63e..17ec85db 100644 --- a/ayanova/src/views/svc-schedule-user.vue +++ b/ayanova/src/views/svc-schedule-user.vue @@ -104,7 +104,7 @@ v-if="!event.editable" x-small :color="event.textColor" - class="ml-n3" + class="ml-n3" > $ayiLock