diff --git a/src/Client/src/app/pages/company/editor/editor.component.html b/src/Client/src/app/pages/company/editor/editor.component.html index 7f99919..db1c67f 100644 --- a/src/Client/src/app/pages/company/editor/editor.component.html +++ b/src/Client/src/app/pages/company/editor/editor.component.html @@ -41,7 +41,7 @@
- + @@ -64,7 +64,7 @@
- +
diff --git a/src/Client/src/app/pages/company/editor/editor.component.ts b/src/Client/src/app/pages/company/editor/editor.component.ts index 5ae8f2b..5664d6d 100644 --- a/src/Client/src/app/pages/company/editor/editor.component.ts +++ b/src/Client/src/app/pages/company/editor/editor.component.ts @@ -30,8 +30,19 @@ export class CompanyEditorComponent { }; ngOnInit(){ - // Query param CompanyID -> Edit - // Query param null -> New + this.route.queryParams.subscribe(params => { + const CompanyID = params['CompanyID'] ? +params['CompanyID'] : null; + if (CompanyID !== null){ + this.http.get("api/company?CompanyID=" + CompanyID).subscribe({ + next: data => { + this.newListing = data; + }, + error: err => { + this.ErrorMsg = err.error; + } + }); + } + }); } ngAfterViewInit(){