Skip to content

Conversation

@matzduniuk
Copy link
Collaborator

This PR addresses #5577

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

  • Updates the Prisma schema to include a new Properties table
  • Adds a new migration file setting up the property table
  • Adds Properties table related controllers, services, and dtos required to handle basic CRUD operations, including:
    • Retrieving the list of properties using a pagination query params or using a name search filter
    • Retrieving a single property by its ID
    • Creating a new Property entry
    • Updating and deleting an existing entry by its ID
  • Adds interation e2e test for the Properties controller available endpoints
  • Add a new endpoint to the listings controller to retrieve listings by assigned property ID

How Can This Be Tested/Reviewed?

  1. Run the yarn setup command to apply the new migration and set up a Properties table
  2. Run the backend application
  3. Using Postman or a similar tool, perform the following operations:
    2a. Create at least two new property entries using the POST /properties endpoint.
    2b. Retrieve all created properties using the GET /properties endpoint (this step should also be repeated using different query parameters and search filters)
    2c. Using a generated ID copied from the previous query, retrieve a single property entry using the GET /properties/<ID> endpoint.
    2d. Using the same ID, perform the update operation using the PUT /properties endpoint. (The request will return an updated entry, but step 2c can be repeated to ensure that changes have been properly applied)
    2e. Using the same ID, perform the delete operation DELETE /properties endpoint.

Tip

The above steps should also be performed using invalid data, like missing DTO fields, invalid URLs, invalid IDs etc. to ensure proper error and exception handling

  1. Open the Prisma Studio view and assign the properties to example listings (copy the ID of one assigned property)
  2. Using Postman, target the GET 'listings/byProperty/' endpoint to retrieve all listings that have been assigned to the given property.

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@matzduniuk matzduniuk self-assigned this Dec 15, 2025
@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 1330c7d
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6952bae74f4da700084a6c54
😎 Deploy Preview https://deploy-preview-5693--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit a788f37
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/693ff376e831550008c138c4
😎 Deploy Preview https://deploy-preview-5693--bloom-public-seeds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for bloom-flagly canceled.

Name Link
🔨 Latest commit 1330c7d
🔍 Latest deploy log https://app.netlify.com/projects/bloom-flagly/deploys/6952bae7dae7f10008a1bc97

@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit a788f37
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/693ff376640528000800f53a
😎 Deploy Preview https://deploy-preview-5693--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit 1330c7d
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6952bae7b8a31f0007a9508c

@matzduniuk matzduniuk removed the 1 review needed Requires 1 more review before ready to merge label Dec 17, 2025
@matzduniuk matzduniuk added 1 review needed Requires 1 more review before ready to merge and removed wip This PR is not ready for review, do not review it's a “Work In Progress” labels Dec 17, 2025
Copy link
Collaborator

@YazeedLoonat YazeedLoonat left a comment

Choose a reason for hiding this comment

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

Overall looks good, some questions and some requested changes

a must have on this would be unit tests on the service functions

a nice to have would be new permission e2e tests in the permission suites

PaginationMeta,
IdDTO,
)
@PermissionTypeDecorator('property')
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: this would get this to leverage the old property permissions from permission_policy.csv is that correct or do those perms need to be updated?

@YazeedLoonat YazeedLoonat added needs changes The author must make changes and then re-request review before merging and removed 1 review needed Requires 1 more review before ready to merge labels Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changes The author must make changes and then re-request review before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants