Skip to content

fix: visit template question Preview crashes#1599

Open
shivoomiess wants to merge 1 commit into
developfrom
SWAP-5643-templatepreview
Open

fix: visit template question Preview crashes#1599
shivoomiess wants to merge 1 commit into
developfrom
SWAP-5643-templatepreview

Conversation

@shivoomiess

@shivoomiess shivoomiess commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes the crash occurring during the preview of the 'Visit Template' question in the User Office.

Motivation and Context

The PR addresses the issue of the application crashing when a user attempts to preview the 'Visit Template' question. This was a significant problem as it hindered the user's ability to preview and validate the template before use.

Changes

  • Added a VisitRegistrationContainer to the PreviewTemplateModal component.
  • Added a 'previewMode' prop to the VisitRegistrationContainer component to handle the preview state.
  • Exposed the 'createRegistrationStub' function from useBlankVisitRegistration hook to create a stub for the registration in preview mode.

How Has This Been Tested?

Fixes Jira Issue

https://jira.ess.eu//browse/SWAP-5643

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@shivoomiess shivoomiess requested a review from a team as a code owner June 24, 2026 08:35
@shivoomiess shivoomiess requested review from ChongJiaChua and removed request for a team June 24, 2026 08:35
@shivoomiess shivoomiess changed the title fix: (UO) Visit Template question Preview crashes fix: visit template question Preview crashes Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants