From 98d0c117a4873aac160d809f873b8400fd7ed1c9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 12 Nov 2020 18:14:27 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 1 - ayanova/src/components/decimal-control.vue | 6 ++++-- ayanova/src/plugins/vuetify.js | 16 ++++++++++++++++ ayanova/src/views/cust-customer.vue | 19 +++++++++++++++++++ .../src/views/home-notify-subscription.vue | 1 - 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 59fca908..9e7bef2d 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -1,4 +1,3 @@ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ ROADMAP STAGE 6 - "REALITY" All in on porting over all the real objects from v7 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ diff --git a/ayanova/src/components/decimal-control.vue b/ayanova/src/components/decimal-control.vue index 34b67b9d..f84560e8 100644 --- a/ayanova/src/components/decimal-control.vue +++ b/ayanova/src/components/decimal-control.vue @@ -6,7 +6,8 @@ @change="updateValue" v-currency="{ currency: null, - locale: languageName + locale: languageName, + precision: precision }" :readonly="readonly" :disabled="disabled" @@ -42,7 +43,8 @@ export default { error: { type: String, required: false - } + }, + precision: { type: Number, default: undefined } }, computed: { currencyValue() { diff --git a/ayanova/src/plugins/vuetify.js b/ayanova/src/plugins/vuetify.js index f1a73b2d..436b4eab 100644 --- a/ayanova/src/plugins/vuetify.js +++ b/ayanova/src/plugins/vuetify.js @@ -105,6 +105,8 @@ import { faLink, faListOl, faListUl, + faMapMarkerAlt, + faMapMarkedAlt, faMinus, faMinusSquare, faMoon, @@ -253,6 +255,8 @@ library.add( faLink, faListOl, faListUl, + faMapMarkerAlt, + faMapMarkedAlt, faMinus, faMinusSquare, faMoon, @@ -788,6 +792,18 @@ const CUSTOM_ICONS = { icon: ["fas", "list-ul"] } }, + ayiMapMarker: { + component: FontAwesomeIcon, + props: { + icon: ["fas", "map-marker-alt"] + } + }, + ayiMapMarked: { + component: FontAwesomeIcon, + props: { + icon: ["fas", "map-marked-alt"] + } + }, ayiMinus: { component: FontAwesomeIcon, props: { diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue index 02b6abfe..5fdc51c0 100644 --- a/ayanova/src/views/cust-customer.vue +++ b/ayanova/src/views/cust-customer.vue @@ -272,6 +272,7 @@ :rules="[form().decimalValid(this, 'latitude')]" :error-messages="form().serverErrors(this, 'latitude')" @input="fieldValueChanged('latitude')" + :precision="6" > @@ -292,6 +293,7 @@ :rules="[form().decimalValid(this, 'longitude')]" :error-messages="form().serverErrors(this, 'longitude')" @input="fieldValueChanged('longitude')" + :precision="6" > @@ -970,6 +972,23 @@ function generateMenu(vm) { key: FORM_KEY + ":duplicate", vm: vm }); + + menuOptions.menuItems.push({ + title: "View on map", + icon: "$ayiMapMarked", + key: FORM_KEY + ":geoview", + vm: vm + }); + + if (navigator.geolocation) { + // geolocation is available + menuOptions.menuItems.push({ + title: "Set to current location", + icon: "$ayiMapMarker", + key: FORM_KEY + ":geocapture", + vm: vm + }); + } } window.$gz.eventBus.$emit("menu-change", menuOptions); diff --git a/ayanova/src/views/home-notify-subscription.vue b/ayanova/src/views/home-notify-subscription.vue index ca08359f..db3dea4d 100644 --- a/ayanova/src/views/home-notify-subscription.vue +++ b/ayanova/src/views/home-notify-subscription.vue @@ -102,7 +102,6 @@ :disabled="formState.readOnly" :clearable="!formState.readOnly" @click:clear="fieldValueChanged('deliveryAddress')" - :label="$ay.t('NotifyDeliveryAddress')" :rules="[form().required(this, 'deliveryAddress')]" :error-messages="form().serverErrors(this, 'deliveryAddress')"