updated js & css

master
Nadim Salloum 2023-12-20 23:13:49 +01:00
parent 26d4bf9647
commit 2d15417dfe
Signed by untrusted user who does not match committer: nadim
GPG Key ID: 649BDF978504C1D1
2 changed files with 7 additions and 10 deletions

0
public/css/app.css vendored Normal file → Executable file
View File

17
public/js/app.js vendored Normal file → Executable file
View File

@ -23001,17 +23001,14 @@ __webpack_require__.r(__webpack_exports__);
var _this = this;
if (newVal !== oldVal && newVal.length === 4 && this.form.country === 'CH') {
axios.get("https://swisspost.opendatasoft.com/api/records/1.0/search/?dataset=plz_verzeichnis_v2&q=&facet=ortbez18&refine.postleitzahl=".concat(newVal)).then(function (response) {
var records = response.data.records;
axios.get("https://openplzapi.org/ch/Localities?postalCode=".concat(newVal)).then(function (response) {
var data = response.data;
/*if (records.length > 1) {
records = records.filter(rec => rec.geometry);
}*/
if (records.length > 1) {
records = records.filter(function (rec) {
return rec.geometry;
});
}
if (records[0]) {
_this.form.city = records[0].fields.ortbez18;
if (data[0]) {
_this.form.city = data[0].name;
}
});
}