@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 +1 -1
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
- package/src/commons/Device/FlatListItems.js +1 -1
- package/src/commons/Device/WaterQualitySensor/ListQualityIndicator.js +1 -1
- package/src/configs/API.js +1 -1
- package/src/screens/AddNewAction/SelectAction.js +1 -1
- package/src/screens/ScriptDetail/index.js +1 -1
package/package.json
CHANGED
|
@@ -105,7 +105,7 @@ const OptionsDropdownActionTemplate = ({
|
|
|
105
105
|
if (!config) {
|
|
106
106
|
return t('not_available');
|
|
107
107
|
}
|
|
108
|
-
return selectedOption
|
|
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
|
|
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.
|
|
52
|
+
measure={item.unit}
|
|
53
53
|
evaluate={item.evaluate}
|
|
54
54
|
style={styles.boxStatus}
|
|
55
55
|
descriptionScreen={Routes.TDSGuide}
|
package/src/configs/API.js
CHANGED
|
@@ -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/
|
|
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 ||
|
|
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(
|