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

FP-35 #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

FP-35 #37

wants to merge 2 commits into from

Conversation

Smarsden007
Copy link

Description

Fixes #

  • What work was done?
  • Created API endpoint to hit all client tables in the ClientSchema.
  • Why was this work done?
  • This was done so a case manager could use placeholder documents, so that they can autofill forms, with future features available.
  • What feature / user story is it for?
  • This is part of FP-6 Case Management.
  • Any relevant links or images / screenshots

Loom Link of Postman API Call

https://www.loom.com/share/beb43cff5d634c33b7c6826b540bbbb2

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Change Status

  • [ x] Complete, tested, ready to review and merge
  • Complete, but not tested (may need new tests)
  • Incomplete/work-in-progress, PR is for discussion/feedback

Has This Been Tested

  • [x ] Yes
  • No
  • Not necessary

Checklist

  • [x ] My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code has been reviewed by at least one peer
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • There are no merge conflicts

Created one API endpoint to hit all Client Tables
Api returns each table in one json object ready to be consumed on the front end for
place holder documents.
Copy link

@publiminal publiminal left a comment

Choose a reason for hiding this comment

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

@Smarsden007 . It was great to check out your code update.
It looks nice and concise. some comments :

  • Wondering a couple of questions as sent you trough it.
  • Also wondering which jira in FE side is implementing this route.
  • Finally wondering about performance once it gets hundreds / thousands entries ?
    Thanks !

@@ -7,7 +7,7 @@ const Ethnicity = require('../ethnicities/ethnicitiesModel');
const EducationHistory = require('../education_histories/educationHistoriesModel');
const EmailAddress = require('../email_addresses/emailAddressesModel');
const PhoneNumber = require('../phone_numbers/phoneNumbersModel');

const PlaceHolder = require('./clientModel');

Choose a reason for hiding this comment

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

Hi @Smarsden007 : wondering why this is needed since you already have a 'Clients' var accessing the same model.

@@ -19,6 +19,39 @@ router.get('/', (req, res) => {
});
});

router.get('/placeholder', async (req, res) => {
try {
const [

Choose a reason for hiding this comment

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

wondering why some other tables related like 'phone_numbers', 'locations' , 'householders' , 'email_addresses' are missing here

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.

2 participants