Skip to content

Commit 792fd09

Browse files
nikhila-aotbolnyanton-bcgovnupurdixit13jaspalsingh-aot
authored
feat: dev to main merge 27 Aug 2025 (#1042)
* test commit * `@bcgov/design-tokens` version upgrade, css variables cleanup * Add UI logic for participants tab * Logic to fetch participants * Add a new column to table * Show the values in table row * Fix CSS and remove console logs * Formatted using prettier * feat: SRS-854 Implement Backend for Application Search * Well that was embarrassing * Add unit tests for backend * Fixed CSS * CATS: apollo client setup, update Participants tab to use it * Changes related to Dto structure * CATS: Application page - set current tab in URL search params * shorten the tabSearchKey * remove redundant styles (d-flex already covers the removed classes) * Updating the Email Assignement ID as its conflicting the existing camunda deployments * change folder sturcture and fix test cases and review comments * run prettier * adding 'users' component to epd-backend (#781) * run prettier to pass PR * update the image tag (#782) * change folder structure and fix test case * bug fix- adding the components (#783) * fix error * error-fix * Replacing Person Entity Reference With ViewPerson DTO to resolve the build error facing in openshift * Fixing API Route Path * Adding Missing Change For Redirection * Fix Dto class * CATS: fix codegen for node v22+ * delete codegen.ts * fix side bar css issue * prettier issue fix * feat: SRS-854 Implement Frontend for Application Search * remove my apollo client that should not be used * Banish redux to the shadow realm and add search debounce delete file I thought I deleted before * Update button divs to be buttons * use bootstrap inline flex class * add BEM style class name for tablecontrols component styling * Implement Apollo Client * Fix some merge errors * Update generated files * Run prettier * chore: CATS - fix codegen when running concurrently with dev build * Srs 870 (#792) * test image update * testing- adding image triggers to deployment * testing image triggers in dev * fixing syntax issues (#794) * rename dto files * Add filters for participants * formatted files * remove logs * Srs 870 fixingenv (#795) * test env variable issue * test deploy * update indentation fix * test * test update syntax error * added config to -updating the image streams * adding the new envs * fixing readiness/liveness probe failure * fixing readiness/liveness probe * fixing the indentaion issue (#798) * Removed the unused files * Added logs and moved files to correct folders * Move the enum file to correct folder * Fix broken dockerfile * chore: skip failing unit tests * skip additional broken test * chore: Clean up broken github workflows. (#805) * chore: Remove github workflow for SITE application. * Disable failing sonarcloud step * feat: SRS-790 - graphql endpoint for fetching application's housing records (#800) * feat: SRS-790 show application housing records (#801) * feat: SRS-790 - graphql endpoint for fetching application's housing records * feat: SRS-790 show application housing records * remove unnecessary fragment * fix subtle navigation bug * chore: CATS - apply commonly used table styles to the base table components (#802) * feat: SRS-790 - graphql endpoint for fetching application's housing records * feat: SRS-790 show application housing records * CATS: extract common table css * don't need important here * chore: Run unit tests on cats frontend in CI/CD pipeline (#806) * chore: Run unit tests on cats frontend in CI/CD pipeline * Revert "chore: Run unit tests on cats frontend in CI/CD pipeline" This reverts commit 36af295192409bf76ed6961a5c3e6a281abde74f. * chore: run unit tests on cats front end for pr open * Skip failing unit test * add cats-frontend to build includes * add jest import * disable jest mock because it's causing issues with vite test * remove cats-frontend from build * replace jest with vi * renaming users to cats folder (#807) * renaming users to cats folder * removing users folder form ci-cd files * remove unit tetss for users * test update * test update * test update * test update * test cats rename * test cats rename * test rename * Fix module spelling (#810) * chore: re-add cats unit tests, disable sonarcloud for the time being (#809) * fix: update dockerfile to no longer reference users. (#812) * fix: update dockerfile to no longer reference users. * revert change to userapi doc, because that folder was not renamed * fix input control label changes and date picker (#813) * Application Search Updates 1. Relocate Application Search into the application folder 2. Update the Application Search response to use the PagedResponseDto base class 3. Update logging 4. Add error handling. * Update SearchApplications GraphQL Query * chore: remove openshift deploy for sites (#808) * remove openshift deploy for sites * empty commit to force ci/cd to run --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Correct label to cater the actual search keyword * New email templates for SDS forms and updated email-template.dmn (#818) * feat: ci-cd for cats including DB deployment (#821) * feat: Ci-cd pipelines craeted for CATS (includes DB deployment) * fix: Ci-cd pipelines craeted for CATS (includes DB deployment) * fix: removing paths in the cats PR yml * adding local government - changes for SDS workflow & form (#823) * feat: SRS-854 Implement Application Search Table Sort. (#822) * Feat/srs 605 testbranch (#826) * fix: removing dev branch and marking as main * fix: removing dev and main branches as part of TEST deployment in OS * fix: changing the branch name to a different one. The default chaecks are failing * Add few fields to be nullable in AppParticipant table (#829) * BCBox + COMS - Re-enable formsflow (#830) * feat: SRS-790: Graphql mutations to create and update application housing records (#831) * SRS-790: Graphql mutation to create and update application housing records * remove unprotected decorators * feat: SRS-897 - Updating to VITE & VITEST (#828) * updating react scripts to vite for frontend folder * Replace ENV variables with REACT_APP_ to VITE_ & updated JEST to vitest * Removing commented code * Updated vite config file and updated routes * Added vite-env.d.ts file and updated user manger setting * Update Dockerfile : replaced with build with dist folder * adding @vitest/coverage-v8 * Reverting to build folder as vite output to build in vite.config.ts * Updating docker node image * Reverting changes to UserManagerSetting.ts (#834) * remove bad condition from appsearch query (#838) * fix: Application Search: Handle paging properly (#839) * feat: srs 846 - API to create an application when a form is submitted in SRS (#836) * application api - to be called from FF * unit test issue fixes * feat: SRS-790 - Add housing modal (#832) * feat: SRS-790 - Add housing modal * Add disabled states, close modal on mutation complete --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * correcting schema name (#842) * SRS-860 Staff Assigned Widget (#841) - Implement Staff Assigned Widget - Implement View Widget - Implement Date Formatting * feat: SRS -783 : Add App Participant feature (#843) * Add the FE functionality for add app participant * Add CSS for the fields in modal + fix existing FE test cases * Add the logic to amend the form fields * Add logic to populate roles + few API * Add more logic to Add person names * fix search dropdown issue * correct the search query and logic for person data * Fix updating form data to be added for new participant * fix the dropdown selection issue in InputControls * Fix dropdown value for participantName * Fix the search issue for Organization * Add logic for adding the participant in DB * Fixed some issue related to adding app participant * Adding check to avoid duplicate entries * Fixing the case when the result cache could have same results stored for person and org * Added Validations and fixed save functionality * Unit tests for Adding AppParticipant * return data after adding new particpant * Removed console and hardcoded appId * remove console and revert changes made in common component * revert change made to this file * Add applicationId for cases wherein no app participants exists * prettier formatting * Update InputControls.tsx * refresh participants when added * refactor DTO class * Replace axios call with apollo * Addressing few review comments * code formatting * code cleanup and formatting * Refetching data * Change the way form needs to be updated * remove console.logs * Address comment * formatted * address comments --------- Co-authored-by: Jaspal.Singh-AOT <163812444+jaspalsingh-aot@users.noreply.github.com> * fix: Application Search Table shows no results (#846) * fix: SRS-905 - View links lead to invalid URLs (#849) * fix: SRS-905 - View links lead to invalid URLs * justify center * feat: changes to pick app type from db (#853) * changes to pick app type from db * changes based on review comments * changes per review comments * feat: Add bcgovpubcode.yml (#854) * Add bcgovpubcode.yml * remove unused bcgovpubcode.yml files --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-790: Add Housing Modal - fetch options for housing types and related applications fields (#847) * SRS-790: Add Housing Modal - fetch options for housing types and related applications fields * move related apps field into components folder, add data entry instructions message * add searchApplicationsById resolver and service method tests * fix imports * fix test providers * add logger statements * fix tests perhaps? --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-790: Add Housing modal checkboxes (#850) * SRS-790: Add Housing Modal - fetch options for housing types and related applications fields * move related apps field into components folder, add data entry instructions message * add searchApplicationsById resolver and service method tests * fix imports * fix test providers * SRS-790: Add Housing modal checkboxes * feat: changes to introduce form id and submission id instead of application id (#855) * changes to pick app type from db * changes based on review comments * changes per review comments * replacing application id with form id and submission id * changed schema name * feat: SRS-790 - Update Application Housing Modal (#851) * SRS-790: Add Housing Modal - fetch options for housing types and related applications fields * move related apps field into components folder, add data entry instructions message * add searchApplicationsById resolver and service method tests * fix imports * fix test providers * SRS-790: Add Housing modal checkboxes * feat: SRS-790 - Update Application Housing modal * Add validation --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-789 Implement Associated Files (#856) * API to integrate form submission with CATS (#858) * Chanages For Site Owner Task Assignement (#859) * Form Chagnes For SRS-908 (#861) * feat: SRS-908 : Change to validate BCEID account and remove Camunda admin (#863) * Change to validate bceid account and remove camunda admin * Removing Saved Path From Session to avoid unwanted redirects * Removed Console log statement * feat: SRS-782 Application Information panel (#852) * SRS-790: Add Housing Modal - fetch options for housing types and related applications fields * move related apps field into components folder, add data entry instructions message * add searchApplicationsById resolver and service method tests * fix imports * fix test providers * SRS-790: Add Housing modal checkboxes * feat: SRS-790 - Update Application Housing modal * Add validation * feat: SRS-782 - Recactor `PanelWithUpDown` component, display hard-coded data in details page * Fetch data for Application Information panel * determine taxExempt status * update isTaxExempt logic * remove irrelevant comments * rename the query * add logging * Updated Needs More Info validation logic (#868) * resolve peer dependency issues as react-formio, formio is not compatible with react 18 (#871) * Add legacy dependency (#872) * feat: SRS 910 Application: Integrate the forms flow forms to CAT (#869) * Embed formsflow in cats * remove warning because of readonly in Form io * fix package.json issue * integerate backend api to get formid and submission id from application * make component type safe and add error handling * fix prittier issues * fix minor issue and upgrade the formio version * fix format issue and compatibility issue * add --legacy-peer-deps in docker file * fix missing dependency * add loader from reusable components * fix review comments * fix review comments * change formio to latest version available * fix review comments * formatting * fix review comment * remove formio.min.css cdn from index.html and used it from installed package directly in application component * formatting * fix version issue --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: srs-787 implement data model for new invoice application (#867) * feat: SRS 787 Implement getInvoicesByApplicationId (#874) * feat: srs-787 implement data model for new invoice application * feat: srs-787 Implement getInvoicesByApplicationId * feat: SRS-911 (#876) * implement sticky header and fix flickering effect * implement sticky header with dynamic values and matched with current design css * add logic to check if any of siteId, appId and description is not there * formatting * feat: SRS-782 - getSiteDetailsBySiteId query, BE codegen script (#873) * feat: SRS-782 - getSiteDetailsBySiteId query, BE codegen script * remove unused dep * generated files * fix tests * address review comments * feat: SRS-782 - site details panel (#875) * feat: SRS-782 - getSiteDetailsBySiteId query, BE codegen script * remove unused dep * generated files * feat: SRS-782 - site details panel * use the same map marker asset as in Site * better handling of loading state * add external links to Site registry * fix coordinate logic * fix FE test * Use LoadingSpinner for consistent styles * feat: SRS-782 - Details tab: associated sites table (#877) * SRS-782 - Details tab: associated sites table * fix ts warning, add missing css import * change path alias to @cats --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * generated files --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * Add invoice creation endpoint (#880) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: Implement update invoice API endpoint (#886) * Implement update invoice API endpoint * Update logging messages, and graphql return type * Implement Invoice Delete GraphQL Endpoint (#887) * chore: SRS-917 - add auth mock mode, improve auth error handling (#883) * chore: SRS-917 - add auth mock mode, improve auth error handling * Update backend/cats/src/app/filters/graphql-exception.filter.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix copilot's slop --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: Brendon O'Laney <102920963+bolny@users.noreply.github.com> * chore: SRS-918 surface operation names in Graphql requests (#884) * chore: SRS-918 surface operation names in Graphql requests * remove redundant comments * Update cats-frontend/src/apollo.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS - 783 - Edit App participant feature (#889) * Edit App Participant logic * BE: Add graphql queries and API for updating app participant * Disabling relevant fields on FE in edit mode * Fix alternate edit and add issue * Add unit tests for BE * Added try-catch block and few more UT's (#891) * feat: SRS-470 - Changes For Staff Assignment (#892) * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Delete backend/cats/G * fixing review comments * Fixing unit test cases * Fixed Reivew Comments * fix: Update invoice service to support LineItems. (#890) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * SOSC edits (#894) * feat: Srs 941: Staff Assignment Updating Email Template (#895) * Changes For Updating Email Template * Changes For Updating Email Template --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * CATS Deployment and CI/CD - Active dev of SRS-605 and github actions (#879) - DEV AND TEST ENVS * Triggering 605 action and monitoring for cats-pr-open * Fixing issue with dependencing with github event number for concurrency * Trying to get cats PR to work on push, just to simplify things. * Fix docker build issues with cats frontend, fixing capitalization issue and folder path issue * Removing seed data configs and initContainer from yaml for cats backend, checking with team, but believe this is not needed * Reduce timeout, try and fix issue with hanging installs from prev actions * Attempging just deploy step, not deploys_db step, to verify which step helm is hanging on with pending install * Re-enable deploys_db, also setup backend-migration step. * Removing push to branch, as that may be causing issue with db deploy step. * Fix cats pr open build context * Fix spacing * Fixing push to commit * Removing on push, adding the branch to dev to trigger in PR * Focing db deploy, as having issues with it * Re-enable seed data deployment yaml, though it's still disabled in values.yaml for now until we get deployment working. * Disable seed data in values-pr.yaml for now, will re-enable after uploading db dump. * Temporarily hardcoding the host connection as unable to find where it's set in the secret. * Added debug logging * Reverting connection string secret after finding out it's pvc constrainted * SQL upload scripts working and documentation updated * Fix initDb.sh to quote the database name, as it has a '-' which causes issues, trying again. * Re-enable seed data import, after having uploaded file previously * Re-enable lines that lead to issue with missing seed.sh file. * Fix issue with quoting db name in some commands leading to errors, but leaving it in create db command where it's required. * Claimname updated for nr-cats-dbdump-sql * Attempting to fix migrations initDb.sh errors, still having some quoting issues, adding proper logging to help clarify * Attempging to change schema name `site`->`cats` in values.yaml, if fails, will revert to values-pr.yaml * Quoting db username and schema, not just db name, as those two were also giving issues. * Had issue with previous quote attempt, trying quoting inline instead. * Remove unnecessary lines from dockerfile * Updating deployment yaml image name to have `cats-frontend`, as otherwise it's deploying the wrong name. * Hardcoding cats-frontend into deployment.yaml * Attempging to fix helm yaml formatting of line 33, for some reason giving issues only in gha * Update port `3000`-`4005` for deployment yaml, as server listens to 4005. * Loading config.js, same as epp.gov.bc.ca approach * Rename vars in config.js from REACT_APP_ -> VITE_ * Setting up window._env_ vars, updating code to use it, properly typing it. * Fixed typo issue of double underscores vs single underscores * Try and fix issue of duplicate seed data executing, as it was checking wrong db * Attempting to set dynamic redirect uri based on PR number. * Added trailing slash * String quoting the line that's causing issues, same as other lines * Addinv VITE_GEOCODER_API url path to helm charts * Updating KC client * Adding in the rest of values from example.env, like VITE_FORM_FLOW_API, still need to validate all values are correct. * Setting SITE_SERVICE_URL for backend to `epd-backend-applications` * Switching seed data check to cats.app_type * Force db deploy trigger * Trigger db redeploy, re-migrate, re-seed, and capture logs. * Add in debug logging to db deploy step * Setup email test values for dev. Note: Also setup keycloak values as Github Secrets, re-deploying to verify the secret (secret.yaml) is properly configured on deploy. * Remapping KEYCLOAK -> KEYCLOCK in the deployment.yaml * Secrets were not set properly, due to name mismatch, trying again. * Start scaffolding test github action files, update GitHub Secrets for keycloak client, redeploying and testing * Removing secret remapping as it's no longer necessary with secret name. * Remove config we no longer need * Setting CHES values * Update secret with CHES * CHES, fixing passing in id and secret from Github actions to helm * Tweaking logout url * Trying to fix malformed secret.yaml file having issue on github actions about expecing string. * Pasing in CHES config values to deployment; secrets already securely setup in github / ocp secret. * Attempting to also include test deployment openshift yaml * Adding CHES files to test yaml deploy * Conditional nullcheck for window._env_, was affecting unit tests * Fix prettier issues --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-593 Manage Staff Assignment Dashboard. (#896) * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Delete backend/cats/G * implement staff dashboard * integerate backend to frontend * merge confict fix * fix merge conflict * fix merge conflict * test cases * fix merge conflict and add manager role authentication. * fix merge conflict * run prittier * fix merge conflict --------- Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * fix: Added filter logic in Application Search to include only staff users (#897) * Changes For Updating Email Template * Changes For Updating Email Template * changes for including housing priority * Corrected staff filter condition in query * changes for including housing priority * Corrected staff filter condition in query * Fixed unit test case * feat: SRS-593 Manage Staff Assignment Dashboard. (#896) * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Delete backend/cats/G * implement staff dashboard * integerate backend to frontend * merge confict fix * fix merge conflict * fix merge conflict * test cases * fix merge conflict and add manager role authentication. * fix merge conflict * run prittier * fix merge conflict --------- Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * changes for including housing priority * Corrected staff filter condition in query * Changes For Updating Email Template * Changes For Updating Email Template * Fixed unit test case --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * feat: changes showing different application status to client users (#902) * changes showing diff status to client users * removed status used for testing * Updated Status for SDS workflow * fix: CATS ENV- UI updates for Navigation and Application Tab (#906) * Fix nav position and error message issue * formatting --------- Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * Updated users-service to cats-service (#907) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * SRS-785: API to create, update and get timesheet days (#908) * feat: SRS-788 - view application notes (#881) * feat: SRS-788 - view application notes * feat: SRS-788 - Create / Update / Delete application notes (#882) * Add create and update actions to application notes * note delete action * change copy * Update cats-frontend/src/app/features/applications/application/applicationTabs/appNotes/components/NoteModal.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * generated types --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: srs-946 (#905) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * Updated VITE_FORM_API FORM_BACKEND_API AND VITE_FORM_FLOW_API --------- Co-authored-by: Adam Coard <adam.coard@aot-technologies.com> * feat: SRS-930 Permissions Manage People (#911) * implement person permissions * Add test cases * add permission which is not exists in db * useEffect issue fix * fix minor issue * formatting * fix test case issue * Revert "formatting" This reverts commit eed456306de03fe57b5a5ba95ca9234b6e1649d4. * formatting frontend * fix typo * fix review comment * add logger and fix typo * add enum as per review comment * fix test case * feat: srs-787 Implement Front End for Invoices Index (#900) * feat: srs-787 Implement Front End for Invoices Index * Modularized CSS * Import useState * Banish console.log * Rename Enum * fix: SRS-949 (#913) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * fix for application getting created twice in FF * fixed UTC --------- Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * feat: Feat/srs 949 (#916) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * fix for application getting created twice in FF * fixed UTC * add console to test in DEV * feat: changes for SDS status updates (#910) * changes for SDS status updates * changes for SDS status updates * Update SDS Workflow bpm * changing file name from upper to lower case * feat: SRS 787 add GraphQL endpoint for fetching a single invoice (#921) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS-950 : Fix adding existing participant issue (#912) * SRS-950 : Fix adding existing participant issue * fix path --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS -948 : Fix date issue (#925) * SRS-948: Fix date issue * Fix the dates * Prettier formatting * feat: srs-787 Implement Front End for Invoices Index (#917) * feat: srs-787 Implement Front End for Invoices Index * Remove Improperly included file * Remove unused import --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * CATS Test Environment in OpenShift (#898) * Fix upload script to work on any env * Trying to fix test deploy, it "succesfully" skipped many critical actions like db deploy and api deploy, so forcing file change to test * Fix trigger for db deploy * Trying to fix PR issue with helm deploy by setting get-pr-info job. * Temporarily trying this via PR just to verify behaviour * Adding workflow dispatch for manual testing to cats deploy * Fixing test values for vite form api and vite form backend, vite form flow api. In dev, this has been verified to fix cats form embeds * Fix issue with db_user name mismatching on secret name for test environment only * Triggering build with new seed data * Revert test's db_name * Reverting db_user name to just cats, which was working per commit `c7743094183be77cdc3bac7091a057f9b47eeee2` * Whitespace change to trigger re-deploy. Have updated seed data for CSSA form. * feat: SRS-593 Manage Staff Assignment Dashboard. (#896) * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Delete backend/cats/G * implement staff dashboard * integerate backend to frontend * merge confict fix * fix merge conflict * fix merge conflict * test cases * fix merge conflict and add manager role authentication. * fix merge conflict * run prittier * fix merge conflict --------- Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * fix: Added filter logic in Application Search to include only staff users (#897) * Changes For Updating Email Template * Changes For Updating Email Template * changes for including housing priority * Corrected staff filter condition in query * changes for including housing priority * Corrected staff filter condition in query * Fixed unit test case * feat: SRS-593 Manage Staff Assignment Dashboard. (#896) * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Adding graphql file * Changes for Assignment - initial * Changes for staff assignment * Delete backend/cats/G * implement staff dashboard * integerate backend to frontend * merge confict fix * fix merge conflict * fix merge conflict * test cases * fix merge conflict and add manager role authentication. * fix merge conflict * run prittier * fix merge conflict --------- Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * changes for including housing priority * Corrected staff filter condition in query * Changes For Updating Email Template * Changes For Updating Email Template * Fixed unit test case --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * feat: changes showing different application status to client users (#902) * changes showing diff status to client users * removed status used for testing * Updated Status for SDS workflow * fix: CATS ENV- UI updates for Navigation and Application Tab (#906) * Fix nav position and error message issue * formatting --------- Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * Updated users-service to cats-service (#907) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * SRS-785: API to create, update and get timesheet days (#908) * feat: SRS-788 - view application notes (#881) * feat: SRS-788 - view application notes * feat: SRS-788 - Create / Update / Delete application notes (#882) * Add create and update actions to application notes * note delete action * change copy * Update cats-frontend/src/app/features/applications/application/applicationTabs/appNotes/components/NoteModal.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * generated types --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: srs-946 (#905) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * Updated VITE_FORM_API FORM_BACKEND_API AND VITE_FORM_FLOW_API --------- Co-authored-by: Adam Coard <adam.coard@aot-technologies.com> * feat: SRS-930 Permissions Manage People (#911) * implement person permissions * Add test cases * add permission which is not exists in db * useEffect issue fix * fix minor issue * formatting * fix test case issue * Revert "formatting" This reverts commit eed456306de03fe57b5a5ba95ca9234b6e1649d4. * formatting frontend * fix typo * fix review comment * add logger and fix typo * add enum as per review comment * fix test case * feat: srs-787 Implement Front End for Invoices Index (#900) * feat: srs-787 Implement Front End for Invoices Index * Modularized CSS * Import useState * Banish console.log * Rename Enum * fix: SRS-949 (#913) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * fix for application getting created twice in FF * fixed UTC --------- Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * feat: Feat/srs 949 (#916) * fix for bug 946 * fix not working, reverting migration * changed to trigger a deployment * fix for application getting created twice in FF * fixed UTC * add console to test in DEV * feat: changes for SDS status updates (#910) * changes for SDS status updates * changes for SDS status updates * Update SDS Workflow bpm * changing file name from upper to lower case * feat: SRS 787 add GraphQL endpoint for fetching a single invoice (#921) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS-950 : Fix adding existing participant issue (#912) * SRS-950 : Fix adding existing participant issue * fix path --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS -948 : Fix date issue (#925) * SRS-948: Fix date issue * Fix the dates * Prettier formatting * feat: srs-787 Implement Front End for Invoices Index (#917) * feat: srs-787 Implement Front End for Invoices Index * Remove Improperly included file * Remove unused import --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> Co-authored-by: midhun-aot <midhun.murali@aot-technologies.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> Co-authored-by: anton-bcgov <anton.trublin+bcgov@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Brendon O'Laney <102920963+bolny@users.noreply.github.com> Co-authored-by: nupurdixit13 <nupur.dixit@gov.bc.ca> * fix: node version (#932) * changed docker version * seeder issue fix * Add VITE_CATS_CSSA_MANAGER_ROLE parameter to backend yaml, hardcoding as won't be changed between dev/test/prod * commented permission seed * commented code and move to master data script * Add VITE_CATS_CSS_MANAGER_ROLE, using top level values.yaml. --------- Co-authored-by: nikhila-aot <nikhila.pankaj@aot-technologies.com> Co-authored-by: Adam Coard <adam.coard@aot-technologies.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * SRS-959: fix remove date issue (#931) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS 962 - Handle UTC date format in string (#934) * Handle UTC date format in string * Handle edge case for non-ISO format * Prettier format * feat: SRS-594 Manage Staff Modal (#922) * Add frontend modal * create api * Implement the modal pop with test cases * run format * add delete notes and save notes label on modal --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: Remove export/import button (#936) * Remove export/import button * addressed review comment * feat: SRS-960 - Adding validation for the end date to be greater than the start date (#938) * Adding validation for the end date to be greater than the start date * Formatting * remove unused state variables * feat: SRS 787 Implement View Invoice Form Component (#937) * feat: SRS 787 Implement View Invoice Form component * Update cats-frontend/src/app/features/applications/application/applicationTabs/appInvoices/components/index/tableColumnConfig.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS 787 Implement invoice editing (#939) * feat: SRS 787 Implement View Invoice Form component * Update cats-frontend/src/app/features/applications/application/applicationTabs/appInvoices/components/index/tableColumnConfig.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: SRS 787 Implement invoice editing functionality --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * SRS-785: Application Timesheets table (#941) * changes for SDS (#945) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: SRS 787 Update invoice forms to refresh index. (#944) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-787 Add notes field to Invoice (#947) * feat: SRS-964 Dashboard (Recently Viewed Applications) (#943) * implement recent section on dashboard including test cases for FE and BE * formatting * fix test cases issue * status changes for CSSA package (#946) Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * changes to display updates status to client (#952) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Edit SOSC form for the requested changes (#954) Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Fixing crunchy postgres operator permissions issue * Attempting to fix permissions of crunchy * Adding `openshift: true` to directly start of `spec` block per docs. --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Force trigger of test deploy of db (#956) * feat: SRS-965 Implement Action Required (Table View with Backend API and DB Integration) (#950) * implement recent section on dashboard including test cases for FE and BE * implement action required table FE * re-name staff folder * fix search people table css * implement required action widget on dashboard * fix table issues * fix sticky column issue with custom css for table header and relative column * FE and BE test cases with minor changes on dashboard * fix query codition * implement recent section on dashboard including test cases for FE and BE * implement action required table FE * re-name staff folder * fix search people table css * implement required action widget on dashboard * fix table issues * fix sticky column issue with custom css for table header and relative column * FE and BE test cases with minor changes on dashboard * fix query codition * fix rebase conflict * formatting * Restored code from commit 0107bb0 * fix conflict issue * Revert "fix rebase conflict" This reverts commit d0b07578e4ee678d8314036d60abf7c99b8220a3. * fix merge conflict * formatting * revert RecentViewedApplication.entity.ts name * revert RecentViewedApplication.entity.ts file name * file rename * git hup is not acception case change therefore changing file name * change RecentViewedApplication with small R now * change button text to Create a New Site ID from Add new Application * fix css issue for create new site button * minor fix on query * feat: API changes for status change srs-966 (#953) * status changes for CSSA package * API changes for status change * fixed some code errors * fixed utc * fix recently visited application bug and handle formid and submission id related issue (#957) * changes for capturing formsflow app id * changes for calling CATS api from FF * changes to insert diff statuses from FF to CATS * corrected utc * fixed cats utc * unit test issue fix --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * feat: changes for updated capacity calculation (#914) * changes for updated capacity calculation * changes for updated capacity calculation * Fixed Merge issues * Fixed merge issue * changes for integrating application service type with permission. * check-in types.ts * changes for renaming table as per review comment * reverting changes * Updating path to fix unit test failure * displaying percentage in frontend * updates seeder logic * changes for updated capacity calculation * Fixed Merge issues * changes for updated capacity calculation * changes for integrating application service type with permission. * check-in types.ts * changes for renaming table as per review comment * reverting changes * Updating path to fix unit test failure * displaying percentage in frontend * updates seeder logic * renamed function * Updated Code To Use StaffRoles * updated comment * updated comment * checking in auto generated files to fix the unit test cases * removed console log --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: srs-787 Implement optional PST (#958) * feat: srs-787 Implement optional PST * Remove console logging statements --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: this is for creating draft pr for testing #959 (#964) * this is for creating draft pr * testing issue in dev environment * for debugging in dev * corrected return values from update service * removed console logs * corrected UTCs * feat: Adding a comment & Removing Logger Reference From Seeder (#968) * Adding a comment * Updating path * Removing Logger Reference in Seeder * fix: remove triggers from main merge or dev in this case (#969) * fix: Adding Multi Keyword Search To Manage People Functionality (#970) * check-in types.ts * Adding Keyword search to manage people --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: SRS-785: Application Timesheets table, second iteration (#967) * fix table styles, add "Select date" button * add comments to timesheetdays, vertical layout for table * Disable timesheet days before that are before and after staff's assignment start and end dates * styling * remove weekends * limit timesheet day's hour value between 0 and 24 * fix denormalization logic * move timesheetDay resolver and services and related tests to their own folders * delete unused file * save startDate in search params when using week navigation buttons --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> * feat: SRS-787 Implement Invoice File Attachements (#971) * fix: Adding a log statement. (#980) * check-in types.ts * updating a log statement * fix: SRS-1007 Fix price input field. (#975) * fix: SRS-1007 Fix price input field. * Fixup --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: srs-787 Implement alternative print feature (#974) * feat: srs-787 Implement alternative print feature * Potential fix for code scanning alert no. 122: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * update package-lock --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: SRS-973: Manage People - Saved value for the Account Permissions not getting reflected (#979) * fix permission saved issue * fix optimization and state management issue * fix test case * format * fix review comments * feat: draft mock change to test the change in DEV (#965) * mock change to test the change in DEV * fix to pick up correct status in app search * temp solution for testing purpose only --------- Co-authored-by: Jaspal.Singh-AOT <163812444+jaspalsingh-aot@users.noreply.github.com> * Remove "Create New Site" button from Dashboard page in CATS (#981) * fix: SRS-1017 Implemented graceful failure for APIs. When Site is not working (#984) * Implemented graceful failure for APIs. When an API does not return the expected data or returns null. * fix backend test case * using pvc backups (#985) * Mismatch between "Status" for an application (#986) * fix: Fix for CATS Tickets - 979 952 980 993 (#987) * check-in types.ts * change for SRS-979-952-980-993 * feat: SRS-785 - prevent navigation on unsaved timesheet changes (#973) * fix table styles, add "Select date" button * add comments to timesheetdays, vertical layout for table * Disable timesheet days before that are before and after staff's assignment start and end dates * styling * remove weekends * limit timesheet day's hour value between 0 and 24 * fix denormalization logic * move timesheetDay resolver and services and related tests to their own folders * delete unused file * save startDate in search params when using week navigation buttons * Refactor ApplicationDetails page to include a sub-router * useUnsavedChangesWarning hook * Preserve unsaved values between week changes * copilot suggestion * remove navigationPills tests as no longer relevant * make `@cats` alias available in tests * remove unused Add Staff button * feat: TEST PR (#988) * check-in types.ts * adding a comment * Testing the route issue * Reverting commented and adding useRef reference * reverted comment * reverted the change to route path * fix: Assignment UI fixes (#976) * check-in types.ts * Adding Keyword search to manage people * Assignment UI fixes * Assignment UI fixes * removed a debug label * fixing frontend unit test cases * File formatted * formatted file --------- Co-authored-by: jaspal-aot <163812444+jaspalsingh-aot@users.noreply.github.com> Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Update the SITE_SERVICE_URL to hardcoded url. (#991) * fix: Combine -seed and -init initContainers, only have one now, and updated seed logic in initDB.sh (#992) * fix: Combine -seed and -init initContainers, only have one now, and updated seed logic in initDB.sh * Fixing default database name. * fix: Added More Logs & Removed Error Thrown in ApplicatonTypeSeeder (#989) * check-in types.ts * Adding more logs and removed error thrown * fix: Fixed undefined in Email Content and Progress Bar On Assignment (#996) * check-in types.ts * fixed undefined in emails & NaN in progress bar --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: My Tasks Functionality & Restricting External Users (#995) * check-in types.ts * changes for my tasks & restricting external users * pushing types.ts * fix: Added More Logs & Removed Error Thrown in ApplicatonTypeSeeder (#989) * check-in types.ts * Adding more logs and removed error thrown * fix: Fixed undefined in Email Content and Progress Bar On Assignment (#996) * check-in types.ts * fixed undefined in emails & NaN in progress bar --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * pushing types.ts * fixed unit test * Updated ENV Variable in yaml files --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: Modified API to Call Secure Site API (#982) * check-in types.ts * changes for calling protected site api endpoint * Updated implementation & test cases * changes for calling protected site api endpoint * Updated implementation & test cases * Updated 3 new envs in helm charts * fixed failed unit test case --------- Co-authored-by: Adam Coard <adam.coard@aot-technologies.com> * Update logout URL for test. (#998) * feat: changes to handle application having multiple site id (CSSA) (#1001) * changes to handle application having multiple site id (CSSA) * removed console logs * feat: changes for SIR integration with CATS (#1004) * changes for SIR integration with CATS * Updated unit test case * fix: NEW-SRS-787 Invoice as per design and current requirement (#1005) * Implement Invoice CRUD opteration of FE and BE * fix backend api issues * delete not required files and folder from FE and BE * implement update, create and delete invoice * Implement Invoice CRUD opteration of FE and BE * fix backend api issues * delete not required files and folder from FE and BE * implement update, create and delete invoice * fix conflict * formatting * fix merge conflict errors * feat: SRS-1002 Implement the file upload feature and integrate it with coms (#1000) * complete implementation of upload invoice attachment * formatting * fix merfe issue and minor css * key required in openshift * formatting * add config keys, value and sceret for dev and test only. urls are pointing to dev only * Potential fix for code scanning alert no. 128: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix preview issue. check blob to generate safe preview * format * removing from frontend as upload document and invoice will move to backend for security purpose * Potential fix for code scanning alert no. 130: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 132: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix merge conflict * fix merge issue --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * feat: Implement Send Invoice Email to Recipient (#1006) * Implement Invoice CRUD opteration of FE and BE * fix backend api issues * delete not required files and folder from FE and BE * implement update, create and delete invoice * Implement Invoice CRUD opteration of FE and BE * fix backend api issues * delete not required files and folder from FE and BE * implement update, create and delete invoice * formatting * fix merge conflict errors * feat: SRS-1002 Implement the file upload feature and integrate it with coms (#1000) * complete implementation of upload invoice attachment * formatting * fix merfe issue and minor css * key required in openshift * formatting * implement api to send invoice email with attachment * implement send invoice email on frontend * fix dropdown css issues * graphql * auto generated graphql * fix minor issues and merge conflict * formatting * status changes for DERA (#1007) * CATS Prod (#993) * Cats prod file, just GHA file testing. * Update gha name * Temporarily enable dry-run for helm before prod deploy, to make we don't affect existing prod ff.ai * Force triggering another dry run check * Another change after modifying branch protection rules to allow feats/cats-prod just for active dev so I don't have to ask people to merge in prs every commit. * Empty commit to start deploy for the day * Modify upload_sql to use append.sql for file * Enable db dry run too for testing purposes * Remove --dry-run from helm charts, will actually run with this push. Both cases showed the release does not exist and is new and is deploying, which is good. * Tweak append content so it's clearer, but it appears to be working after checking in pod * Update append.sql with latest from Nikhila * Adjust append.sql with input from Jaspal and Nikhila to remove unncessary stuff --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Deploy prod data to DEV environment (#1016) * Dummy commit to make PR to test prod data import process in CI/CD * fix MENT issue * Update WAL storage size in dev/test/prod to 2gb. * add null and undefine check * Reorganize append.sql * Update append.sql re-add section per Midhun * Update append.sql Added Review In Progress status insert statement --------- Co-authored-by: Jaspal.Singh-AOT <163812444+jaspalsingh-aot@users.noreply.github.com> Co-authored-by: midhun-aot <105463561+midhun-aot@users.noreply.github.com> * feat: NOM Bundle Integration to CATS (#1014) * changes for SIR integration with CATS * NOM Bundle Integration To Cats * updated formId * Form changes * Delete backend/cats/G --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * feat: NIR bundle changes (#1017) * changes for NIR status changes * form changes for status * fix: handling empty site id (#1018) * handling empty site id * updated utc * fix: SRS 1036 Application details not loading in CATS when no SITE ID is available (#1020) * this is for testing only * for testing * testing an issue for empty siteid * this test case is not required * changed siteid as nullable * handling null siteid * this for testing the result application * corrected utc * changed siteid as nullable * site related fields can be nullable * removed unused code * fix: NIR - Issue fix for status changes (#1021) * this is for testing only * for testing * testing an issue for empty siteid * this test case is not required * changed siteid as nullable * handling null siteid * this for testing the result application * corrected utc * changed siteid as nullable * site related fields can be nullable * removed unused code * corrected issues 1040 * feat: Implement invoice attachment upload from cats backend to s3 bucket via coms (#1019) * Implement backend logic to call coms api. work in progress.. * fix get and create object endpoint issue * object already exist handling * integerate the API and FE for invoice attachments * add env variables for backend .env * formattig * Potential fix for code scanning alert no. 133: Type confusion through parameter tampering Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 135: Type confusion through parameter tampering Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix review comments as per co pilot * remove unused code * add config keys * revert change * add test site backend urrl for testing purpose * fix crrect site backend test url * fix impacted area because of modal dialog component changes * formatting * we can see page if one got data * add condition for email if site is not working * reverting the email code * formatting * fix invoice unit per cent calculation error --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * feat: SRCR Integration to CATS (#1023) * changes for SIR integration with CATS * initial changes for SRCR integration to CATS * form & bpm changes * Form & workflow changes * added missing one * remove nirStatus variable * Delete backend/cats/G * fix: Application Id and SiteId needs to be a link. (#1024) * fix: Application Id and SiteId needs to be a link. * add complatibility with my task component * format * fix: All Applications - The Staff assigned field shouldn't show a dropdown sign when no one is assigned (#1025) * fix: All Applications - The Staff assigned field shouldn't show a dropdown sign when no one is assigned * format --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fix: The Actions button seem irrelevant on Application page (#1026) * status changes for standalone SoSC (#1027) * removed assign reviewers component (#1031) * fix: Fixed NOM Resubmission & Updating Site Id in CATS (#1030) * changes for SIR integration with CATS * initial changes for SRCR integration to CATS * form & bpm changes * Form & workflow changes * added missing one * remove nirStatus variable * fixed NIR resubmission issue * changes for SIR integration with CATS * initial changes for SRCR integration to CATS * form & bpm changes * Form & workflow changes * fixed NIR resubmission issue * Delete backend/cats/G * updated the if condition --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * fixed resubmission issue for sir (#1033) * feat: dev to main merge - 26 Aug 2025 (#1039) * Dev to main merge 21 March 2025 (#835) * testing build and deploy cleanup * Set Active Status for Manage People * Latest Changes * removing legacy and sites as part of cleanup * Integerate api for view mode * delete sites and legacy deploy files * initial check in for cats entities * moved entities to diff folder * added app entity * Added Logger & Generic Response provider * Create ghrapql queries and custom hooks for edit person * Adding Entities * Edit person frontend * Changes for manage people * adding unit test cases * fix for entity error * removing not required files from git * Add test cases and add new person * solved merge error * Adding delete functionality and missing packages * Fixed all review comments * fixed unit cases * updated unit test case * added evn to github actions * updating github actions * updating env & reverting changes to pr-open.yml * commenting changes to pr-open.yml * reverting changes to github actions * integerate backend with frontend and refactor the APIs, add generic response. * Add note entities * add winston * ignore vscode workspace settings * also ignore launch configs * Fix merge issue * remove console to log. Functionality will be added in next PR * Add basic set up for Application page * SRS-855 Adding application related tabs for the page * Add sticky header * Add front end logic for add, update notes * add notes entity and changes in person entity, response * review comment fix * CATS: fix FE fonts * define appropriate font-family fallbacks * rename entities, resolver, service and addcustom exception * Renaming in frontend * Add delete person notes * fix review comments * add delete person feature * Add test cases * adding a new ftl and category * Roll back Side bar animation and spacing of content container code * fix css issue * design token color issue fix * frontend test case * Addressing few minor comments * Removing console * env for geocoder * delete .env file * removing the constraints to support data migration * fix errors * fix geocoder issue * remove commented code * fix: docker-compose incorrect indentation * feat: SRS-859 - useAutoSignin hook + auth flow fixes * WIP: vite migration * migrate tests to use vitest instead of jest * fix typo * chore: expose database port for development * SOSC edits to AP section * changes for task assignment * chore: sync lock files with package files. * updating docker-compose * changes to email template & bpm * disabled form content for approving authority users * Updated comments in user controller * removed console logs and hardcoded values * removed commented code * run prettier formatter * prettier check github action * update working dir * try that again * change path * try working_directory again * update prettierignore * set work dir on the job level * remove only_changed * remove only_changed * try a different path * oh no * another try * come on now * pass ignore and config options * new path * put only-changed back * commit test file with busted formatting * test only-changed * display error message * format error message * try gh actions command for message instead * aw yess it worked * test commit * `@bcgov/design-tokens` version upgrade, css variables cleanup * Add UI logic for participants tab * Logic to fetch participants * Add a new column to table * Show the values in table row * Fix CSS and remove console logs * Formatted using prettier * feat: SRS-854 Implement Backend for Application Search * Well that was embarrassing * Add unit tests for backend * Fixed CSS * CATS: apollo client setup, update Participants tab to use it * Changes related to Dto structure * CATS: Application page - set current tab in URL search params * shorten the tabSearchKey * remove redundant styles (d-flex already covers the removed classes) * Updating the Email Assignement ID as its conflicting the existing camunda deployments * change folder sturcture and fix test cases and review comments * run prettier * adding 'users' component to epd-backend (#781) * run prettier to pass PR * update the image tag (#782) * change folder structure and fix test case * bug fix- adding the components (#783) * fix error * error-fix * Replacing Person Entity Reference With ViewPerson DTO to resolve the build error facing in openshift * Fixing API Route Path * Adding Missing Change For Redirection * Fix Dto class * CATS: fix codegen for node v22+ * delete codegen.ts * fix side bar css issue * prettier issue fix * feat: SRS-854 Implement Frontend for Application Search * remove my apollo client that should not be used * Banish redux to the shadow realm and add search debounce delete file I thought I deleted before * Update button divs to be buttons * use bootstrap inline flex class * add BEM style class name for tablecontrols component styling * Implement Apollo Client * Fix some merge errors * Update generated files * Run prettier * chore: CATS - fix codegen when running concurrently with dev build * Srs 870 (#792) * test image update * testing- adding image triggers to deployment * testing image triggers in dev * fixing syntax issues (#794) * rename dto files * Add filters for participants * formatted files * remove logs * Srs 870 fixingenv (#795) * test env variable issue * test deploy * update indentation fix * test * test update syntax error * added config to -updating the image streams * adding the new envs * fixing readiness/liveness probe failure * fixing readiness/liveness probe * fixing the indentaion issue (#798) * Removed the unused files * Added logs and moved files to correct folders * Move the enum file to correct folder * Fix broken dockerfile * chore: skip failing unit tests * skip additional broken test * chore: Clean up broken github workflows. (#805) * chore: Remove github workflow for SITE application. * Disable failing sonarcloud step * feat: SRS-790 - graphql endpoint for fetching application's housing records (#800) * feat: SRS-790 show application housing records (#801) * feat: SRS-790 - graphql endpoint for fetching application's housing records * feat: SRS-790 show application housing records * remove unnecessary fragment * fix subtle navigation bug * chore: CATS - apply commonly used table styles to the base table components (#802) * feat: SRS-790 - graphql endpoint for fetching application's housing records * feat: SRS-790 show application housing records * CATS: extract common table css * don't need important here * chore: Run unit tests on cats frontend in CI/CD pipeline (#806) * chore: Run unit tests on cats frontend in CI/CD pipeline * Revert "chore: Run unit tests on cats frontend in CI/CD pipeline" This reverts commit 36af295192409bf76ed6961a5c3e6a281abde74f. * chore: run unit tests on cats front end for pr open * Skip failing unit test * add cats-frontend to build includes * add jest import * disable jest mock because it's causing issues with vite test * remove cats-frontend from build * replace jest with vi * renaming users to cats folder (#807) * renaming users to cats folder * removing users folder form ci-cd files * remove unit tetss for users * test update * test update * test update * test update * test cats rename * test cats rename * test rename * Fix module spelling (#810) * chore: re-add cats unit tests, disable sonarcloud for the time being (#809) * fix: update dockerfile to no longer reference users. (#812) * fix: update dockerfile to no longer reference users. * revert change to userapi doc, because that folder was not renamed * fix input control label changes and date picker (#813) * Application Search Updates 1. Relocate Application Search into the application folder 2. Update the Application Search response to use the PagedResponseDto base class 3. Update logging 4. Add error handling. * Update SearchApplications GraphQL Query * chore: remove openshift deploy for sites (#808) * remove openshift deploy for sites * empty commit to force ci/cd to run --------- Co-authored-by: nikhila-aot <38471389+nikhila-aot@users.noreply.github.com> * Correct label to cater the actual search keyword * New email templates for SDS form…
1 parent 8fe2842 commit 792fd09

File tree

6 files changed

+76
-98
lines changed

6 files changed

+76
-98
lines changed

backend/applications/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/cats/package-lock.json

Lines changed: 0 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/cats/src/app/entities/invoiceLineItem.entity.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

cats-frontend/src/app/features/applications/application/applicationTabs/application/Application.tsx

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
getApplicationForm,
55
getApplicationFormData,
66
getBundleForms,
7+
getExecuteRules,
78
getFormDetails,
89
} from './FormioEndpoints';
910
import { getUser } from '../../../../../helpers/utility';
@@ -15,6 +16,7 @@ import {
1516
import LoadingOverlay from '../../../../../components/loader/LoadingOverlay';
1617
import { Form } from '@formio/react';
1718
import '@formio/js/dist/formio.full.min.css';
19+
import { set } from 'date-fns';
1820

1921
type ApplicationDetails =
2022
GetApplicationByIdQuery['getApplicationDetailsById']['data'];
@@ -35,7 +37,7 @@ interface ApplicationForm {
3537
formJson: FormJson;
3638
}
3739

38-
interface ApplicationProps {}
40+
interface ApplicationProps { }
3941

4042
export const Application: React.FC<ApplicationProps> = () => {
4143
const userDetails = getUser();
@@ -52,9 +54,54 @@ export const Application: React.FC<ApplicationProps> = () => {
5254
});
5355
const [formType, setFormType] = useState<string | null>(null);
5456
const [selectedForms, setSelectedForms] = useState<ApplicationForm[]>([]);
57+
const [formsToBeFiltered, setFormsToBeFiltered] = useState<ApplicationForm[]>(
58+
[],
59+
);
5560
const [activeStep, setActiveStep] = useState<number>(0);
5661
const [error, setError] = useState<string | null>(null);
5762
const [isLoading, setIsLoading] = useState(true);
63+
const [rules, setRules] = useState<any[]>([]);
64+
65+
const evaluateRule = (rule: any, data: any) => {
66+
// Normalize operators
67+
let expr = rule
68+
.replace(/\s+or\s+/gi, ' || ')
69+
.replace(/\s+and\s+/gi, ' && ')
70+
.replace(/==/g, '===')
71+
.replace(/!=/g, '!==');
72+
73+
// Replace object keys with actual values
74+
expr = expr.replace(/\b\w+\b/g, (match: any) => {
75+
if (Object.prototype.hasOwnProperty.call(data, match)) {
76+
const val = data[match];
77+
return typeof val === 'string' ? `"${val}"` : val;
78+
}
79+
return match;
80+
});
81+
82+
try {
83+
// eslint-disable-next-line no-new-func
84+
return new Function(`return (${expr});`)();
85+
} catch (e) {
86+
return false;
87+
}
88+
};
89+
90+
useEffect(() => {
91+
if (rules.length > 0 && formsToBeFiltered.length > 0) {
92+
const filteredForms = formsToBeFiltered.filter((form) => {
93+
const formRule = rules.find((rule) => rule.formId === form.formId);
94+
95+
if (formRule) {
96+
return formRule.rules.every((rule: any) => {
97+
return evaluateRule(rule, formData?.data);
98+
});
99+
}
100+
});
101+
setSelectedForms(filteredForms);
102+
setFormJson(filteredForms[0]?.formJson);
103+
}
104+
}, [rules, formsToBeFiltered]);
58105

59106
const applicationId = parseInt(id ?? '', 10);
60107
const {
@@ -106,7 +153,12 @@ export const Application: React.FC<ApplicationProps> = () => {
106153
});
107154

108155
const forms = await Promise.all(formPromises);
156+
getExecuteRules(id, formData?.data).then((response) => {
157+
setRules(response?.data ?? []);
158+
});
159+
109160
setSelectedForms(forms);
161+
setFormsToBeFiltered(forms);
110162
setFormJson(forms[0]?.formJson);
111163
}
112164

cats-frontend/src/app/features/applications/application/applicationTabs/application/FormioEndpoints.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ export const getApplicationForm = async (formId?: string) => {
6060
}
6161
};
6262

63+
export const getExecuteRules = async (bundleId?: string, data?: any) => {
64+
try {
65+
const ENDPOINT = `${COMS_ENDPOINTS.FORM}/${bundleId}${COMS_ENDPOINTS.BUNDLES}/execute-rules`;
66+
const response = await getAxiosInstance(FORM_API).post(ENDPOINT, {
67+
...data,
68+
});
69+
return response;
70+
} catch (error) {
71+
console.error('Error in getting getExecuteRules:', error);
72+
throw error;
73+
}
74+
};
75+
6376
/**
6477
* @description Fetches the form data for a given form ID and submission ID from the FormFlow API.
6578
* @param {string} formId - The ID of the form to retrieve the data of

forms-flow-ai/epd-forms/bundling/Summary of Site Condition.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9561,7 +9561,6 @@
95619561
"attributes": {},
95629562
"overlay": {
95639563
"style": "",
9564-
"page": "",
95659564
"left": "",
95669565
"top": "",
95679566
"width": "",

0 commit comments

Comments
 (0)