@eohjsc/react-native-smart-city 0.7.3 → 0.7.5
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/assets/images/Automation-fill.svg +85 -0
- package/assets/images/Map/LocationPin.svg +10 -0
- package/assets/images/Scenario-filled.svg +22 -0
- package/assets/images/schedule-fill.svg +48 -0
- package/package.json +20 -17
- package/src/commons/Action/ItemQuickAction.js +1 -1
- package/src/commons/Action/__test__/ItemQuickAction.test.js +6 -6
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +5 -5
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
- package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SliderRangeTemplate.js +7 -7
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
- package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonCircle.test.js +2 -2
- package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonDefault.test.js +2 -2
- package/src/commons/ActionGroup/TimerActionTemplate.js +6 -3
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
- package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +9 -10
- package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +5 -5
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +5 -5
- package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +8 -8
- package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +3 -3
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +6 -6
- package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/index.test.js +6 -6
- package/src/commons/ActionGroup/index.js +2 -2
- package/src/commons/ActionTemplate/__test__/index.test.js +4 -4
- package/src/commons/Automate/ItemAutomate.js +9 -41
- package/src/commons/Automate/ItemConditionScriptDetail.js +67 -0
- package/src/commons/Automate/ItemConditionScriptDetailStyles.js +46 -0
- package/src/commons/Automate/__test__/ItemAutomate.test.js +0 -21
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/BottomButtonView/index.js +1 -0
- package/src/commons/ButtonPopup/index.js +3 -2
- package/src/commons/ChartAggregationOption/__test__/FourButtonFilterHistory.test.js +2 -2
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +8 -9
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +7 -7
- package/src/commons/DateTimeRangeChange/DateTimeButton.js +3 -3
- package/src/commons/DateTimeRangeChange/index.js +1 -1
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
- package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +1 -1
- package/src/commons/Device/FlatListItems.js +20 -19
- package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -3
- package/src/commons/Device/HorizontalBarChart.js +54 -34
- package/src/commons/Device/ItemAddNew/index.js +2 -2
- package/src/commons/Device/ItemDevice.js +5 -21
- package/src/commons/Device/SonosSpeaker/index.js +3 -3
- package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
- package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +6 -2
- package/src/commons/DisplayChecking/index.js +2 -2
- package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
- package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
- package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +3 -3
- package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +6 -6
- package/src/commons/FlatListDnD/__test__/index.test.js +4 -4
- package/src/commons/FlatListDnD/index.js +12 -9
- package/src/commons/Grid/GridItem.js +10 -2
- package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +3 -3
- package/src/commons/Header/HeaderCustom.js +2 -2
- package/src/commons/Header/__test__/HeaderCT.test.js +3 -3
- package/src/commons/HeaderAni/index.js +2 -2
- package/src/commons/IconComponent/index.js +3 -3
- package/src/commons/ImagePicker/__test__/ImagePicker.test.js +5 -5
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +6 -4
- package/src/commons/MenuActionMore/MenuActionMoreStyles.js +2 -1
- package/src/commons/MenuActionMore/index.js +1 -1
- package/src/commons/NavBar/NavBarStyles.js +1 -1
- package/src/commons/NavBar/index.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +1 -1
- package/src/commons/Popover/__test__/index.test.js +3 -3
- package/src/commons/Processing/__test__/Connecting.test.js +4 -4
- package/src/commons/SearchLocation/index.js +3 -3
- package/src/commons/SelectActionCard/index.js +2 -2
- package/src/commons/SelectSubUnit/index.js +6 -2
- package/src/commons/SelectUnit/__test__/SelectUnit.test.js +5 -5
- package/src/commons/Sharing/BtnRemoveMember.js +2 -2
- package/src/commons/Sharing/StationDevicePermissions.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +6 -7
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +0 -2
- package/src/commons/SubUnit/OneTap/index.js +9 -8
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +8 -8
- package/src/commons/Unit/HeaderUnit/index.js +30 -22
- package/src/commons/Unit/SharedUnit.js +7 -7
- package/src/commons/Widgets/IFrame/__tests__/IFrame.test.js +9 -13
- package/src/commons/Widgets/IFrameWithConfig/IFrameWithConfig.js +34 -2
- package/src/commons/Widgets/IFrameWithConfig/__tests__/IFrameWithConfig.test.js +88 -8
- package/src/commons/WrapParallaxScrollView/index.js +9 -10
- package/src/configs/API.js +1 -1
- package/src/configs/AccessibilityLabel.js +2 -0
- package/src/configs/Constants.js +3 -3
- package/src/configs/Theme.js +1 -1
- package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +5 -5
- package/src/hooks/IoT/__test__/useHomeAssistantConnection.test.js +12 -12
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +14 -7
- package/src/hooks/IoT/__test__/useWatchConfigs.test.js +3 -3
- package/src/hooks/IoT/useRemoteControl.js +24 -13
- package/src/hooks/useMqtt.js +2 -2
- package/src/iot/RemoteControl/Bluetooth.js +19 -22
- package/src/iot/RemoteControl/Internet.js +13 -5
- package/src/iot/RemoteControl/__test__/Internet.test.js +7 -7
- package/src/navigations/EmergencyContactsStack.js +4 -3
- package/src/navigations/SharedStack.js +2 -0
- package/src/navigations/UnitStack.js +56 -57
- package/src/screens/AQIGuide/index.js +0 -2
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddLocationMaps/__test__/index.test.js +12 -12
- package/src/screens/AddLocationMaps/index.js +16 -19
- package/src/screens/AddLocationMaps/indexStyle.js +1 -0
- package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
- package/src/screens/AddNewGateway/SelectDeviceType.js +1 -1
- package/src/screens/AddNewGateway/ShareWifiPassword.js +16 -15
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +7 -7
- package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +8 -8
- package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +7 -7
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +8 -8
- package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +5 -5
- package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +4 -4
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +6 -6
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +6 -6
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +0 -4
- package/src/screens/AddNewGateway/hooks/__Tests__/useWifiManage.test.js +2 -2
- package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +19 -17
- package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +19 -17
- package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +18 -16
- package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +43 -35
- package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +38 -22
- package/src/screens/AllGateway/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/components/Detail/__test__/index.test.js +3 -5
- package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +3 -3
- package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/hooks/__test__/index.test.js +2 -2
- package/src/screens/AllGateway/test-utils.js +3 -4
- package/src/screens/Automate/AddNewAction/ChooseAction.js +17 -3
- package/src/screens/Automate/AddNewAction/ChooseConfig.js +7 -6
- package/src/screens/Automate/AddNewAction/NewActionWrapper.js +8 -8
- package/src/screens/Automate/AddNewAction/SelectControlDevices.js +30 -20
- package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +58 -44
- package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
- package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
- package/src/screens/Automate/AddNewAction/Styles/SetupSensorStyles.js +20 -4
- package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +12 -12
- package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +14 -8
- package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +13 -7
- package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +54 -15
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptDelay.test.js +9 -9
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +39 -10
- package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +10 -10
- package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +13 -8
- package/src/screens/Automate/Components/InputName.js +10 -7
- package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +8 -8
- package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +6 -6
- package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +7 -7
- package/src/screens/Automate/EditActionsList/index.js +19 -17
- package/src/screens/Automate/MultiUnits.js +19 -22
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +18 -8
- package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +15 -7
- package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
- package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +4 -7
- package/src/screens/Automate/ScriptDetail/__test__/index.test.js +56 -18
- package/src/screens/Automate/ScriptDetail/__test__/useStarredScript.test.js +6 -6
- package/src/screens/Automate/ScriptDetail/index.js +105 -41
- package/src/screens/Automate/SetSchedule/__test__/SelectWeekday.test.js +4 -4
- package/src/screens/Automate/SetSchedule/__test__/index.test.js +29 -18
- package/src/screens/Automate/SetSchedule/components/RowItem.js +5 -5
- package/src/screens/Automate/SetSchedule/index.js +8 -7
- package/src/screens/Automate/Styles/indexStyles.js +1 -1
- package/src/screens/Automate/__test__/MultiUnits.test.js +1 -4
- package/src/screens/Automate/__test__/index.test.js +0 -1
- package/src/screens/Automate/index.js +36 -34
- package/src/screens/ChangePosition/__test__/index.test.js +6 -6
- package/src/screens/ChangePosition/index.js +2 -1
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +13 -13
- package/src/screens/Device/EditDevice/index.js +4 -4
- package/src/screens/Device/__test__/BluetoothDevice.test.js +300 -0
- package/src/screens/Device/__test__/detail.test.js +14 -14
- package/src/screens/Device/__test__/mqttDetail.test.js +9 -9
- package/src/screens/Device/components/BluetoothDevice.js +135 -0
- package/src/screens/Device/components/SensorDisplayItem.js +9 -8
- package/src/screens/Device/detail.js +70 -62
- package/src/screens/Device/hooks/useEvaluateValue.js +1 -1
- package/src/screens/Drawer/Drawer.test.js +2 -2
- package/src/screens/Drawer/index.js +3 -3
- package/src/screens/EmergencyContacts/EmergencyContactsList.js +8 -4
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +7 -7
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +8 -8
- package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
- package/src/screens/GuestInfo/components/__test__/AccessScheduleSheet.test.js +3 -3
- package/src/screens/GuestInfo/index.js +2 -2
- package/src/screens/HanetCamera/ManageAccess.js +3 -3
- package/src/screens/HanetCamera/MemberInfo.js +2 -2
- package/src/screens/HanetCamera/__test__/Detail.test.js +9 -9
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +10 -10
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
- package/src/screens/ManageAccess/index.js +3 -3
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +9 -9
- package/src/screens/Notification/__test__/Notification.test.js +9 -9
- package/src/screens/Notification/components/NotificationItem.js +3 -4
- package/src/screens/Notification/index.js +3 -3
- package/src/screens/Notification/styles/NotificationItemStyles.js +0 -1
- package/src/screens/PlayBackCamera/__test__/index.test.js +1 -1
- package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +1 -1
- package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
- package/src/screens/SelectUnit/__test__/index.test.js +8 -8
- package/src/screens/SelectUnit/index.js +4 -4
- package/src/screens/SharedUnit/TabHeader.js +2 -2
- package/src/screens/Sharing/Components/EndDevice.js +3 -3
- package/src/screens/Sharing/UnitMemberList.js +2 -2
- package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +7 -7
- package/src/screens/SideMenuDetail/__test__/index.test.js +8 -8
- package/src/screens/SmartAccount/Connecting/index.js +5 -5
- package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +8 -8
- package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +7 -7
- package/src/screens/SmartAccount/SuccessfullyConnected/index.js +2 -2
- package/src/screens/SmartAccount/__test__/Connecting.test.js +6 -6
- package/src/screens/SmartAccount/__test__/SmartAccount.test.js +10 -10
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +3 -2
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +2 -2
- package/src/screens/SmartIr/components/SelectBrand.js +2 -2
- package/src/screens/SubUnit/AddSubUnit.js +28 -26
- package/src/screens/SubUnit/AddSubUnitStyles.js +10 -4
- package/src/screens/SubUnit/EditSubUnit.js +12 -11
- package/src/screens/SubUnit/ManageSubUnit.js +3 -3
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +13 -13
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +3 -3
- package/src/screens/Template/EditTemplate.js +6 -4
- package/src/screens/Template/__test__/EditTemplate.test.js +7 -7
- package/src/screens/Template/__test__/detail.test.js +4 -4
- package/src/screens/Template/__test__/index.test.js +1 -1
- package/src/screens/UVIndexGuide/index.js +2 -4
- package/src/screens/Unit/Detail.js +1 -5
- package/src/screens/Unit/MoreMenu.js +6 -5
- package/src/screens/Unit/SelectAddToFavorites.js +2 -2
- package/src/screens/Unit/SelectAddress.js +16 -12
- package/src/screens/Unit/Station/__test__/index.test.js +1 -1
- package/src/screens/Unit/__test__/MoreMenu.test.js +5 -1
- package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +9 -9
- package/src/screens/Unit/__test__/SelectAddress.test.js +11 -17
- package/src/screens/Unit/__test__/Summaries.test.js +7 -7
- package/src/screens/Unit/components/AutomateScript/index.js +5 -5
- package/src/screens/Unit/components/ButtonWrapper/index.js +3 -3
- package/src/screens/Unit/components/Header/index.js +2 -2
- package/src/screens/Unit/components/SharedUnit/index.js +5 -5
- package/src/screens/Unit/components/__test__/AutomateScript.test.js +3 -3
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +8 -8
- package/src/screens/Unit/hook/__test__/useUnitConnectRemoteDevices.test.js +2 -2
- package/src/screens/UnitSummary/components/AirQuality/index.js +6 -11
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +5 -5
- package/src/screens/UnitSummary/index.js +6 -2
- package/src/utils/Apis/axios.js +5 -5
- package/src/utils/Functions/ShortEmail.js +1 -0
- package/src/utils/I18n/translations/en.js +6 -3
- package/src/utils/I18n/translations/vi.js +8 -4
- package/src/utils/__test__/Utils.test.js +16 -16
- package/src/utils/bluetooth.js +3 -0
- package/assets/images/OneTap.svg +0 -14
- package/assets/images/Schedule.svg +0 -39
- package/assets/images/ValueChange.svg +0 -49
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import Text from '../../../commons/Text';
|
|
5
5
|
import styles from '../styles/indexStyles';
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ const RowGuestInfo = ({
|
|
|
19
19
|
<View style={styles.rowRight}>
|
|
20
20
|
<Text type="Body">{textRight}</Text>
|
|
21
21
|
{rightArrow && (
|
|
22
|
-
<
|
|
22
|
+
<IconOutline name="right" size={20} style={styles.icon} />
|
|
23
23
|
)}
|
|
24
24
|
</View>
|
|
25
25
|
</View>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { act, create } from 'react-test-renderer';
|
|
3
3
|
|
|
4
|
+
import BottomSheet from '../../../../commons/BottomSheet';
|
|
4
5
|
import { SCProvider } from '../../../../context';
|
|
5
6
|
import { mockSCStore } from '../../../../context/mockStore';
|
|
6
7
|
import AccessScheduleSheet from '../AccessScheduleSheet';
|
|
7
|
-
import BottomSheet from '../../../../commons/BottomSheet';
|
|
8
8
|
|
|
9
9
|
const wrapComponent = (props) => (
|
|
10
10
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -47,6 +47,6 @@ describe('AccessScheduleSheet', () => {
|
|
|
47
47
|
await act(async () => {
|
|
48
48
|
bottomSheet[0].props.onBackdropPress();
|
|
49
49
|
});
|
|
50
|
-
expect(mockOnHide).
|
|
50
|
+
expect(mockOnHide).toHaveBeenCalled();
|
|
51
51
|
});
|
|
52
52
|
});
|
|
@@ -7,7 +7,7 @@ import RowGuestInfo from './components/RowGuestInfo';
|
|
|
7
7
|
import HeaderGuestInfo from './components/HeaderGuestInfo';
|
|
8
8
|
import AccessScheduleSheet from './components/AccessScheduleSheet';
|
|
9
9
|
import { CircleView } from '../../commons/CircleView';
|
|
10
|
-
import
|
|
10
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
11
11
|
import Text from '../../commons/Text';
|
|
12
12
|
import { useBoolean } from '../../hooks/Common';
|
|
13
13
|
import { axiosGet, axiosPut } from '../../utils/Apis/axios';
|
|
@@ -113,7 +113,7 @@ const GuestInfo = ({ route }) => {
|
|
|
113
113
|
/>
|
|
114
114
|
) : (
|
|
115
115
|
<CircleView size={88} center style={styles.avatar}>
|
|
116
|
-
<
|
|
116
|
+
<IconOutline name="user" size={44} color={Colors.Pink1} />
|
|
117
117
|
</CircleView>
|
|
118
118
|
)}
|
|
119
119
|
<Text type="H3" bold>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { View, TouchableOpacity, Image, FlatList } from 'react-native';
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
|
-
import
|
|
4
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
5
5
|
import { HeaderCustom } from '../../commons/Header';
|
|
6
6
|
import Text from '../../commons/Text';
|
|
7
7
|
import RequestFaceIDPopup from './components/RequestFaceIDPopup';
|
|
@@ -74,7 +74,7 @@ const HanetManageAccess = ({ route }) => {
|
|
|
74
74
|
{' '}
|
|
75
75
|
{item.name}
|
|
76
76
|
</Text>
|
|
77
|
-
<
|
|
77
|
+
<IconOutline name="right" size={20} color={Colors.Gray6} />
|
|
78
78
|
</TouchableOpacity>
|
|
79
79
|
);
|
|
80
80
|
},
|
|
@@ -89,7 +89,7 @@ const HanetManageAccess = ({ route }) => {
|
|
|
89
89
|
onPress={setShowAddMemberModal}
|
|
90
90
|
accessibilityLabel={AccessibilityLabel.HANET_MANAGE_ACCESS_ADD_BUTTON}
|
|
91
91
|
>
|
|
92
|
-
<
|
|
92
|
+
<IconOutline name={'plus'} size={27} color={Colors.Black} />
|
|
93
93
|
</TouchableOpacity>
|
|
94
94
|
</View>
|
|
95
95
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { View, TouchableOpacity, Image } from 'react-native';
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
|
-
import
|
|
4
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
5
5
|
|
|
6
6
|
import { HeaderCustom } from '../../commons/Header';
|
|
7
7
|
import { AlertAction, FullLoading } from '../../commons';
|
|
@@ -173,7 +173,7 @@ const HanetMemberInfo = ({ route }) => {
|
|
|
173
173
|
onPress={setShowSetFaceIDModal}
|
|
174
174
|
style={[styles.row, !!error && { borderBottomColor: Colors.Red6 }]}
|
|
175
175
|
>
|
|
176
|
-
<
|
|
176
|
+
<IconOutline name="camera" size={27} color={Colors.Primary} />
|
|
177
177
|
<Text
|
|
178
178
|
type="Body"
|
|
179
179
|
bold
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { FlatList } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import MockAdapter from 'axios-mock-adapter';
|
|
4
|
+
import { act, create } from 'react-test-renderer';
|
|
5
5
|
|
|
6
|
+
import moment from 'moment';
|
|
7
|
+
import { MenuActionMore } from '../../../commons';
|
|
8
|
+
import Calendar from '../../../commons/Calendar';
|
|
9
|
+
import { API } from '../../../configs';
|
|
10
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
6
11
|
import { SCProvider } from '../../../context';
|
|
7
12
|
import { mockSCStore } from '../../../context/mockStore';
|
|
13
|
+
import api from '../../../utils/Apis/axios';
|
|
8
14
|
import HanetCameraDetail from '../Detail';
|
|
9
15
|
import CheckinHeader from '../components/CheckinHeader';
|
|
10
|
-
import moment from 'moment';
|
|
11
|
-
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
12
|
-
import Calendar from '../../../commons/Calendar';
|
|
13
|
-
import api from '../../../utils/Apis/axios';
|
|
14
|
-
import { API } from '../../../configs';
|
|
15
|
-
import { MenuActionMore } from '../../../commons';
|
|
16
16
|
|
|
17
17
|
const wrapComponent = (route) => (
|
|
18
18
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -103,7 +103,7 @@ describe('Test HanetCameraDetail', () => {
|
|
|
103
103
|
expect(textCountStranger.props.children).toBe(1);
|
|
104
104
|
const MenuActionMores = instance.findByType(MenuActionMore);
|
|
105
105
|
await MenuActionMores.props.onItemClick({ data: 'test' });
|
|
106
|
-
expect(global.mockedNavigate).
|
|
106
|
+
expect(global.mockedNavigate).toHaveBeenCalled();
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
it('Test change date', async () => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import MockAdapter from 'axios-mock-adapter';
|
|
4
|
+
import { act, create } from 'react-test-renderer';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { mockSCStore } from '../../../context/mockStore';
|
|
8
|
-
import HanetMemberInfo from '../MemberInfo';
|
|
6
|
+
import { useNavigation } from '@react-navigation/native';
|
|
9
7
|
import { AlertAction } from '../../../commons';
|
|
10
|
-
import TextInput from '../../../commons/Form/TextInput';
|
|
11
8
|
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
12
9
|
import BottomSheet from '../../../commons/BottomSheet';
|
|
10
|
+
import TextInput from '../../../commons/Form/TextInput';
|
|
11
|
+
import { API } from '../../../configs';
|
|
13
12
|
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
13
|
+
import { SCProvider } from '../../../context';
|
|
14
|
+
import { mockSCStore } from '../../../context/mockStore';
|
|
14
15
|
import api from '../../../utils/Apis/axios';
|
|
15
|
-
import
|
|
16
|
-
import { useNavigation } from '@react-navigation/native';
|
|
16
|
+
import HanetMemberInfo from '../MemberInfo';
|
|
17
17
|
|
|
18
18
|
const wrapComponent = (route) => (
|
|
19
19
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -113,7 +113,7 @@ describe('Test HanetMemberInfo', () => {
|
|
|
113
113
|
await chooseSetFaceIDOption(instance, 0);
|
|
114
114
|
|
|
115
115
|
expect(bottomSheet.props.isVisible).toBe(false);
|
|
116
|
-
expect(navigate).
|
|
116
|
+
expect(navigate).toHaveBeenCalled(); // navigate to HanetCaptureFaceID
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
it('Test set photo id choose file', async () => {
|
|
@@ -176,6 +176,6 @@ describe('Test HanetMemberInfo', () => {
|
|
|
176
176
|
await act(async () => {
|
|
177
177
|
await bottomButton.props.onPressMain();
|
|
178
178
|
});
|
|
179
|
-
expect(navigate).
|
|
179
|
+
expect(navigate).toHaveBeenCalled();
|
|
180
180
|
});
|
|
181
181
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
3
|
import ImagePicker from 'react-native-image-crop-picker';
|
|
4
|
-
import
|
|
4
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
5
5
|
import Text from '../../../commons/Text';
|
|
6
6
|
import BottomSheet from '../../../commons/BottomSheet';
|
|
7
7
|
import { Colors } from '../../../configs';
|
|
@@ -19,7 +19,7 @@ const RequestFaceIDPopup = ({
|
|
|
19
19
|
const t = useTranslations();
|
|
20
20
|
const options = [
|
|
21
21
|
{
|
|
22
|
-
icon: <
|
|
22
|
+
icon: <IconOutline name="camera" color={Colors.Gray9} size={27} />,
|
|
23
23
|
text: t('capture_image'),
|
|
24
24
|
onChoose: () => {
|
|
25
25
|
setHide();
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { useNavigation, useIsFocused } from '@react-navigation/native';
|
|
10
10
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
11
11
|
import { HeaderCustom } from '../../commons/Header';
|
|
12
|
-
import
|
|
12
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
13
13
|
import styles from './styles/ManageAccessStyles';
|
|
14
14
|
import { Colors } from '../../configs';
|
|
15
15
|
import Text from '../../commons/Text';
|
|
@@ -75,7 +75,7 @@ const ManageAccessScreen = memo(({ route }) => {
|
|
|
75
75
|
// accessibilityLabel={AccessibilityLabel.SIDE_MENU_AVATAR_USER}
|
|
76
76
|
/>
|
|
77
77
|
) : (
|
|
78
|
-
<
|
|
78
|
+
<IconOutline
|
|
79
79
|
name="user"
|
|
80
80
|
size={20}
|
|
81
81
|
color={Colors.White}
|
|
@@ -90,7 +90,7 @@ const ManageAccessScreen = memo(({ route }) => {
|
|
|
90
90
|
subtext={item.schedule}
|
|
91
91
|
onPress={() => goToGuestInfo(item.id)}
|
|
92
92
|
rightComponent={
|
|
93
|
-
<
|
|
93
|
+
<IconOutline
|
|
94
94
|
name="right"
|
|
95
95
|
size={20}
|
|
96
96
|
color={Colors.Gray6}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import MockAdapter from 'axios-mock-adapter';
|
|
3
|
-
import { create } from 'react-test-renderer';
|
|
4
1
|
import { act } from '@testing-library/react-hooks';
|
|
2
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import { TouchableOpacity } from 'react-native';
|
|
5
|
+
import { create } from 'react-test-renderer';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { API } from '../../../configs';
|
|
7
|
+
import { useNavigation } from '@react-navigation/native';
|
|
9
8
|
import MoveToAnotherSubUnit from '../';
|
|
9
|
+
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
10
|
+
import { API } from '../../../configs';
|
|
11
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
10
12
|
import { SCProvider } from '../../../context';
|
|
11
13
|
import { mockSCStore } from '../../../context/mockStore';
|
|
12
|
-
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
13
14
|
import api from '../../../utils/Apis/axios';
|
|
14
|
-
import { useNavigation } from '@react-navigation/native';
|
|
15
15
|
|
|
16
16
|
const mock = new MockAdapter(api.axiosInstance);
|
|
17
17
|
|
|
@@ -128,7 +128,7 @@ describe('Test Render ListSubUnit', () => {
|
|
|
128
128
|
await bottomButtonView.props.onPressMain();
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
expect(global.mockedNavigate).
|
|
131
|
+
expect(global.mockedNavigate).toHaveBeenCalled();
|
|
132
132
|
const touchableOpacities = instance.findAllByType(TouchableOpacity);
|
|
133
133
|
await act(async () => {
|
|
134
134
|
await touchableOpacities[2].props.onPress();
|
|
@@ -140,6 +140,6 @@ describe('Test Render ListSubUnit', () => {
|
|
|
140
140
|
await act(async () => {
|
|
141
141
|
await bottomButtonView.props.onPressMain();
|
|
142
142
|
});
|
|
143
|
-
expect(global.mockedNavigate).not.
|
|
143
|
+
expect(global.mockedNavigate).not.toHaveBeenCalled();
|
|
144
144
|
});
|
|
145
145
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { act, create } from 'react-test-renderer';
|
|
1
|
+
import { NavigationContext } from '@react-navigation/native';
|
|
3
2
|
import MockAdapter from 'axios-mock-adapter';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { Animated, RefreshControl } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { act, create } from 'react-test-renderer';
|
|
6
6
|
|
|
7
|
+
import { WrapHeaderScrollable } from '../../../commons';
|
|
8
|
+
import { API } from '../../../configs';
|
|
7
9
|
import { SCProvider } from '../../../context';
|
|
8
10
|
import { mockSCStore } from '../../../context/mockStore';
|
|
9
|
-
import Notification from '../index';
|
|
10
|
-
import NotificationItem from '../components/NotificationItem';
|
|
11
|
-
import { API } from '../../../configs';
|
|
12
11
|
import api from '../../../utils/Apis/axios';
|
|
13
|
-
import
|
|
12
|
+
import NotificationItem from '../components/NotificationItem';
|
|
13
|
+
import Notification from '../index';
|
|
14
14
|
|
|
15
|
-
import { getPusher } from '../../../utils/Pusher';
|
|
16
15
|
import { NOTIFICATION_TYPES } from '../../../configs/Constants';
|
|
16
|
+
import { getPusher } from '../../../utils/Pusher';
|
|
17
17
|
|
|
18
18
|
const wrapComponent = () => (
|
|
19
19
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -155,7 +155,7 @@ describe('test Notification', () => {
|
|
|
155
155
|
tree = await create(wrapComponent());
|
|
156
156
|
await tree.unmount();
|
|
157
157
|
});
|
|
158
|
-
expect(getPusher().unsubscribe).
|
|
158
|
+
expect(getPusher().unsubscribe).toHaveBeenCalledWith('private-user-1');
|
|
159
159
|
});
|
|
160
160
|
it('test render trigger script notification', async () => {
|
|
161
161
|
const response = {
|
|
@@ -3,6 +3,7 @@ import moment from 'moment';
|
|
|
3
3
|
import React, { memo, useCallback, useState } from 'react';
|
|
4
4
|
import { Image, TouchableOpacity, View } from 'react-native';
|
|
5
5
|
|
|
6
|
+
import Notify from '../../../../assets/images/Notify.svg';
|
|
6
7
|
import IconComponent from '../../../commons/IconComponent';
|
|
7
8
|
import Text from '../../../commons/Text';
|
|
8
9
|
import { API, Colors, SCConfig } from '../../../configs';
|
|
@@ -16,7 +17,6 @@ import { useTranslations } from '../../../hooks/Common/useTranslations';
|
|
|
16
17
|
import { axiosPost } from '../../../utils/Apis/axios';
|
|
17
18
|
import Routes from '../../../utils/Route';
|
|
18
19
|
import styles from '../styles/NotificationItemStyles';
|
|
19
|
-
import Notify from '../../../../assets/images/Notify.svg';
|
|
20
20
|
|
|
21
21
|
const NotificationItem = memo(({ item }) => {
|
|
22
22
|
const t = useTranslations();
|
|
@@ -72,8 +72,7 @@ const NotificationItem = memo(({ item }) => {
|
|
|
72
72
|
},
|
|
73
73
|
iconContent: (
|
|
74
74
|
<IconComponent
|
|
75
|
-
icon=
|
|
76
|
-
outlined
|
|
75
|
+
icon="usergroup-add"
|
|
77
76
|
style={styles.backgroundSummer}
|
|
78
77
|
/>
|
|
79
78
|
),
|
|
@@ -439,7 +438,7 @@ const NotificationItem = memo(({ item }) => {
|
|
|
439
438
|
navigation.navigate(Routes.UnitStack, {
|
|
440
439
|
screen: Routes.ScriptDetail,
|
|
441
440
|
params: {
|
|
442
|
-
id: automate_id,
|
|
441
|
+
preAutomate: { id: automate_id },
|
|
443
442
|
},
|
|
444
443
|
});
|
|
445
444
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useMemo, useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useFocusEffect } from '@react-navigation/native';
|
|
5
5
|
|
|
6
6
|
import styles from './styles/indexStyles';
|
|
@@ -33,7 +33,7 @@ const Notification = memo(() => {
|
|
|
33
33
|
notImplemented(t);
|
|
34
34
|
}}
|
|
35
35
|
>
|
|
36
|
-
<
|
|
36
|
+
<IconOutline name={'plus'} size={27} color={Colors.Black} />
|
|
37
37
|
</TouchableOpacity>
|
|
38
38
|
|
|
39
39
|
<TouchableOpacity
|
|
@@ -41,7 +41,7 @@ const Notification = memo(() => {
|
|
|
41
41
|
notImplemented(t);
|
|
42
42
|
}}
|
|
43
43
|
>
|
|
44
|
-
<
|
|
44
|
+
<IconOutline name={'search'} size={27} color={Colors.Black} />
|
|
45
45
|
</TouchableOpacity>
|
|
46
46
|
</View>
|
|
47
47
|
),
|
|
@@ -5,11 +5,11 @@ import { Calendar } from 'react-native-calendars';
|
|
|
5
5
|
|
|
6
6
|
import { act, create } from 'react-test-renderer';
|
|
7
7
|
import PlayBackCamera from '..';
|
|
8
|
+
import MediaPlayerFull from '../../../commons/MediaPlayerDetail/MediaPlayerFull';
|
|
8
9
|
import Text from '../../../commons/Text';
|
|
9
10
|
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
10
11
|
import { SCProvider } from '../../../context';
|
|
11
12
|
import { mockSCStore } from '../../../context/mockStore';
|
|
12
|
-
import MediaPlayerFull from '../../../commons/MediaPlayerDetail/MediaPlayerFull';
|
|
13
13
|
import Timer from '../Timer';
|
|
14
14
|
|
|
15
15
|
const wrapComponent = () => (
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Dimensions,
|
|
8
8
|
TouchableOpacity,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import
|
|
10
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
11
11
|
import { RNCamera } from 'react-native-camera';
|
|
12
12
|
import { getStatusBarHeight } from 'react-native-iphone-x-helper';
|
|
13
13
|
import { useTranslations } from '../../../../hooks/Common/useTranslations';
|
|
@@ -36,7 +36,7 @@ const VerifyingQRCode = memo(() => {
|
|
|
36
36
|
<View style={styles.maskOuter}>
|
|
37
37
|
<TouchableOpacity style={[styles.viewVerifying, styles.buttonShadow]}>
|
|
38
38
|
<Loading
|
|
39
|
-
icon={<
|
|
39
|
+
icon={<IconOutline name={'sync'} color={Colors.Green6} size={16} />}
|
|
40
40
|
/>
|
|
41
41
|
<Text type={'Body'} style={styles.text}>
|
|
42
42
|
{t('verify_qr_code')}
|
|
@@ -117,7 +117,7 @@ const QRScan = ({ isScanReady = true, onScan }) => {
|
|
|
117
117
|
borderColor={Colors.Gray4}
|
|
118
118
|
style={styles.buttonClose}
|
|
119
119
|
>
|
|
120
|
-
<
|
|
120
|
+
<IconOutline name={'close'} size={24} co />
|
|
121
121
|
</CircleButton>
|
|
122
122
|
{loading && <VerifyingQRCode />}
|
|
123
123
|
</View>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { useRoute } from '@react-navigation/native';
|
|
2
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
-
import { useRoute } from '@react-navigation/native';
|
|
4
5
|
import { act, create } from 'react-test-renderer';
|
|
5
|
-
import MockAdapter from 'axios-mock-adapter';
|
|
6
6
|
|
|
7
7
|
import SelectUnit from '../';
|
|
8
|
+
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
9
|
+
import { API } from '../../../configs';
|
|
10
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
8
11
|
import { SCProvider } from '../../../context';
|
|
9
12
|
import { mockSCStore } from '../../../context/mockStore';
|
|
10
|
-
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
11
|
-
import Routes from '../../../utils/Route';
|
|
12
13
|
import api from '../../../utils/Apis/axios';
|
|
13
|
-
import
|
|
14
|
-
import BottomButtonView from '../../../commons/BottomButtonView';
|
|
14
|
+
import Routes from '../../../utils/Route';
|
|
15
15
|
|
|
16
16
|
const mock = new MockAdapter(api.axiosInstance);
|
|
17
17
|
|
|
@@ -157,8 +157,8 @@ describe('Test Select unit screen', () => {
|
|
|
157
157
|
await act(async () => {
|
|
158
158
|
await iconClose[0].props.onPress();
|
|
159
159
|
});
|
|
160
|
-
expect(global.mockedNavigate).
|
|
161
|
-
id: 1,
|
|
160
|
+
expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.ScriptDetail, {
|
|
161
|
+
automate: { id: 1 },
|
|
162
162
|
havePermission: true,
|
|
163
163
|
isMultiUnits: undefined,
|
|
164
164
|
name: '1',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo, useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import { View, TouchableOpacity, FlatList } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import WrapHeaderScrollable from '../../commons/Sharing/WrapHeaderScrollable';
|
|
5
5
|
import { API, Colors } from '../../configs';
|
|
6
6
|
import Text from '../../commons/Text';
|
|
@@ -50,7 +50,7 @@ const SelectUnit = () => {
|
|
|
50
50
|
const handleOnGoBackAndClose = useCallback(() => {
|
|
51
51
|
if (automateId) {
|
|
52
52
|
navigate(Routes.ScriptDetail, {
|
|
53
|
-
id: automateId,
|
|
53
|
+
automate: { id: automateId },
|
|
54
54
|
name: scriptName,
|
|
55
55
|
type: oldType,
|
|
56
56
|
havePermission: true,
|
|
@@ -76,7 +76,7 @@ const SelectUnit = () => {
|
|
|
76
76
|
isAutomateTab,
|
|
77
77
|
isMultiUnits,
|
|
78
78
|
routeName,
|
|
79
|
-
|
|
79
|
+
multiUnit: selectedItem,
|
|
80
80
|
automateId,
|
|
81
81
|
scriptName,
|
|
82
82
|
oldType,
|
|
@@ -132,7 +132,7 @@ const SelectUnit = () => {
|
|
|
132
132
|
accessibilityLabel={AccessibilityLabel.ICON_CLOSE}
|
|
133
133
|
>
|
|
134
134
|
<View style={styles.buttonClose}>
|
|
135
|
-
<
|
|
135
|
+
<IconOutline name={'close'} size={24} color={Colors.Black} />
|
|
136
136
|
</View>
|
|
137
137
|
</TouchableOpacity>
|
|
138
138
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
|
|
6
6
|
import Text from '../../commons/Text';
|
|
@@ -54,7 +54,7 @@ const TabHeader = ({ current, getCurrentTab, showModal, textFilter }) => {
|
|
|
54
54
|
<Text style={styles.sortBy}>
|
|
55
55
|
{t('sort_by') + ': '} {textFilter}
|
|
56
56
|
</Text>
|
|
57
|
-
<
|
|
57
|
+
<IconOutline name="arrowdown" size={10} />
|
|
58
58
|
</TouchableOpacity>
|
|
59
59
|
</View>
|
|
60
60
|
</View>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useMemo, useState } from 'react';
|
|
2
2
|
import { View, Text, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { Colors } from '../../../configs';
|
|
5
5
|
import styles from './Styles/DeviceItemStyles';
|
|
6
6
|
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
@@ -71,11 +71,11 @@ const EndDevice = ({
|
|
|
71
71
|
{name}
|
|
72
72
|
</Text>
|
|
73
73
|
{checked && (
|
|
74
|
-
<
|
|
74
|
+
<IconOutline name={'check'} color={Colors.Primary} size={20} />
|
|
75
75
|
)}
|
|
76
76
|
|
|
77
77
|
{dataConfig.length > 0 && (
|
|
78
|
-
<
|
|
78
|
+
<IconOutline
|
|
79
79
|
onPress={() => toggleExpandEndDevice()}
|
|
80
80
|
name={isItemExpanded ? 'up' : 'down'}
|
|
81
81
|
size={20}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
3
3
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
4
4
|
import { useNavigation, useIsFocused } from '@react-navigation/native';
|
|
5
5
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
@@ -83,7 +83,7 @@ const UnitMemberList = ({ route }) => {
|
|
|
83
83
|
style={styles.rightHeader}
|
|
84
84
|
>
|
|
85
85
|
{isOwner ? (
|
|
86
|
-
<
|
|
86
|
+
<IconOutline name={'plus'} size={27} color={Colors.Black} />
|
|
87
87
|
) : (
|
|
88
88
|
<MaterialIcons name={'more-vert'} size={27} color={Colors.Black} />
|
|
89
89
|
)}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { act } from '@testing-library/react-hooks';
|
|
2
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { Alert } from 'react-native';
|
|
4
5
|
import { create } from 'react-test-renderer';
|
|
5
|
-
import MockAdapter from 'axios-mock-adapter';
|
|
6
6
|
import { ViewButtonBottom } from '../../../commons';
|
|
7
|
+
import AccessibilityLabel from '../../../configs/AccessibilityLabel';
|
|
8
|
+
import API from '../../../configs/API';
|
|
7
9
|
import { SCProvider } from '../../../context';
|
|
8
10
|
import { mockSCStore } from '../../../context/mockStore';
|
|
9
|
-
import API from '../../../configs/API';
|
|
10
11
|
import api from '../../../utils/Apis/axios';
|
|
11
12
|
import UpdateShareDevice from '../UpdateShareDevice';
|
|
12
|
-
import AccessibilityLabel from '../../../configs/AccessibilityLabel';
|
|
13
13
|
|
|
14
14
|
const mock = new MockAdapter(api.axiosInstance);
|
|
15
15
|
jest.spyOn(Alert, 'alert').mockImplementation(() => {});
|
|
@@ -151,7 +151,7 @@ describe('Test UpdateShareDevice', () => {
|
|
|
151
151
|
await act(async () => {
|
|
152
152
|
ViewButtonBottomElement[0].props.onRightClick();
|
|
153
153
|
});
|
|
154
|
-
expect(global.mockedGoBack).
|
|
154
|
+
expect(global.mockedGoBack).toHaveBeenCalled();
|
|
155
155
|
expect(mock.history.post[0].data).toEqual(
|
|
156
156
|
JSON.stringify({
|
|
157
157
|
phone: '0901234567',
|
|
@@ -185,7 +185,7 @@ describe('Test UpdateShareDevice', () => {
|
|
|
185
185
|
await act(async () => {
|
|
186
186
|
ViewButtonBottomElement[0].props.onRightClick();
|
|
187
187
|
});
|
|
188
|
-
expect(global.mockedGoBack).
|
|
188
|
+
expect(global.mockedGoBack).toHaveBeenCalled();
|
|
189
189
|
expect(mock.history.post[0].data).toEqual(
|
|
190
190
|
JSON.stringify({
|
|
191
191
|
phone: '',
|
|
@@ -217,7 +217,7 @@ describe('Test UpdateShareDevice', () => {
|
|
|
217
217
|
await act(async () => {
|
|
218
218
|
ViewButtonBottomElement[0].props.onRightClick();
|
|
219
219
|
});
|
|
220
|
-
expect(global.mockedGoBack).not.
|
|
220
|
+
expect(global.mockedGoBack).not.toHaveBeenCalled();
|
|
221
221
|
expect(mock.history.post[0].data).toEqual(
|
|
222
222
|
JSON.stringify({
|
|
223
223
|
phone: '',
|
|
@@ -274,7 +274,7 @@ describe('Test UpdateShareDevice', () => {
|
|
|
274
274
|
await act(async () => {
|
|
275
275
|
ViewButtonBottomElement[0].props.onLeftClick();
|
|
276
276
|
});
|
|
277
|
-
expect(global.mockedGoBack).
|
|
277
|
+
expect(global.mockedGoBack).toHaveBeenCalled();
|
|
278
278
|
});
|
|
279
279
|
|
|
280
280
|
it('user not choose device click button next', async () => {
|