case 4341
This commit is contained in:
@@ -829,6 +829,11 @@ export default {
|
||||
if (obj.postCode) {
|
||||
q += obj.postCode + delimiter;
|
||||
}
|
||||
|
||||
if (obj.addressPostal) {
|
||||
q += obj.addressPostal + delimiter;
|
||||
}
|
||||
|
||||
if (q.length > 1) {
|
||||
q = q.substring(0, q.length - 1);
|
||||
}
|
||||
|
||||
@@ -146,6 +146,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'AddressPostal')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="value.addressPostal"
|
||||
dense
|
||||
:readonly="readonly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Latitude')"
|
||||
cols="12"
|
||||
@@ -451,6 +470,7 @@ export default {
|
||||
this.value.city = item.src.city;
|
||||
this.value.region = item.src.region;
|
||||
this.value.country = item.src.country;
|
||||
this.value.addressPostal = item.src.addressPostal;
|
||||
if (item.src.latitude) {
|
||||
this.value.latitude = item.src.latitude;
|
||||
}
|
||||
@@ -476,6 +496,7 @@ export default {
|
||||
this.value.postCity = this.value.city;
|
||||
this.value.postRegion = this.value.region;
|
||||
this.value.postCountry = this.value.country;
|
||||
this.value.postCode = this.value.addressPostal;
|
||||
this.pvm.formState.dirty = true;
|
||||
this.value.isDirty = true;
|
||||
},
|
||||
@@ -484,6 +505,7 @@ export default {
|
||||
this.value.city = this.value.postCity;
|
||||
this.value.region = this.value.postRegion;
|
||||
this.value.country = this.value.postCountry;
|
||||
this.value.addressPostal = this.value.postCode;
|
||||
this.pvm.formState.dirty = true;
|
||||
this.value.isDirty = true;
|
||||
},
|
||||
@@ -507,6 +529,12 @@ export default {
|
||||
if (this.value.country) {
|
||||
ret += this.value.country + "\n";
|
||||
}
|
||||
|
||||
if (this.value.addressPostal) {
|
||||
//Postal codes should have two spaces before them according to regs.
|
||||
ret += " " + this.value.addressPostal + "\n";
|
||||
}
|
||||
|
||||
window.$gz.util.copyToClipboard(ret);
|
||||
/* todo maybe down the road if asked for?
|
||||
|
||||
@@ -647,6 +675,9 @@ function formatAddress(o) {
|
||||
if (!window.$gz.util.stringIsNullOrEmpty(o.country)) {
|
||||
ret.physical += o.country + " ";
|
||||
}
|
||||
if (!window.$gz.util.stringIsNullOrEmpty(o.addressPostal)) {
|
||||
ret.postal += o.addressPostal;
|
||||
}
|
||||
if (!window.$gz.util.stringIsNullOrEmpty(o.latitude)) {
|
||||
ret.physical += ", lat " + o.latitude;
|
||||
}
|
||||
|
||||
@@ -258,6 +258,19 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="obj.addressPostal"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<gz-decimal
|
||||
ref="latitude"
|
||||
@@ -1600,6 +1613,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude"
|
||||
]);
|
||||
|
||||
@@ -385,6 +385,7 @@ function cleanData(dat, atype) {
|
||||
"City",
|
||||
"Region",
|
||||
"Country",
|
||||
"AddressPostal",
|
||||
"Latitude",
|
||||
"Longitude"
|
||||
]
|
||||
@@ -418,6 +419,7 @@ function cleanData(dat, atype) {
|
||||
"City",
|
||||
"Region",
|
||||
"Country",
|
||||
"AddressPostal",
|
||||
"Latitude",
|
||||
"Longitude"
|
||||
]
|
||||
@@ -552,6 +554,7 @@ function cleanData(dat, atype) {
|
||||
"City",
|
||||
"Region",
|
||||
"Country",
|
||||
"AddressPostal",
|
||||
"Latitude",
|
||||
"Longitude"
|
||||
]
|
||||
@@ -604,6 +607,7 @@ function cleanData(dat, atype) {
|
||||
"City",
|
||||
"Region",
|
||||
"Country",
|
||||
"AddressPostal",
|
||||
"Latitude",
|
||||
"Longitude"
|
||||
]
|
||||
|
||||
@@ -507,6 +507,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'AddressPostal')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="obj.addressPostal"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Latitude')"
|
||||
cols="12"
|
||||
@@ -777,6 +796,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null
|
||||
},
|
||||
@@ -1197,6 +1217,12 @@ export default {
|
||||
if (vm.obj.country) {
|
||||
ret += vm.obj.country + "\n";
|
||||
}
|
||||
|
||||
if (vm.obj.addressPostal) {
|
||||
//Postal codes should have two spaces before them according to regs.
|
||||
ret += " " + vm.obj.addressPostal + "\n";
|
||||
}
|
||||
|
||||
window.$gz.util.copyToClipboard(ret);
|
||||
/* todo maybe down the road if asked for?
|
||||
|
||||
@@ -1304,7 +1330,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
case "CustomerNoteList":
|
||||
@@ -1570,6 +1597,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"CustomerCustom1",
|
||||
|
||||
@@ -434,6 +434,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'AddressPostal')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="obj.addressPostal"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Latitude')"
|
||||
cols="12"
|
||||
@@ -699,6 +718,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null
|
||||
},
|
||||
@@ -1106,6 +1126,11 @@ export default {
|
||||
if (vm.obj.country) {
|
||||
ret += vm.obj.country + "\n";
|
||||
}
|
||||
|
||||
if (vm.obj.addressPostal) {
|
||||
//Postal codes should have two spaces before them according to regs.
|
||||
ret += " " + vm.obj.addressPostal + "\n";
|
||||
}
|
||||
window.$gz.util.copyToClipboard(ret);
|
||||
/* todo maybe down the road if asked for?
|
||||
|
||||
@@ -1213,7 +1238,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
case "CustomerList":
|
||||
@@ -1372,6 +1398,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"HeadOfficeCustom1",
|
||||
|
||||
@@ -596,6 +596,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
items: [],
|
||||
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
items: [],
|
||||
@@ -1740,7 +1741,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -113,6 +113,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
items: [],
|
||||
@@ -1813,7 +1814,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
default:
|
||||
@@ -2075,6 +2077,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"SelectAlternateAddress",
|
||||
|
||||
@@ -574,6 +574,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'AddressPostal')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="obj.addressPostal"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Latitude')"
|
||||
cols="12"
|
||||
@@ -761,6 +780,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null
|
||||
},
|
||||
@@ -860,6 +880,7 @@ export default {
|
||||
gen.city ||
|
||||
gen.region ||
|
||||
gen.country ||
|
||||
gen.addressPostal ||
|
||||
gen.latitude ||
|
||||
gen.longitude
|
||||
) {
|
||||
@@ -868,6 +889,7 @@ export default {
|
||||
this.obj.city = gen.city ?? null;
|
||||
this.obj.region = gen.region ?? null;
|
||||
this.obj.country = gen.country ?? null;
|
||||
this.obj.addressPostal = gen.addressPostal ?? null;
|
||||
this.obj.latitude = gen.latitude ?? null;
|
||||
this.obj.longitude = gen.longitude ?? null;
|
||||
}
|
||||
@@ -1108,6 +1130,11 @@ export default {
|
||||
if (vm.obj.country) {
|
||||
ret += vm.obj.country + "\n";
|
||||
}
|
||||
if (vm.obj.addressPostal) {
|
||||
//Postal codes should have two spaces before them according to regs.
|
||||
ret += " " + vm.obj.addressPostal + "\n";
|
||||
}
|
||||
|
||||
window.$gz.util.copyToClipboard(ret);
|
||||
},
|
||||
async GeoCapture() {
|
||||
@@ -1174,7 +1201,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
case "WorkOrderItemUnitList":
|
||||
@@ -1406,6 +1434,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"UnitCustom1",
|
||||
|
||||
@@ -123,6 +123,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
items: [],
|
||||
@@ -2032,7 +2033,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
default:
|
||||
@@ -2320,6 +2322,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"SelectAlternateAddress",
|
||||
|
||||
@@ -411,6 +411,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'AddressPostal')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
ref="addressPostal"
|
||||
v-model="obj.addressPostal"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('AddressPostal')"
|
||||
data-cy="addressPostal"
|
||||
:error-messages="form().serverErrors(this, 'addressPostal')"
|
||||
@input="fieldValueChanged('addressPostal')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'Latitude')"
|
||||
cols="12"
|
||||
@@ -626,6 +645,7 @@ export default {
|
||||
city: null,
|
||||
region: null,
|
||||
country: null,
|
||||
addressPostal: null,
|
||||
latitude: null,
|
||||
longitude: null
|
||||
},
|
||||
@@ -920,6 +940,12 @@ export default {
|
||||
if (vm.obj.country) {
|
||||
ret += vm.obj.country + "\n";
|
||||
}
|
||||
|
||||
if (vm.obj.addressPostal) {
|
||||
//Postal codes should have two spaces before them according to regs.
|
||||
ret += " " + vm.obj.addressPostal + "\n";
|
||||
}
|
||||
|
||||
window.$gz.util.copyToClipboard(ret);
|
||||
},
|
||||
AddressCopyPostalToClipBoard() {
|
||||
@@ -1014,7 +1040,8 @@ async function clickHandler(menuItem) {
|
||||
city: m.vm.obj.city || m.vm.obj.postCity,
|
||||
region: m.vm.obj.region || m.vm.obj.postRegion,
|
||||
country: m.vm.obj.country || m.vm.obj.postCountry,
|
||||
postCode: m.vm.obj.postCode
|
||||
postCode: m.vm.obj.postCode,
|
||||
addressPostal: m.vm.obj.addressPostal
|
||||
});
|
||||
break;
|
||||
default:
|
||||
@@ -1159,6 +1186,7 @@ async function fetchTranslatedText() {
|
||||
"AddressCity",
|
||||
"AddressStateProv",
|
||||
"AddressCountry",
|
||||
"AddressPostal",
|
||||
"AddressLatitude",
|
||||
"AddressLongitude",
|
||||
"VendorCustom1",
|
||||
|
||||
Reference in New Issue
Block a user