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

Add transaction type to properties "For Rent" and "For Sale" #39

Closed
eevan7a9 opened this issue Jun 21, 2024 · 0 comments · Fixed by #49
Closed

Add transaction type to properties "For Rent" and "For Sale" #39

eevan7a9 opened this issue Jun 21, 2024 · 0 comments · Fixed by #49
Assignees
Labels
enhancement New feature or request

Comments

@eevan7a9
Copy link
Owner

Update the Real Estate Properties Model to include a transaction type field to clearly indicate if a property is "For Rent" or "For Sale".

Tasks:

Backend Changes are needed:

  • The transactionType field should be of type String.
  • It should accept only two values: "sale" and "rent".
  • This field should be required.
  • Add validation to ensure only sale and rent are accepted as values for the transactionType field.
Propose Schema Change:
const propertySchema = new mongoose.Schema(
  {
    ...
    transactionType: { type: String, enum: ['for_sale', 'for_rent'], required: true },
   ...
  },
  {
    timestamps: true,
  }
);

Frontend Changes are needed.

  • Modify the property creation form and edit forms to include a field for selecting transactionType.
  • Ensure that users can only select either "Sale" or "Rent".
@eevan7a9 eevan7a9 added the enhancement New feature or request label Jun 21, 2024
@eevan7a9 eevan7a9 self-assigned this Aug 10, 2024
@eevan7a9 eevan7a9 linked a pull request Aug 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant