diff --git a/frontend/packages/shared/CHANGELOG.MD b/frontend/packages/shared/CHANGELOG.MD
index 05cc75a30..eda01527d 100644
--- a/frontend/packages/shared/CHANGELOG.MD
+++ b/frontend/packages/shared/CHANGELOG.MD
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Released]
+## [1.9.30] - 2023-10-24
+
+### Added
+
+- New utility classes `.uppercase` and `.display-none`
+
## [1.9.29] - 2023-10-20
### Changed
diff --git a/frontend/packages/shared/package.json b/frontend/packages/shared/package.json
index 68b689422..ad5034c17 100644
--- a/frontend/packages/shared/package.json
+++ b/frontend/packages/shared/package.json
@@ -1,6 +1,6 @@
{
"name": "@opetushallitus/kieli-ja-kaantajatutkinnot.shared",
- "version": "1.9.29",
+ "version": "1.9.30",
"description": "Shared Frontend Package",
"exports": {
"./components": "./src/components/index.tsx",
diff --git a/frontend/packages/shared/src/styles/abstracts/common/_layout.scss b/frontend/packages/shared/src/styles/abstracts/common/_layout.scss
index 8250c9c00..d9a31b0b4 100644
--- a/frontend/packages/shared/src/styles/abstracts/common/_layout.scss
+++ b/frontend/packages/shared/src/styles/abstracts/common/_layout.scss
@@ -1,3 +1,7 @@
+.display-none {
+ display: none;
+}
+
/* FLEX */
.rows {
display: flex;
@@ -75,4 +79,4 @@
{&} {
table-layout: auto;
}
-}
+}
\ No newline at end of file
diff --git a/frontend/packages/shared/src/styles/abstracts/common/_typography.scss b/frontend/packages/shared/src/styles/abstracts/common/_typography.scss
index 85e960880..b9b8d77f7 100644
--- a/frontend/packages/shared/src/styles/abstracts/common/_typography.scss
+++ b/frontend/packages/shared/src/styles/abstracts/common/_typography.scss
@@ -48,6 +48,12 @@ thead.heading-text th {
}
}
+.uppercase {
+ {&} {
+ text-transform: uppercase;
+ }
+}
+
.text-transform-none {
{&} {
text-transform: none;
diff --git a/frontend/packages/yki/package.json b/frontend/packages/yki/package.json
index 0fe93352d..4c7b3a0be 100644
--- a/frontend/packages/yki/package.json
+++ b/frontend/packages/yki/package.json
@@ -26,7 +26,7 @@
"yki:tslint": "yarn g:tsc --pretty --noEmit"
},
"dependencies": {
- "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.29"
+ "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.30"
},
"devDependencies": {
"multer": "^1.4.5-lts.1"
diff --git a/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListing.tsx b/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListing.tsx
index 854357258..d3dc842a0 100644
--- a/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListing.tsx
+++ b/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListing.tsx
@@ -1,3 +1,4 @@
+import { Typography } from '@mui/material';
import { LabelDisplayedRowsArgs } from '@mui/material/TablePagination';
import { Box } from '@mui/system';
import { TFunction } from 'i18next';
@@ -123,7 +124,9 @@ export const PublicExamSessionListing = ({
return (
<>
-
+
{
const translateCommon = useCommonTranslation();
- const { isPhone } = useWindowProperties();
return (
-
- {!isPhone && (
-
- {translateCommon('examSession')}
- {translateCommon('examDate')}
- {translateCommon('institution')}
- {translateCommon('registrationPeriod')}
- {translateCommon('price')}
- {translateCommon('placesAvailable')}
- {translateCommon('actions')}
-
- )}
+
+
+ {translateCommon('examSession')}
+ {translateCommon('examDate')}
+ {translateCommon('institution')}
+ {translateCommon('registrationPeriod')}
+ {translateCommon('price')}
+ {translateCommon('placesAvailable')}
+ {translateCommon('actions')}
+
);
};
diff --git a/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListingRow.tsx b/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListingRow.tsx
index be10e3f24..9a4ae9c39 100644
--- a/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListingRow.tsx
+++ b/frontend/packages/yki/src/components/registration/examSession/PublicExamSessionListingRow.tsx
@@ -1,5 +1,6 @@
import { TableCell, TableRow, Typography } from '@mui/material';
import dayjs, { Dayjs } from 'dayjs';
+import { ReactNode } from 'react';
import { CustomButtonLink, Text } from 'shared/components';
import { Color, Variant } from 'shared/enums';
import { useWindowProperties } from 'shared/hooks';
@@ -93,7 +94,7 @@ const renderAdmissionPeriod = ({
return (
{startTimeStr} —
-
+
{endTimeStr}
);
@@ -108,7 +109,8 @@ const AdmissionPeriodText = ({ examSession }: { examSession: ExamSession }) => {
} else {
return (
<>
- {translateCommon('postAdmission')}:
+ {translateCommon('postAdmission')}:
+
{renderAdmissionPeriod(relevantPeriod)}
>
);
@@ -155,6 +157,21 @@ const PublicExamSessionListingCellsForDesktop = ({
);
};
+const TableCellForPhone = ({
+ columnName,
+ children,
+}: {
+ columnName: string;
+ children: ReactNode;
+}) => (
+
+
+ {columnName}
+
+ {children}
+
+);
+
const PublicExamSessionListingCellsForPhone = ({
examSession,
locationInfo,
@@ -169,47 +186,44 @@ const PublicExamSessionListingCellsForPhone = ({
const translateCommon = useCommonTranslation();
return (
-
-
-
+ <>
+
+
{ExamSessionUtils.languageAndLevelText(examSession)}
-
- {translateCommon('examDate')}
-
- {DateUtils.formatOptionalDate(examSession.session_date, 'l')}
-
-
- {translateCommon('institution')}
-
- {locationInfo.name}
-
- {ExamSessionUtils.getMunicipality(locationInfo)}
-
-
- {translateCommon('registrationPeriod')}
-
-
-
-
- {translateCommon('price')}
-
- {examSession.exam_fee} €
-
-
- {translateCommon('placesAvailable')}
-
- {availablePlacesText}
-
+
+
+ {DateUtils.formatOptionalDate(examSession.session_date, 'l')}
+
+
+ {locationInfo.name}
+
+ {ExamSessionUtils.getMunicipality(locationInfo)}
+
+
+
+
+
+ {examSession.exam_fee} €
+
+
+ {availablePlacesText}
+
+
{registerActionAvailable ? (
) : (
-
-
-
+ <>
+
+ {translateCommon('actions')}
+
+
+
+
+ >
)}
-
-
+
+ >
);
};
@@ -237,7 +251,7 @@ export const PublicExamSessionListingRow = ({
if (isPhone) {
return (
-
+
postAdmission
:
-
+
6/1/2023 klo 10.00
—
-
+
8/1/2023 klo 16.00
@@ -293,13 +297,17 @@ Array [
>
postAdmission
:
-
+
8/1/2023 klo 10.00
—
-
+
9/1/2024 klo 16.00
@@ -383,7 +391,9 @@ Array [
>
12/1/2030 klo 10.00
—
-
+
12/10/2039 klo 16.00
@@ -441,7 +451,9 @@ Array [
>
12/3/2025 klo 10.00
—
-
+
12/14/2039 klo 16.00
@@ -499,7 +511,9 @@ Array [
>
2/1/2019 klo 10.00
—
-
+
2/28/2039 klo 16.00
@@ -583,7 +597,9 @@ Array [
>
2/1/2019 klo 10.00
—
-
+
2/28/2039 klo 16.00
@@ -667,7 +683,9 @@ Array [
>
2/1/2019 klo 10.00
—
-
+
2/28/2029 klo 16.00
@@ -751,7 +769,9 @@ Array [
>
2/1/2019 klo 10.00
—
-
+
2/28/2039 klo 16.00
@@ -835,7 +855,9 @@ Array [
>
2/1/2019 klo 10.00
—
-
+
2/28/2039 klo 16.00
@@ -893,7 +915,9 @@ Array [
>
11/1/2020 klo 10.00
—
-
+
12/2/2020 klo 16.00
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index fc6c6a173..41dacac1b 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -2990,7 +2990,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.29":
+"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.30":
version: 0.0.0-use.local
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared"
languageName: unknown
@@ -3010,7 +3010,7 @@ __metadata:
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.yki@workspace:packages/yki"
dependencies:
multer: ^1.4.5-lts.1
- shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.29"
+ shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.30"
languageName: unknown
linkType: soft
@@ -12606,6 +12606,13 @@ __metadata:
languageName: node
linkType: hard
+"shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.9.29":
+ version: 1.9.29
+ resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@npm:1.9.29::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40Opetushallitus%2Fkieli-ja-kaantajatutkinnot.shared%2F1.9.29%2Fbae7e4637da7470c2d65ef5969d5bdc015618fc6"
+ checksum: 78851915b3556ca5bc459ddf5ade477c5f62876e6a267f1bb174f4a5e0add4d957ae35882f358e748ef58bb2dea00db913aa8cf2937340199037b7ff23757a40
+ languageName: node
+ linkType: hard
+
"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"