@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.
Files changed (101) hide show
  1. package/package.json +1 -1
  2. package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
  3. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
  4. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
  5. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
  6. package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
  7. package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
  8. package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
  9. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
  10. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
  11. package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
  12. package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
  13. package/src/commons/ActionGroup/TimerActionTemplate.js +6 -3
  14. package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
  15. package/src/commons/BackDefault/index.js +2 -2
  16. package/src/commons/ButtonPopup/index.js +2 -2
  17. package/src/commons/DateTimeRangeChange/DateTimeButton.js +2 -2
  18. package/src/commons/Device/ConnectedViewHeader.js +2 -2
  19. package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
  20. package/src/commons/Device/FlatListItems.js +3 -3
  21. package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
  22. package/src/commons/Device/ItemAddNew/index.js +2 -2
  23. package/src/commons/Device/ItemDevice.js +2 -2
  24. package/src/commons/Device/SonosSpeaker/index.js +3 -3
  25. package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
  26. package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +6 -2
  27. package/src/commons/DisplayChecking/index.js +2 -2
  28. package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
  29. package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
  30. package/src/commons/Header/HeaderCustom.js +2 -2
  31. package/src/commons/HeaderAni/index.js +2 -2
  32. package/src/commons/NavBar/index.js +2 -2
  33. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
  34. package/src/commons/SearchLocation/index.js +3 -3
  35. package/src/commons/SelectActionCard/index.js +2 -2
  36. package/src/commons/SelectSubUnit/index.js +6 -2
  37. package/src/commons/Sharing/BtnRemoveMember.js +2 -2
  38. package/src/commons/Sharing/StationDevicePermissions.js +2 -2
  39. package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
  40. package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
  41. package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
  42. package/src/commons/SubUnit/OneTap/ItemOneTap.js +2 -2
  43. package/src/commons/Unit/HeaderUnit/index.js +3 -3
  44. package/src/commons/Unit/SharedUnit.js +7 -7
  45. package/src/configs/Theme.js +1 -1
  46. package/src/navigations/EmergencyContactsStack.js +2 -2
  47. package/src/navigations/SharedStack.js +2 -0
  48. package/src/navigations/UnitStack.js +2 -2
  49. package/src/screens/ActivityLog/index.js +2 -2
  50. package/src/screens/AddLocationMaps/index.js +3 -3
  51. package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
  52. package/src/screens/Automate/AddNewAction/ChooseAction.js +17 -3
  53. package/src/screens/Automate/AddNewAction/ChooseConfig.js +7 -6
  54. package/src/screens/Automate/AddNewAction/NewActionWrapper.js +2 -2
  55. package/src/screens/Automate/AddNewAction/SelectControlDevices.js +27 -17
  56. package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
  57. package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +7 -2
  58. package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
  59. package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
  60. package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +29 -0
  61. package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +7 -7
  62. package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
  63. package/src/screens/Automate/ScriptDetail/__test__/index.test.js +2 -0
  64. package/src/screens/Automate/ScriptDetail/index.js +3 -3
  65. package/src/screens/Automate/Styles/indexStyles.js +1 -1
  66. package/src/screens/Automate/index.js +36 -33
  67. package/src/screens/Device/EditDevice/index.js +2 -2
  68. package/src/screens/Device/__test__/detail.test.js +3 -3
  69. package/src/screens/Device/detail.js +7 -7
  70. package/src/screens/Drawer/index.js +3 -3
  71. package/src/screens/EmergencyContacts/EmergencyContactsList.js +8 -4
  72. package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
  73. package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
  74. package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
  75. package/src/screens/GuestInfo/index.js +2 -2
  76. package/src/screens/HanetCamera/ManageAccess.js +3 -3
  77. package/src/screens/HanetCamera/MemberInfo.js +2 -2
  78. package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
  79. package/src/screens/ManageAccess/index.js +3 -3
  80. package/src/screens/Notification/index.js +3 -3
  81. package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
  82. package/src/screens/SelectUnit/index.js +3 -3
  83. package/src/screens/SharedUnit/TabHeader.js +2 -2
  84. package/src/screens/Sharing/Components/EndDevice.js +3 -3
  85. package/src/screens/Sharing/UnitMemberList.js +2 -2
  86. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +2 -2
  87. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +3 -2
  88. package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +2 -2
  89. package/src/screens/SmartIr/components/SelectBrand.js +2 -2
  90. package/src/screens/SubUnit/EditSubUnit.js +2 -2
  91. package/src/screens/SubUnit/ManageSubUnit.js +3 -3
  92. package/src/screens/Unit/SelectAddToFavorites.js +2 -2
  93. package/src/screens/Unit/SelectAddress.js +3 -3
  94. package/src/screens/Unit/components/AutomateScript/index.js +2 -2
  95. package/src/screens/Unit/components/ButtonWrapper/index.js +3 -3
  96. package/src/screens/Unit/components/Header/index.js +2 -2
  97. package/src/screens/Unit/components/SharedUnit/index.js +5 -5
  98. package/src/screens/UnitSummary/components/AirQuality/index.js +2 -2
  99. package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +2 -2
  100. package/src/screens/UnitSummary/index.js +3 -3
  101. 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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'close'} size={24} color={Colors.Black} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'left'} size={27} color={Colors.Gray9} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'bars'} size={19} color={Colors.Black} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name="down" size={32} color={Colors.Primary} />
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
- <AntDesign name="up" size={32} color={Colors.Primary} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
14
- name="search1"
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name="right" size={20} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name="plus-circle" size={20} color={Colors.Primary} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'minus'} size={20} color={Colors.Gray8} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign style={styles.marginTop10} name="right" size={12} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign style={styles.marginTop10} name="right" size={12} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign style={styles.marginTop10} name="right" size={12} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name="right" size={12} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'left'} size={27} color={colorHeader} />
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
- <AntDesign name={'plus'} size={27} color={colorHeader} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
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
- <AntDesign
103
- name="pushpino"
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
- <AntDesign
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
- <AntDesign
119
- name="staro"
118
+ <IconOutline
119
+ name="star"
120
120
  size={20}
