Skip to content

Conversation

johnwroge
Copy link
Member

@johnwroge johnwroge commented Mar 2, 2025

This PR is a work in progress. We haven't met as a group in a few weeks so please provide feedback, or feel free to message me on slack so I can make needed changes.

What changes did you make?

  • Temporarily removed mock service worker (MSW).
  • Updated intake-profile controller to return json document for dynamic form elements.
  • Changed fetch requests to match api handler
  • Altered path in main.tsx allowing user to navigate to other forms based on updated path
  • Fixed json file for the contact method fields, and the contact method input component to retrieve the correct field id.
  • Removed color formatting in JSON logs for QA environments in AWS.

Rationale behind the changes?

Dynamic forms are being implemented to display application information. This approach is intended for both Host and Guest applications, reducing the need for custom form components and promoting code reuse.

Testing done for these changes

Testing will be completed once the functionality is confirmed.

What can you share that is new?

Note I believe there are a number of changes needed including:

  1. The path from the guest dashboard using the correct group id and profile id.
    // Old url: 'profile/1/group/1' vs New url: 'profile/guest'

  2. the userId vs profileType in api requests

'/api/intake-profile/responses/:profile_type' vs '/api/intake-profile/responses/:userId',

The paths were updated to 'guest' and 'host' from 1 and 2 for readability, but will be changed to user ids.

Guest Application
Screen Shot 2025-03-01 at 9 49 25 PM

Host Application
Screen Shot 2025-03-01 at 9 50 20 PM


Copy link
Member

@paulespinosa paulespinosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the code locally. Looks good.

import json
with open("form_data/form1.json", "r") as f:
FORM_1 = json.load(f)
FORM_1['id'] = 'guest'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to change the json in the file to have id guest/host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants