-
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.
VKT(Backend&Frontend): Get (mocked, fixed) list of examiners to displ…
…ay on frontend from backend API [deploy]
- Loading branch information
Showing
12 changed files
with
234 additions
and
67 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
18 changes: 18 additions & 0 deletions
18
backend/vkt/src/main/java/fi/oph/vkt/api/dto/PublicExaminerDTO.java
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,18 @@ | ||
package fi.oph.vkt.api.dto; | ||
|
||
import fi.oph.vkt.model.type.ExamLanguage; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.NonNull; | ||
|
||
@Builder | ||
public record PublicExaminerDTO( | ||
@NonNull @NotNull Long id, | ||
@NonNull @NotNull String lastName, | ||
@NonNull @NotNull String firstName, | ||
@NonNull @NotNull List<ExamLanguage> languages, | ||
@NonNull @NotNull List<PublicMunicipalityDTO> municipalities, | ||
@NonNull @NotNull List<LocalDate> examDates | ||
) {} |
8 changes: 8 additions & 0 deletions
8
backend/vkt/src/main/java/fi/oph/vkt/api/dto/PublicMunicipalityDTO.java
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,8 @@ | ||
package fi.oph.vkt.api.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import lombok.NonNull; | ||
|
||
@Builder | ||
public record PublicMunicipalityDTO(@NonNull @NotNull String fi, @NonNull @NotNull String sv) {} |
35 changes: 35 additions & 0 deletions
35
backend/vkt/src/main/java/fi/oph/vkt/service/PublicExaminerService.java
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,35 @@ | ||
package fi.oph.vkt.service; | ||
|
||
import fi.oph.vkt.api.dto.PublicExaminerDTO; | ||
import fi.oph.vkt.api.dto.PublicMunicipalityDTO; | ||
import fi.oph.vkt.model.type.ExamLanguage; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class PublicExaminerService { | ||
|
||
public List<PublicExaminerDTO> listExaminers() { | ||
final PublicMunicipalityDTO helsinki = PublicMunicipalityDTO.builder().fi("Helsinki").sv("Helsingfors").build(); | ||
final PublicMunicipalityDTO espoo = PublicMunicipalityDTO.builder().fi("Espoo").sv("Esbo").build(); | ||
final PublicMunicipalityDTO vantaa = PublicMunicipalityDTO.builder().fi("Vantaa").sv("Vanda").build(); | ||
final PublicMunicipalityDTO kauniainen = PublicMunicipalityDTO.builder().fi("Kauniainen").sv("Grankulla").build(); | ||
final List<PublicExaminerDTO> examiners = new ArrayList<>(); | ||
examiners.add( | ||
PublicExaminerDTO | ||
.builder() | ||
.id(1L) | ||
.lastName("Laine") | ||
.firstName("Eemeli") | ||
.languages(List.of(ExamLanguage.FI)) | ||
.municipalities(List.of(helsinki, espoo, vantaa, kauniainen)) | ||
.examDates(List.of()) | ||
.build() | ||
); | ||
|
||
return examiners; | ||
} | ||
} |
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
8 changes: 7 additions & 1 deletion
8
...ages/vkt/src/pages/goodAndSatisfactoryLevel/PublicGoodAndSatisfactoryLevelLandingPage.tsx
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.