-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created new consultant page and filter on competance (#448)
Co-authored-by: md <[email protected]>
- Loading branch information
Showing
24 changed files
with
551 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using Database.DatabaseContext; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace Api.Organisation; | ||
|
||
[Route("/v0/competences")] | ||
[ApiController] | ||
public class CompetenceController : ControllerBase | ||
{ | ||
private readonly ApplicationContext _applicationContext; | ||
|
||
public CompetenceController(ApplicationContext applicationContext) | ||
{ | ||
_applicationContext = applicationContext; | ||
} | ||
|
||
[HttpGet] | ||
public ActionResult<List<CompetenceReadModel>> Get() | ||
{ | ||
return _applicationContext.Competence | ||
.Select(competence => new CompetenceReadModel(competence.Id, competence.Name)) | ||
.ToList(); | ||
} | ||
} | ||
|
||
public record CompetenceReadModel([property: Required] string Id, [property: Required] string Name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { | ||
CompetenceReadModel, | ||
ConsultantReadModel, | ||
Degree, | ||
DepartmentReadModel, | ||
|
@@ -22,7 +23,7 @@ export const MockConsultants: ConsultantReadModel[] = [ | |
id: 1, | ||
name: "Test Consultant", | ||
email: "[email protected]", | ||
competences: ["Frontend"], | ||
competences: [{ id: "development", name: "Utvikling" }], | ||
department: "My Department", | ||
bookings: [ | ||
{ | ||
|
@@ -61,3 +62,10 @@ export const MockEngagements: EngagementPerCustomerReadModel[] = [ | |
engagements: [], | ||
}, | ||
]; | ||
|
||
export const MockCompetences: CompetenceReadModel[] = [ | ||
{ | ||
id: "development", | ||
name: "Utvikling", | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.