@homefile/components-v2 2.36.23 → 2.36.25

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
- import { useState } from 'react';
3
+ import { useEffect, useState } from 'react';
4
4
  import { Box, Button, Stack, Text } from '@chakra-ui/react';
5
5
  import { MyHomesStepBody, MyHomesStepWrapper, PropertyCards, } from '../../../components';
6
6
  export const ConfirmProperty = ({ handleAddress = () => { }, isFirstHome, isLoading, properties = [], isWizard = false, }) => {
@@ -18,6 +18,11 @@ export const ConfirmProperty = ({ handleAddress = () => { }, isFirstHome, isLoad
18
18
  },
19
19
  },
20
20
  ];
21
+ useEffect(() => {
22
+ if ((properties === null || properties === void 0 ? void 0 : properties.length) > 0) {
23
+ setCurrentProperty(properties[0].id);
24
+ }
25
+ }, [properties]);
21
26
  if (isWizard) {
22
27
  return (_jsxs(Stack, { children: [_jsxs(Stack, { align: "center", borderRadius: "sm", w: "100%", py: "4", children: [_jsx(PropertyCards, { properties: propertiesWithNoneOfTheAbove, currentProperty: currentProperty, onChange: setCurrentProperty }), _jsx(Box, { px: "6", children: _jsx(Text, { variant: "home", textAlign: "center", children: footerText }) })] }), _jsx(Button, { onClick: () => handleAddress === null || handleAddress === void 0 ? void 0 : handleAddress(currentProperty), disabled: isLoading, children: t('buttons.continue') })] }));
23
28
  }
@@ -6,6 +6,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
6
6
  id: 'lender',
7
7
  name: t('propertyTiles.placeholders.lender'),
8
8
  value: lenderName,
9
+ label: t('propertyTiles.placeholders.lender'),
9
10
  type: 'text',
10
11
  visible: true,
11
12
  },
@@ -13,6 +14,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
13
14
  icon: 'price',
14
15
  id: 'purchase-price',
15
16
  name: t('propertyTiles.placeholders.purchasePrice'),
17
+ label: t('propertyTiles.placeholders.purchasePrice'),
16
18
  value: purchasePrice,
17
19
  type: 'currency',
18
20
  visible: true,
@@ -21,6 +23,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
21
23
  id: 'group-1',
22
24
  value: '',
23
25
  name: t('propertyTiles.placeholders.loan'),
26
+ label: t('propertyTiles.placeholders.loan'),
24
27
  type: 'group',
25
28
  visible: true,
26
29
  children: [
@@ -28,6 +31,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
28
31
  icon: 'billing',
29
32
  id: 'group-1-loan',
30
33
  name: t('propertyTiles.placeholders.loan'),
34
+ label: t('propertyTiles.placeholders.loan'),
31
35
  value: amount,
32
36
  type: 'currency',
33
37
  visible: true,
@@ -41,12 +45,14 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
41
45
  id: 'group-1-grid-origination',
42
46
  value: formatISODate(documentDate),
43
47
  description: t('propertyTiles.placeholders.origination'),
48
+ label: t('propertyTiles.placeholders.origination'),
44
49
  type: 'date',
45
50
  visible: true,
46
51
  },
47
52
  {
48
53
  id: 'group-1-grid-interest',
49
54
  name: t('propertyTiles.placeholders.interest'),
55
+ label: t('propertyTiles.placeholders.interest'),
50
56
  value: interestRate,
51
57
  type: 'number',
52
58
  visible: true,
@@ -54,6 +60,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
54
60
  {
55
61
  id: 'group-1-grid-interest-type',
56
62
  name: t('propertyTiles.placeholders.interestType'),
63
+ label: t('propertyTiles.placeholders.interestType'),
57
64
  value: interestRateType,
58
65
  type: 'text',
59
66
  visible: true,
@@ -66,12 +73,14 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
66
73
  {
67
74
  id: 'payment-grid',
68
75
  name: t('propertyTiles.placeholders.payment'),
76
+ label: t('propertyTiles.placeholders.payment'),
69
77
  value: '',
70
78
  type: 'grid',
71
79
  children: [
72
80
  {
73
81
  id: 'payment-grid-mortgage-payment',
74
82
  name: t('propertyTiles.placeholders.payment'),
83
+ label: "Amt",
75
84
  value: estimatedMortgagePayment,
76
85
  type: 'currency',
77
86
  visible: true,
@@ -80,6 +89,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
80
89
  {
81
90
  id: 'payment-grid-maturity-date',
82
91
  description: t('propertyTiles.placeholders.maturityDate'),
92
+ label: t('propertyTiles.placeholders.maturityDate'),
83
93
  value: formatISODate(maturityDate),
84
94
  type: 'date',
85
95
  visible: true,
@@ -90,6 +100,7 @@ export const mortgageInfoForm = ({ amount = 0, documentDate = '', maturityDate =
90
100
  {
91
101
  id: 'balance',
92
102
  name: t('propertyTiles.placeholders.balance'),
103
+ label: t('propertyTiles.placeholders.balance'),
93
104
  value: estimatedMortgageBalance,
94
105
  type: 'currency',
95
106
  visible: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.36.23",
3
+ "version": "2.36.25",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",