Skip to content

Commit

Permalink
Add another exception for rr_new_hitas in Apartment sale
Browse files Browse the repository at this point in the history
  • Loading branch information
indigane committed Sep 20, 2024
1 parent 5209eee commit bd21bf6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ const ApartmentSalesPageLinkButton = ({
// If apartment has been sold for the first time, and it's company not fully completed, it can not be re-sold
// Exception: rr_new_hitas, which allows re-selling before housing company is fully completed
apartmentCantBeSoldErrorMessage = "Valmistumattoman taloyhtiön asuntoa ei voida jälleenmyydä";
} else if (apartment.prices.first_purchase_date && !apartment.completion_date) {
} else if (
apartment.prices.first_purchase_date &&
!apartment.completion_date &&
// Exception: rr_new_hitas also allows re-selling before apartment is fully completed
housingCompany.hitas_type !== "rr_new_hitas"
) {
apartmentCantBeSoldErrorMessage = "Valmistumatonta asuntoa ei voida jälleenmyydä";
} else if (apartment.prices.first_purchase_date && housingCompany.hitas_type === "half_hitas") {
apartmentCantBeSoldErrorMessage = "Puolihitas-taloyhtiön asuntoa ei voida jälleenmyydä";
Expand Down

0 comments on commit bd21bf6

Please sign in to comment.