Skip to content

Commit

Permalink
Merge pull request #173 from careerfairsystems/desiredcompetences-fea…
Browse files Browse the repository at this point in the history
…ture

Desired companies feature klar
  • Loading branch information
LeoFjatstrom authored Nov 7, 2024
2 parents c891896 + ff08ff7 commit 3fc077a
Show file tree
Hide file tree
Showing 8 changed files with 664 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Nexpo/Controllers/CompaniesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public async Task<ActionResult> GetCompanies()
DaysAtArkad = company.DaysAtArkad,
DesiredDegrees = company.DesiredDegrees,
DesiredProgramme = company.DesiredProgramme,
DesiredCompetences = company.DesiredCompetences,
Positions = company.Positions,
Industries = company.Industries,
StudentSessionMotivation = company.StudentSessionMotivation
Expand Down Expand Up @@ -75,6 +76,7 @@ public async Task<ActionResult> GetCompany(int id)
DaysAtArkad = company.DaysAtArkad,
DesiredDegrees = company.DesiredDegrees,
DesiredProgramme = company.DesiredProgramme,
DesiredCompetences = company.DesiredCompetences,
Positions = company.Positions,
Industries = company.Industries,
StudentSessionMotivation = company.StudentSessionMotivation
Expand Down Expand Up @@ -130,7 +132,10 @@ public async Task<ActionResult> PutCompany(int id, UpdateCompanyAdminDTO DTO)
{
company.LogoUrl = DTO.LogoUrl;
}

if (DTO.DesiredCompetences != null)
{
company.DesiredCompetences = DTO.DesiredCompetences;
}
if (DTO.DaysAtArkad != null)
{
company.DaysAtArkad = new List<DateTime>(DTO.DaysAtArkad);
Expand Down Expand Up @@ -188,7 +193,10 @@ public async Task<ActionResult> PutCompanyByName(string name, UpdateCompanyAdmin
{
company.LogoUrl = DTO.LogoUrl;
}

if (DTO.DesiredCompetences != null)
{
company.DesiredCompetences = DTO.DesiredCompetences;
}
if (DTO.DaysAtArkad != null)
{
company.DaysAtArkad = new List<DateTime>(DTO.DaysAtArkad);
Expand Down Expand Up @@ -266,6 +274,7 @@ public async Task<ActionResult> AddNewCompany(AddCompanyDTO DTO)
DaysAtArkad = DTO.DaysAtArkad,
DesiredDegrees = DTO.DesiredDegrees,
DesiredProgramme = DTO.DesiredProgramme,
DesiredCompetences = DTO.DesiredCompetences,
Positions = DTO.Positions,
Industries = DTO.Industries,
HostName = DTO.HostName,
Expand Down
2 changes: 2 additions & 0 deletions Nexpo/DTO/Company/AddCompanyDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class AddCompanyDTO

public List<int> DesiredProgramme { get; set;}

public List<int> DesiredCompetences { get; set; }

public List<int> Positions { get; set;}

public List<int> Industries { get; set;}
Expand Down
2 changes: 2 additions & 0 deletions Nexpo/DTO/Company/PublicCompanyDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class PublicCompanyDTO

public List<int> DesiredProgramme { get; set;}

public List<int> DesiredCompetences { get; set; }

public List<int> Positions { get; set;}

public List<int> Industries { get; set;}
Expand Down
2 changes: 2 additions & 0 deletions Nexpo/DTO/Company/UpdateCompanyAdminDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ public class UpdateCompanyAdminDTO
public string LogoUrl { get; set; }

public List<DateTime> DaysAtArkad { get; set;}

public List<int> DesiredCompetences { get; set; }
}
}
Loading

0 comments on commit 3fc077a

Please sign in to comment.