diff --git a/src/Client/src/app/pages/main/company/company.component.css b/src/Client/src/app/pages/main/company/company.component.css index 290016c..1ceeb47 100644 --- a/src/Client/src/app/pages/main/company/company.component.css +++ b/src/Client/src/app/pages/main/company/company.component.css @@ -39,6 +39,97 @@ button { justify-content: center; } +.content-edit { + position: absolute; + right: 20px; +} + .center-item img { width: 300px; +} + +.content-name { + width: 300px; + text-align: center; + font-size: 30px; +} + +.content-name h1 { + margin: 0; +} + +.content-link { + display: flex; + width: 300px; + justify-content: center; +} + +.content-link a { + text-decoration: none; + color: var(--Mistox-White); + margin-top: auto; +} + +.content-desc { + border: solid 1px red; + border-radius: 5px; + padding: 20px; + margin: 0 100px; + margin-bottom: 0px; + margin-bottom: 50px; +} + +.content-desc h1 { + margin: 0; + font-size: 20px; + color: #ddd; +} + +.content-button { + display: flex; + justify-content: center; +} + +.content-button span { + align-content: center; +} + +.split-frame { + display: flex; + width: 100%; +} + +.half-frame { + width: 50%; + border-right: solid 1px var(--Mistox-Black); + border-left: solid 1px var(--Mistox-Black); +} + +.half-frame h2 { + text-align: center; +} + +.job-tile { + display: flex; + background-color: var(--Mistox-Black); + justify-content: end; + align-items: center; + border-radius: 10px; + margin: 0 5px; + margin-bottom: 10px; +} + +.center-text { + display: flex; + flex: 1; + justify-content: center; +} + +.job-tile h1 { + margin: 0; +} + +.job-tile button { + color: white; + border-color: white; } \ No newline at end of file diff --git a/src/Client/src/app/pages/main/company/company.component.html b/src/Client/src/app/pages/main/company/company.component.html index 204c13b..90f926c 100644 --- a/src/Client/src/app/pages/main/company/company.component.html +++ b/src/Client/src/app/pages/main/company/company.component.html @@ -1,25 +1,50 @@
- +
+
- + +

{{ Comp.name }}

+ +
+
+

{{ Comp.city }}, {{ Comp.stateOrRegion }} {{ Comp.postalCode }}

+
+
+

{{ line }}

+
+
+ +
+
+ + You must verify your company email before you can post job listings. +
+
+
+
+

Active Job Listings

+
+
+

{{ listing.title }}

+
+ + + +
+
+
+

Employees

+ +
-

{{ Comp.emailVerified }}

- -

{{ Comp.phone }}

-

{{ Comp.postalCode }}

-

{{ Comp.country }}

-

{{ Comp.stateOrRegion }}

-

{{ Comp.city }}

-

{{ Comp.description }}

-
\ No newline at end of file diff --git a/src/Client/src/app/pages/main/company/company.component.ts b/src/Client/src/app/pages/main/company/company.component.ts index dc8ee16..015c90d 100644 --- a/src/Client/src/app/pages/main/company/company.component.ts +++ b/src/Client/src/app/pages/main/company/company.component.ts @@ -6,6 +6,7 @@ import { Title } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { Authentication } from 'app/services/Authentication'; import { Company, Employee } from 'app/models/Company'; +import { JobListing } from 'app/models/JobListing'; @Component({ selector: 'main-company', @@ -17,13 +18,22 @@ export class CompanyComponent { public ErrorMsg: string = ""; public Employers: Employee[] = []; + public Comp: Company | null = null; + public Desc: string[] = []; + + public List: JobListing[] = []; constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) { this.title.setTitle("Companies | BoredCareers"); http.get("api/employee/").subscribe({ next: data => { this.Employers = data; + if (data[0] != null){ + if (data[0].company.id !== null){ + this.changeSelectedCompany(data[0].company.id); + } + } }, error: err => { this.ErrorMsg = err.error; @@ -36,6 +46,27 @@ export class CompanyComponent { this.http.get("api/company?CompanyID=" + companyID).subscribe({ next: data => { this.Comp = data; + this.Desc = data.description.split("\n"); + }, + error: err => { + this.ErrorMsg = err.error; + } + }); + + this.http.get("api/joblisting/company?CompanyID=" + companyID).subscribe({ + next: data => { + this.List = data; + }, + error: err => { + this.ErrorMsg = err.error; + } + }); + } + + RemoveJobListing( JobListingID: number ){ + this.http.delete("api/joblisting?JobListingID=" + JobListingID).subscribe({ + next: data => { + window.location.reload(); }, error: err => { this.ErrorMsg = err.error;