@meetelise/chat 1.43.5 → 1.43.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/addon-table.d.ts +4 -4
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/index.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.d.ts +3 -2
- package/dist/src/WebComponent/FeeCalculator/components/charge-inputs/charge-inputs.d.ts +27 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +12 -12
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +1 -1
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/grouped-rentable-item.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +6 -5
- package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +1 -1
- package/dist/src/WebComponent/FeeCalculator/model/fee-quote.d.ts +3 -4
- package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +1 -4
- package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +1 -3
- package/dist/src/WebComponent/FeeCalculator/model/marketable-fee-new.d.ts +75 -0
- package/dist/src/WebComponent/FeeCalculator/model/marketable-fee.d.ts +79 -0
- package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +1 -15
- package/dist/src/WebComponent/FeeCalculator/model/pricing-metadata.d.ts +1 -9
- package/dist/src/WebComponent/FeeCalculator/model/quote.d.ts +16 -2
- package/dist/src/disclaimers.d.ts +2 -1
- package/dist/src/services/fees/calculateQuote.d.ts +13 -3
- package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +2 -2
- package/package.json +1 -1
- package/public/dist/index.js +571 -462
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/addon-table.ts +28 -59
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/index.ts +0 -1
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.ts +7 -10
- package/src/WebComponent/FeeCalculator/components/charge-inputs/charge-inputs.ts +351 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +26 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +120 -86
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +19 -14
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +23 -12
- package/src/WebComponent/FeeCalculator/components/fee-item/grouped-rentable-item.ts +3 -13
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +1 -1
- package/src/WebComponent/FeeCalculator/components/index.ts +1 -0
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +57 -64
- package/src/WebComponent/FeeCalculator/model/desired-addon.ts +1 -1
- package/src/WebComponent/FeeCalculator/model/fee-quote.ts +3 -4
- package/src/WebComponent/FeeCalculator/model/index.ts +1 -4
- package/src/WebComponent/FeeCalculator/model/item-combination.ts +2 -12
- package/src/WebComponent/FeeCalculator/model/marketable-fee-new.ts +81 -0
- package/src/WebComponent/FeeCalculator/model/marketable-fee.ts +124 -0
- package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +3 -39
- package/src/WebComponent/FeeCalculator/model/pricing-metadata.ts +2 -10
- package/src/WebComponent/FeeCalculator/model/quote.ts +16 -2
- package/src/WebComponent/Scheduler/tour-scheduler.ts +3 -0
- package/src/WebComponent/actions/email-us-window.ts +1 -0
- package/src/disclaimers.ts +17 -13
- package/src/services/fees/calculateQuote.ts +17 -8
- package/src/services/fees/downloadQuotePdf.ts +6 -8
- package/src/services/fees/fetchBuildingFeesV2.ts +10 -6
- package/src/utils.ts +1 -1
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector-styles.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector.d.ts +0 -23
- package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +0 -42
- package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +0 -10
- package/dist/src/WebComponent/FeeCalculator/model/pricing-type.d.ts +0 -10
- package/dist/src/services/fees/downloadQuotePdf.d.ts +0 -12
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector-styles.ts +0 -82
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector.ts +0 -203
- package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +0 -105
- package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +0 -11
- package/src/WebComponent/FeeCalculator/model/pricing-type.ts +0 -11
package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts
CHANGED
|
@@ -3,21 +3,23 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
3
3
|
import { ALL_LAYOUTS_OPTION } from "../../constants";
|
|
4
4
|
import feeCalculatorLayoutStyles from "./fee-calculator-layout-styles";
|
|
5
5
|
import { LayoutOption } from "../../../../fetchBuildingWebchatView";
|
|
6
|
-
import { DesiredAddon, DesiredRentableItem } from "../../model";
|
|
7
6
|
import { Unit } from "../../../../services/fees/fetchBuildingUnits";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "../../model";
|
|
8
|
+
MarketableFee,
|
|
9
|
+
MarketableFeeFrequency,
|
|
10
|
+
} from "../../model/marketable-fee";
|
|
11
|
+
import { RentableItemSummary } from "../../model";
|
|
13
12
|
import { Quote } from "../../model/quote";
|
|
14
13
|
import { FeeQuote } from "../../model/fee-quote";
|
|
15
|
-
import { FeeFrequency,
|
|
14
|
+
import { FeeFrequency, MarketableFeeNew } from "../../model/marketable-fee-new";
|
|
16
15
|
import { AmountRange } from "../../model/amount-range";
|
|
16
|
+
import { ChargeInputs } from "../../../../services/fees/calculateQuote";
|
|
17
|
+
import { DesiredRentableItem } from "../../model/desired-rentable-item";
|
|
18
|
+
import { formatCurrency } from "../../../../utils";
|
|
17
19
|
|
|
18
20
|
import "../floor-plan-selector/floor-plan-selector";
|
|
19
21
|
import "../fee-card/fee-card";
|
|
20
|
-
import "../
|
|
22
|
+
import "../charge-inputs/charge-inputs";
|
|
21
23
|
import "../../../loaders/skeleton-loader";
|
|
22
24
|
import "../../../loaders/mega-loader";
|
|
23
25
|
|
|
@@ -44,12 +46,15 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
44
46
|
selectedLayoutIds: number[] = [ALL_LAYOUTS_OPTION];
|
|
45
47
|
|
|
46
48
|
@property({ type: Object })
|
|
47
|
-
groupedFees: Record<
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
49
|
+
groupedFees: Record<MarketableFeeFrequency, MarketableFee[]> = {
|
|
50
|
+
[MarketableFeeFrequency.ONE_TIME]: [],
|
|
51
|
+
[MarketableFeeFrequency.MONTHLY]: [],
|
|
52
|
+
[MarketableFeeFrequency.WEEKLY]: [],
|
|
53
|
+
[MarketableFeeFrequency.BI_WEEKLY]: [],
|
|
54
|
+
[MarketableFeeFrequency.ANNUALLY]: [],
|
|
55
|
+
[MarketableFeeFrequency.DAILY]: [],
|
|
56
|
+
[MarketableFeeFrequency.AS_NEEDED]: [],
|
|
57
|
+
[MarketableFeeFrequency.NEVER]: [],
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
@property({ type: Array })
|
|
@@ -73,61 +78,78 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
73
78
|
@property()
|
|
74
79
|
onLeaseTermChange: ((leaseTerm: number) => void) | null = null;
|
|
75
80
|
|
|
76
|
-
@property()
|
|
77
|
-
|
|
81
|
+
@property({ type: Object })
|
|
82
|
+
chargeInputs: ChargeInputs = {
|
|
83
|
+
base_rent: 0,
|
|
84
|
+
num_pets: 0,
|
|
85
|
+
num_vehicles: 0,
|
|
86
|
+
num_applicants: 1,
|
|
87
|
+
};
|
|
78
88
|
|
|
79
|
-
@property(
|
|
80
|
-
|
|
89
|
+
@property()
|
|
90
|
+
onChargeInputsChange: ((newInputs: Partial<ChargeInputs>) => void) | null =
|
|
81
91
|
null;
|
|
82
92
|
|
|
83
|
-
@property({
|
|
84
|
-
|
|
85
|
-
null;
|
|
93
|
+
@property({ type: Array })
|
|
94
|
+
selectedRentableItems: DesiredRentableItem[] = [];
|
|
86
95
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.flat()
|
|
93
|
-
.filter((fee) => fee.isAddon);
|
|
94
|
-
|
|
95
|
-
return [...addons, ...this.rentableItems].sort((a, b) => {
|
|
96
|
-
const aIsRentable = a instanceof RentableItemSummary;
|
|
97
|
-
const bIsRentable = b instanceof RentableItemSummary;
|
|
98
|
-
|
|
99
|
-
if (!aIsRentable && !bIsRentable) return 0;
|
|
100
|
-
|
|
101
|
-
const aAvailable = aIsRentable
|
|
102
|
-
? (a as RentableItemSummary).allItems?.some((item) => item.available) ??
|
|
103
|
-
false
|
|
104
|
-
: true;
|
|
105
|
-
const bAvailable = bIsRentable
|
|
106
|
-
? (b as RentableItemSummary).allItems?.some((item) => item.available) ??
|
|
107
|
-
false
|
|
108
|
-
: true;
|
|
109
|
-
|
|
110
|
-
// Sort unavailable rentable items to the end
|
|
111
|
-
return aAvailable === bAvailable ? 0 : aAvailable ? -1 : 1;
|
|
112
|
-
});
|
|
113
|
-
}
|
|
96
|
+
@property()
|
|
97
|
+
onRentableItemAdd: ((item: DesiredRentableItem) => void) | null = null;
|
|
98
|
+
|
|
99
|
+
@property()
|
|
100
|
+
onRentableItemRemove: ((item: DesiredRentableItem) => void) | null = null;
|
|
114
101
|
|
|
115
102
|
get rentAsFeeQuote(): FeeQuote | null {
|
|
116
103
|
if (!this.quote?.rentCost) return null;
|
|
117
104
|
|
|
118
105
|
return {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
marketableFee: {
|
|
107
|
+
id: "rent",
|
|
108
|
+
buildingId: this.quote.buildingId || 0,
|
|
109
|
+
feeName: "Rent",
|
|
110
|
+
amount: this.quote.rentCost,
|
|
111
|
+
amountDisplay: formatCurrency(this.quote.rentCost, 2),
|
|
112
|
+
minEstimate: null,
|
|
113
|
+
maxEstimate: null,
|
|
114
|
+
percentRentMin: null,
|
|
115
|
+
percentRentMax: null,
|
|
116
|
+
percentRent: null,
|
|
122
117
|
frequency: FeeFrequency.MONTHLY,
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
category: "Rent",
|
|
119
|
+
hiddenReason: null,
|
|
120
|
+
description: `Unit ${this.selectedUnit?.unitNumber}`,
|
|
121
|
+
additionalInfo: null,
|
|
122
|
+
refundable: false,
|
|
123
|
+
unitIds: null,
|
|
124
|
+
layoutIds: null,
|
|
125
|
+
startDate: null,
|
|
126
|
+
endDate: null,
|
|
127
|
+
triggeredByEvent: null,
|
|
128
|
+
externalKey: null,
|
|
129
|
+
chargeCode: null,
|
|
130
|
+
bundleKey: null,
|
|
131
|
+
source: null,
|
|
132
|
+
publicFacing: true,
|
|
133
|
+
perApplicant: false,
|
|
134
|
+
prorated: null,
|
|
135
|
+
syncActive: true,
|
|
136
|
+
} as MarketableFeeNew,
|
|
125
137
|
amountRange: {
|
|
126
138
|
fixedValue: this.quote.rentCost,
|
|
127
139
|
minValue: null,
|
|
128
140
|
maxValue: null,
|
|
129
141
|
} as AmountRange,
|
|
130
|
-
|
|
142
|
+
chargeInputs: {
|
|
143
|
+
baseRent: this.quote.rentCost,
|
|
144
|
+
numPets: 0,
|
|
145
|
+
numDogs: 0,
|
|
146
|
+
numCats: 0,
|
|
147
|
+
numOtherPets: 0,
|
|
148
|
+
numVehicles: 0,
|
|
149
|
+
numApplicants: 1,
|
|
150
|
+
unitId: this.quote.unitId,
|
|
151
|
+
layoutId: null,
|
|
152
|
+
},
|
|
131
153
|
isAddon: false,
|
|
132
154
|
} as FeeQuote;
|
|
133
155
|
}
|
|
@@ -149,7 +171,7 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
149
171
|
{ freq: FeeFrequency.BI_WEEKLY, title: "Bi-Weekly Charges" },
|
|
150
172
|
{ freq: FeeFrequency.WEEKLY, title: "Weekly Charges" },
|
|
151
173
|
{ freq: FeeFrequency.DAILY, title: "Daily Charges" },
|
|
152
|
-
{ freq: FeeFrequency.ONE_TIME, title: "
|
|
174
|
+
{ freq: FeeFrequency.ONE_TIME, title: "One-Time" },
|
|
153
175
|
{ freq: FeeFrequency.NEVER, title: "No Charges" },
|
|
154
176
|
];
|
|
155
177
|
|
|
@@ -160,7 +182,21 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
160
182
|
|
|
161
183
|
let feesByFreq =
|
|
162
184
|
feeQuotes?.filter((fq) => {
|
|
163
|
-
if (fq.
|
|
185
|
+
if (fq.marketableFee?.frequency === freq) {
|
|
186
|
+
// For ONE_TIME fees, only show if they have specific triggered_by_event values
|
|
187
|
+
if (freq === FeeFrequency.ONE_TIME) {
|
|
188
|
+
const allowedEvents = [
|
|
189
|
+
"APPLICATION_SUBMISSION",
|
|
190
|
+
"APPLICATION_APPROVAL",
|
|
191
|
+
"LEASE_SIGNING",
|
|
192
|
+
"MOVE_IN",
|
|
193
|
+
];
|
|
194
|
+
return allowedEvents.includes(
|
|
195
|
+
fq.marketableFee?.triggeredByEvent || ""
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
164
200
|
|
|
165
201
|
if (fq.sourceRentableItem) {
|
|
166
202
|
return (
|
|
@@ -189,6 +225,22 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
189
225
|
return sections;
|
|
190
226
|
}
|
|
191
227
|
|
|
228
|
+
renderTotalCost(): TemplateResult | null {
|
|
229
|
+
if (!this.quote?.totalMonthlyCost) return null;
|
|
230
|
+
|
|
231
|
+
const totalCost = this.quote.totalMonthlyCost.fixedValue;
|
|
232
|
+
if (!totalCost) return null;
|
|
233
|
+
|
|
234
|
+
return html`
|
|
235
|
+
<div class="total-cost-section">
|
|
236
|
+
<div class="total-cost-row">
|
|
237
|
+
<span class="total-cost-label">Total Monthly Cost:</span>
|
|
238
|
+
<span class="total-cost-amount">${formatCurrency(totalCost, 2)}</span>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
`;
|
|
242
|
+
}
|
|
243
|
+
|
|
192
244
|
renderFeesContent(): TemplateResult {
|
|
193
245
|
if (!this.selectedUnit) {
|
|
194
246
|
return html`
|
|
@@ -209,36 +261,7 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
209
261
|
></skeleton-loader>
|
|
210
262
|
</div>
|
|
211
263
|
`
|
|
212
|
-
: this.renderFeeSections()}
|
|
213
|
-
</div>
|
|
214
|
-
`;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
renderAddOns(): TemplateResult | null {
|
|
218
|
-
if (!this.showSkeletonLoader && !this.addOns.length) return null;
|
|
219
|
-
|
|
220
|
-
// Keep showing loader for addons section only if it's the initial loader
|
|
221
|
-
// otherwise let the parent handle the header loader for recalculations.
|
|
222
|
-
const showAddonLoader = this.showSkeletonLoader && !this.addOns.length;
|
|
223
|
-
|
|
224
|
-
return html`
|
|
225
|
-
<div class="sidepanel-section">
|
|
226
|
-
${showAddonLoader
|
|
227
|
-
? html`
|
|
228
|
-
<h5 class="sidepanel-section-title">Add-Ons</h5>
|
|
229
|
-
<div class="sidepanel-loading-container">
|
|
230
|
-
<mega-loader size="32"></mega-loader>
|
|
231
|
-
</div>
|
|
232
|
-
`
|
|
233
|
-
: html`
|
|
234
|
-
<addon-table
|
|
235
|
-
.addons=${this.addOns}
|
|
236
|
-
.disabled=${!this.selectedUnit}
|
|
237
|
-
.onAddonSelect=${this.onAddonSelect}
|
|
238
|
-
.onRentableItemAdd=${this.onRentableItemAdd}
|
|
239
|
-
.onRentableItemRemove=${this.onRentableItemRemove}
|
|
240
|
-
></addon-table>
|
|
241
|
-
`}
|
|
264
|
+
: html` ${this.renderFeeSections()} ${this.renderTotalCost()} `}
|
|
242
265
|
</div>
|
|
243
266
|
`;
|
|
244
267
|
}
|
|
@@ -261,7 +284,18 @@ export class FeeCalculatorLayout extends LitElement {
|
|
|
261
284
|
.buildingSlug=${this.buildingSlug}
|
|
262
285
|
></floor-plan-selector>
|
|
263
286
|
</div>
|
|
264
|
-
|
|
287
|
+
|
|
288
|
+
<div class="sidepanel-section">
|
|
289
|
+
<charge-inputs
|
|
290
|
+
.chargeInputs=${this.chargeInputs}
|
|
291
|
+
.onChargeInputsChange=${this.onChargeInputsChange}
|
|
292
|
+
.disabled=${!this.selectedUnit}
|
|
293
|
+
.rentableItems=${this.rentableItems}
|
|
294
|
+
.selectedRentableItems=${this.selectedRentableItems}
|
|
295
|
+
.onRentableItemAdd=${this.onRentableItemAdd}
|
|
296
|
+
.onRentableItemRemove=${this.onRentableItemRemove}
|
|
297
|
+
></charge-inputs>
|
|
298
|
+
</div>
|
|
265
299
|
</div>
|
|
266
300
|
|
|
267
301
|
${this.renderFeesContent()}
|
|
@@ -25,7 +25,7 @@ export class FeeCard extends LitElement {
|
|
|
25
25
|
(acc, fee) => acc + (fee.amountRange.fixedValue ?? 0),
|
|
26
26
|
0
|
|
27
27
|
);
|
|
28
|
-
return formatCurrency(total);
|
|
28
|
+
return formatCurrency(total, 2);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
get groupedRentableItems(): Record<string, FeeQuote[]> {
|
|
@@ -67,19 +67,24 @@ export class FeeCard extends LitElement {
|
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
69
|
<div class="fee-card-list">
|
|
70
|
-
${this.nonRentableItems
|
|
71
|
-
(item) =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
${this.nonRentableItems
|
|
71
|
+
.filter((item) => (item.amountRange.fixedValue ?? 0) > 0)
|
|
72
|
+
.map(
|
|
73
|
+
(item) => html`<div class="fee-item-container">
|
|
74
|
+
<fee-item .feeQuote=${item}></fee-item>
|
|
75
|
+
</div>`
|
|
76
|
+
)}
|
|
77
|
+
${Object.entries(this.groupedRentableItems)
|
|
78
|
+
.filter(([, quotes]) =>
|
|
79
|
+
quotes.some((quote) => (quote.amountRange.fixedValue ?? 0) > 0)
|
|
80
|
+
)
|
|
81
|
+
.map(
|
|
82
|
+
([, quotes]) => html`<div class="fee-item-container">
|
|
83
|
+
<grouped-rentable-item
|
|
84
|
+
.feeQuotes=${quotes}
|
|
85
|
+
></grouped-rentable-item>
|
|
86
|
+
</div>`
|
|
87
|
+
)}
|
|
83
88
|
</div>
|
|
84
89
|
|
|
85
90
|
<div class="footer-container">
|
|
@@ -18,8 +18,10 @@ export class FeeItemComponent extends LitElement {
|
|
|
18
18
|
this.feeQuote.sourceRentableItem.description || ""
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
return
|
|
21
|
+
const marketableFee = this.feeQuote?.marketableFee;
|
|
22
|
+
return marketableFee?.feeName
|
|
23
|
+
? sentenceTitleCase(marketableFee.feeName)
|
|
24
|
+
: "";
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
get description(): string {
|
|
@@ -27,21 +29,28 @@ export class FeeItemComponent extends LitElement {
|
|
|
27
29
|
const item = this.feeQuote.sourceRentableItem;
|
|
28
30
|
return `${item.id}`;
|
|
29
31
|
}
|
|
30
|
-
return this.feeQuote?.
|
|
32
|
+
return this.feeQuote?.marketableFee?.description ?? "";
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
get
|
|
34
|
-
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
get triggeredEvent(): string {
|
|
36
|
+
const event = this.feeQuote?.marketableFee?.triggeredByEvent;
|
|
37
|
+
if (!event) return "";
|
|
38
|
+
|
|
39
|
+
const eventLabels: Record<string, string> = {
|
|
40
|
+
APPLICATION_SUBMISSION: "Due at Application Submission",
|
|
41
|
+
APPLICATION_APPROVAL: "Due at Application Approval",
|
|
42
|
+
LEASE_SIGNING: "Due at Lease Signing",
|
|
43
|
+
MOVE_IN: "Due at Move-In",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return eventLabels[event] || event;
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
get amount(): string | null {
|
|
41
50
|
if (!this.feeQuote) return null;
|
|
42
51
|
const amt = this.feeQuote.amountRange.fixedValue ?? 0;
|
|
43
52
|
if (amt === 0) return null;
|
|
44
|
-
return formatCurrency(amt);
|
|
53
|
+
return formatCurrency(amt, 2);
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
render(): TemplateResult {
|
|
@@ -51,11 +60,13 @@ export class FeeItemComponent extends LitElement {
|
|
|
51
60
|
return html`
|
|
52
61
|
<div class="fee-item">
|
|
53
62
|
<div class="fee-info">
|
|
54
|
-
${this.isRequired
|
|
55
|
-
? html`<div class="required-label">Required</div>`
|
|
56
|
-
: ""}
|
|
57
63
|
<div class="fee-name">${this.name}</div>
|
|
58
64
|
<div class="fee-description">${this.description}</div>
|
|
65
|
+
${this.triggeredEvent
|
|
66
|
+
? html`<div class="fee-triggered-event">
|
|
67
|
+
${this.triggeredEvent}
|
|
68
|
+
</div>`
|
|
69
|
+
: ""}
|
|
59
70
|
</div>
|
|
60
71
|
<div class="fee-amount">${this.amount}</div>
|
|
61
72
|
</div>
|
|
@@ -45,14 +45,7 @@ export class GroupedRentableItemComponent extends LitElement {
|
|
|
45
45
|
(acc, quote) => acc + (quote.amountRange.fixedValue ?? 0),
|
|
46
46
|
0
|
|
47
47
|
);
|
|
48
|
-
return formatCurrency(total);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get isRequired(): boolean {
|
|
52
|
-
return this.feeQuotes.some(
|
|
53
|
-
(quote) =>
|
|
54
|
-
quote.sourceFee?.pricingMetadata?.pricingCategory === "MANDATORY"
|
|
55
|
-
);
|
|
48
|
+
return formatCurrency(total, 2);
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
get priceBreakdown(): string {
|
|
@@ -67,7 +60,7 @@ export class GroupedRentableItemComponent extends LitElement {
|
|
|
67
60
|
`${group.count} ${pluralize(
|
|
68
61
|
unitName,
|
|
69
62
|
group.count
|
|
70
|
-
)} @ ${formatCurrency(group.price)}/month`
|
|
63
|
+
)} @ ${formatCurrency(group.price, 2)}/month`
|
|
71
64
|
)
|
|
72
65
|
.join(" + ");
|
|
73
66
|
}
|
|
@@ -79,16 +72,13 @@ export class GroupedRentableItemComponent extends LitElement {
|
|
|
79
72
|
}
|
|
80
73
|
|
|
81
74
|
render(): TemplateResult {
|
|
82
|
-
if (!this.feeQuotes.length || this.totalAmount === formatCurrency(0)) {
|
|
75
|
+
if (!this.feeQuotes.length || this.totalAmount === formatCurrency(0, 2)) {
|
|
83
76
|
return html``;
|
|
84
77
|
}
|
|
85
78
|
|
|
86
79
|
return html`
|
|
87
80
|
<div class="fee-item">
|
|
88
81
|
<div class="fee-info">
|
|
89
|
-
${this.isRequired
|
|
90
|
-
? html`<div class="required-label">Required</div>`
|
|
91
|
-
: ""}
|
|
92
82
|
<div class="fee-name">${this.itemType}</div>
|
|
93
83
|
<div class="fee-description">${this.priceBreakdown}</div>
|
|
94
84
|
</div>
|
package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts
CHANGED
|
@@ -151,7 +151,7 @@ export class FloorPlanSelector extends LitElement {
|
|
|
151
151
|
return html`
|
|
152
152
|
<div class="unit-selection">
|
|
153
153
|
<div class="image-carousel">
|
|
154
|
-
${this.units?.length === 0
|
|
154
|
+
${!this.isLoading && this.units?.length === 0
|
|
155
155
|
? html`
|
|
156
156
|
<div class="no-floorplans-container">
|
|
157
157
|
<p>No floorplans found</p>
|