Commit f8defb1c authored by Labros Papadopoulos's avatar Labros Papadopoulos
Browse files

fixing redirecting and geographic site info form

parent 7cee035a
Loading
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -101,10 +101,7 @@ export class EditIndividualsComponent implements OnInit {
              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()
@@ -233,7 +230,13 @@ export class EditIndividualsComponent implements OnInit {

  retrieveGeographicSite(){
    this.geographicSiteService.retrieveGeographicSite("myuser").subscribe(
      data => this.geographicSite = data,
      data => {
        this.geographicSite = data
        if (this.geographicSite.place[0].geographicAddress.city!==null){
          this.hasGeographicSite=true
          console.log(this.hasGeographicSite)
      }
      },
      error => console.error(error),
      () => {
        this.editForm.patchValue({
+3 −3
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ export class RedirectComponent implements OnInit {
    const activePortal = localStorage.getItem('active_portal')

    if (activePortal === 'services') {
      this.router.navigate(['services', 'individual_update'])
      this.router.navigate(['services/individual_update', 'myuser'])

    }
    else if (activePortal === 'resources') {
@@ -29,12 +29,12 @@ export class RedirectComponent implements OnInit {
    }
    else if (activePortal === 'testing') {

      this.router.navigate(['testing', 'individual_update'])
      this.router.navigate(['testing/individual_update', 'myuser'])
    }

    else if (activePortal === 'products') {

          this.router.navigate(['products', 'individual_update'])
          this.router.navigate(['products/individual_update', 'myuser'])
    }

    else {