@@ -97,8 +111,8 @@ const ExamEventDetails = ({ enrollment }: { enrollment: PublicEnrollment }) => {
return (
{t('title')}
- {displayBulletList(t('selectedSkillsLabel'), skills)}
- {displayBulletList(t('selectedPartialExamsLabel'), partialExams)}
+ {displaySkillsList()}
+ {displayExamsList()}
{t('previousEnrollmentLabel')}
diff --git a/frontend/packages/vkt/src/enums/app.ts b/frontend/packages/vkt/src/enums/app.ts
index 9e2bb52af..550bbe5e2 100644
--- a/frontend/packages/vkt/src/enums/app.ts
+++ b/frontend/packages/vkt/src/enums/app.ts
@@ -49,7 +49,9 @@ export enum UIMode {
}
export enum EnrollmentStatus {
+ COMPLETED = 'COMPLETED',
PAID = 'PAID',
+ AWAITING_APPROVAL = 'AWAITING_APPROVAL',
SHIFTED_FROM_QUEUE = 'SHIFTED_FROM_QUEUE',
EXPECTING_PAYMENT_UNFINISHED_ENROLLMENT = 'EXPECTING_PAYMENT_UNFINISHED_ENROLLMENT',
QUEUED = 'QUEUED',
diff --git a/frontend/packages/vkt/src/interfaces/publicEducation.ts b/frontend/packages/vkt/src/interfaces/publicEducation.ts
new file mode 100644
index 000000000..8bbbe5b04
--- /dev/null
+++ b/frontend/packages/vkt/src/interfaces/publicEducation.ts
@@ -0,0 +1,15 @@
+interface Education {
+ allowsFreeEnrollment: boolean;
+ name: string;
+ ongoing: boolean;
+}
+
+interface FreeEnrollments {
+ textualSkill: 0 | 1 | 2 | 3;
+ oralSkill: 0 | 1 | 2 | 3;
+}
+
+export interface PublicEducationDetails {
+ educationHistory: Education[];
+ freeEnrollments: FreeEnrollments;
+}
diff --git a/frontend/packages/vkt/src/interfaces/publicEnrollment.ts b/frontend/packages/vkt/src/interfaces/publicEnrollment.ts
index 9abeffc8a..163733a7d 100644
--- a/frontend/packages/vkt/src/interfaces/publicEnrollment.ts
+++ b/frontend/packages/vkt/src/interfaces/publicEnrollment.ts
@@ -5,6 +5,7 @@ import {
CertificateShippingData,
PartialExamsAndSkills,
} from 'interfaces/common/enrollment';
+import { PublicEducationDetails } from 'interfaces/publicEducation';
import { PublicExamEventResponse } from 'interfaces/publicExamEvent';
import { PublicPerson } from 'interfaces/publicPerson';
import { WithId } from 'interfaces/with';
@@ -48,6 +49,7 @@ export interface PublicEnrollment
examEventId?: number;
hasPaymentLink?: boolean;
isFree?: boolean;
+ education?: PublicEducationDetails;
}
export interface PublicEnrollmentResponse
diff --git a/frontend/packages/vkt/src/utils/enrollment.ts b/frontend/packages/vkt/src/utils/enrollment.ts
index 2e1863254..d21ebef5e 100644
--- a/frontend/packages/vkt/src/utils/enrollment.ts
+++ b/frontend/packages/vkt/src/utils/enrollment.ts
@@ -1,5 +1,6 @@
import { StringUtils } from 'shared/utils';
+import { EnrollmentStatus } from 'enums/app';
import {
CertificateShippingData,
PartialExamsAndSkills,
@@ -45,6 +46,14 @@ export class EnrollmentUtils {
);
}
+ static isPaymentRequired(enrollment: PublicEnrollment) {
+ return (
+ enrollment.status == EnrollmentStatus.SHIFTED_FROM_QUEUE ||
+ enrollment.status ==
+ EnrollmentStatus.EXPECTING_PAYMENT_UNFINISHED_ENROLLMENT
+ );
+ }
+
static isValidCertificateShipping(shippingData: CertificateShippingData) {
const isAddressFieldsFilled = [
shippingData.street,
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index dc2f9b4a3..cdc9342b9 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -2687,7 +2687,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.6":
+"@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared, shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.7":
version: 0.0.0-use.local
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@workspace:packages/shared"
languageName: unknown
@@ -2698,7 +2698,7 @@ __metadata:
resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.vkt@workspace:packages/vkt"
dependencies:
reduxjs-toolkit-persist: "npm:^7.2.1"
- shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.5"
+ shared: "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.7"
languageName: unknown
linkType: soft
@@ -11789,6 +11789,13 @@ __metadata:
languageName: node
linkType: hard
+"shared@npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.10.6":
+ version: 1.10.6
+ resolution: "@opetushallitus/kieli-ja-kaantajatutkinnot.shared@npm:1.10.6::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40Opetushallitus%2Fkieli-ja-kaantajatutkinnot.shared%2F1.10.6%2F138bc1d046232b00fa0483033d1827141dfe7171"
+ checksum: 6f58ec1109ff04e01765995be46f88e64d419335f5aa67e39bcc710e01fe286ef760385ed49eba05322ab72860cd47ec6917bae66a801953a573c5bbed9230ce
+ languageName: node
+ linkType: hard
+
"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"