Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add isRequired option for generic template questions #923

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

deepaksftc
Copy link
Contributor

@deepaksftc deepaksftc commented Jan 27, 2025

Description

This PR introduces an "isRequired" option for generic template questions in the application.

Motivation and Context

Previously, there was no way to mandate the input for generic template questions. This was causing issues as some responses were left blank by users, leading to incomplete data. This feature aims to solve this problem by allowing the option to make these questions required.

Changes

  • Added a new "isRequired" option in the genericTemplateDefinition in GenericTemplateDefinition.tsx. This checks if the configuration requires an answer and adjusts the schema accordingly.
  • Added a new checkbox in QuestionGenericTemplateForm.tsx and QuestionTemplateRelationGenericTemplateForm.tsx to allow users to mark a question as required.

How Has This Been Tested?

Fixes Jira Issue

UserOfficeProject/issue-tracker#1180

Depends On

Tests included/Docs Updated?

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

@deepaksftc deepaksftc requested review from a team and martin-trajanovski and removed request for a team January 27, 2025 14:03
@deepaksftc deepaksftc marked this pull request as ready for review January 27, 2025 14:03
@deepaksftc deepaksftc requested a review from a team as a code owner January 27, 2025 14:03
@deepaksftc deepaksftc requested review from mehta-pooja123, a team, bolmsten and EdwardHaynes and removed request for a team and martin-trajanovski January 27, 2025 14:03
@deepaksftc deepaksftc requested review from a team and Scott-James-Hurley and removed request for a team January 28, 2025 08:20
@deepaksftc deepaksftc merged commit 4bd7218 into develop Jan 30, 2025
22 checks passed
@deepaksftc deepaksftc deleted the 1180 branch January 30, 2025 14:50
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