Skip to content

Commit

Permalink
VKT(Frontend): Enrollment appointment contact form continues
Browse files Browse the repository at this point in the history
  • Loading branch information
jrkkp committed Oct 16, 2024
1 parent 2100958 commit 630c6c0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
usePublicTranslation,
} from 'configs/i18n';
import { useAppDispatch, useAppSelector } from 'configs/redux';
import { ExamLanguage } from 'enums/app';
import { AppRoutes, ExamLanguage } from 'enums/app';
import { PublicExaminer } from 'interfaces/publicExaminer';
import { setPublicExaminerLanguageFilter } from 'redux/reducers/publicExaminer';
import {
Expand Down Expand Up @@ -98,7 +98,7 @@ const DesktopExaminerRow = ({
<CustomButtonLink
color={Color.Secondary}
variant={Variant.Outlined}
to={''}
to={AppRoutes.PublicEnrollmentContactContactDetails}
>
Ota yhteyttä
</CustomButtonLink>
Expand Down
38 changes: 26 additions & 12 deletions frontend/packages/vkt/src/enums/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const excellentLevelRoutePrefix = '/vkt/erinomainen-taito';
const excellentLevelEnrollmentRoute =
excellentLevelRoutePrefix + '/ilmoittaudu';

const goodAndSatisfactoryLevelRoutePrefix = '/vkt/hyva-ja-tyydyttava-taito';
const goodAndSatisfactoryLevelEnrollmentRoute =
excellentLevelRoutePrefix + '/ilmoittaudu';
const goodAndSatisfactoryLevelContactRoute =
goodAndSatisfactoryLevelRoutePrefix + '/ota-yhteytta';

export enum AppRoutes {
PublicRoot = '/vkt',
PublicHomePage = '/vkt/etusivu',
Expand All @@ -31,18 +37,26 @@ export enum AppRoutes {
PublicEnrollmentDone = excellentLevelEnrollmentRoute + '/:examEventId/valmis',

// Routes for good and satisfactory level - TODO
PublicGoodAndSatisfactoryLevelLanding = '/vkt/hyva-ja-tyydyttava-taito',
PublicEnrollmentAppointment = '/vkt/markkinapaikka',
PublicAuthAppointment = '/vkt/markkinapaikka/:enrollmentId/tunnistaudu',
PublicEnrollmentAppointmentContactDetails = '/vkt/markkinapaikka/:enrollmentId/tiedot',
PublicEnrollmentAppointmentPreview = '/vkt/markkinapaikka/:enrollmentId/esikatsele',
PublicEnrollmentAppointmentPaymentFail = '/vkt/markkinapaikka/:enrollmentId/maksu/peruutettu',
PublicEnrollmentAppointmentPaymentSuccess = '/vkt/markkinapaikka/:enrollmentId/maksu/valmis',

PublicEnrollmentContact = '/vkt/markkinapaikka/ota-yhteytta',
PublicEnrollmentContactContactDetails = '/vkt/markkinapaikka/ota-yhteytta/:appointeeId/tiedot',
PublicEnrollmentContactSelectExam = '/vkt/markkinapaikka/ota-yhteytta/:appointeeId/tutkinto',
PublicEnrollmentContactDone = '/vkt/markkinapaikka/ota-yhteytta/:appointeeId/valmis',
PublicGoodAndSatisfactoryLevelLanding = goodAndSatisfactoryLevelRoutePrefix,
PublicEnrollmentAppointment = goodAndSatisfactoryLevelEnrollmentRoute,
PublicAuthAppointment = goodAndSatisfactoryLevelEnrollmentRoute +
'/:enrollmentId/tunnistaudu',
PublicEnrollmentAppointmentContactDetails = goodAndSatisfactoryLevelEnrollmentRoute +
'/:enrollmentId/tiedot',
PublicEnrollmentAppointmentPreview = goodAndSatisfactoryLevelEnrollmentRoute +
'/:enrollmentId/esikatsele',
PublicEnrollmentAppointmentPaymentFail = goodAndSatisfactoryLevelEnrollmentRoute +
'/:enrollmentId/maksu/peruutettu',
PublicEnrollmentAppointmentPaymentSuccess = goodAndSatisfactoryLevelEnrollmentRoute +
'/:enrollmentId/maksu/valmis',

PublicEnrollmentContact = goodAndSatisfactoryLevelContactRoute,
PublicEnrollmentContactContactDetails = goodAndSatisfactoryLevelContactRoute +
'/:examinerId/tiedot',
PublicEnrollmentContactSelectExam = goodAndSatisfactoryLevelContactRoute +
'/:examinerId/tutkinto',
PublicEnrollmentContactDone = goodAndSatisfactoryLevelContactRoute +
'/:examinerId/valmis',

// Routes for clerk user
ClerkHomePage = '/vkt/virkailija',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { SerializationUtils } from 'utils/serialization';

function* loadPublicExamEventSaga(action: PayloadAction<number>) {
try {
const inspectorId = action.payload;
const loadUrl = `${APIEndpoints.PublicEnrollmentAppointment}/${inspectorId}`;
const examinerId = action.payload;
const loadUrl = `${APIEndpoints.PublicEnrollmentAppointment}/${examinerId}`;

const response: AxiosResponse<PublicExamEventResponse> = yield call(
axiosInstance.get,
Expand Down

0 comments on commit 630c6c0

Please sign in to comment.