Skip to content

Commit

Permalink
VKT(Backend&Frontend): Fixup: bring back optional text description fo…
Browse files Browse the repository at this point in the history
…r previous enrollment [deploy]
  • Loading branch information
pkoivisto committed Dec 2, 2024
1 parent 5d74222 commit 966c4d1
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public record ExaminerEnrollmentAppointmentDTO(
@NonNull @NotNull Boolean writingPartialExam,
@NonNull @NotNull Boolean readingComprehensionPartialExam,
@NonNull @NotNull EnrollmentAppointmentStatus status,
@NonNull @NotNull Boolean hasPreviousEnrollment,
String previousEnrollment,
@NonNull @NotBlank String email,
String phoneNumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public record ExaminerEnrollmentAppointmentUpdateDTO(
@NonNull @NotNull Boolean speechComprehensionPartialExam,
@NonNull @NotNull Boolean writingPartialExam,
@NonNull @NotNull Boolean readingComprehensionPartialExam,
@NonNull @NotNull Boolean hasPreviousEnrollment,
String previousEnrollment,
@NonNull @NotBlank String email,
@NonNull @NotBlank String firstName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public class EnrollmentAppointment extends EnrollmentCommon {
@Column(name = "has_previous_enrollment", nullable = false)
private boolean hasPreviousEnrollment;

@Column(name = "previous_enrollment")
private String previousEnrollment;

@Column(name = "message")
private String message;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ public static ExaminerEnrollmentAppointmentDTO createClerkEnrollmentAppointmentD
.paymentLinkUrl(paymentLinkUrl)
.examEvent(examinerExamEventDTO)
.payments(paymentDTOs)
.hasPreviousEnrollment(enrollmentAppointment.isHasPreviousEnrollment())
.previousEnrollment(enrollmentAppointment.getPreviousEnrollment())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,5 @@
UPDATE enrollment_appointment SET has_previous_enrollment = (previous_enrollment IS NOT NULL);
</sql>
<addNotNullConstraint tableName="enrollment_appointment" columnName="has_previous_enrollment" />
<dropColumn tableName="enrollment_appointment" columnName="previous_enrollment" />
</changeSet>
</databaseChangeLog>
1 change: 1 addition & 0 deletions frontend/packages/vkt/src/interfaces/clerkEnrollment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export interface ClerkEnrollmentAppointment
authLink?: ClerkAuthLink;
paymentLinkUrl?: string;
examEvent?: ExaminerExamEvent;
previousEnrollment?: string;
}

export interface ClerkEnrollmentAppointmentResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const initialState: PublicEnrollmentAppointmentState = {
country: '',
id: undefined,
hasPreviousEnrollment: undefined,
previousEnrollment: '',
privacyStatementConfirmation: false,
status: undefined,
person: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const initialState: PublicEnrollmentContactState = {
isFullExam: undefined,
id: 1,
hasPreviousEnrollment: undefined,
previousEnrollment: '',
privacyStatementConfirmation: false,
status: undefined,
message: '',
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/vkt/src/utils/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export class SerializationUtils {
return {
...enrollment,
emailConfirmation: '',
hasPreviousEnrollment: !!enrollment.previousEnrollment,
privacyStatementConfirmation: false,
examEvent: SerializationUtils.deserializePublicExaminerExamEvent(
enrollment.examEvent,
Expand Down

0 comments on commit 966c4d1

Please sign in to comment.