Skip to content
Snippets Groups Projects
Commit 7cee035a authored by Labros Papadopoulos's avatar Labros Papadopoulos
Browse files

check if it has geographic info

parent f7733648
No related branches found
No related tags found
1 merge request!11Party registration workflow
Pipeline #6260 passed
......@@ -82,6 +82,8 @@ export class EditIndividualsComponent implements OnInit {
testbedProvider = false
hasGeographicSite = false
subscriptions = new Subscription()
ngOnInit() {
......@@ -98,6 +100,11 @@ export class EditIndividualsComponent implements OnInit {
if (val ==='TESTBED_PROVIDER') {
this.testbedProvider=true
this.retrieveGeographicSite()
console.log(this.geographicSite)
if (this.geographicSite.place[0].geographicAddress.city!==null){
this.hasGeographicSite=true
console.log(this.hasGeographicSite)
}
}
}
this.retrieveIndividual()
......@@ -309,7 +316,7 @@ export class EditIndividualsComponent implements OnInit {
console.log(updateObj)
let updatedGeographicSite: GeographicSite
if (this.newIndividual) {
if (!this.hasGeographicSite) {
this.geographicSiteService.createGeographicSite(updateObj).subscribe(
data => { updatedGeographicSite = data },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment