Addresses for orgs and a bunch of bugfixes feature/72-adddress_for_everyone #73

Merged
niggl merged 9 commits from feature/72-adddress_for_everyone into dev 2021-02-19 17:04:21 +00:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit ec8d946a41 - Show all commits

View File

@ -42,6 +42,15 @@
original_data.groups = original_data.groups.map((g) => g.id); original_data.groups = original_data.groups.map((g) => g.id);
editable.address_checked = editable.address.address1 !== null; editable.address_checked = editable.address.address1 !== null;
original_data.address_checked = editable.address.address1 !== null; original_data.address_checked = editable.address.address1 !== null;
if(editable.address_checked===false){
editable.address = {
address1: "",
address2: "",
city: "",
postalcode: "",
country: ""
}
}
}); });
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => { RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
orgs = val; orgs = val;

View File

@ -35,6 +35,15 @@
} }
} }
value.address_checked = value.address.address1 !== null; value.address_checked = value.address.address1 !== null;
if(value.address_checked===false){
value.address = {
address1: "",
address2: "",
city: "",
postalcode: "",
country: ""
}
}
editable = Object.assign(editable, value); editable = Object.assign(editable, value);
editable = editable; editable = editable;
original_object = Object.assign(editable, value); original_object = Object.assign(editable, value);
@ -73,6 +82,7 @@
if (postdata.address_checked === false) { if (postdata.address_checked === false) {
postdata.address = null; postdata.address = null;
} }
console.log(postdata)
postdata.contact = postdata.contact === "null" ? null : postdata.contact; postdata.contact = postdata.contact === "null" ? null : postdata.contact;
RunnerOrganizationService.runnerOrganizationControllerPut( RunnerOrganizationService.runnerOrganizationControllerPut(
original_object.id, original_object.id,