From a3ef9bb570b5ca1f76daa5e05d99a73d6061d4ec Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:46:50 +0300 Subject: [PATCH 1/6] VKT(Frontend): Swedish translation fixes and unused import [deploy] (#738) --- frontend/packages/vkt/public/i18n/fi-FI/public.json | 1 - frontend/packages/vkt/public/i18n/sv-SE/common.json | 5 ++++- frontend/packages/vkt/public/i18n/sv-SE/public.json | 11 ++++++----- .../publicEnrollment/PublicEnrollmentStepper.tsx | 1 - 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/packages/vkt/public/i18n/fi-FI/public.json b/frontend/packages/vkt/public/i18n/fi-FI/public.json index b4d8124e1..408f08dab 100644 --- a/frontend/packages/vkt/public/i18n/fi-FI/public.json +++ b/frontend/packages/vkt/public/i18n/fi-FI/public.json @@ -254,7 +254,6 @@ "point2": "<0>kirjallisen taidon tutkinto (= kirjoittamisen ja tekstin ymmärtämisen osakokeet)", "point3": "<0>ymmärtämisen taidon tutkinto (= tekstin ymmärtämisen ja puheen ymmärtämisen osakokeet)" }, - "skills": "Valtionhallinnon erinomaisen taidon kielitutkintoja ovat", "title": "Yleistä valtionhallinnon kielitutkinnoista" }, diff --git a/frontend/packages/vkt/public/i18n/sv-SE/common.json b/frontend/packages/vkt/public/i18n/sv-SE/common.json index 73db44729..fee62838f 100644 --- a/frontend/packages/vkt/public/i18n/sv-SE/common.json +++ b/frontend/packages/vkt/public/i18n/sv-SE/common.json @@ -46,7 +46,10 @@ }, "dates": { "dateTimeFormat": "l [kl.] HH.mm", - "dateFormat": "l" + "dateFormat": "l", + "timeFormat": "[kl.] HH.mm", + "registrationOpensAt": "kl. 10.00", + "registrationClosesAt": "kl. 16.00" }, "errors": { "api": { diff --git a/frontend/packages/vkt/public/i18n/sv-SE/public.json b/frontend/packages/vkt/public/i18n/sv-SE/public.json index 3b365c016..4d352c74b 100644 --- a/frontend/packages/vkt/public/i18n/sv-SE/public.json +++ b/frontend/packages/vkt/public/i18n/sv-SE/public.json @@ -255,11 +255,8 @@ "point2": "<0>examen som gäller förmåga att använda finska eller svenska i skrift (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 (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": { @@ -289,6 +286,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": { diff --git a/frontend/packages/vkt/src/components/publicEnrollment/PublicEnrollmentStepper.tsx b/frontend/packages/vkt/src/components/publicEnrollment/PublicEnrollmentStepper.tsx index 1f5f5670c..9b441289b 100644 --- a/frontend/packages/vkt/src/components/publicEnrollment/PublicEnrollmentStepper.tsx +++ b/frontend/packages/vkt/src/components/publicEnrollment/PublicEnrollmentStepper.tsx @@ -1,6 +1,5 @@ import { Step, StepLabel, Stepper, Typography } from '@mui/material'; import { visuallyHidden } from '@mui/utils'; -import { useEffect } from 'react'; import { CircularStepper } from 'shared/components'; import { Color } from 'shared/enums'; import { useWindowProperties } from 'shared/hooks'; From 367df5c7a6b3cad0981a5ec49fc3e90463f2893e Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:32:02 +0300 Subject: [PATCH 2/6] VKT(Frontend): Swedish translation fixes vol 2 [deploy] (#739) --- frontend/packages/vkt/public/i18n/sv-SE/public.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/packages/vkt/public/i18n/sv-SE/public.json b/frontend/packages/vkt/public/i18n/sv-SE/public.json index 4d352c74b..dbd60774c 100644 --- a/frontend/packages/vkt/public/i18n/sv-SE/public.json +++ b/frontend/packages/vkt/public/i18n/sv-SE/public.json @@ -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", From 2d51d628249e8d060fdc8c827639cc97a98594cf Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Fri, 1 Nov 2024 16:06:06 +0200 Subject: [PATCH 3/6] AKR:OTR:VKT: Remove (unmaintained, unused) frontend Dockerfiles --- docker-compose-akr.yml | 20 -------------------- docker-compose-otr.yml | 20 -------------------- docker-compose-vkt.yml | 21 --------------------- frontend/Dockerfile.akr | 21 --------------------- frontend/Dockerfile.otr | 21 --------------------- frontend/Dockerfile.vkt | 21 --------------------- frontend/packages/akr/package.json | 1 - frontend/packages/otr/package.json | 1 - frontend/packages/vkt/package.json | 1 - frontend/webpack.common.js | 2 +- 10 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 frontend/Dockerfile.akr delete mode 100644 frontend/Dockerfile.otr delete mode 100644 frontend/Dockerfile.vkt diff --git a/docker-compose-akr.yml b/docker-compose-akr.yml index 2d439b077..a3fd481d4 100644 --- a/docker-compose-akr.yml +++ b/docker-compose-akr.yml @@ -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 @@ -59,6 +42,3 @@ services: networks: akr-dev: {} - -volumes: - nodemodules: {} diff --git a/docker-compose-otr.yml b/docker-compose-otr.yml index 7c8e9d01b..4a0489f4b 100644 --- a/docker-compose-otr.yml +++ b/docker-compose-otr.yml @@ -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 @@ -60,6 +43,3 @@ services: networks: otr-dev: {} - -volumes: - nodemodules: {} diff --git a/docker-compose-vkt.yml b/docker-compose-vkt.yml index f9f9349c2..9b0fa3e23 100644 --- a/docker-compose-vkt.yml +++ b/docker-compose-vkt.yml @@ -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 @@ -74,6 +56,3 @@ services: networks: vkt-dev: {} - -volumes: - nodemodules: {} diff --git a/frontend/Dockerfile.akr b/frontend/Dockerfile.akr deleted file mode 100644 index 30362f4da..000000000 --- a/frontend/Dockerfile.akr +++ /dev/null @@ -1,21 +0,0 @@ -FROM node:16.16.0-alpine - -RUN corepack enable - -ARG GITHUB_REGISTRY_TOKEN - -# Create app directory -WORKDIR /app/reactjs - -# Copy workspace config -COPY package*.json yarn.lock webpack.common.js ./ -COPY .yarn/releases ./.yarn/releases -COPY .yarn/plugins ./.yarn/plugins -COPY .yarnrc.yml ./ - -# Copy packages -COPY ./packages/akr ./packages/akr - -RUN yarn install - -ENTRYPOINT [ "yarn", "akr:start:docker-compose" ] diff --git a/frontend/Dockerfile.otr b/frontend/Dockerfile.otr deleted file mode 100644 index d89fa02aa..000000000 --- a/frontend/Dockerfile.otr +++ /dev/null @@ -1,21 +0,0 @@ -FROM node:16.16.0-alpine - -RUN corepack enable - -ARG GITHUB_REGISTRY_TOKEN - -# Create app directory -WORKDIR /app/reactjs - -# Copy workspace config -COPY package*.json yarn.lock webpack.common.js ./ -COPY .yarn/releases ./.yarn/releases -COPY .yarn/plugins ./.yarn/plugins -COPY .yarnrc.yml ./ - -# Copy packages -COPY ./packages/otr ./packages/otr - -RUN yarn install - -ENTRYPOINT [ "yarn", "otr:start:docker-compose" ] diff --git a/frontend/Dockerfile.vkt b/frontend/Dockerfile.vkt deleted file mode 100644 index cccb1be37..000000000 --- a/frontend/Dockerfile.vkt +++ /dev/null @@ -1,21 +0,0 @@ -FROM node:16.16.0-alpine - -RUN corepack enable - -ARG GITHUB_REGISTRY_TOKEN - -# Create app directory -WORKDIR /app/reactjs - -# Copy workspace config -COPY package*.json yarn.lock webpack.common.js ./ -COPY .yarn/releases ./.yarn/releases -COPY .yarn/plugins ./.yarn/plugins -COPY .yarnrc.yml ./ - -# Copy packages -COPY ./packages/vkt ./packages/vkt - -RUN yarn install - -ENTRYPOINT [ "yarn", "vkt:start:docker-compose" ] diff --git a/frontend/packages/akr/package.json b/frontend/packages/akr/package.json index c493483a3..8586d6638 100644 --- a/frontend/packages/akr/package.json +++ b/frontend/packages/akr/package.json @@ -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", diff --git a/frontend/packages/otr/package.json b/frontend/packages/otr/package.json index 6983d5d54..e11a96256 100644 --- a/frontend/packages/otr/package.json +++ b/frontend/packages/otr/package.json @@ -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", diff --git a/frontend/packages/vkt/package.json b/frontend/packages/vkt/package.json index 7f720bfd3..4261cdc53 100644 --- a/frontend/packages/vkt/package.json +++ b/frontend/packages/vkt/package.json @@ -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", diff --git a/frontend/webpack.common.js b/frontend/webpack.common.js index ca3c16347..605d3f4cd 100644 --- a/frontend/webpack.common.js +++ b/frontend/webpack.common.js @@ -183,7 +183,7 @@ const getHtmlWebpackPlugin = (env, appName, dirName) => { }, }; - if ((!env.docker || !env.cypress) && isGitAvailable()) { + if (!env.cypress && isGitAvailable()) { const { GitRevisionPlugin } = require("git-revision-webpack-plugin"); const gitRevisionPlugin = new GitRevisionPlugin({ branch: true, From 204f3ac794f6193227fb87cd6ad6137ede41dd14 Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:06:36 +0200 Subject: [PATCH 4/6] Snyk/updates 10 2024 (#748) * fix: upgrade axios from 1.7.4 to 1.7.7 Snyk has created this PR to upgrade axios from 1.7.4 to 1.7.7. See this package in yarn: axios See this project in Snyk: https://app.snyk.io/org/oph-snyk/project/84abdeeb-9d9e-4376-92f5-0d0983809ad7?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr * fix: upgrade org.liquibase:liquibase-core from 4.29.1 to 4.29.2 Snyk has created this PR to upgrade org.liquibase:liquibase-core from 4.29.1 to 4.29.2. See this package in maven: org.liquibase:liquibase-core See this project in Snyk: https://app.snyk.io/org/oph-snyk/project/d824f7ed-bf61-4724-becd-c480f7e7c8ea?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr * fix: upgrade io.netty:netty-resolver-dns-native-macos from 4.1.112.Final to 4.1.113.Final Snyk has created this PR to upgrade io.netty:netty-resolver-dns-native-macos from 4.1.112.Final to 4.1.113.Final. See this package in maven: io.netty:netty-resolver-dns-native-macos See this project in Snyk: https://app.snyk.io/org/oph-snyk/project/e59ac9f1-fa97-493f-be51-738241cda069?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr * fix: upgrade react-router-dom from 6.26.1 to 6.26.2 Snyk has created this PR to upgrade react-router-dom from 6.26.1 to 6.26.2. See this package in yarn: react-router-dom See this project in Snyk: https://app.snyk.io/org/oph-snyk/project/84abdeeb-9d9e-4376-92f5-0d0983809ad7?utm_source=github-cloud-app&utm_medium=referral&page=upgrade-pr * fix: backend/pom.xml to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230364 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230365 * fix: backend/pom.xml to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230364 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230365 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 * fix: backend/pom.xml to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230372 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230373 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230364 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230365 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230367 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230368 * fix: backend/pom.xml to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230372 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230373 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230364 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230365 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230367 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230368 * fix: backend/pom.xml to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORKSECURITY-8309135 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230372 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230373 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230364 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230365 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230367 - https://snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-8230368 * VKT:AKR:OTR:YKI(Backend) Dummy commit for [deploy] * YKI(Backend) Disable default authentication [deploy] --------- Co-authored-by: snyk-io[bot] <141718529+snyk-io[bot]@users.noreply.github.com> --- .../java/fi/oph/akr/config/AppConfig.java | 4 +- .../main/java/fi/oph/otr/util/DateUtil.java | 1 - backend/pom.xml | 8 ++-- backend/vkt/pom.xml | 2 +- .../vkt/repository/CasTicketRepository.java | 1 - .../main/java/fi/oph/yki/YkiApplication.java | 2 +- .../config/security/WebSecurityConfig.java | 9 ++++ frontend/package.json | 4 +- frontend/yarn.lock | 42 +++++++++---------- 9 files changed, 40 insertions(+), 33 deletions(-) diff --git a/backend/akr/src/main/java/fi/oph/akr/config/AppConfig.java b/backend/akr/src/main/java/fi/oph/akr/config/AppConfig.java index 8237dbbe4..6cc3f112d 100644 --- a/backend/akr/src/main/java/fi/oph/akr/config/AppConfig.java +++ b/backend/akr/src/main/java/fi/oph/akr/config/AppConfig.java @@ -86,7 +86,7 @@ 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)) @@ -94,7 +94,7 @@ private static WebClient.Builder webClientBuilderWithCallerId(final String conne .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) diff --git a/backend/otr/src/main/java/fi/oph/otr/util/DateUtil.java b/backend/otr/src/main/java/fi/oph/otr/util/DateUtil.java index aafdd51de..0809d8e79 100644 --- a/backend/otr/src/main/java/fi/oph/otr/util/DateUtil.java +++ b/backend/otr/src/main/java/fi/oph/otr/util/DateUtil.java @@ -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 { diff --git a/backend/pom.xml b/backend/pom.xml index 1cbd6f2d1..098e28a7b 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -33,9 +33,9 @@ 2.6.0 - 4.48.0 + 5.13.0 5.3.0 - 4.29.1 + 4.29.2 @@ -55,13 +55,13 @@ org.springframework.security spring-security-config - 6.3.3 + 6.3.4 org.springframework.security spring-security-web - 6.3.3 + 6.3.4 org.springframework.boot diff --git a/backend/vkt/pom.xml b/backend/vkt/pom.xml index 4e7987588..b9bebd1ec 100644 --- a/backend/vkt/pom.xml +++ b/backend/vkt/pom.xml @@ -51,7 +51,7 @@ io.netty netty-resolver-dns-native-macos - 4.1.112.Final + 4.1.113.Final osx-aarch_64 runtime diff --git a/backend/vkt/src/main/java/fi/oph/vkt/repository/CasTicketRepository.java b/backend/vkt/src/main/java/fi/oph/vkt/repository/CasTicketRepository.java index 4a492de31..2bf0d89ca 100644 --- a/backend/vkt/src/main/java/fi/oph/vkt/repository/CasTicketRepository.java +++ b/backend/vkt/src/main/java/fi/oph/vkt/repository/CasTicketRepository.java @@ -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; diff --git a/backend/yki/src/main/java/fi/oph/yki/YkiApplication.java b/backend/yki/src/main/java/fi/oph/yki/YkiApplication.java index fef15c8f8..91ac3c247 100644 --- a/backend/yki/src/main/java/fi/oph/yki/YkiApplication.java +++ b/backend/yki/src/main/java/fi/oph/yki/YkiApplication.java @@ -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); } } diff --git a/backend/yki/src/main/java/fi/oph/yki/config/security/WebSecurityConfig.java b/backend/yki/src/main/java/fi/oph/yki/config/security/WebSecurityConfig.java index 5797f4333..322022b80 100644 --- a/backend/yki/src/main/java/fi/oph/yki/config/security/WebSecurityConfig.java +++ b/backend/yki/src/main/java/fi/oph/yki/config/security/WebSecurityConfig.java @@ -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; @@ -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"); + }; + } } diff --git a/frontend/package.json b/frontend/package.json index 7bc4471b3..eb7c5442b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,7 +34,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", @@ -46,7 +46,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": { diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 844a539c0..19c8a2aed 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2633,7 +2633,7 @@ __metadata: "@types/react-test-renderer": "npm:^18.0.5" "@typescript-eslint/eslint-plugin": "npm:^6.10.0" "@typescript-eslint/parser": "npm:^6.10.0" - axios: "npm:^1.7.4" + axios: "npm:^1.7.7" babel-jest: "npm:^29.7.0" babel-loader: "npm:^9.1.3" compression-webpack-plugin: "npm:^10.0.0" @@ -2670,7 +2670,7 @@ __metadata: react-dom: "npm:^18.3.1" react-i18next: "npm:^13.5.0" react-redux: "npm:^8.1.3" - react-router-dom: "npm:6.26.1" + react-router-dom: "npm:6.26.2" react-test-renderer: "npm:^18.2.0" redux-saga: "npm:^1.3.0" sass: "npm:^1.69.5" @@ -2816,10 +2816,10 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.19.1": - version: 1.19.1 - resolution: "@remix-run/router@npm:1.19.1" - checksum: 2800c2f6567a982fe942aacc4cb5b170e7cc89bd455960e3bea2424161ff7dac32d01886322d88dd19b88d1bea711f39566d17f02b73eeb74999affb471f8f52 +"@remix-run/router@npm:1.19.2": + version: 1.19.2 + resolution: "@remix-run/router@npm:1.19.2" + checksum: 31b62b66ea68bd62018189047de7b262700113438f62407df019f81a9856a08a705b2b77454be9293518e2f5f3bbf3f8b858ac19f48cb7d89f8ab56b7b630c19 languageName: node linkType: hard @@ -4331,14 +4331,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.7.4": - version: 1.7.4 - resolution: "axios@npm:1.7.4" +"axios@npm:^1.7.7": + version: 1.7.7 + resolution: "axios@npm:1.7.7" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 7a1429be1e3d0c2e1b96d4bba4d113efbfabc7c724bed107beb535c782c7bea447ff634886b0c7c43395a264d085450d009eb1154b5f38a8bae49d469fdcbc61 + checksum: 7f875ea13b9298cd7b40fd09985209f7a38d38321f1118c701520939de2f113c4ba137832fe8e3f811f99a38e12c8225481011023209a77b0c0641270e20cde1 languageName: node linkType: hard @@ -11076,27 +11076,27 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:6.26.1": - version: 6.26.1 - resolution: "react-router-dom@npm:6.26.1" +"react-router-dom@npm:6.26.2": + version: 6.26.2 + resolution: "react-router-dom@npm:6.26.2" dependencies: - "@remix-run/router": "npm:1.19.1" - react-router: "npm:6.26.1" + "@remix-run/router": "npm:1.19.2" + react-router: "npm:6.26.2" peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: 1bd255d1ff88f477699c72656e7c07702a907e644388a1bea1c648f2df0c3c86db2e90bea945b1d43eaf84ebab194f3868f3788502965ad5f20c508c6874f1fe + checksum: 4eee37839bd1a660807c090b4d272e4aa9b95d8a9a932cdcdf7c5b10735f39b6db73bad79b08a3012386a7e225ff6bf60435e2741fb7c68e137ac5a6295d4308 languageName: node linkType: hard -"react-router@npm:6.26.1": - version: 6.26.1 - resolution: "react-router@npm:6.26.1" +"react-router@npm:6.26.2": + version: 6.26.2 + resolution: "react-router@npm:6.26.2" dependencies: - "@remix-run/router": "npm:1.19.1" + "@remix-run/router": "npm:1.19.2" peerDependencies: react: ">=16.8" - checksum: b3761515c75da65a1678f005d08a6285ceccd9df7237ae6fdd9ab2ab816ef328435b75610f705ecd9ecd41c6878fd22eb9b44c5391cdef2e1ed99ddbc78de8a4 + checksum: 496e855b53e61066c1791e354f5d79eab56a128d9722fdc6486c3ecd3b3a0bf9968e927028f429893b157f3cc10fc09e890a055847723ee242663e7995fedc9d languageName: node linkType: hard From 2126a25e74ad02fbf47d8beb8dad9c11446e8773 Mon Sep 17 00:00:00 2001 From: Laura Ketola Date: Mon, 11 Nov 2024 20:49:18 +0200 Subject: [PATCH 5/6] VKT(Backend): Fix determining when queue enrollment is partially free [deploy] --- .../java/fi/oph/vkt/service/PublicEnrollmentService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/vkt/src/main/java/fi/oph/vkt/service/PublicEnrollmentService.java b/backend/vkt/src/main/java/fi/oph/vkt/service/PublicEnrollmentService.java index fde39caad..dde4150c7 100644 --- a/backend/vkt/src/main/java/fi/oph/vkt/service/PublicEnrollmentService.java +++ b/backend/vkt/src/main/java/fi/oph/vkt/service/PublicEnrollmentService.java @@ -493,7 +493,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, From f7256a966c50168b6f9a0e99a5215c0fcb355e76 Mon Sep 17 00:00:00 2001 From: Laura Ketola Date: Fri, 22 Nov 2024 12:30:01 +0200 Subject: [PATCH 6/6] VKT(Frontend & Backend): Order enrollements by created_at and show seconds [deploy] --- .../vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java | 2 ++ frontend/packages/vkt/public/i18n/fi-FI/common.json | 1 + frontend/packages/vkt/public/i18n/sv-SE/common.json | 1 + .../listing/ClerkEnrollmentListingRow.tsx | 4 +++- frontend/packages/vkt/src/utils/dateTime.ts | 9 +++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backend/vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java b/backend/vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java index ccecf5654..129cfef49 100644 --- a/backend/vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java +++ b/backend/vkt/src/main/java/fi/oph/vkt/model/ExamEvent.java @@ -10,6 +10,7 @@ import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; +import jakarta.persistence.OrderBy; import jakarta.persistence.Table; import java.time.LocalDate; import java.time.LocalDateTime; @@ -53,6 +54,7 @@ public class ExamEvent extends BaseEntity { private long maxParticipants; @OneToMany(mappedBy = "examEvent") + @OrderBy("createdAt") private List enrollments = new ArrayList<>(); @OneToMany(mappedBy = "examEvent") diff --git a/frontend/packages/vkt/public/i18n/fi-FI/common.json b/frontend/packages/vkt/public/i18n/fi-FI/common.json index e88025b21..4b5fe9752 100644 --- a/frontend/packages/vkt/public/i18n/fi-FI/common.json +++ b/frontend/packages/vkt/public/i18n/fi-FI/common.json @@ -46,6 +46,7 @@ }, "dates": { "dateTimeFormat": "l [klo] HH.mm", + "dateTimeFormatPrecise": "l [klo] HH.mm.ss", "timeFormat": "[klo] HH.mm", "dateFormat": "l", "registrationOpensAt": "klo 10.00", diff --git a/frontend/packages/vkt/public/i18n/sv-SE/common.json b/frontend/packages/vkt/public/i18n/sv-SE/common.json index fee62838f..9a0e7f5ee 100644 --- a/frontend/packages/vkt/public/i18n/sv-SE/common.json +++ b/frontend/packages/vkt/public/i18n/sv-SE/common.json @@ -46,6 +46,7 @@ }, "dates": { "dateTimeFormat": "l [kl.] HH.mm", + "dateTimeFormatPrecise": "l [kl.] HH.mm.ss", "dateFormat": "l", "timeFormat": "[kl.] HH.mm", "registrationOpensAt": "kl. 10.00", diff --git a/frontend/packages/vkt/src/components/clerkEnrollment/listing/ClerkEnrollmentListingRow.tsx b/frontend/packages/vkt/src/components/clerkEnrollment/listing/ClerkEnrollmentListingRow.tsx index 03b69e1a3..336d3a416 100644 --- a/frontend/packages/vkt/src/components/clerkEnrollment/listing/ClerkEnrollmentListingRow.tsx +++ b/frontend/packages/vkt/src/components/clerkEnrollment/listing/ClerkEnrollmentListingRow.tsx @@ -88,7 +88,9 @@ export const ClerkEnrollmentListingRow = ({ {getSelectedPartialExamsText()} - {DateTimeUtils.renderDateTime(enrollment.enrollmentTime)} + + {DateTimeUtils.renderDateTimePrecise(enrollment.enrollmentTime)} + {[ diff --git a/frontend/packages/vkt/src/utils/dateTime.ts b/frontend/packages/vkt/src/utils/dateTime.ts index fee70c0ae..3c5854727 100644 --- a/frontend/packages/vkt/src/utils/dateTime.ts +++ b/frontend/packages/vkt/src/utils/dateTime.ts @@ -13,6 +13,15 @@ export class DateTimeUtils { ); } + static renderDateTimePrecise(dateTime?: Dayjs) { + const t = translateOutsideComponent(); + + return DateUtils.formatOptionalDateTime( + dateTime, + t('vkt.common.dates.dateTimeFormatPrecise'), + ); + } + static renderOpenDateTime(dateTime?: Dayjs) { const t = translateOutsideComponent();