@eohjsc/react-native-smart-city 0.7.3-rc11 → 0.7.3-rc13
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/package.json +1 -1
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
- package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
- package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/TimerActionTemplate.js +6 -3
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/ButtonPopup/index.js +2 -2
- package/src/commons/DateTimeRangeChange/DateTimeButton.js +2 -2
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
- package/src/commons/Device/FlatListItems.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
- package/src/commons/Device/ItemAddNew/index.js +2 -2
- package/src/commons/Device/ItemDevice.js +2 -2
- package/src/commons/Device/SonosSpeaker/index.js +3 -3
- package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
- package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +6 -2
- package/src/commons/DisplayChecking/index.js +2 -2
- package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
- package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
- package/src/commons/Header/HeaderCustom.js +2 -2
- package/src/commons/HeaderAni/index.js +2 -2
- package/src/commons/NavBar/index.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/SearchLocation/index.js +3 -3
- package/src/commons/SelectActionCard/index.js +2 -2
- package/src/commons/SelectSubUnit/index.js +6 -2
- package/src/commons/Sharing/BtnRemoveMember.js +2 -2
- package/src/commons/Sharing/StationDevicePermissions.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +2 -2
- package/src/commons/Unit/HeaderUnit/index.js +3 -3
- package/src/commons/Unit/SharedUnit.js +7 -7
- package/src/configs/Theme.js +1 -1
- package/src/navigations/EmergencyContactsStack.js +2 -2
- package/src/navigations/SharedStack.js +2 -0
- package/src/navigations/UnitStack.js +2 -2
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddLocationMaps/index.js +3 -3
- package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
- package/src/screens/Automate/AddNewAction/ChooseAction.js +17 -3
- package/src/screens/Automate/AddNewAction/ChooseConfig.js +7 -6
- package/src/screens/Automate/AddNewAction/NewActionWrapper.js +2 -2
- package/src/screens/Automate/AddNewAction/SelectControlDevices.js +27 -17
- package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +7 -2
- package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
- package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +29 -0
- package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +7 -7
- package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
- package/src/screens/Automate/ScriptDetail/__test__/index.test.js +2 -0
- package/src/screens/Automate/ScriptDetail/index.js +3 -3
- package/src/screens/Automate/Styles/indexStyles.js +1 -1
- package/src/screens/Automate/index.js +36 -33
- package/src/screens/Device/EditDevice/index.js +2 -2
- package/src/screens/Device/__test__/detail.test.js +3 -3
- package/src/screens/Device/detail.js +7 -7
- package/src/screens/Drawer/index.js +3 -3
- package/src/screens/EmergencyContacts/EmergencyContactsList.js +8 -4
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
- package/src/screens/GuestInfo/index.js +2 -2
- package/src/screens/HanetCamera/ManageAccess.js +3 -3
- package/src/screens/HanetCamera/MemberInfo.js +2 -2
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
- package/src/screens/ManageAccess/index.js +3 -3
- package/src/screens/Notification/index.js +3 -3
- package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
- package/src/screens/SelectUnit/index.js +3 -3
- package/src/screens/SharedUnit/TabHeader.js +2 -2
- package/src/screens/Sharing/Components/EndDevice.js +3 -3
- package/src/screens/Sharing/UnitMemberList.js +2 -2
- package/src/screens/SmartAccount/SuccessfullyConnected/index.js +2 -2
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +3 -2
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +2 -2
- package/src/screens/SmartIr/components/SelectBrand.js +2 -2
- package/src/screens/SubUnit/EditSubUnit.js +2 -2
- package/src/screens/SubUnit/ManageSubUnit.js +3 -3
- package/src/screens/Unit/SelectAddToFavorites.js +2 -2
- package/src/screens/Unit/SelectAddress.js +3 -3
- package/src/screens/Unit/components/AutomateScript/index.js +2 -2
- package/src/screens/Unit/components/ButtonWrapper/index.js +3 -3
- package/src/screens/Unit/components/Header/index.js +2 -2
- package/src/screens/Unit/components/SharedUnit/index.js +5 -5
- package/src/screens/UnitSummary/components/AirQuality/index.js +2 -2
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +2 -2
- package/src/screens/UnitSummary/index.js +3 -3
- package/src/utils/I18n/translations/vi.js +2 -0
|
@@ -2,7 +2,7 @@ import React, { useCallback, useRef } from 'react';
|
|
|
2
2
|
import { View, Text, TouchableOpacity, Image } from 'react-native';
|
|
3
3
|
import Images from '../../configs/Images';
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
7
7
|
import { useNavigation } from '@react-navigation/native';
|
|
8
8
|
import styles from './Styles/HeaderCustomStyles';
|
|
@@ -111,7 +111,7 @@ const HeaderCustom = ({
|
|
|
111
111
|
{isShowClose && (
|
|
112
112
|
<TouchableOpacity onPress={handleClose}>
|
|
113
113
|
<View style={styles.buttonAdd}>
|
|
114
|
-
<
|
|
114
|
+
<IconOutline name={'close'} size={24} color={Colors.Black} />
|
|
115
115
|
</View>
|
|
116
116
|
</TouchableOpacity>
|
|
117
117
|
)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
3
3
|
import { TouchableOpacity, StyleSheet, Animated, View } from 'react-native';
|
|
4
4
|
import { useNavigation } from '@react-navigation/native';
|
|
5
5
|
import { getStatusBarHeight } from 'react-native-iphone-x-helper';
|
|
@@ -95,7 +95,7 @@ const HeaderAni = memo(
|
|
|
95
95
|
accessibilityLabel={AccessibilityLabel.ICON_BACK}
|
|
96
96
|
>
|
|
97
97
|
<View style={styles.btnBack}>
|
|
98
|
-
<
|
|
98
|
+
<IconOutline name={'left'} size={27} color={Colors.Gray9} />
|
|
99
99
|
</View>
|
|
100
100
|
</TouchableOpacity>
|
|
101
101
|
<View styles={styles.wrapRightComponent}>{rightComponent}</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
3
3
|
import { View, TouchableOpacity } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import styles from './NavBarStyles';
|
|
@@ -40,7 +40,7 @@ const NavBar = ({
|
|
|
40
40
|
ref={refMenuAction}
|
|
41
41
|
accessibilityLabel={idLabelIconBars}
|
|
42
42
|
>
|
|
43
|
-
<
|
|
43
|
+
<IconOutline name={'bars'} size={19} color={Colors.Black} />
|
|
44
44
|
</TouchableOpacity>
|
|
45
45
|
</View>
|
|
46
46
|
<MenuActionMore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
|
|
5
5
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
6
6
|
import styles from './NumberUpDownActionTemplateStyles';
|
|
@@ -118,7 +118,7 @@ const NumberUpDownActionTemplate = ({ device, item = {}, onSelectAction }) => {
|
|
|
118
118
|
AccessibilityLabel.NUMBER_UP_DOWN_ACTION_DOWN
|
|
119
119
|
}
|
|
120
120
|
>
|
|
121
|
-
<
|
|
121
|
+
<IconOutline name="down" size={32} color={Colors.Primary} />
|
|
122
122
|
</TouchableOpacity>
|
|
123
123
|
<Text
|
|
124
124
|
type="H2"
|
|
@@ -134,7 +134,7 @@ const NumberUpDownActionTemplate = ({ device, item = {}, onSelectAction }) => {
|
|
|
134
134
|
onPress={onPressUp}
|
|
135
135
|
accessibilityLabel={AccessibilityLabel.NUMBER_UP_DOWN_ACTION_UP}
|
|
136
136
|
>
|
|
137
|
-
<
|
|
137
|
+
<IconOutline name="up" size={32} color={Colors.Primary} />
|
|
138
138
|
</TouchableOpacity>
|
|
139
139
|
</View>
|
|
140
140
|
<View style={styles.wrapButton}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, TextInput } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
|
|
6
6
|
import { Colors } from '../../configs';
|
|
@@ -10,8 +10,8 @@ const SearchBarLocation = memo(({ input, onTextInput }) => {
|
|
|
10
10
|
const t = useTranslations();
|
|
11
11
|
return (
|
|
12
12
|
<View style={styles.container}>
|
|
13
|
-
<
|
|
14
|
-
name="
|
|
13
|
+
<IconOutline
|
|
14
|
+
name="search"
|
|
15
15
|
size={24}
|
|
16
16
|
color={Colors.Gray6}
|
|
17
17
|
accessibilityLabel="icon-search"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
|
|
5
5
|
import { Card } from '../CardShadow';
|
|
6
6
|
import Text from '../Text';
|
|
@@ -20,7 +20,7 @@ const SelectActionCard = memo(({ title, action, onPress }) => {
|
|
|
20
20
|
{action}
|
|
21
21
|
</Text>
|
|
22
22
|
</View>
|
|
23
|
-
<
|
|
23
|
+
<IconOutline name="right" size={20} />
|
|
24
24
|
</View>
|
|
25
25
|
</TouchableOpacity>
|
|
26
26
|
</Card>
|
|
@@ -2,7 +2,7 @@ import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
2
2
|
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
|
3
3
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
4
4
|
import { ScrollView, TouchableOpacity, View } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
|
|
7
7
|
import { API, Colors } from '../../configs';
|
|
8
8
|
import { RadioCircle, Section, ViewButtonBottom } from '../../commons';
|
|
@@ -98,7 +98,11 @@ const SelectSubUnit = ({ unitId, title, subTitle, onPressNext, route }) => {
|
|
|
98
98
|
/>
|
|
99
99
|
))}
|
|
100
100
|
<TouchableOpacity style={styles.rowContainer} onPress={addSubUnit}>
|
|
101
|
-
<
|
|
101
|
+
<IconOutline
|
|
102
|
+
name="plus-circle"
|
|
103
|
+
size={20}
|
|
104
|
+
color={Colors.Primary}
|
|
105
|
+
/>
|
|
102
106
|
<View style={styles.row}>
|
|
103
107
|
<Text type="H4" color={Colors.Primary}>
|
|
104
108
|
{t('add_new_sub_unit')}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
2
|
import { TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
5
|
|
|
6
6
|
const BtnRemoveMember = memo(({ member, onPressRemove }) => {
|
|
@@ -9,7 +9,7 @@ const BtnRemoveMember = memo(({ member, onPressRemove }) => {
|
|
|
9
9
|
}, [member, onPressRemove]);
|
|
10
10
|
return (
|
|
11
11
|
<TouchableOpacity style={styles.buttonRemove} onPress={onPress}>
|
|
12
|
-
<
|
|
12
|
+
<IconOutline name={'minus'} size={20} color={Colors.Gray8} />
|
|
13
13
|
</TouchableOpacity>
|
|
14
14
|
);
|
|
15
15
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
import { Colors } from '../../configs';
|
|
6
6
|
import Text from '../../commons/Text';
|
|
@@ -86,7 +86,7 @@ const StationDevicePermissions = ({ dataStation, onselectSensor }) => {
|
|
|
86
86
|
<View style={styles.infoContainer}>
|
|
87
87
|
<Text style={styles.text}>{sensor.name}</Text>
|
|
88
88
|
<View style={styles.rightImage}>
|
|
89
|
-
<
|
|
89
|
+
<IconOutline
|
|
90
90
|
name={expandedIndex === index ? 'up' : 'down'}
|
|
91
91
|
size={20}
|
|
92
92
|
color={Colors.Gray6}
|
|
@@ -5,7 +5,7 @@ import Text from '../../../Text';
|
|
|
5
5
|
import LastUpdatedText from '../../../Device/LastUpdatedText';
|
|
6
6
|
import { EvaluationConfigWrapper } from '../EvaluationOverConfig/EvaluationOverConfig';
|
|
7
7
|
import IconComponent from '../../../IconComponent';
|
|
8
|
-
import
|
|
8
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
9
9
|
|
|
10
10
|
const ConfigAndEvaluationDisplay = memo(
|
|
11
11
|
({ device, valueEvaluation, stationItem, configValue }) => {
|
|
@@ -44,7 +44,7 @@ const ConfigAndEvaluationDisplay = memo(
|
|
|
44
44
|
lastUpdated={configValue?.last_updated}
|
|
45
45
|
format={'DDMMYYYY'}
|
|
46
46
|
/>
|
|
47
|
-
<
|
|
47
|
+
<IconOutline style={styles.marginTop10} name="right" size={12} />
|
|
48
48
|
</View>
|
|
49
49
|
)}
|
|
50
50
|
</>
|
|
@@ -5,7 +5,7 @@ import Text from '../../../Text';
|
|
|
5
5
|
import { useConfigGlobalState } from '../../../../iot/states';
|
|
6
6
|
import LastUpdatedText from '../../../Device/LastUpdatedText';
|
|
7
7
|
import IconComponent from '../../../IconComponent';
|
|
8
|
-
import
|
|
8
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
9
9
|
|
|
10
10
|
const ConfigValue = ({ device, stationItem }) => {
|
|
11
11
|
const [configValues] = useConfigGlobalState('configValues');
|
|
@@ -40,7 +40,7 @@ const ConfigValue = ({ device, stationItem }) => {
|
|
|
40
40
|
lastUpdated={configValue?.last_updated}
|
|
41
41
|
format={'DDMMYYYY'}
|
|
42
42
|
/>
|
|
43
|
-
<
|
|
43
|
+
<IconOutline style={styles.marginTop10} name="right" size={12} />
|
|
44
44
|
</View>
|
|
45
45
|
)}
|
|
46
46
|
</View>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from '../../../../screens/Device/hooks/useEvaluateValue';
|
|
10
10
|
import LastUpdatedText from '../../../Device/LastUpdatedText';
|
|
11
11
|
import IconComponent from '../../../IconComponent';
|
|
12
|
-
import
|
|
12
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
13
13
|
|
|
14
14
|
export const EvaluationConfigWrapper = memo(
|
|
15
15
|
({ device, stationItem, Child }) => {
|
|
@@ -69,7 +69,7 @@ const EvaluationOverConfigDisplay = memo(
|
|
|
69
69
|
lastUpdated={configValue?.last_updated}
|
|
70
70
|
format={'DDMMYYYY'}
|
|
71
71
|
/>
|
|
72
|
-
<
|
|
72
|
+
<IconOutline style={styles.marginTop10} name="right" size={12} />
|
|
73
73
|
</View>
|
|
74
74
|
)}
|
|
75
75
|
</View>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
2
|
import { TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import Text from '../../Text';
|
|
6
6
|
import { API, Colors } from '../../../configs';
|
|
@@ -107,7 +107,7 @@ const ItemOneTap = memo(({ automate = {}, wrapSyles, onPressItem }) => {
|
|
|
107
107
|
>
|
|
108
108
|
{activateAt && t('activated_time', { time: activateAt })}
|
|
109
109
|
</Text>
|
|
110
|
-
<
|
|
110
|
+
<IconOutline name="right" size={12} />
|
|
111
111
|
</View>
|
|
112
112
|
</TouchableOpacity>
|
|
113
113
|
</View>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback, useMemo, useRef } from 'react';
|
|
2
2
|
import { StatusBar, StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
5
5
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
6
6
|
import { getStatusBarHeight } from 'react-native-iphone-x-helper';
|
|
@@ -53,7 +53,7 @@ const HeaderUnit = memo(({ transparent, unit }) => {
|
|
|
53
53
|
onPress={handleGoBack}
|
|
54
54
|
>
|
|
55
55
|
<View style={styles.btnLeft}>
|
|
56
|
-
<
|
|
56
|
+
<IconOutline name={'left'} size={27} color={colorHeader} />
|
|
57
57
|
</View>
|
|
58
58
|
</TouchableOpacity>
|
|
59
59
|
{!transparent && (
|
|
@@ -71,7 +71,7 @@ const HeaderUnit = memo(({ transparent, unit }) => {
|
|
|
71
71
|
onPress={setShowAdd}
|
|
72
72
|
>
|
|
73
73
|
<View style={styles.btnAdd}>
|
|
74
|
-
<
|
|
74
|
+
<IconOutline name={'plus'} size={27} color={colorHeader} />
|
|
75
75
|
</View>
|
|
76
76
|
</TouchableOpacity>
|
|
77
77
|
)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useCallback } from 'react';
|
|
2
2
|
import { View, Image, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
4
|
-
import
|
|
4
|
+
import { IconFill, IconOutline } from '@ant-design/icons-react-native';
|
|
5
5
|
|
|
6
6
|
import { API, Colors, Images } from '../../configs';
|
|
7
7
|
import Text from '../../commons/Text';
|
|
@@ -91,7 +91,7 @@ const SharedUnit = ({
|
|
|
91
91
|
{isOptions && (
|
|
92
92
|
<Fragment>
|
|
93
93
|
{item.is_pin ? (
|
|
94
|
-
<
|
|
94
|
+
<IconFill
|
|
95
95
|
name="pushpin"
|
|
96
96
|
size={20}
|
|
97
97
|
color={Colors.Blue10}
|
|
@@ -99,15 +99,15 @@ const SharedUnit = ({
|
|
|
99
99
|
accessibilityLabel={`${AccessibilityLabel.ICON_REMOVE_PIN_SHARED_UNIT}-${item.id}`}
|
|
100
100
|
/>
|
|
101
101
|
) : (
|
|
102
|
-
<
|
|
103
|
-
name="
|
|
102
|
+
<IconOutline
|
|
103
|
+
name="pushpin"
|
|
104
104
|
size={20}
|
|
105
105
|
onPress={addPinSharedUnit}
|
|
106
106
|
accessibilityLabel={`${AccessibilityLabel.ICON_ADD_PIN_SHARED_UNIT}-${item.id}`}
|
|
107
107
|
/>
|
|
108
108
|
)}
|
|
109
109
|
{item.is_star ? (
|
|
110
|
-
<
|
|
110
|
+
<IconFill
|
|
111
111
|
name="star"
|
|
112
112
|
size={20}
|
|
113
113
|
color={Colors.Yellow6}
|
|
@@ -115,8 +115,8 @@ const SharedUnit = ({
|
|
|
115
115
|
accessibilityLabel={`${AccessibilityLabel.ICON_REMOVE_STAR_SHARED_UNIT}-${item.id}`}
|
|
116
116
|
/>
|
|
117
117
|
) : (
|
|
118
|
-
<
|
|
119
|
-
name="
|
|
118
|
+
<IconOutline
|
|
119
|
+
name="star"
|
|
120
120
|
size={20}
|
|
121
121
|
onPress={addStarSharedUnit}
|
|
122
122
|
accessibilityLabel={`${AccessibilityLabel.ICON_ADD_STAR_SHARED_UNIT}-${item.id}`}
|
package/src/configs/Theme.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
2
2
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
3
3
|
import React, { memo } from 'react';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
@@ -19,7 +19,7 @@ export const EmergencyContactsStack = memo(() => {
|
|
|
19
19
|
...screenOptions,
|
|
20
20
|
headerTitleAlign: 'center',
|
|
21
21
|
headerBackImage: () => (
|
|
22
|
-
<
|
|
22
|
+
<IconOutline
|
|
23
23
|
name="left"
|
|
24
24
|
size={27}
|
|
25
25
|
color={Colors.Black}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useContext, useEffect } from 'react';
|
|
2
2
|
import { AppState, View } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
5
5
|
import { BleManager } from 'react-native-ble-plx';
|
|
6
6
|
import NetInfo from '@react-native-community/netinfo';
|
|
@@ -173,7 +173,7 @@ export const UnitStack = memo((props) => {
|
|
|
173
173
|
...screenOptions,
|
|
174
174
|
headerTitleAlign: 'center',
|
|
175
175
|
headerBackImage: () => (
|
|
176
|
-
<
|
|
176
|
+
<IconOutline
|
|
177
177
|
name="left"
|
|
178
178
|
size={27}
|
|
179
179
|
color={Colors.Black}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
TouchableOpacity,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
10
|
-
import
|
|
10
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
11
11
|
import { Colors } from '../../configs';
|
|
12
12
|
import { HeaderCustom } from '../../commons/Header';
|
|
13
13
|
import ItemLog from './ItemLog';
|
|
@@ -83,7 +83,7 @@ const ActivityLogScreen = ({ route }) => {
|
|
|
83
83
|
onPress={setShowFilterPopup}
|
|
84
84
|
accessibilityLabel={AccessibilityLabel.FILTER_BUTTON}
|
|
85
85
|
>
|
|
86
|
-
<
|
|
86
|
+
<IconOutline name={'filter'} size={27} color={Colors.Black} />
|
|
87
87
|
</TouchableOpacity>
|
|
88
88
|
),
|
|
89
89
|
[setShowFilterPopup]
|
|
@@ -2,7 +2,7 @@ import React, { memo, useState, useCallback, useRef, useEffect } from 'react';
|
|
|
2
2
|
import { View, ScrollView, TouchableOpacity } from 'react-native';
|
|
3
3
|
import MapView, { Marker, Circle, PROVIDER_GOOGLE } from 'react-native-maps';
|
|
4
4
|
import { useNavigation } from '@react-navigation/native';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
7
7
|
import { check, RESULTS } from 'react-native-permissions';
|
|
8
8
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
@@ -225,7 +225,7 @@ const AddLocationMaps = memo(() => {
|
|
|
225
225
|
style={styles.button}
|
|
226
226
|
accessibilityLabel={AccessibilityLabel.BUTTON_CHOOSE_ON_MAP}
|
|
227
227
|
>
|
|
228
|
-
<
|
|
228
|
+
<IconOutline
|
|
229
229
|
name="enviroment"
|
|
230
230
|
size={27}
|
|
231
231
|
color={Colors.Primary}
|
|
@@ -274,7 +274,7 @@ const AddLocationMaps = memo(() => {
|
|
|
274
274
|
}}
|
|
275
275
|
tracksViewChanges={false}
|
|
276
276
|
>
|
|
277
|
-
<
|
|
277
|
+
<IconOutline
|
|
278
278
|
name="enviroment"
|
|
279
279
|
size={27}
|
|
280
280
|
color={Colors.Blue10}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback, useEffect, useState, useMemo } from 'react';
|
|
2
2
|
import { ScrollView, TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { CommonActions, useNavigation } from '@react-navigation/native';
|
|
5
5
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
6
6
|
import { Colors } from '../../configs';
|
|
@@ -357,7 +357,7 @@ const RenameNewDevices = memo(({ route }) => {
|
|
|
357
357
|
/>
|
|
358
358
|
<View style={styles.content}>
|
|
359
359
|
<View style={styles.viewIconSuccess}>
|
|
360
|
-
<
|
|
360
|
+
<IconOutline name="check-circle" size={28} color={Colors.Green6} />
|
|
361
361
|
<Text
|
|
362
362
|
semibold
|
|
363
363
|
color={Colors.Black}
|
|
@@ -14,7 +14,13 @@ import RenderActionItem from './RenderActionItem';
|
|
|
14
14
|
const ChooseAction = ({ route }) => {
|
|
15
15
|
const t = useTranslations();
|
|
16
16
|
const { navigate } = useNavigation();
|
|
17
|
-
const {
|
|
17
|
+
const {
|
|
18
|
+
unitId,
|
|
19
|
+
device,
|
|
20
|
+
automateId,
|
|
21
|
+
numberActionCanAdd,
|
|
22
|
+
multiUnit = {},
|
|
23
|
+
} = route.params;
|
|
18
24
|
const [data, setData] = useState([]);
|
|
19
25
|
const [actions, setActions] = useState([]);
|
|
20
26
|
|
|
@@ -48,7 +54,7 @@ const ChooseAction = ({ route }) => {
|
|
|
48
54
|
API.AUTOMATE.ADD_SCRIPT_ACTION(automateId),
|
|
49
55
|
{
|
|
50
56
|
list_action,
|
|
51
|
-
unit: unitId,
|
|
57
|
+
unit: unitId || multiUnit.id,
|
|
52
58
|
}
|
|
53
59
|
);
|
|
54
60
|
|
|
@@ -58,7 +64,15 @@ const ChooseAction = ({ route }) => {
|
|
|
58
64
|
merge: true,
|
|
59
65
|
params: { saveAt: moment().valueOf() },
|
|
60
66
|
});
|
|
61
|
-
}, [
|
|
67
|
+
}, [
|
|
68
|
+
actions,
|
|
69
|
+
numberActionCanAdd,
|
|
70
|
+
automateId,
|
|
71
|
+
unitId,
|
|
72
|
+
multiUnit.id,
|
|
73
|
+
navigate,
|
|
74
|
+
t,
|
|
75
|
+
]);
|
|
62
76
|
|
|
63
77
|
const handleOnSelectAction = (action) => {
|
|
64
78
|
setActions((prevActions) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native';
|
|
1
2
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
3
|
import { View } from 'react-native';
|
|
3
|
-
import { useNavigation } from '@react-navigation/native';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import GridItem from '../../../commons/Grid/GridItem';
|
|
6
6
|
import Text from '../../../commons/Text';
|
|
7
|
-
import { axiosGet } from '../../../utils/Apis/axios';
|
|
8
7
|
import { API, Colors } from '../../../configs';
|
|
8
|
+
import { AUTOMATE_TYPE } from '../../../configs/Constants';
|
|
9
|
+
import { useTranslations } from '../../../hooks/Common/useTranslations';
|
|
10
|
+
import { axiosGet } from '../../../utils/Apis/axios';
|
|
9
11
|
import Routes from '../../../utils/Route';
|
|
10
|
-
import styles from './Styles/SelectActionStyles';
|
|
11
12
|
import { LoadingSelectAction } from './Components';
|
|
12
|
-
import { AUTOMATE_TYPE } from '../../../configs/Constants';
|
|
13
13
|
import NewActionWrapper from './NewActionWrapper';
|
|
14
|
-
import
|
|
14
|
+
import styles from './Styles/SelectActionStyles';
|
|
15
15
|
|
|
16
16
|
const ChooseConfig = ({ route }) => {
|
|
17
17
|
const t = useTranslations();
|
|
@@ -44,6 +44,7 @@ const ChooseConfig = ({ route }) => {
|
|
|
44
44
|
config,
|
|
45
45
|
automate,
|
|
46
46
|
closeScreen,
|
|
47
|
+
unitId: automate?.unit,
|
|
47
48
|
});
|
|
48
49
|
},
|
|
49
50
|
[automate, closeScreen, navigate]
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
3
3
|
import { TouchableOpacity, View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
6
|
-
import
|
|
6
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
7
7
|
import { FullLoading, HeaderCustom } from '../../../commons';
|
|
8
8
|
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
9
9
|
import { Colors } from '../../../configs';
|
|
@@ -35,7 +35,7 @@ const NewActionWrapper = ({
|
|
|
35
35
|
onPress={handleClose}
|
|
36
36
|
accessibilityLabel={AccessibilityLabel.ICON_CLOSE}
|
|
37
37
|
>
|
|
38
|
-
<
|
|
38
|
+
<IconOutline name={'close'} size={24} color={Colors.Black} />
|
|
39
39
|
</TouchableOpacity>
|
|
40
40
|
),
|
|
41
41
|
[handleClose]
|
|
@@ -8,8 +8,13 @@ import SelectDevices from './Components/SelectDevices';
|
|
|
8
8
|
|
|
9
9
|
const SelectControlDevices = ({ route }) => {
|
|
10
10
|
const t = useTranslations();
|
|
11
|
-
const {
|
|
12
|
-
|
|
11
|
+
const {
|
|
12
|
+
unitId,
|
|
13
|
+
closeScreen,
|
|
14
|
+
automateId,
|
|
15
|
+
numberActionCanAdd,
|
|
16
|
+
multiUnit = {},
|
|
17
|
+
} = route.params || {};
|
|
13
18
|
|
|
14
19
|
const [stations, setStations] = useState([]);
|
|
15
20
|
const [listStation, setListStation] = useState([]);
|
|
@@ -19,22 +24,26 @@ const SelectControlDevices = ({ route }) => {
|
|
|
19
24
|
const [loading, setLoading] = useState(true);
|
|
20
25
|
|
|
21
26
|
const fetchDetails = useCallback(async () => {
|
|
22
|
-
await fetchWithCache(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
index
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
await fetchWithCache(
|
|
28
|
+
API.UNIT.DEVICE_CONTROL(unitId || multiUnit.id),
|
|
29
|
+
{},
|
|
30
|
+
(response) => {
|
|
31
|
+
const { success, data } = response;
|
|
32
|
+
if (success) {
|
|
33
|
+
const newData = data.filter((item) => item.sensors.length > 0);
|
|
34
|
+
const listMenu = newData.map((item, index) => ({
|
|
35
|
+
text: item.name,
|
|
36
|
+
station: item,
|
|
37
|
+
index: index,
|
|
38
|
+
}));
|
|
39
|
+
setStations(newData);
|
|
40
|
+
setListMenuItem(listMenu);
|
|
41
|
+
setListStation(listMenu);
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
|
-
|
|
44
|
+
);
|
|
36
45
|
setLoading(false);
|
|
37
|
-
}, [unitId]);
|
|
46
|
+
}, [multiUnit.id, unitId]);
|
|
38
47
|
|
|
39
48
|
useEffect(() => {
|
|
40
49
|
fetchDetails();
|
|
@@ -48,9 +57,10 @@ const SelectControlDevices = ({ route }) => {
|
|
|
48
57
|
device: selectedDevice,
|
|
49
58
|
closeScreen,
|
|
50
59
|
numberActionCanAdd,
|
|
60
|
+
multiUnit,
|
|
51
61
|
});
|
|
52
62
|
},
|
|
53
|
-
[navigate, unitId, automateId, closeScreen, numberActionCanAdd]
|
|
63
|
+
[navigate, unitId, automateId, closeScreen, numberActionCanAdd, multiUnit]
|
|
54
64
|
);
|
|
55
65
|
|
|
56
66
|
if (loading) {
|