From 77f1f559a908a2d7b0979aa79b55b4d8fc9118a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nandy=20B=C3=A2?= Date: Tue, 27 Aug 2024 00:25:47 +0900 Subject: [PATCH 1/3] feat: fullyRentedAPR: manage VEFA properties --- src/hooks/useFullyRentedAPR.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hooks/useFullyRentedAPR.ts b/src/hooks/useFullyRentedAPR.ts index 08f166a..a653e9a 100644 --- a/src/hooks/useFullyRentedAPR.ts +++ b/src/hooks/useFullyRentedAPR.ts @@ -11,8 +11,16 @@ import { } from 'src/types/RentCalculation' const fullyRentedAPREstimation = (token: UserRealtoken) => { - // Case of fully rented property + // VEFA + if (token.shortName === 'Playa Caracol Cottage 10') return 10.77 + else if (token.shortName === 'Playa Caracol 303300') return 10.69 + else if (token.shortName === 'Playa Caracol 303200') return 10.8 + else if (token.shortName === 'PH Pinoalto A002') return 10.11 + else if (token.shortName === 'PH Pinoalto A003') return 10.11 + else if (token.shortName === 'Vervana T1 ') return 11.33 + if (token.rentedUnits === token.totalUnits) { + // Case of fully rented property return token.annualPercentageYield } From 62a9fe2c2eb2236a599f456e65b9f2e46ec36f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nandy=20B=C3=A2?= Date: Tue, 27 Aug 2024 00:26:49 +0900 Subject: [PATCH 2/3] refactore: improve comment --- src/hooks/useFullyRentedAPR.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useFullyRentedAPR.ts b/src/hooks/useFullyRentedAPR.ts index a653e9a..f81cf95 100644 --- a/src/hooks/useFullyRentedAPR.ts +++ b/src/hooks/useFullyRentedAPR.ts @@ -11,7 +11,7 @@ import { } from 'src/types/RentCalculation' const fullyRentedAPREstimation = (token: UserRealtoken) => { - // VEFA + // VEFA properties if (token.shortName === 'Playa Caracol Cottage 10') return 10.77 else if (token.shortName === 'Playa Caracol 303300') return 10.69 else if (token.shortName === 'Playa Caracol 303200') return 10.8 From 3a833bf937f6b6105f19bf226bd57f2c290e86aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nandy=20B=C3=A2?= Date: Tue, 27 Aug 2024 00:42:11 +0900 Subject: [PATCH 3/3] feat: show VEFA properties forced fully rented APR only if property do not have tenants --- src/hooks/useFullyRentedAPR.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/hooks/useFullyRentedAPR.ts b/src/hooks/useFullyRentedAPR.ts index f81cf95..33f59da 100644 --- a/src/hooks/useFullyRentedAPR.ts +++ b/src/hooks/useFullyRentedAPR.ts @@ -12,12 +12,17 @@ import { const fullyRentedAPREstimation = (token: UserRealtoken) => { // VEFA properties - if (token.shortName === 'Playa Caracol Cottage 10') return 10.77 - else if (token.shortName === 'Playa Caracol 303300') return 10.69 - else if (token.shortName === 'Playa Caracol 303200') return 10.8 - else if (token.shortName === 'PH Pinoalto A002') return 10.11 - else if (token.shortName === 'PH Pinoalto A003') return 10.11 - else if (token.shortName === 'Vervana T1 ') return 11.33 + if (token.shortName === 'Playa Caracol Cottage 10' && !token.hasTenants) + return 10.77 + else if (token.shortName === 'Playa Caracol 303300' && !token.hasTenants) + return 10.69 + else if (token.shortName === 'Playa Caracol 303200' && !token.hasTenants) + return 10.8 + else if (token.shortName === 'PH Pinoalto A002' && !token.hasTenants) + return 10.11 + else if (token.shortName === 'PH Pinoalto A003' && !token.hasTenants) + return 10.11 + else if (token.shortName === 'Vervana T1 ' && !token.hasTenants) return 11.33 if (token.rentedUnits === token.totalUnits) { // Case of fully rented property