@eohjsc/react-native-smart-city 0.2.66 → 0.2.67

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.2.66",
4
+ "version": "0.2.67",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -62,7 +62,11 @@ const ItemDevice = memo(
62
62
  <TouchableOpacity onPress={goToSensorDisplay}>
63
63
  {displayIconSensor()}
64
64
  </TouchableOpacity>
65
- <ItemQuickAction sensor={sensor} unit={unit} />
65
+ <ItemQuickAction
66
+ sensor={sensor}
67
+ unit={unit}
68
+ wrapperStyle={styles.iconCircle}
69
+ />
66
70
  </View>
67
71
  <TouchableOpacity onPress={goToSensorDisplay}>
68
72
  <Text
@@ -133,4 +137,12 @@ const styles = StyleSheet.create({
133
137
  height: 40,
134
138
  resizeMode: 'contain',
135
139
  },
140
+ iconCircle: {
141
+ width: 32,
142
+ height: 32,
143
+ backgroundColor: Colors.Gray3,
144
+ borderRadius: 16,
145
+ justifyContent: 'center',
146
+ alignItems: 'center',
147
+ },
136
148
  });
@@ -17,11 +17,13 @@ const AddCommonSelectSubUnit = ({ route }) => {
17
17
  const t = useTranslations();
18
18
  const navigation = useNavigation();
19
19
  const isFocused = useIsFocused();
20
- const { addType, unit_id } = route.params;
20
+ const { addType, unit_id, sensor_data, listSelectDevice, smart_account_id } =
21
+ route.params;
21
22
  const [selectedIndex, setSelectedIndex] = useState(-1);
22
23
  const [unit, setUnit] = useState([]);
23
24
  const [title, setTitle] = useState('');
24
25
  const [subTitle, setSubTitle] = useState('');
26
+ const [nameSubUnit, setNameSubUnit] = useState('');
25
27
 
26
28
  useEffect(() => {
27
29
  switch (addType) {
@@ -72,6 +74,10 @@ const AddCommonSelectSubUnit = ({ route }) => {
72
74
  navigation.navigate(Routes.SmartAccountConnecting, {
73
75
  listSensorIds: route.params.listSensorIds,
74
76
  station: subUnits[selectedIndex]?.id,
77
+ nameSubUnit: nameSubUnit,
78
+ sensor_data: sensor_data,
79
+ listSelectDevice: listSelectDevice,
80
+ smart_account_id: smart_account_id,
75
81
  });
76
82
  break;
77
83
  case 'AddVconnexDevice':
@@ -95,9 +101,14 @@ const AddCommonSelectSubUnit = ({ route }) => {
95
101
  unit?.name,
96
102
  unit.user_id,
97
103
  route.params,
104
+ nameSubUnit,
105
+ sensor_data,
106
+ listSelectDevice,
107
+ smart_account_id,
98
108
  ]);
99
109
 
100
110
  const handleSelectIndex = (index) => {
111
+ setNameSubUnit(subUnits[index].name);
101
112
  if (index !== selectedIndex) {
102
113
  setSelectedIndex(index);
103
114
  } else {