diff --git a/ayanova/src/components/work-order-address.vue b/ayanova/src/components/work-order-address.vue index 5e2ffff0..c6553b08 100644 --- a/ayanova/src/components/work-order-address.vue +++ b/ayanova/src/components/work-order-address.vue @@ -338,9 +338,7 @@ - - {{ alternateAddresses }} + @@ -412,6 +410,12 @@ export default { this.value.city = item.src.city; this.value.region = item.src.region; this.value.country = item.src.country; + if (item.src.latitude) { + this.value.latitude = item.src.latitude; + } + if (item.src.longitude) { + this.value.longitude = item.src.longitude; + } this.pvm.formState.dirty = true; } }, @@ -637,91 +641,4 @@ function formatAddress(o) { return ret; } - -/* - -[ { "name": "Anderson, Price and Cormier", -"viz": "0607 Gusikowski Grove West Juston Kansas Tonga , lat 53.8735, long -94.0396", -"src": { - "customerpost": { "name": "Anderson, Price and Cormier", "postAddress": "29693 Autumn Terrace", "postCity": "West Juston", "postRegion": "Kansas", "postCountry": "Tonga", "postCode": "99517" }, - "customerphys": { "name": "Anderson, Price and Cormier", "address": "0607 Gusikowski Grove", "city": "West Juston", "region": "Kansas", "country": "Tonga", "latitude": 53.8735, "longitude": -94.0396 }, - "headofficepost": { "name": "Pfannerstill, Wilderman and Boyer", "postAddress": "41501 Grover Loop", "postCity": "South Alice", "postRegion": "Alaska", "postCountry": "Brazil", "postCode": "34640" } } } - ] - - postAddress: null, - postCity: null, - postRegion: null, - postCountry: null, - postCode: null, - address: null, - city: null, - region: null, - country: null, - latitude: null, - longitude: null, -/// - /// Get complete address as single string for display - /// following US / Canadian postal regulations recommendations: - /// DELIVERY ADDRESS - /// CITY/STATE/ZIP - /// COUNTRY - /// - public string FullAddress - { - get - { - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - if(mDeliveryAddress!=null && mDeliveryAddress.Length>0) - { - sb.Append(mDeliveryAddress); - sb.Append(" \r\n"); - } - - if(mCity!=null && mCity.Length>0) - { - sb.Append(mCity); - sb.Append(" "); - } - - if(mStateProv!=null && mStateProv.Length>0) - { - sb.Append(mStateProv); - sb.Append(" "); - } - - if(mPostal!=null && mPostal.Length>0) - { - //Postal codes should have two spaces before them according to regs. - sb.Append(" "); - sb.Append(mPostal); - sb.Append(" \r\n"); - } - - if(mCountry!=null && mCountry.Length>0) - { - sb.Append(mCountry); - - } - - if(mAddressType==AddressTypes.Physical) - { - if(mLatitude!=0 || mLongitude!=0) - { - sb.Append(" \r\n"); - sb.Append(LongitudeToString(mLongitude)); - sb.Append(" "); - sb.Append(LatitudeToString(mLatitude)); - sb.Append(" \r\n"); - } - } - - - return sb.ToString(); - } - } - - - - -*/