@eohjsc/react-native-smart-city 0.3.78 → 0.3.79

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.3.78",
4
+ "version": "0.3.79",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -105,7 +105,7 @@ const OptionsDropdownActionTemplate = ({
105
105
  if (!config) {
106
106
  return t('not_available');
107
107
  }
108
- return selectedOption.text;
108
+ return selectedOption?.text;
109
109
  }, [config, selectedOption?.text, t]);
110
110
 
111
111
  const iconSvg = useMemo(() => {
@@ -190,7 +190,7 @@ const OptionsDropdownActionTemplate = ({
190
190
  setSelectedIndex(index);
191
191
  }}
192
192
  >
193
- <Text style={styles.text}>{item.text}</Text>
193
+ <Text style={styles.text}>{item?.text}</Text>
194
194
  </TouchableOpacity>
195
195
  </View>
196
196
  ))}
@@ -49,7 +49,7 @@ const FlatListItems = memo(({ data, style, title, offsetTitle }) => {
49
49
  key={item?.id}
50
50
  standard={item.standard}
51
51
  value={item.value}
52
- measure={item.measure}
52
+ measure={item.unit}
53
53
  evaluate={item.evaluate}
54
54
  style={styles.boxStatus}
55
55
  descriptionScreen={Routes.TDSGuide}
@@ -17,7 +17,7 @@ const ListQualityIndicator = ({ data, style }) => {
17
17
  standard={item.standard}
18
18
  value={getValue}
19
19
  evaluate={item.evaluate}
20
- measure={item.measure}
20
+ measure={item.unit}
21
21
  />
22
22
  );
23
23
  }, []);
@@ -53,7 +53,7 @@ const API = {
53
53
  },
54
54
  DEVICE: {
55
55
  SENSOR_DETAIL: (id) => `/property_manager/sensors/${id}/`,
56
- DISPLAY: (id) => `/property_manager/sensors/${id}/display/`,
56
+ DISPLAY: (id) => `/property_manager/devices/${id}/display/`,
57
57
  SIDE_MENU_DETAIL: (id, side_menu_id) =>
58
58
  `/property_manager/devices/${id}/display/side_menu/${side_menu_id}/`,
59
59
  DISPLAY_VALUES_V2: (id) =>
@@ -169,7 +169,7 @@ const SelectAction = memo(({ route }) => {
169
169
  Alert.alert('', t('choose_only_one'));
170
170
  return;
171
171
  }
172
- if (isSelectSensor || isSetupEvent) {
172
+ if (isSelectSensor || sensorData?.length > 0) {
173
173
  await checkConditionToContinue();
174
174
  } else {
175
175
  if (automateId) {
@@ -419,7 +419,7 @@ const ScriptDetail = ({ route }) => {
419
419
  [AUTOMATE_TYPE.EVENT, AUTOMATE_TYPE.EVENT_ACTION].includes(type)
420
420
  ) {
421
421
  const { action, end_device_name, config_name, sensor_type, value } =
422
- automate?.event;
422
+ automate?.event || automate?.event_action || automate?.event_sensor;
423
423
  let textEvent = '';
424
424
  if (config_name) {
425
425
  const stateConditionData = STATE_VALUE_SENSOR_TYPES.find(