[MDS-6987] Add Figures and Documents to Condition Data Variable Menu - #3992
Merged
alazar-aot merged 13 commits intoSep 22, 2026
Merged
Conversation
…ly use the 'new' CDV picker without any Flagsmith gate
…r/utility function, updated unit tests accordingly and pointed all files that need this functionality to use the new helper. Added 'Permit Package files -> Figures/Docuents' to CDV menu, gated by feature flag. These selections insert 'tokens' for the permit package files into the condtion text - currently rendered as {file:guid}
…-quill editor for the PermitConditionForm's condition filed (this is UI only), which includes a custom Quill embed blot that renders the 'label' (green or red 'pill' of Doc/Fig index and title) for an inserted Figure/Document reference. Small fix to preamble text area (keep using original textarea, not rich-text Quill editor) and run a WGAC pass on the changes using Claude
…ce' functionality is implented (risk of breaking the CDV references if guid is not maintained)
…ually being referenced in any permit condition, used to warn users if they try to remove a file from the permit package that it will break the reference. Added unit tests for this new functionality
…s of errors - related to not having a unique CSS/className attribute on the 'pill' elements
…fter trying to de-select the 'part of permit package'checkbox, instead of before trying to save (UX improvement)
…ces - they appear as the literal index (1.2, 1.3, etc) and title - not in a 'pill'. If a removed reference is included, it gets the literal text of 'Reference unavailable'.
…rences are resolved (rendered) in the issued permit correctly. Minor patches for es-lint warnings and overall code improvements + cleanup:
…e once, and pass through rather than global cache
matbusby-fw
requested changes
Sep 21, 2026
matbusby-fw
left a comment
Collaborator
There was a problem hiding this comment.
Looks great! Just had a few comments/suggestions.
…'1.1' locked row to match the frontend logic (and relevant unit tests), move variable substitiution to before token extraction to avoid variable naming collisions, turn getPermitPackageFilesByType into an interface for proper typing
|
|
|
|
matbusby-fw
approved these changes
Sep 22, 2026
matbusby-fw
left a comment
Collaborator
There was a problem hiding this comment.
Rock on till the end of time!
alazar-aot
deleted the
MDS-6987-Add-Figures-and-Documents-to-CDV-menu
branch
September 22, 2026 21:09
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
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.





Objective
MDS-6987
Why are you making this change? Provide a short explanation and/or screenshots
To allow permitting inspectors to more easily work with permit package references, the Condition Data Variable (CDV) Menu is to be updated to allow inspectors to insert permit package references into condition text when drafting the permit, so that the references remain accurate when permit package files are reordered or replaced.
@lru_cacheto instead determine locked doc value once, and pass through rather than global cache