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 f2be310..54ca043 100644 --- a/src/Client/src/app/pages/main/company/company.component.html +++ b/src/Client/src/app/pages/main/company/company.component.html @@ -1,5 +1,5 @@
- +
diff --git a/src/Client/src/app/pages/main/company/jobs/jobs.component.html b/src/Client/src/app/pages/main/company/jobs/jobs.component.html index 70552be..db11b14 100644 --- a/src/Client/src/app/pages/main/company/jobs/jobs.component.html +++ b/src/Client/src/app/pages/main/company/jobs/jobs.component.html @@ -18,6 +18,6 @@

Modified: {{ cur.modifiedTime }}

- + \ No newline at end of file diff --git a/src/Client/src/app/pages/main/jobs/editor/jobeditor.component.ts b/src/Client/src/app/pages/main/jobs/editor/jobeditor.component.ts index bd69aad..63b61bc 100644 --- a/src/Client/src/app/pages/main/jobs/editor/jobeditor.component.ts +++ b/src/Client/src/app/pages/main/jobs/editor/jobeditor.component.ts @@ -71,7 +71,7 @@ export class JobEditorComponent { } PostJobListing(jobListing: JobListing){ - jobListing.companyID = this.selectedCompany.id; + jobListing.companyID = this.selectedCompany.id!; this.http.post("api/joblisting", jobListing).subscribe({ next: data => { this.router.navigate([""]); diff --git a/src/Server/Controllers/CompanyController.cs b/src/Server/Controllers/CompanyController.cs index 639725f..c546bf8 100644 --- a/src/Server/Controllers/CompanyController.cs +++ b/src/Server/Controllers/CompanyController.cs @@ -26,7 +26,7 @@ namespace BoredCareers.Controllers { public async Task SetCompany([FromBody] Company company, [FromQuery] bool newCompany = false) { if (isLoggedIn()) { if (newCompany) { - Company? test = await _databaseService.GetCompany(company.ID); + Company? test = await _databaseService.GetCompany(Convert.ToInt32(company.ID)); if (test == null) { company.ID = await _databaseService.SetCompany(company); await _databaseService.SetEmployee(new Employee() { @@ -37,7 +37,7 @@ namespace BoredCareers.Controllers { } return NotFound("The company already exists"); } else { - if (await isLoggedInUserEmployeeOf(company.ID)) { + if (await isLoggedInUserEmployeeOf(Convert.ToInt32(company.ID))) { await _databaseService.SetCompany(company); return Ok(); } diff --git a/src/Server/Controllers/EmployeeController.cs b/src/Server/Controllers/EmployeeController.cs index b00d61a..9a270b2 100644 --- a/src/Server/Controllers/EmployeeController.cs +++ b/src/Server/Controllers/EmployeeController.cs @@ -34,7 +34,7 @@ namespace BoredCareers.Controllers { [HttpPost] public async Task SetEmployee([FromBody] Employee employee) { if (isLoggedIn()) { - if (await isLoggedInUserEmployeeOf(employee.Company.ID)) { + if (await isLoggedInUserEmployeeOf(Convert.ToInt32(employee.Company.ID))) { await _databaseService.SetEmployee(employee); return Ok(); } @@ -48,7 +48,7 @@ namespace BoredCareers.Controllers { if (isLoggedIn()) { Employee? employee = await _databaseService.GetEmployee(EmployeeID); if (employee != null) { - if (await isLoggedInUserEmployeeOf(employee.Company.ID)) { + if (await isLoggedInUserEmployeeOf(Convert.ToInt32(employee.Company.ID))) { await _databaseService.DeleteEmployee(EmployeeID); return Ok(); } diff --git a/src/Server/Services/DatabaseService/Resume.cs b/src/Server/Services/DatabaseService/Resume.cs index 5050a10..88ff4d2 100644 --- a/src/Server/Services/DatabaseService/Resume.cs +++ b/src/Server/Services/DatabaseService/Resume.cs @@ -143,7 +143,7 @@ namespace BoredCareers.Services.DatabaseService { // Split into grouped lists and add to experience Dictionary groupedExperienceBullets = experienceBullets.GroupBy(b => b.ResumeExperienceID).ToDictionary(g => g.Key, g => g.ToArray()); foreach (ResumeExperience cur in experience) { - cur.ExperienceBullets = groupedExperienceBullets[cur.ID]; + cur.ExperienceBullets = groupedExperienceBullets[Convert.ToInt32(cur.ID)]; } // Add the parts to the resume