Skip to content

Commit

Permalink
Merge branch 'dev' into feature/OPHKIOS-116
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoivisto committed Dec 2, 2024
2 parents f70a427 + 77591ac commit 4f4edba
Show file tree
Hide file tree
Showing 27 changed files with 72 additions and 171 deletions.
4 changes: 2 additions & 2 deletions backend/akr/src/main/java/fi/oph/akr/config/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ public SpringResourceTemplateResolver emailTemplateResolver(final ApplicationCon
}

private static WebClient.Builder webClientBuilderWithCallerId(final String connectionProviderName) {
ConnectionProvider connectionProvider = ConnectionProvider
final ConnectionProvider connectionProvider = ConnectionProvider
.builder(connectionProviderName)
.maxConnections(50)
.maxIdleTime(Duration.ofSeconds(20))
.maxLifeTime(Duration.ofSeconds(60))
.pendingAcquireTimeout(Duration.ofSeconds(60))
.evictInBackground(Duration.ofSeconds(120))
.build();
HttpClient httpClient = HttpClient.create(connectionProvider);
final HttpClient httpClient = HttpClient.create(connectionProvider);
return WebClient
.builder()
.defaultHeader("Caller-Id", Constants.CALLER_ID)
Expand Down
1 change: 0 additions & 1 deletion backend/otr/src/main/java/fi/oph/otr/util/DateUtil.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fi.oph.otr.util;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class DateUtil {
Expand Down
8 changes: 4 additions & 4 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<!-- openai v2 https://springdoc.org/#migrating-from-springdoc-v1 -->
<springdoc-openapi.version>2.6.0</springdoc-openapi.version>
<!-- latest version for Java 17 https://github.com/lukas-krecan/ShedLock#versions -->
<shedlock.version>4.48.0</shedlock.version>
<shedlock.version>5.13.0</shedlock.version>
<poi.version>5.3.0</poi.version>
<liquibase.version>4.29.1</liquibase.version>
<liquibase.version>4.29.2</liquibase.version>
</properties>

<dependencies>
Expand All @@ -55,13 +55,13 @@
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>6.3.3</version>
<version>6.3.4</version>
</dependency>
<!-- Force 6.3.3 since there is vulnerability in 6.3.1 -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>6.3.3</version>
<version>6.3.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
2 changes: 1 addition & 1 deletion backend/vkt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.112.Final</version>
<version>4.1.113.Final</version>
<classifier>osx-aarch_64</classifier>
<scope>runtime</scope>
</dependency>
Expand Down
1 change: 1 addition & 0 deletions backend/vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class ExamEvent extends ExamEventCommon {
private long maxParticipants;

@OneToMany(mappedBy = "examEvent")
@OrderBy("createdAt")
private List<Enrollment> enrollments = new ArrayList<>();

@OneToMany(mappedBy = "examEvent")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fi.oph.vkt.repository;

import fi.oph.vkt.model.CasTicket;
import fi.oph.vkt.model.Person;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ public PublicEnrollmentDTO createEnrollmentToQueue(
);

if (freeEnrollmentDetails != null && freeEnrollment != null) {
if (freeEnrollmentDetails.textualSkillCount() == 0 || freeEnrollmentDetails.oralSkillCount() == 0) {
if (
EnrollmentUtil.getFreeExamsLeft(freeEnrollmentDetails.textualSkillCount()) == 0 ||
EnrollmentUtil.getFreeExamsLeft(freeEnrollmentDetails.oralSkillCount()) == 0
) {
publicEnrollmentEmailService.sendPartiallyFreeEnrollmentToQueueConfirmationEmail(
enrollment,
person,
Expand Down
2 changes: 1 addition & 1 deletion backend/yki/src/main/java/fi/oph/yki/YkiApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@SpringBootApplication
public class YkiApplication {

public static void main(String[] args) {
public static void main(final String[] args) {
SpringApplication.run(YkiApplication.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationServiceException;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;
Expand Down Expand Up @@ -31,4 +33,11 @@ public static HttpSecurity configCsrf(final HttpSecurity httpSecurity) throws Ex
configurer.csrfTokenRepository(csrfTokenRepository).csrfTokenRequestHandler(requestHandler)
);
}

@Bean
public AuthenticationManager noopAuthenticationManager() {
return authentication -> {
throw new AuthenticationServiceException("Authentication is disabled");
};
}
}
20 changes: 0 additions & 20 deletions docker-compose-akr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,6 @@ services:
- SPRING_DATASOURCE_PASSWORD=postgres
- SERVER_PORT=8080
- AKR_UNSECURE=${AKR_UNSECURE}
akr-frontend:
build:
context: ./frontend
dockerfile: Dockerfile.akr
args:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}
ports:
- "4000:4000"
working_dir: /app/reactjs
networks:
- akr-dev
volumes:
- ./frontend/packages/akr:/app/reactjs/packages/akr
- /app/reactjs/node_modules
- /app/reactjs/packages/akr/node_modules
environment:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}

akr-postgres:
build: ./backend/akr/db
Expand All @@ -59,6 +42,3 @@ services:

networks:
akr-dev: {}

volumes:
nodemodules: {}
20 changes: 0 additions & 20 deletions docker-compose-otr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,6 @@ services:
- SPRING_DATASOURCE_PASSWORD=postgres
- SERVER_PORT=8081
- OTR_UNSECURE=${OTR_UNSECURE}
otr-frontend:
build:
context: ./frontend
dockerfile: Dockerfile.otr
args:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}
ports:
- "4001:4001"
working_dir: /app/reactjs
networks:
- otr-dev
volumes:
- ./frontend/packages/otr:/app/reactjs/packages/otr
- /app/reactjs/node_modules
- /app/reactjs/packages/otr/node_modules
environment:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}

otr-postgres:
build: ./backend/otr/db
Expand All @@ -60,6 +43,3 @@ services:

networks:
otr-dev: {}

volumes:
nodemodules: {}
21 changes: 0 additions & 21 deletions docker-compose-vkt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ services:
- SERVER_PORT=8082
- VKT_UNSECURE=${VKT_UNSECURE}

vkt-frontend:
build:
context: ./frontend
dockerfile: Dockerfile.vkt
args:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}
ports:
- "4002:4002"
working_dir: /app/reactjs
networks:
- vkt-dev
volumes:
- ./frontend/packages/vkt:/app/reactjs/packages/vkt
- /app/reactjs/node_modules
- /app/reactjs/packages/vkt/node_modules
environment:
- GITHUB_REGISTRY_TOKEN=${GITHUB_REGISTRY_TOKEN}

vkt-postgres:
build: ./backend/vkt/db
container_name: vkt-postgres
Expand Down Expand Up @@ -74,6 +56,3 @@ services:

networks:
vkt-dev: {}

volumes:
nodemodules: {}
21 changes: 0 additions & 21 deletions frontend/Dockerfile.akr

This file was deleted.

21 changes: 0 additions & 21 deletions frontend/Dockerfile.otr

This file was deleted.

21 changes: 0 additions & 21 deletions frontend/Dockerfile.vkt

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@mui/x-date-pickers": "^5.0.20",
"@reduxjs/toolkit": "^1.9.7",
"@types/js-cookie": "^3.0.6",
"axios": "^1.7.4",
"axios": "^1.7.7",
"dayjs": "^1.11.13",
"finnish-personal-identity-code-validator": "kimmotaskinen/finnish-personal-identity-code-validator#support-new-delimiters",
"history": "^5.3.0",
Expand All @@ -47,7 +47,7 @@
"react-dom": "^18.3.1",
"react-i18next": "^13.5.0",
"react-redux": "^8.1.3",
"react-router-dom": "6.26.1",
"react-router-dom": "6.26.2",
"redux-saga": "^1.3.0"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/akr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"akr:qa": "yarn akr:lint && yarn akr:format && yarn akr:test:jest && yarn akr:start:ci",
"akr:start": "yarn g:webpack serve --config webpack.config.js --env proxy=http://localhost:8080",
"akr:start:ci": "yarn g:webpack serve --env cypress --config webpack.config.js --no-open",
"akr:start:docker-compose": "yarn g:webpack serve --config webpack.config.js --env proxy=http://akr-backend:8080 --env docker",
"akr:stylelint": "yarn g:stylelint --fix \"./src/**/*.scss\"",
"akr:test:cypress": "TZ=Europe/Helsinki yarn g:cypress run",
"akr:test:cypress:open": "TZ=Europe/Helsinki yarn g:cypress open",
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/otr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"otr:qa": "yarn otr:lint && yarn otr:format && yarn otr:test:jest && yarn otr:start:ci",
"otr:start": "yarn g:webpack serve --config webpack.config.js --env proxy=http://localhost:8081",
"otr:start:ci": "yarn g:webpack serve --env cypress --config webpack.config.js --no-open",
"otr:start:docker-compose": "yarn g:webpack serve --config webpack.config.js --env proxy=http://otr-backend:8081 --env docker",
"otr:stylelint": "yarn g:stylelint --fix \"./src/**/*.scss\"",
"otr:test:cypress": "TZ=Europe/Helsinki yarn g:cypress run",
"otr:test:cypress:open": "TZ=Europe/Helsinki yarn g:cypress open",
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/vkt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"vkt:qa": "yarn vkt:lint && yarn vkt:format && yarn vkt:test:jest && yarn vkt:start:ci",
"vkt:start": "yarn g:webpack serve --config webpack.config.js --env proxy=http://localhost:8082",
"vkt:start:ci": "yarn g:webpack serve --env cypress --env prod --config webpack.config.js --no-open --no-client-overlay",
"vkt:start:docker-compose": "yarn g:webpack serve --config webpack.config.js --env proxy=http://vkt-backend:8082 --env docker",
"vkt:stylelint": "yarn g:stylelint --fix \"./src/**/*.scss\"",
"vkt:test:cypress": "TZ=Europe/Helsinki yarn g:cypress run",
"vkt:test:cypress:open": "TZ=Europe/Helsinki yarn g:cypress open",
Expand Down
1 change: 1 addition & 0 deletions frontend/packages/vkt/public/i18n/fi-FI/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"dates": {
"dateTimeFormat": "l [klo] HH.mm",
"dateTimeFormatPrecise": "l [klo] HH.mm.ss",
"timeFormat": "[klo] HH.mm",
"dateFormat": "l",
"registrationOpensAt": "klo 10.00",
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/vkt/public/i18n/fi-FI/public.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@
"point2": "<0>kirjallisen taidon tutkinto</0> (= kirjoittamisen ja tekstin ymmärtämisen osakokeet)",
"point3": "<0>ymmärtämisen taidon tutkinto</0> (= tekstin ymmärtämisen ja puheen ymmärtämisen osakokeet)"
},

"skills": "Valtionhallinnon erinomaisen taidon kielitutkintoja ovat",
"title": "Yleistä valtionhallinnon kielitutkinnoista"
},
Expand Down
6 changes: 5 additions & 1 deletion frontend/packages/vkt/public/i18n/sv-SE/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
},
"dates": {
"dateTimeFormat": "l [kl.] HH.mm",
"dateFormat": "l"
"dateTimeFormatPrecise": "l [kl.] HH.mm.ss",
"dateFormat": "l",
"timeFormat": "[kl.] HH.mm",
"registrationOpensAt": "kl. 10.00",
"registrationClosesAt": "kl. 16.00"
},
"errors": {
"api": {
Expand Down
14 changes: 8 additions & 6 deletions frontend/packages/vkt/public/i18n/sv-SE/public.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"title": "Annullera anmälan"
},
"enrollToQueue": "Ställ dig i kön",
"pay": "Betala"
"pay": "Betala",
"enroll": "Anmäl dig"
},
"examEventDetails": {
"enrollmentToQueue": "Ställ dig i kön",
Expand Down Expand Up @@ -255,11 +256,8 @@
"point2": "<0>examen som gäller förmåga att använda finska eller svenska i skrift</0> (med delproven läsförståelse och skriftlig färdighet)",
"point3": "<0>examen som gäller förmåga att förstå finska eller svenska</0> (med delproven hörförståelse och läsförståelse)"
},
"introduction": {
"line1": "Språkexamina för statsförvaltningen är avsedda för att visa sådana språkkunskaper i det andra inhemska språket som krävs av offentligt anställda.",
"line2": "Med examensintygen kan man visa förmåga att använda finska eller svenska i tal och i skrift samt förmåga att förstå språket."
},
"skills": "Examina som gäller utmärkta språkkunskaper är"
"skills": "Examina som gäller utmärkta språkkunskaper är",
"title": "Allmänt om språkexamina för statsförvaltningen"
},
"enrollment": {
"link": {
Expand Down Expand Up @@ -289,6 +287,10 @@
},
"title": "Avgftsfri examen"
},
"introduction": {
"line1": "Språkexamina för statsförvaltningen är avsedda för att visa sådana språkkunskaper i det andra inhemska språket som krävs av offentligt anställda.",
"line2": "Med examensintygen kan man visa förmåga att använda finska eller svenska i tal och i skrift samt förmåga att förstå språket."
},
"title": "Språkexamina för statsförvaltningen (VKT) - anmälan till examina som gäller utmärkta språkkunskaper"
},
"publicExamEventListing": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export const ClerkEnrollmentListingRow = ({
<Text>{getSelectedPartialExamsText()}</Text>
</TableCell>
<TableCell>
<Text>{DateTimeUtils.renderDateTime(enrollment.enrollmentTime)}</Text>
<Text>
{DateTimeUtils.renderDateTimePrecise(enrollment.enrollmentTime)}
</Text>
</TableCell>
<TableCell sx={{ width: '20%' }} align="right">
{[
Expand Down
Loading

0 comments on commit 4f4edba

Please sign in to comment.