Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Hack-together] Sometimes Value of discounted Price is 0

Tanmai2002 opened this issue · comments

Are you accessing the project from the GitHub Codespaces?

  • No, I am running the project on my local machine (I will fill in the OS section below)
  • [ X] Yes, I am using GitHub Codespaces.

Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!

Describe the bug
When I Hard refresh or use
/listing/{number}/modern-apartment-close-to-the-metro-station

To Reproduce
Steps to reproduce the behavior:

  1. Open any Listing
  2. Select the url: example http://127.0.0.1:4280/listing/3/great-home-for-entertaining
  3. Copy it to new tab and paste.
  4. See error

Expected behavior
Correct Value of Discounted Price

Screenshots
image

OS (please complete the following information):

  • OS:
  • OS Version:
  • npm version:
  • Node.js version:
  • output of azd version:

Additional context
This may be mostly as MonthlyDiscountedRent is Calculated based on this.monthlyRentPrice() rather than rent fetched from listing. Thus all other values are intact but not the MonthlyDiscountedRent.

This is the issue as this.monthlyRentPrice is set after setting value for rentPriceWithDiscount

Hi, thanks for reporting! Looking forward to your fix!

@anfibiacreativa I Have created a Pull Request. Kindly Check.