Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@LawrenceLau2020
Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 commented Apr 22, 2024

🎯 Summary

PIMS-1529:

Adding the service function to the addDisposalProject endpoint.
Still need to add some user permissions check.

πŸ”° 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.

@github-actions
Copy link

πŸš€ Deployment Information

The Express API Image has been built with the tag: 2336. 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.

@qlty-cloud-legacy
Copy link

qlty-cloud-legacy bot commented Apr 23, 2024

Code Climate has analyzed commit 0a5f222 and detected 0 issues on this pull request.

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

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

View more on Code Climate.

import { DeepPartial } from 'typeorm';
import { Project } from '@/typeorm/Entities/Project';

interface ProjectPropertyIds {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's already the same type as an exported member of projectsServices, probably best to consolidate this to one place.

const {
project,
propertyIds,
}: { project: DeepPartial<Project>; propertyIds: ProjectPropertyIds } = req.body;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we care about the length of the propertyIds arrays at all? Is a project with no properties allowed to be created?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good question, as this was possible in the old PIMS and a user could start creating a project save it and enter the properties at a later time.

Copy link
Contributor

Choose a reason for hiding this comment

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

That being the case, I think I'm fine with keeping this as a valid option for now

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