-
Notifications
You must be signed in to change notification settings - Fork 47
feat: FORMS-2500 add embedded forms #1721
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
Draft
jasonchung1871
wants to merge
19
commits into
bcgov:main
Choose a base branch
from
jasonchung1871:FORMS-2500-embedded-forms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: FORMS-2500 add embedded forms #1721
jasonchung1871
wants to merge
19
commits into
bcgov:main
from
jasonchung1871:FORMS-2500-embedded-forms
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces database migrations and Objection.js models for managing allowed and requested domains for embedded forms. Adds new tables 'form_allowed_domains' and 'form_requested_domains', and registers their models in the forms module.
Introduces embed domain management endpoints, middleware, and service to control which domains can embed forms. Adds security headers (CSP and X-Frame-Options) to form routes based on allowed domains. Updates form routes and mounting logic to integrate the new embed functionality.
Introduces validateRequestId and validateDomainId middleware to ensure these route parameters are valid UUIDs. Updates embed routes to use the new validators and fixes the embed routes import path in the form module.
Changed embed domain-related API routes to include '/embed/' in their paths for better clarity and consistency. Also removed the 'format: uuid' property from the JSON schema validation for 'id' and 'formId' fields in formAllowedDomain and formRequestedDomain models, relying solely on the UUID pattern.
Introduces a new Embed.vue component for managing allowed and requested embed domains for forms, including domain request and removal functionality. Adds embedService for API interactions, updates ManageForm.vue to include the embedding panel, and extends constants and translations to support the new feature.
Replaces the previous allowed/requested domain tables and models with a new, unified embed domain model and supporting history and status code tables. Adds migration, Objection models, and views for embed domain management and history. Updates admin and embed controllers, routes, services, and parameter validation to support new endpoints and logic for requesting, reviewing, revoking, and removing embedded form domains. Cleans up obsolete code and aligns naming and status handling for improved clarity and extensibility.
Consolidate review and revoke logic for form embed domain requests into a single update endpoint and service method. Removes separate revoke functionality and updates route/controller/service naming for clarity and maintainability.
Deleted the search method from the FormEmbedDomainVw model as it is no longer needed or used in the codebase.
Introduces admin UI for managing form embed domain requests, including review, status history, and deletion. Refactors frontend and backend APIs to unify allowed/requested domains, adds embed utilities for iframe resizing, and updates database views and models for consistency. Updates internationalization, store, and service layers to support new embed domain management workflows.
Removed unused isFormEmbedded ref in FormViewer.vue and FormEmbedDomainStatuses import in service.js. Added EMBED constant to constants.spec.js for improved test coverage.
Refactored AdminFormEmbed.vue and Embed.vue to use translation keys for all user-facing strings related to form embedding. Added new translation entries for form embed features in all supported languages, including error messages, labels, and table headers. This improves localization and consistency across the admin and form management interfaces.
Introduces detailed logging and improved error handling in the embed security middleware and service. Now, errors during embed permission checks are logged and result in default restrictive headers, while the service logs invalid origins and database errors, throwing exceptions for upstream handling.
Refactored admin and form embed components to fetch domain status codes from the backend instead of using hardcoded values. Updated internationalization files for all supported languages to include new error messages related to fetching domain status codes. This improves flexibility and localization for domain status handling.
…hung1871/common-hosted-form-service into FORMS-2500-embedded-forms
This comment has been minimized.
This comment has been minimized.
Changed the initial value of embedPanel from 0 to 1 to update the default panel state in ManageForm.vue.
|
|
Release e6ef635 deployed at https://chefs-dev.apps.silver.devops.gov.bc.ca/pr-1721 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Description
This adds form embedding functionality in CHEFS, it includes:
Type of Change
feat (a new feature)
This is a breaking change because ...
Checklist
Further comments