@homefile/components-v2 2.40.6 → 2.40.8
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,7 +1,7 @@
|
|
|
1
1
|
import { Fire, Fridge, GearTime, House, LargeAppliances, Patio, Target, Temperature, Water, } from '../../assets/images';
|
|
2
2
|
export const homeAssistantSteps = [
|
|
3
3
|
{
|
|
4
|
-
title: '
|
|
4
|
+
title: 'Pains',
|
|
5
5
|
icon: Target,
|
|
6
6
|
},
|
|
7
7
|
{
|
|
@@ -27,7 +27,7 @@ export const homeAssistantSteps = [
|
|
|
27
27
|
];
|
|
28
28
|
export const homeAssistantWizardSteps = [
|
|
29
29
|
{
|
|
30
|
-
title: '
|
|
30
|
+
title: 'Pains',
|
|
31
31
|
icon: Target,
|
|
32
32
|
},
|
|
33
33
|
{
|
|
@@ -4,7 +4,8 @@ import { firstHomeProxy, addressProxy } from '../../proxies';
|
|
|
4
4
|
import { useAddressStored } from '../../hooks';
|
|
5
5
|
import { useRadioGroup } from '@chakra-ui/react';
|
|
6
6
|
export const useAddHouseContent = (values, callback) => {
|
|
7
|
-
|
|
7
|
+
// removing below and moving to when they are needed so no stale proxy
|
|
8
|
+
// const { fields, validations } = addressProxy
|
|
8
9
|
const firstHome = firstHomeProxy;
|
|
9
10
|
const { handleValidation } = useAddressStored({});
|
|
10
11
|
const handleNameChange = (event) => {
|
|
@@ -22,6 +23,7 @@ export const useAddHouseContent = (values, callback) => {
|
|
|
22
23
|
return '';
|
|
23
24
|
};
|
|
24
25
|
const cleanStores = () => {
|
|
26
|
+
const { fields } = addressProxy;
|
|
25
27
|
const addressKeys = Object.keys(fields);
|
|
26
28
|
addressKeys.forEach((key) => (fields[key] = ''));
|
|
27
29
|
firstHome.name = '';
|
|
@@ -30,12 +32,14 @@ export const useAddHouseContent = (values, callback) => {
|
|
|
30
32
|
firstHome.searchRecords = true;
|
|
31
33
|
};
|
|
32
34
|
const resetValidations = () => {
|
|
35
|
+
const { validations } = addressProxy;
|
|
33
36
|
const keys = Object.keys(validations);
|
|
34
37
|
keys.forEach((key) => (validations[key] = true));
|
|
35
38
|
firstHome.isNameValid = true;
|
|
36
39
|
};
|
|
37
40
|
const fullfillStores = (values) => {
|
|
38
41
|
var _a;
|
|
42
|
+
const { fields } = addressProxy;
|
|
39
43
|
if (values) {
|
|
40
44
|
const addressKeys = Object.keys(values).filter((key) => key !== 'name');
|
|
41
45
|
addressKeys.forEach((key) => { var _a, _b; return (fields[key] = (_b = (_a = values[key]) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''); });
|
|
@@ -44,6 +48,7 @@ export const useAddHouseContent = (values, callback) => {
|
|
|
44
48
|
}
|
|
45
49
|
};
|
|
46
50
|
const handleSubmit = () => {
|
|
51
|
+
const { fields, validations } = addressProxy;
|
|
47
52
|
if (!firstHome.name)
|
|
48
53
|
firstHome.isNameValid = false;
|
|
49
54
|
handleValidation('city');
|