121
121
  onPress={addStarSharedUnit}
122
122
  accessibilityLabel={`${AccessibilityLabel.ICON_ADD_STAR_SHARED_UNIT}-${item.id}`}
@@ -86,7 +86,7 @@ export default StyleSheet.create({
86
86
  alignItems: 'center',
87
87
  },
88
88
  menuIcon: {
89
- paddingLeft: 16,
89
+ paddingRight: 10,
90
90
  height: '100%',
91
91
  justifyContent: 'center',
92
92
  },
@@ -1,4 +1,4 @@
1
- import AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
22
+ <IconOutline
23
23
  name="left"
24
24
  size={27}
25
25
  color={Colors.Black}
@@ -50,6 +50,8 @@ export default SharedStack;
50
50
 
51
51
  const styles = StyleSheet.create({
52
52
  btnMenu: {
53
+ paddingLeft: 0,
54
+ paddingRight: 10,
53
55
  paddingHorizontal: 16,
54
56
  height: '100%',
55
57
  justifyContent: 'center',
@@ -1,6 +1,6 @@
1
1
  import React, { memo, useContext, useEffect } from 'react';
2
2
  import { AppState, View } from 'react-native';
3
- import AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'filter'} size={27} color={Colors.Black} />
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign
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
- <AntDesign
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name="check-circle" size={28} color={Colors.Green6} />
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 { unitId, device, automateId, numberActionCanAdd } = route?.params;
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
- }, [actions, numberActionCanAdd, automateId, unitId, navigate, t]);
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 { useTranslations } from '../../../hooks/Common/useTranslations';
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 GridItem from '../../../commons/Grid/GridItem';
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 AntDesign from 'react-native-vector-icons/AntDesign';
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
- <AntDesign name={'close'} size={24} color={Colors.Black} />
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 { unitId, closeScreen, automateId, numberActionCanAdd } =
12
- route?.params || {};
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(API.UNIT.DEVICE_CONTROL(unitId), {}, (response) => {
23
- const { success, data } = response;
24
- if (success) {
25
- const newData = data.filter((item) => item.sensors.length > 0);
26
- const listMenu = newData.map((item, index) => ({
27
- text: item.name,
28
- station: item,
29
- index: index,
30
- }));
31
- setStations(newData);
32
- setListMenuItem(listMenu);
33
- setListStation(listMenu);
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) {