@eohjsc/react-native-smart-city 0.7.3-rc20 → 0.7.3-rc22
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,27 +1,27 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native';
|
|
1
2
|
import React, {
|
|
2
|
-
useState,
|
|
3
3
|
useCallback,
|
|
4
|
-
useMemo,
|
|
5
4
|
useEffect,
|
|
5
|
+
useMemo,
|
|
6
6
|
useRef,
|
|
7
|
+
useState,
|
|
7
8
|
} from 'react';
|
|
8
|
-
import {
|
|
9
|
-
import { useNavigation } from '@react-navigation/native';
|
|
9
|
+
import { Image, Keyboard, TouchableWithoutFeedback, View } from 'react-native';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
import { API, Colors } from '../../configs';
|
|
13
|
-
import { ViewButtonBottom, ImagePicker } from '../../commons';
|
|
14
|
-
import Text from '../../commons/Text';
|
|
11
|
+
import { ImagePicker, ViewButtonBottom } from '../../commons';
|
|
15
12
|
import _TextInput from '../../commons/Form/TextInput';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { ToastBottomHelper } from '../../utils/Utils';
|
|
13
|
+
import Text from '../../commons/Text';
|
|
14
|
+
import { API, Colors } from '../../configs';
|
|
19
15
|
import { AccessibilityLabel } from '../../configs/Constants';
|
|
20
|
-
import
|
|
16
|
+
import { useSCContextSelector } from '../../context';
|
|
21
17
|
import useKeyboardShow from '../../hooks/Common/useKeyboardShow';
|
|
18
|
+
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
22
19
|
import { replace } from '../../navigations/utils';
|
|
20
|
+
import { axiosPost, createFormData } from '../../utils/Apis/axios';
|
|
23
21
|
import { useBackendPermission } from '../../utils/Permission/backend';
|
|
24
|
-
import
|
|
22
|
+
import Routes from '../../utils/Route';
|
|
23
|
+
import { ToastBottomHelper } from '../../utils/Utils';
|
|
24
|
+
import styles from './AddSubUnitStyles';
|
|
25
25
|
|
|
26
26
|
const AddSubUnit = ({ route }) => {
|
|
27
27
|
const t = useTranslations();
|
|
@@ -64,7 +64,7 @@ const AddSubUnit = ({ route }) => {
|
|
|
64
64
|
lat: location.latitude,
|
|
65
65
|
lng: location.longitude,
|
|
66
66
|
};
|
|
67
|
-
const formData = createFormData(dataObj, ['background'
|
|
67
|
+
const formData = createFormData(dataObj, ['background']);
|
|
68
68
|
const { success, data } = await axiosPost(
|
|
69
69
|
API.UNIT.CREATE_UNIT(),
|
|
70
70
|
formData,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import { View, TouchableOpacity, Image } from 'react-native';
|
|
3
1
|
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
|
2
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { Image, TouchableOpacity, View } from 'react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { API, Colors } from '../../configs';
|
|
7
|
+
import useBoolean from '../../hooks/Common/useBoolean';
|
|
8
8
|
import {
|
|
9
|
-
axiosPatch,
|
|
10
9
|
axiosDelete,
|
|
10
|
+
axiosPatch,
|
|
11
11
|
createFormData,
|
|
12
12
|
} from '../../utils/Apis/axios';
|
|
13
13
|
import Routes from '../../utils/Route';
|
|
14
|
-
import
|
|
14
|
+
import { ToastBottomHelper } from '../../utils/Utils';
|
|
15
15
|
|
|
16
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
16
17
|
import { ImagePicker, Section } from '../../commons';
|
|
17
18
|
import AlertAction from '../../commons/AlertAction';
|
|
18
19
|
import _TextInput from '../../commons/Form/TextInput';
|
|
19
20
|
import Text from '../../commons/Text';
|
|
20
21
|
import { AccessibilityLabel } from '../../configs/Constants';
|
|
21
|
-
import { IconOutline } from '@ant-design/icons-react-native';
|
|
22
|
-
import { useEmeragencyContacts } from './hooks/useEmergencyContacts';
|
|
23
22
|
import useKeyboardAnimated from '../../hooks/Explore/useKeyboardAnimated';
|
|
24
23
|
import styles from './EditSubUnitStyles';
|
|
24
|
+
import { useEmeragencyContacts } from './hooks/useEmergencyContacts';
|
|
25
25
|
|
|
26
26
|
const EditSubUnit = ({ route }) => {
|
|
27
27
|
const { unit, station } = route?.params || {};
|
|
@@ -118,6 +118,7 @@ const EditSubUnit = ({ route }) => {
|
|
|
118
118
|
if (success) {
|
|
119
119
|
//dispatch(removeSubUnit(station.id));
|
|
120
120
|
ToastBottomHelper.success(t('text_remove_sub_unit_success'));
|
|
121
|
+
navigation.pop();
|
|
121
122
|
onBack();
|
|
122
123
|
} else {
|
|
123
124
|
ToastBottomHelper.error(t('text_remove_sub_unit_fail'));
|