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

PIMS-1967: Create link to project from property page #2617

Merged
merged 17 commits into from
Aug 15, 2024
Merged

Conversation

LawrenceLau2020
Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 commented Aug 12, 2024

🎯 Summary

PIMS-1967:

Changes

  • Added new controller, route, and service to find associated projects for a property
  • New data card on the property details page

Notes

  • I can't seem to make the third column for the project description wrap around when this field contains text which goes beyond the width of the table.
    image

  • Waiting for some feedback from Josh as well, so some things may change.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2617. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

🚀 Deployment Information

The React APP Image has been built with the tag: 2617. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Aug 12, 2024

Code Climate has analyzed commit 03f78f8 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 63.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.5%.

View more on Code Climate.

@LawrenceLau2020
Copy link
Collaborator Author

if (filter.hasParcels?.length) {
const projectsHavingTheseParcels = await AppDataSource.getRepository(ProjectProperty).find({ where: {
ParcelId: In(filter.hasParcels)
}});
query.andWhere('id IN (:...projectsParcels)', { projectsParcels: In(projectsHavingTheseParcels.map((p) => p.Id))})
}

I'm not sure how this function would get called from the PropertyDetail form? Should this perhaps be a separate ticket?

@GrahamS-Quartech
Copy link
Contributor

if (filter.hasParcels?.length) {
const projectsHavingTheseParcels = await AppDataSource.getRepository(ProjectProperty).find({ where: {
ParcelId: In(filter.hasParcels)
}});
query.andWhere('id IN (:...projectsParcels)', { projectsParcels: In(projectsHavingTheseParcels.map((p) => p.Id))})
}

I'm not sure how this function would get called from the PropertyDetail form? Should this perhaps be a separate ticket?

This is meant to be an excerpt from the project service on the api.

Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

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

Looks good and works well for me.

@LawrenceLau2020 LawrenceLau2020 merged commit 5672997 into main Aug 15, 2024
13 checks passed
@LawrenceLau2020 LawrenceLau2020 deleted the PIMS-1967 branch August 15, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants