@eohjsc/react-native-smart-city 0.7.3-rc9 → 0.7.4
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/assets/images/Map/LocationPin.svg +10 -0
- package/package.json +4 -2
- package/src/commons/Action/__test__/ItemQuickAction.test.js +2 -2
- 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/SliderRangeTemplate.js +7 -7
- 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/ActionGroup/__test__/index.test.js +2 -2
- package/src/commons/ActionGroup/index.js +2 -2
- package/src/commons/Automate/ItemAutomate.js +9 -41
- package/src/commons/Automate/ItemConditionScriptDetail.js +109 -0
- package/src/commons/Automate/ItemConditionScriptDetailStyles.js +46 -0
- package/src/commons/Automate/__test__/ItemAutomate.test.js +0 -21
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/BottomButtonView/index.js +1 -0
- package/src/commons/ButtonPopup/index.js +3 -2
- package/src/commons/DateTimeRangeChange/DateTimeButton.js +3 -3
- 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/HorizontalBarChart.js +54 -34
- 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/FlatListDnD/index.js +12 -9
- package/src/commons/Grid/GridItem.js +10 -2
- package/src/commons/Header/HeaderCustom.js +2 -2
- package/src/commons/HeaderAni/index.js +2 -2
- package/src/commons/IconComponent/index.js +4 -4
- package/src/commons/NavBar/index.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +4 -4
- 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 +3 -4
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +0 -2
- package/src/commons/SubUnit/OneTap/index.js +9 -8
- package/src/commons/Unit/HeaderUnit/index.js +3 -3
- package/src/commons/Unit/SharedUnit.js +7 -7
- package/src/commons/Widgets/IFrameWithConfig/IFrameWithConfig.js +4 -15
- package/src/commons/Widgets/IFrameWithConfig/__tests__/IFrameWithConfig.test.js +29 -18
- package/src/configs/API.js +1 -1
- package/src/configs/AccessibilityLabel.js +1 -0
- package/src/configs/Theme.js +1 -1
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +14 -7
- package/src/hooks/IoT/useRemoteControl.js +18 -7
- package/src/hooks/useMqtt.js +2 -2
- package/src/iot/RemoteControl/Bluetooth.js +19 -22
- package/src/iot/RemoteControl/Internet.js +11 -3
- package/src/navigations/EmergencyContactsStack.js +4 -3
- package/src/navigations/SharedStack.js +2 -0
- package/src/navigations/UnitStack.js +56 -57
- package/src/screens/AQIGuide/index.js +0 -2
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddLocationMaps/index.js +16 -19
- package/src/screens/AddLocationMaps/indexStyle.js +1 -0
- package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
- package/src/screens/AddNewGateway/SelectDeviceType.js +1 -1
- package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +25 -9
- 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 +8 -8
- package/src/screens/Automate/AddNewAction/SelectControlDevices.js +30 -20
- package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +58 -44
- package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
- package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
- package/src/screens/Automate/AddNewAction/Styles/SetupSensorStyles.js +20 -4
- package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +1 -1
- package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +14 -8
- package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +13 -7
- package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +54 -15
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +29 -0
- package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +10 -10
- package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +2 -0
- package/src/screens/Automate/Components/InputName.js +10 -7
- package/src/screens/Automate/EditActionsList/index.js +19 -17
- package/src/screens/Automate/MultiUnits.js +19 -22
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +12 -2
- package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +9 -1
- package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
- package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +4 -7
- package/src/screens/Automate/ScriptDetail/__test__/index.test.js +42 -17
- package/src/screens/Automate/ScriptDetail/index.js +33 -22
- package/src/screens/Automate/SetSchedule/__test__/index.test.js +21 -10
- package/src/screens/Automate/SetSchedule/components/RowItem.js +5 -5
- package/src/screens/Automate/SetSchedule/index.js +8 -7
- package/src/screens/Automate/Styles/indexStyles.js +1 -1
- package/src/screens/Automate/__test__/MultiUnits.test.js +1 -4
- package/src/screens/Automate/__test__/index.test.js +0 -1
- package/src/screens/Automate/index.js +36 -34
- package/src/screens/ChangePosition/index.js +2 -1
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +4 -4
- package/src/screens/Device/EditDevice/index.js +4 -4
- package/src/screens/Device/__test__/BluetoothDevice.test.js +300 -0
- package/src/screens/Device/__test__/detail.test.js +3 -3
- package/src/screens/Device/components/BluetoothDevice.js +135 -0
- package/src/screens/Device/components/SensorDisplayItem.js +4 -3
- package/src/screens/Device/detail.js +70 -62
- package/src/screens/Device/hooks/useEvaluateValue.js +1 -1
- 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/components/NotificationItem.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/__test__/index.test.js +1 -1
- package/src/screens/SelectUnit/index.js +4 -4
- 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/AddSubUnit.js +28 -24
- package/src/screens/SubUnit/AddSubUnitStyles.js +10 -4
- package/src/screens/SubUnit/EditSubUnit.js +12 -11
- package/src/screens/SubUnit/ManageSubUnit.js +3 -3
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +13 -13
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +3 -3
- package/src/screens/Template/EditTemplate.js +6 -4
- package/src/screens/UVIndexGuide/index.js +2 -4
- package/src/screens/Unit/SelectAddToFavorites.js +2 -2
- package/src/screens/Unit/SelectAddress.js +16 -12
- 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 +6 -11
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +6 -6
- package/src/screens/UnitSummary/index.js +3 -3
- package/src/utils/Apis/axios.js +5 -5
- package/src/utils/Functions/ShortEmail.js +1 -0
- package/src/utils/I18n/translations/en.js +6 -3
- package/src/utils/I18n/translations/vi.js +8 -4
- package/src/utils/bluetooth.js +3 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TouchableOpacity, View, ScrollView } from 'react-native';
|
|
3
|
-
import MapView, { Marker, Circle, PROVIDER_GOOGLE } from 'react-native-maps';
|
|
1
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
2
|
import { useNavigation } from '@react-navigation/native';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { ScrollView, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import MapView, { Circle, Marker, PROVIDER_GOOGLE } from 'react-native-maps';
|
|
7
6
|
import { check, RESULTS } from 'react-native-permissions';
|
|
7
|
+
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
8
8
|
import { openPromptEnableLocation } from '../../utils/Setting/Location';
|
|
9
9
|
|
|
10
|
+
import { FullLoading } from '../../commons';
|
|
10
11
|
import BottomButtonView from '../../commons/BottomButtonView';
|
|
11
12
|
import SearchBarLocation from '../../commons/SearchLocation';
|
|
12
13
|
import RowLocation from '../../commons/SearchLocation/RowLocation';
|
|
13
14
|
import Text from '../../commons/Text';
|
|
14
|
-
import { FullLoading } from '../../commons';
|
|
15
15
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
16
16
|
import {
|
|
17
17
|
GEOLOCATION_ERROR,
|
|
@@ -19,15 +19,15 @@ import {
|
|
|
19
19
|
OpenSetting,
|
|
20
20
|
} from '../../utils/Permission/common';
|
|
21
21
|
|
|
22
|
-
import styles from './SelectAddressStyles';
|
|
23
22
|
import { API, Colors, SCConfig } from '../../configs';
|
|
24
|
-
import { axiosGet } from '../../utils/Apis/axios';
|
|
25
|
-
import Routes from '../../utils/Route';
|
|
26
23
|
import {
|
|
27
24
|
AccessibilityLabel,
|
|
28
|
-
MAP_INITIAL_REGION,
|
|
29
25
|
EOH_LOCATION,
|
|
26
|
+
MAP_INITIAL_REGION,
|
|
30
27
|
} from '../../configs/Constants';
|
|
28
|
+
import { axiosGet } from '../../utils/Apis/axios';
|
|
29
|
+
import Routes from '../../utils/Route';
|
|
30
|
+
import styles from './SelectAddressStyles';
|
|
31
31
|
|
|
32
32
|
navigator.geolocation = require('@react-native-community/geolocation');
|
|
33
33
|
|
|
@@ -210,7 +210,11 @@ const SelectAddress = memo(({ route }) => {
|
|
|
210
210
|
style={styles.button}
|
|
211
211
|
accessibilityLabel={AccessibilityLabel.BUTTON_CHOOSE_ON_MAP}
|
|
212
212
|
>
|
|
213
|
-
<
|
|
213
|
+
<IconOutline
|
|
214
|
+
name="environment"
|
|
215
|
+
size={27}
|
|
216
|
+
color={Colors.Primary}
|
|
217
|
+
/>
|
|
214
218
|
<Text type="Body" color={Colors.Gray9} style={styles.text} bold>
|
|
215
219
|
{t('choose_on_map')}
|
|
216
220
|
</Text>
|
|
@@ -248,7 +252,7 @@ const SelectAddress = memo(({ route }) => {
|
|
|
248
252
|
}}
|
|
249
253
|
tracksViewChanges={false}
|
|
250
254
|
>
|
|
251
|
-
<
|
|
255
|
+
<IconOutline name="environment" size={27} color={Colors.Blue10} />
|
|
252
256
|
</Marker>
|
|
253
257
|
</>
|
|
254
258
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, TouchableWithoutFeedback } 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 Text from '../../../../commons/Text';
|
|
6
6
|
import FImage from '../../../../commons/FImage';
|
|
@@ -61,7 +61,7 @@ const AutomateScript = ({ automate, onPress, isSelected }) => {
|
|
|
61
61
|
<Text numberOfLines={1} type={'Label'} color={Colors.Gray7}>
|
|
62
62
|
{t('created_by', { name: author })}
|
|
63
63
|
</Text>
|
|
64
|
-
<
|
|
64
|
+
<IconOutline name="right" size={12} />
|
|
65
65
|
</View>
|
|
66
66
|
</View>
|
|
67
67
|
</View>
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import { View, TouchableOpacity, Image } from 'react-native';
|
|
3
3
|
import Text from '../../../../commons/Text';
|
|
4
4
|
import { Colors } from '../../../../configs';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
7
7
|
import styles from './styles';
|
|
8
8
|
|
|
@@ -46,10 +46,10 @@ const ButtonWrapper = ({
|
|
|
46
46
|
<Image source={{ uri: value }} style={styles.avatar} />
|
|
47
47
|
) : (
|
|
48
48
|
<View style={styles.avatar}>
|
|
49
|
-
<
|
|
49
|
+
<IconOutline name={'user'} size={27} />
|
|
50
50
|
</View>
|
|
51
51
|
)}
|
|
52
|
-
<
|
|
52
|
+
<IconOutline name="right" size={20} color={Colors.Gray7} />
|
|
53
53
|
</View>
|
|
54
54
|
</View>
|
|
55
55
|
{children}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
|
2
2
|
import { Dimensions, View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
3
|
import Popover from '../../../../commons/Popover';
|
|
4
|
-
import
|
|
4
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
5
5
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
6
6
|
import { useTranslations } from '../../../../hooks/Common/useTranslations';
|
|
7
7
|
|
|
@@ -98,7 +98,7 @@ const HeaderComponent = ({ title, goBack, dark, hideRight, style }) => {
|
|
|
98
98
|
onPress={() => setShowModal(true)}
|
|
99
99
|
style={styles.rightHeader}
|
|
100
100
|
>
|
|
101
|
-
<
|
|
101
|
+
<IconOutline
|
|
102
102
|
name="plus"
|
|
103
103
|
size={32}
|
|
104
104
|
color={dark ? Colors.Black : Colors.White}
|
|
@@ -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';
|
|
@@ -88,7 +88,7 @@ const SharedUnit = ({
|
|
|
88
88
|
{isOptions && (
|
|
89
89
|
<Fragment>
|
|
90
90
|
{item.is_pin ? (
|
|
91
|
-
<
|
|
91
|
+
<IconOutline
|
|
92
92
|
name="pushpin"
|
|
93
93
|
size={20}
|
|
94
94
|
color={Colors.Blue10}
|
|
@@ -98,7 +98,7 @@ const SharedUnit = ({
|
|
|
98
98
|
}
|
|
99
99
|
/>
|
|
100
100
|
) : (
|
|
101
|
-
<
|
|
101
|
+
<IconOutline
|
|
102
102
|
name="pushpin"
|
|
103
103
|
size={20}
|
|
104
104
|
onPress={addPinSharedUnit}
|
|
@@ -106,7 +106,7 @@ const SharedUnit = ({
|
|
|
106
106
|
/>
|
|
107
107
|
)}
|
|
108
108
|
{item.is_star ? (
|
|
109
|
-
<
|
|
109
|
+
<IconFill
|
|
110
110
|
name="star"
|
|
111
111
|
size={20}
|
|
112
112
|
color={Colors.Yellow6}
|
|
@@ -116,7 +116,7 @@ const SharedUnit = ({
|
|
|
116
116
|
}
|
|
117
117
|
/>
|
|
118
118
|
) : (
|
|
119
|
-
<
|
|
119
|
+
<IconOutline
|
|
120
120
|
name="star"
|
|
121
121
|
size={20}
|
|
122
122
|
onPress={addStarSharedUnit}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
1
2
|
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
2
3
|
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
4
|
-
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
5
4
|
|
|
6
5
|
import styles from './styles';
|
|
7
6
|
|
|
8
7
|
import { Section, Text } from '../../../../commons';
|
|
9
|
-
import VisualChart from '../../../Device/components/VisualChart';
|
|
10
|
-
import { useTranslations } from '../../../../hooks/Common/useTranslations';
|
|
11
|
-
import { useWatchConfigs } from '../../../../hooks/IoT';
|
|
12
8
|
import { Colors } from '../../../../configs';
|
|
13
9
|
import AccessibilityLabel from '../../../../configs/AccessibilityLabel';
|
|
10
|
+
import { useTranslations } from '../../../../hooks/Common/useTranslations';
|
|
11
|
+
import { useWatchConfigs } from '../../../../hooks/IoT';
|
|
12
|
+
import VisualChart from '../../../Device/components/VisualChart';
|
|
14
13
|
import SegmentedRoundChart from './SegmentedRoundChart';
|
|
15
14
|
|
|
16
15
|
const AirQuality = memo(({ summaryDetail }) => {
|
|
@@ -80,7 +79,7 @@ const AirQuality = memo(({ summaryDetail }) => {
|
|
|
80
79
|
<View
|
|
81
80
|
style={[styles.boxEmotion, { backgroundColor: outdoorColor }]}
|
|
82
81
|
>
|
|
83
|
-
<
|
|
82
|
+
<IconOutline name={outdoorIcon} size={35} />
|
|
84
83
|
</View>
|
|
85
84
|
<View
|
|
86
85
|
style={[
|
|
@@ -122,11 +121,7 @@ const AirQuality = memo(({ summaryDetail }) => {
|
|
|
122
121
|
{<SegmentedRoundChart data={outdoor} />}
|
|
123
122
|
{!!advices?.length && (
|
|
124
123
|
<View style={styles.boxHealth}>
|
|
125
|
-
<
|
|
126
|
-
name="alert-circle-outline"
|
|
127
|
-
size={20}
|
|
128
|
-
style={styles.iconMargin}
|
|
129
|
-
/>
|
|
124
|
+
<IconOutline name="alert" size={20} style={styles.iconMargin} />
|
|
130
125
|
<Text semibold color={Colors.Gray9} type="H4">
|
|
131
126
|
{t('Health advices:')}
|
|
132
127
|
</Text>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
1
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
2
|
import { useNavigation } from '@react-navigation/native';
|
|
3
|
+
import React, { memo } from 'react';
|
|
4
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
5
|
|
|
6
6
|
import Text from '../../../../../commons/Text';
|
|
7
7
|
import { Colors, Constants } from '../../../../../configs';
|
|
8
|
-
import Route from '../../../../../utils/Route';
|
|
9
8
|
import { useConfigGlobalState } from '../../../../../iot/states';
|
|
9
|
+
import Route from '../../../../../utils/Route';
|
|
10
10
|
|
|
11
11
|
const width_item = (Constants.width - 48) / 2;
|
|
12
12
|
|
|
@@ -23,9 +23,9 @@ const Item = memo(({ id, svgMain, title, measure, des, color, waterType }) => {
|
|
|
23
23
|
<Text>{title}</Text>
|
|
24
24
|
{waterType && (
|
|
25
25
|
<TouchableOpacity onPress={goToDetail} style={styles.buttonInfo}>
|
|
26
|
-
<
|
|
26
|
+
<IconOutline
|
|
27
27
|
style={styles.row}
|
|
28
|
-
name="
|
|
28
|
+
name="info-circle"
|
|
29
29
|
size={20}
|
|
30
30
|
color={Colors.Black}
|
|
31
31
|
/>
|
|
@@ -2,7 +2,7 @@ import React, { memo, useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
4
|
import { TouchableOpacity } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
|
|
8
8
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
@@ -168,8 +168,8 @@ const UnitSummary = memo(({ route }) => {
|
|
|
168
168
|
accessibilityLabel={AccessibilityLabel.UNIT_SUMMARY_GUIDE_TOUCH}
|
|
169
169
|
onPress={() => navigation.navigate(GuideName)}
|
|
170
170
|
>
|
|
171
|
-
<
|
|
172
|
-
name=
|
|
171
|
+
<IconOutline
|
|
172
|
+
name="info-circle"
|
|
173
173
|
size={25}
|
|
174
174
|
color={Colors.Black}
|
|
175
175
|
/>
|
package/src/utils/Apis/axios.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
import { create } from 'apisauce';
|
|
3
|
-
import { getData, storeData } from '../Storage';
|
|
4
|
-
import { ToastBottomHelper } from '../Utils';
|
|
5
2
|
import NetInfo from '@react-native-community/netinfo';
|
|
3
|
+
import { create } from 'apisauce';
|
|
4
|
+
import { SCConfig } from '../../configs';
|
|
6
5
|
import { PROBLEM_CODE } from '../../configs/Constants';
|
|
7
6
|
import { getTranslate } from '../I18n';
|
|
8
|
-
import {
|
|
7
|
+
import { getData, storeData } from '../Storage';
|
|
8
|
+
import { ToastBottomHelper } from '../Utils';
|
|
9
9
|
import { isHTML } from '../Validation';
|
|
10
10
|
|
|
11
11
|
const api = create({
|
|
@@ -261,7 +261,7 @@ export function createFormData(data, list_file_field) {
|
|
|
261
261
|
});
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
formData.append(key, data[key]);
|
|
264
|
+
data[key] && formData.append(key, data[key]);
|
|
265
265
|
});
|
|
266
266
|
|
|
267
267
|
return formData;
|
|
@@ -238,6 +238,8 @@ export default {
|
|
|
238
238
|
'Overall Water quality is based on below those conditions',
|
|
239
239
|
water_quality_guide: 'Water Quality Guide',
|
|
240
240
|
clo_guide: 'Chlorine Residual Guide',
|
|
241
|
+
aqi_guide: 'AQI Guide',
|
|
242
|
+
uv_index_guide: 'UV Index Guide',
|
|
241
243
|
what_is_clo: 'What is Chlorine residual?',
|
|
242
244
|
text_what_clo:
|
|
243
245
|
'Residual chlorine is the low level amount of chlorine remaining in the water after a certain period of ' +
|
|
@@ -380,7 +382,6 @@ export default {
|
|
|
380
382
|
text_select_permissions_desc: 'Select permissions will be grant',
|
|
381
383
|
text_read_config: 'Read configs',
|
|
382
384
|
text_actions: 'Actions',
|
|
383
|
-
geolocation: 'Geolocation',
|
|
384
385
|
background: 'Background',
|
|
385
386
|
remove_unit: 'Remove unit',
|
|
386
387
|
text_pins: 'pins',
|
|
@@ -487,7 +488,7 @@ export default {
|
|
|
487
488
|
wind_quality_sensor: 'Wind Quality Sensor',
|
|
488
489
|
current_water_quality: 'Current Quality Sensor',
|
|
489
490
|
clo_residual: 'Clo Residual',
|
|
490
|
-
|
|
491
|
+
text_explain_add_location:
|
|
491
492
|
'Tell us where this unit is. It will help automatically personalized your experience.',
|
|
492
493
|
raining: 'Raining',
|
|
493
494
|
not_raining: 'Not raining',
|
|
@@ -840,7 +841,7 @@ export default {
|
|
|
840
841
|
select_unit_members: 'Select from Unit members',
|
|
841
842
|
select_contacts: 'Select contacts',
|
|
842
843
|
no_contact: 'No contacts',
|
|
843
|
-
|
|
844
|
+
is_equal: 'is equal',
|
|
844
845
|
is_below: 'is below',
|
|
845
846
|
is_above: 'is above',
|
|
846
847
|
text_notification_content_air_quality_high:
|
|
@@ -1018,6 +1019,8 @@ export default {
|
|
|
1018
1019
|
multi_units_automate: 'Multi-Units Smart',
|
|
1019
1020
|
tap_to_run: 'Tap to run',
|
|
1020
1021
|
how_to_start: 'How to start',
|
|
1022
|
+
edit_condition: 'Edit condition',
|
|
1023
|
+
device_display: 'Device display',
|
|
1021
1024
|
'set_up {name}': 'Setup {name}',
|
|
1022
1025
|
choose_action: 'Choose action',
|
|
1023
1026
|
action: 'action',
|
|
@@ -94,8 +94,8 @@ export default {
|
|
|
94
94
|
verify: 'Xác nhận',
|
|
95
95
|
text_new_unit: 'Địa điểm',
|
|
96
96
|
text_sub_units: 'Khu vực',
|
|
97
|
+
is_equal: 'bằng',
|
|
97
98
|
is_below: 'dưới',
|
|
98
|
-
is: 'bằng',
|
|
99
99
|
is_above: 'trên',
|
|
100
100
|
edit_actions_list: 'Chỉnh sửa danh sách hành động',
|
|
101
101
|
des_edit_actions_list:
|
|
@@ -197,7 +197,8 @@ export default {
|
|
|
197
197
|
text_name: 'Tên',
|
|
198
198
|
left_menu_notifications: 'Thông báo',
|
|
199
199
|
text_settings: 'Cài đặt',
|
|
200
|
-
|
|
200
|
+
aqi_guide: 'Chỉ số AQI',
|
|
201
|
+
uv_index_guide: 'Chỉ số UV',
|
|
201
202
|
'What is AQI?': 'Chỉ số AQI là gì?',
|
|
202
203
|
text_what_aqi:
|
|
203
204
|
'AQI là các chữ cái viết tắt của “Air Quality Index” – chỉ số chất lượng không khí. Chỉ số này được sử dụng để ' +
|
|
@@ -436,7 +437,6 @@ export default {
|
|
|
436
437
|
text_select_permissions_desc: 'Chọn các hành động cho phép',
|
|
437
438
|
text_read_config: 'Thông số đọc',
|
|
438
439
|
text_actions: 'Điều khiển',
|
|
439
|
-
geolocation: 'Vị trí',
|
|
440
440
|
background: 'Hình nền',
|
|
441
441
|
remove_unit: 'Xoá địa điểm',
|
|
442
442
|
text_pins: 'Lượt ghim',
|
|
@@ -555,7 +555,7 @@ export default {
|
|
|
555
555
|
wind_quality_sensor: 'Cảm biến chất lượng nước',
|
|
556
556
|
current_water_quality: 'Chất lượng nước hiện tại',
|
|
557
557
|
clo_residual: 'Clo dư',
|
|
558
|
-
|
|
558
|
+
text_explain_add_location:
|
|
559
559
|
'Hãy cho chúng tôi biết địa điểm này nằm ở đâu. Việc này sẽ giúp cá nhân hoá các trải nghiệm của bạn trong ' +
|
|
560
560
|
'việc quản lý.',
|
|
561
561
|
raining: 'Đang mưa',
|
|
@@ -1033,6 +1033,8 @@ export default {
|
|
|
1033
1033
|
continue: 'Tiếp tục',
|
|
1034
1034
|
tap_to_run: 'Nhấn để chạy',
|
|
1035
1035
|
how_to_start: 'Cách khởi động',
|
|
1036
|
+
edit_condition: 'Chỉnh sửa điều kiện',
|
|
1037
|
+
device_display: 'Thiết bị hiển thị',
|
|
1036
1038
|
'set_up {name}': 'Thiết lập {name}',
|
|
1037
1039
|
choose_action: 'Lựa chọn hành động',
|
|
1038
1040
|
action: 'hành động',
|
|
@@ -1320,6 +1322,8 @@ export default {
|
|
|
1320
1322
|
smart_supplier: 'Nhà Cung Cấp Thông Minh',
|
|
1321
1323
|
text_email_or_phone_number: 'Email hoặc Số điện thoại',
|
|
1322
1324
|
enter_password: 'Mật khẩu',
|
|
1325
|
+
you_need_to_enter_password:
|
|
1326
|
+
'Bạn cần nhập mật khẩu để xác nhận yêu cầu của mình',
|
|
1323
1327
|
connecting_smart_account: 'Đang kết nối tài khoản',
|
|
1324
1328
|
warning_connecting_smart_account:
|
|
1325
1329
|
'Đừng tắt thiết bị hoặc đóng ứng dụng này trong quá trình thiết lập. Quá trình thiết lập có thể mất vài ' +
|