@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.7
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/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, Switch } from 'react-native';
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
5
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
6
|
-
|
|
7
|
-
export default function STimingSwitch(props) {
|
|
8
|
-
const [refresh, setRefresh] = useState(0);
|
|
9
|
-
const [data, setData] = useState(props.data);
|
|
10
|
-
return (
|
|
11
|
-
<View style={{ flexDirection: 'row' ,borderWidth: 0, marginTop:ValueCheck(props.type) ? 0 : 19,alignItems:'center',justifyContent:'center',marginHorizontal:5}}>
|
|
12
|
-
{data.map((selectslot, k) => {
|
|
13
|
-
return (
|
|
14
|
-
<View key={k} style={{alignItems:'center',justifyContent:'center'}}>
|
|
15
|
-
<Switch
|
|
16
|
-
trackColor={{ false: '#767577', true: Global.AppTheme.primary_color }}
|
|
17
|
-
thumbColor={'lightgrey'}
|
|
18
|
-
onChange={() => getSwitch(selectslot)}
|
|
19
|
-
value={selectslot.selected}
|
|
20
|
-
/>
|
|
21
|
-
<Text style={{ color: 'black', fontWeight: 'bold', fontSize: normalize(10) }}>{selectslot.slotname}</Text>
|
|
22
|
-
</View>);
|
|
23
|
-
})}
|
|
24
|
-
</View>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
function getSwitch(params) {
|
|
28
|
-
data.map((item) => item.selected = false);
|
|
29
|
-
params.selected = !params.selected;
|
|
30
|
-
props.callBack(params);
|
|
31
|
-
setRefresh(refresh + 1);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, View} from 'react-native';
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
|
|
5
|
-
const CContainerView = props => {
|
|
6
|
-
|
|
7
|
-
const styles = StyleSheet.create({
|
|
8
|
-
CContainerView : {
|
|
9
|
-
flex: 1,
|
|
10
|
-
backgroundColor: Global.AppTheme.primary_color,
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<View style={styles.CContainerView}>
|
|
16
|
-
{props.children}
|
|
17
|
-
</View>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default CContainerView;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React, { useContext, useState } from 'react';
|
|
2
|
-
import { StyleSheet, View, ImageBackground, Text, Dimensions } from 'react-native';
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
5
|
-
import CCard from '../Custom/CCard';
|
|
6
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
7
|
-
import { isNU } from '../CommonStyle/ComponentFunctions';
|
|
8
|
-
import CTemplateCard from '../Custom/CTemplateCard';
|
|
9
|
-
import AppContext from '../../../../../src/Handlers/AppContext';
|
|
10
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
11
|
-
|
|
12
|
-
const CDetailView = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const styles = StyleSheet.create({
|
|
16
|
-
CDetailView: {
|
|
17
|
-
flex: 1,
|
|
18
|
-
shadowColor: '#000',
|
|
19
|
-
shadowOffset: { width: 0, height: 2 },
|
|
20
|
-
shadowOpacity: 0.8,
|
|
21
|
-
shadowRadius: 2,
|
|
22
|
-
borderTopLeftRadius: 20,
|
|
23
|
-
borderTopRightRadius: 20,
|
|
24
|
-
width: '100%',
|
|
25
|
-
backgroundColor: props.backgroundColor ? props.backgroundColor : 'white'
|
|
26
|
-
},
|
|
27
|
-
image: {
|
|
28
|
-
flex: 1
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// console.log("PATIENT DATATTTTTTATTATTATTATATATATTATATAAT",JSON.stringify(Global.PatientDetails))
|
|
33
|
-
const [patientdata] = useState(Global.PatientDetails)
|
|
34
|
-
const [userListShow] = useState(props.userlist != undefined ? props.userlist : true)
|
|
35
|
-
const { inputText, setInputText } = useContext(AppContext);
|
|
36
|
-
|
|
37
|
-
const navigation = useNavigation();
|
|
38
|
-
return (
|
|
39
|
-
<View style={styles.CDetailView}>
|
|
40
|
-
{/* {console.log('patientdata----------',JSON.stringify(patientdata))} */}
|
|
41
|
-
<ImageBackground
|
|
42
|
-
source={props.bgimage != undefined ? { uri: props.bgimage } : {uri:`${APIURL}insurancefile/getCommonFile/image/IMA.png`}}
|
|
43
|
-
resizeMode={props.bgimage != undefined ? "stretch" : "contain"}
|
|
44
|
-
imageStyle={props.bgimage != undefined ? { opacity: 1 } : { opacity: 0.1 }}
|
|
45
|
-
style={styles.image}
|
|
46
|
-
>
|
|
47
|
-
{patientdata != null
|
|
48
|
-
&& patientdata != undefined && userListShow && !props.hideCard ?
|
|
49
|
-
<View style={{ marginHorizontal: normalize(5), marginTop: normalize(-30) }}>
|
|
50
|
-
<CCard
|
|
51
|
-
// navigation={navigation}
|
|
52
|
-
type={2}
|
|
53
|
-
disableTouch={true}
|
|
54
|
-
data={[Global.PatientDetails]}
|
|
55
|
-
consultation={props.consultation ? true : false}
|
|
56
|
-
expandheight={normalize(100)}
|
|
57
|
-
disabledetailcard={props.disabledetailcard ? true : false}
|
|
58
|
-
disabledetailcardcallback={() => {
|
|
59
|
-
// console.log('kkkk')
|
|
60
|
-
isNU(props.disabledetailcardcallback) ? props.disabledetailcardcallback(true) : null
|
|
61
|
-
}}
|
|
62
|
-
/>
|
|
63
|
-
</View> : null}
|
|
64
|
-
{isNU(inputText) && isNU(inputText.templatedata) && inputText.showtemplatecard && props.showTemplateCard ?
|
|
65
|
-
<View style={{ marginTop: normalize(-10) }}>
|
|
66
|
-
<CTemplateCard
|
|
67
|
-
data={inputText.templatedata}
|
|
68
|
-
Cardcallback={(val) => {
|
|
69
|
-
console.log('Cardcallback.....')
|
|
70
|
-
}}
|
|
71
|
-
/>
|
|
72
|
-
</View> : null}
|
|
73
|
-
{props.children}
|
|
74
|
-
</ImageBackground>
|
|
75
|
-
</View>
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
export default CDetailView;
|
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
StyleSheet,
|
|
4
|
-
Text,
|
|
5
|
-
View,
|
|
6
|
-
StatusBar,
|
|
7
|
-
Image,
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
Alert,
|
|
10
|
-
Modal,
|
|
11
|
-
Dimensions,
|
|
12
|
-
ScrollView
|
|
13
|
-
} from 'react-native';
|
|
14
|
-
import Ionicons from 'react-native-vector-icons/Ionicons';
|
|
15
|
-
import Feather from 'react-native-vector-icons/Feather';
|
|
16
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
17
|
-
import CSliderMenu from '../Custom/CSliderMenu';
|
|
18
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
19
|
-
import NotificationContext from '../../../../../src/Handlers/NoticationsContext';
|
|
20
|
-
import moment from 'moment';
|
|
21
|
-
import { ValueCheck, isNUQZ } from '../CommonStyle/ComponentFunctions';
|
|
22
|
-
import ABlink from '../Alerts/ABlink';
|
|
23
|
-
import COverlay from '../CustomComponents/COverlay';
|
|
24
|
-
import OUserView from '../Custom/OUserView';
|
|
25
|
-
import CBackHandler from '../CustomComponents/CBackHandler';
|
|
26
|
-
// import InsureResponseComponentContext from '../../../../../src/Handlers/insureResponseComponentContext';
|
|
27
|
-
import CNetworkStatus from '../CustomComponents/CNetworkStatus';
|
|
28
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
29
|
-
|
|
30
|
-
const HeaderBlock = (props) => {
|
|
31
|
-
// const { responseJSON, setResponseJSON } = useContext(InsureResponseComponentContext);
|
|
32
|
-
const [isShowSlidermenu, setIsShowSlidermenu] = useState(false);
|
|
33
|
-
const [backHandler, setBackHandler] = useState(false);
|
|
34
|
-
const [backHandlerLogOut, setBackHandlerLogOut] = useState(false);
|
|
35
|
-
const [refresh, setRefresh] = useState(0);
|
|
36
|
-
const [overlay, setOverlay] = useState(false);
|
|
37
|
-
const [jsonoverlay, setJsonOverlay] = useState(false);
|
|
38
|
-
const navigation = useNavigation()
|
|
39
|
-
|
|
40
|
-
const OverlayHOCComponent = COverlay(OUserView);
|
|
41
|
-
|
|
42
|
-
const NoticationData = React.useContext(NotificationContext);
|
|
43
|
-
|
|
44
|
-
const result = NoticationData.filter(obj => obj.status === true);
|
|
45
|
-
|
|
46
|
-
const styles = StyleSheet.create({
|
|
47
|
-
container: {
|
|
48
|
-
display: 'flex',
|
|
49
|
-
backgroundColor: Global.AppTheme.primary_color,
|
|
50
|
-
justifyContent: 'center',
|
|
51
|
-
paddingLeft: normalize(3),
|
|
52
|
-
marginTop: StatusBar.currentHeight,
|
|
53
|
-
},
|
|
54
|
-
headerContent: {
|
|
55
|
-
flexDirection: 'row',
|
|
56
|
-
alignItems: 'center',
|
|
57
|
-
marginBottom: normalize(6),
|
|
58
|
-
paddingBottom: normalize(0),
|
|
59
|
-
},
|
|
60
|
-
backButton: {
|
|
61
|
-
flexDirection: 'row',
|
|
62
|
-
alignItems: 'center',
|
|
63
|
-
borderWidth: 0,
|
|
64
|
-
},
|
|
65
|
-
logoContainer: {
|
|
66
|
-
width: normalize(100),
|
|
67
|
-
height: normalize(40),
|
|
68
|
-
},
|
|
69
|
-
betaContainer: {
|
|
70
|
-
position: 'absolute',
|
|
71
|
-
bottom: normalize(-4),
|
|
72
|
-
right: normalize(-70),
|
|
73
|
-
},
|
|
74
|
-
betaText: {
|
|
75
|
-
color: '#ffffff',
|
|
76
|
-
fontSize: normalize(20),
|
|
77
|
-
letterSpacing: 5,
|
|
78
|
-
fontWeight: 'bold',
|
|
79
|
-
textShadowColor: '#000000',
|
|
80
|
-
textShadowOffset: { width: 0.5, height: 0.5 },
|
|
81
|
-
textShadowRadius: 0.5,
|
|
82
|
-
},
|
|
83
|
-
versionText: {
|
|
84
|
-
color: 'white',
|
|
85
|
-
fontSize: normalize(8),
|
|
86
|
-
},
|
|
87
|
-
userInfoButton: {
|
|
88
|
-
flexDirection: 'row',
|
|
89
|
-
borderWidth: 0,
|
|
90
|
-
flex: 1,
|
|
91
|
-
justifyContent: 'flex-start',
|
|
92
|
-
},
|
|
93
|
-
userInfoContainer: {
|
|
94
|
-
borderWidth: 0,
|
|
95
|
-
},
|
|
96
|
-
userNameText: {
|
|
97
|
-
fontWeight: 'bold',
|
|
98
|
-
fontSize: normalize(13),
|
|
99
|
-
marginLeft: 5,
|
|
100
|
-
color: 'white',
|
|
101
|
-
},
|
|
102
|
-
departmentText: {
|
|
103
|
-
fontFamily: Global.fontNormal,
|
|
104
|
-
fontSize: normalize(11),
|
|
105
|
-
marginLeft: 5,
|
|
106
|
-
color: 'white',
|
|
107
|
-
},
|
|
108
|
-
rightIconsContainer: {
|
|
109
|
-
flexDirection: 'row',
|
|
110
|
-
alignItems: 'center',
|
|
111
|
-
justifyContent: 'flex-end',
|
|
112
|
-
borderWidth: 0,
|
|
113
|
-
},
|
|
114
|
-
notificationButton: {
|
|
115
|
-
marginRight: normalize(5),
|
|
116
|
-
},
|
|
117
|
-
notificationBadge: {
|
|
118
|
-
position: 'absolute',
|
|
119
|
-
right: normalize(-5),
|
|
120
|
-
top: normalize(-8),
|
|
121
|
-
backgroundColor: 'white',
|
|
122
|
-
alignItems: 'center',
|
|
123
|
-
borderRadius: 20,
|
|
124
|
-
width: normalize(15),
|
|
125
|
-
},
|
|
126
|
-
notificationCount: {
|
|
127
|
-
fontSize: normalize(7),
|
|
128
|
-
fontWeight: 'bold',
|
|
129
|
-
},
|
|
130
|
-
menuButton: {
|
|
131
|
-
alignItems: 'center',
|
|
132
|
-
justifyContent: 'center',
|
|
133
|
-
},
|
|
134
|
-
loginTimeText: {
|
|
135
|
-
fontSize: normalize(9),
|
|
136
|
-
marginLeft: 0,
|
|
137
|
-
color: 'white',
|
|
138
|
-
},
|
|
139
|
-
jsonModalContainer: {
|
|
140
|
-
backgroundColor: 'white',
|
|
141
|
-
borderWidth: 1,
|
|
142
|
-
height: Dimensions.get('screen').height * 0.9,
|
|
143
|
-
alignSelf: 'center',
|
|
144
|
-
width: Dimensions.get('screen').width * 0.9,
|
|
145
|
-
},
|
|
146
|
-
closeButton: {
|
|
147
|
-
textAlign: 'right',
|
|
148
|
-
fontWeight: 'bold',
|
|
149
|
-
color: 'black',
|
|
150
|
-
},
|
|
151
|
-
jsonText: {
|
|
152
|
-
fontSize: normalize(10),
|
|
153
|
-
color: 'black',
|
|
154
|
-
fontFamily: 'Courier New',
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
const OnPressGoBack = () => {
|
|
159
|
-
if (props.callback) {
|
|
160
|
-
props.callback(true);
|
|
161
|
-
} else {
|
|
162
|
-
if (ValueCheck(props.backhandler)) {
|
|
163
|
-
if (ValueCheck(props.consultation) && Global.EditStatus == 1) {
|
|
164
|
-
setBackHandler(true);
|
|
165
|
-
} else {
|
|
166
|
-
navigation.goBack(); // 👈 works
|
|
167
|
-
}
|
|
168
|
-
} else {
|
|
169
|
-
navigation.goBack(); // 👈 works
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
const renderJsonModal = () => (
|
|
175
|
-
<Modal
|
|
176
|
-
onRequestClose={() => setJsonOverlay(false)}
|
|
177
|
-
style={{
|
|
178
|
-
height: Dimensions.get('screen').height,
|
|
179
|
-
width: Dimensions.get('screen').width,
|
|
180
|
-
backgroundColor: 'transparent',
|
|
181
|
-
justifyContent: 'center',
|
|
182
|
-
alignItems: 'center',
|
|
183
|
-
}}
|
|
184
|
-
transparent={true}
|
|
185
|
-
>
|
|
186
|
-
<View style={styles.jsonModalContainer}>
|
|
187
|
-
<TouchableOpacity onPress={() => setJsonOverlay(false)}>
|
|
188
|
-
<Text style={styles.closeButton}>Close</Text>
|
|
189
|
-
</TouchableOpacity>
|
|
190
|
-
<ScrollView>
|
|
191
|
-
<Text selectable={true} style={styles.jsonText}>
|
|
192
|
-
{/* {JSON.stringify(responseJSON, null, 2)} */}
|
|
193
|
-
</Text>
|
|
194
|
-
</ScrollView>
|
|
195
|
-
</View>
|
|
196
|
-
</Modal>
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
const renderBetaVersion = () => (
|
|
200
|
-
<View style={styles.betaContainer}>
|
|
201
|
-
<ABlink duration={500}>
|
|
202
|
-
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
|
|
203
|
-
<Text style={styles.betaText}>BETA TESTING</Text>
|
|
204
|
-
<Text style={styles.versionText}>
|
|
205
|
-
{Global.version ? `V ${Global.version}` : null}
|
|
206
|
-
</Text>
|
|
207
|
-
</View>
|
|
208
|
-
</ABlink>
|
|
209
|
-
</View>
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
const renderUserInfo = () => (
|
|
213
|
-
<TouchableOpacity
|
|
214
|
-
onPress={() => props.webview != undefined ? null : setOverlay(true)}
|
|
215
|
-
style={styles.userInfoButton}
|
|
216
|
-
>
|
|
217
|
-
<View style={styles.userInfoContainer}>
|
|
218
|
-
<Text
|
|
219
|
-
adjustsFontSizeToFit
|
|
220
|
-
numberOfLines={2}
|
|
221
|
-
style={styles.userNameText}
|
|
222
|
-
>
|
|
223
|
-
{props.webview != undefined ? "" : Global.userData && Global.userData.department != undefined && Global.userData.department != "" ? Global.userData.username : ''}
|
|
224
|
-
</Text>
|
|
225
|
-
{Global.userData && Global.userData.department != undefined && Global.userData.department != "" && props.webview == undefined ? (
|
|
226
|
-
<Text
|
|
227
|
-
adjustsFontSizeToFit
|
|
228
|
-
style={styles.departmentText}
|
|
229
|
-
>
|
|
230
|
-
{Global.userData.department}
|
|
231
|
-
</Text>
|
|
232
|
-
) : null}
|
|
233
|
-
</View>
|
|
234
|
-
</TouchableOpacity>
|
|
235
|
-
);
|
|
236
|
-
|
|
237
|
-
const renderRightIcons = () => (
|
|
238
|
-
<View style={styles.rightIconsContainer}>
|
|
239
|
-
<CNetworkStatus />
|
|
240
|
-
<TouchableOpacity
|
|
241
|
-
onPress={() => navigation.navigate('Notifications')}
|
|
242
|
-
style={styles.notificationButton}
|
|
243
|
-
>
|
|
244
|
-
<View style={styles.notificationBadge}>
|
|
245
|
-
<ABlink>
|
|
246
|
-
<Text
|
|
247
|
-
numberOfLines={1}
|
|
248
|
-
adjustsFontSizeToFit
|
|
249
|
-
style={[
|
|
250
|
-
styles.notificationCount,
|
|
251
|
-
{ color: result.length > 0 ? "red" : 'black' }
|
|
252
|
-
]}
|
|
253
|
-
>
|
|
254
|
-
{result.length}
|
|
255
|
-
</Text>
|
|
256
|
-
</ABlink>
|
|
257
|
-
</View>
|
|
258
|
-
<Ionicons name={'notifications-outline'} color="white" size={normalize(15)} />
|
|
259
|
-
</TouchableOpacity>
|
|
260
|
-
<View style={{ paddingLeft: normalize(2) }}>
|
|
261
|
-
<TouchableOpacity
|
|
262
|
-
onPress={() => setIsShowSlidermenu(true)}
|
|
263
|
-
style={styles.menuButton}
|
|
264
|
-
>
|
|
265
|
-
<Feather name={'menu'} color="white" size={normalize(25)} />
|
|
266
|
-
<View>
|
|
267
|
-
{Global.LoginTime != undefined ? (
|
|
268
|
-
<Text style={styles.loginTimeText}>
|
|
269
|
-
{(moment.duration(moment().diff(Global.LoginTime)).asMinutes()).toFixed(0) + " Min."}
|
|
270
|
-
</Text>
|
|
271
|
-
) : null}
|
|
272
|
-
</View>
|
|
273
|
-
</TouchableOpacity>
|
|
274
|
-
</View>
|
|
275
|
-
</View>
|
|
276
|
-
);
|
|
277
|
-
|
|
278
|
-
return (
|
|
279
|
-
<View style={[styles.container, props.style]} key={refresh}>
|
|
280
|
-
<StatusBar
|
|
281
|
-
translucent
|
|
282
|
-
backgroundColor={Global.AppTheme.primary_color}
|
|
283
|
-
barStyle="light-content"
|
|
284
|
-
/>
|
|
285
|
-
|
|
286
|
-
{jsonoverlay && renderJsonModal()}
|
|
287
|
-
|
|
288
|
-
<View style={styles.headerContent}>
|
|
289
|
-
<TouchableOpacity
|
|
290
|
-
style={styles.backButton}
|
|
291
|
-
onPress={OnPressGoBack}
|
|
292
|
-
>
|
|
293
|
-
<Ionicons
|
|
294
|
-
name={'chevron-back'}
|
|
295
|
-
color='white'
|
|
296
|
-
size={normalize(25)}
|
|
297
|
-
/>
|
|
298
|
-
<View style={styles.logoContainer}>
|
|
299
|
-
{Global.betaversion ? (
|
|
300
|
-
<View style={styles.logoContainer} />
|
|
301
|
-
) : (
|
|
302
|
-
<Image
|
|
303
|
-
style={{
|
|
304
|
-
width: normalize(100),
|
|
305
|
-
height: normalize(40),
|
|
306
|
-
resizeMode: 'contain',
|
|
307
|
-
borderRadius: 8,
|
|
308
|
-
}}
|
|
309
|
-
source={{ uri: Global?.HospitalData?.hospitallogo3 ? Global.HospitalData.hospitallogo3 : null }}
|
|
310
|
-
/>
|
|
311
|
-
)}
|
|
312
|
-
</View>
|
|
313
|
-
{Global.betaversion && renderBetaVersion()}
|
|
314
|
-
</TouchableOpacity>
|
|
315
|
-
|
|
316
|
-
{renderUserInfo()}
|
|
317
|
-
|
|
318
|
-
{props.webview != undefined ? null : renderRightIcons()}
|
|
319
|
-
</View>
|
|
320
|
-
|
|
321
|
-
{overlay && (
|
|
322
|
-
<OverlayHOCComponent
|
|
323
|
-
visibility={val => (val == undefined ? null : setOverlay(val))}
|
|
324
|
-
/>
|
|
325
|
-
)}
|
|
326
|
-
{isShowSlidermenu && (
|
|
327
|
-
<CSliderMenu
|
|
328
|
-
navigation={navigation.navigate}
|
|
329
|
-
isShow={isShowSlidermenu}
|
|
330
|
-
visibility={(val) => (val == undefined ? null : setIsShowSlidermenu(val))}
|
|
331
|
-
/>
|
|
332
|
-
)}
|
|
333
|
-
|
|
334
|
-
{backHandler && (
|
|
335
|
-
<CBackHandler
|
|
336
|
-
type={5}
|
|
337
|
-
callBack={(val) => (val == undefined ? null : (setBackHandler(val), navigation.goBack()))}
|
|
338
|
-
close={(val) => (val == undefined ? null : setBackHandler(val))}
|
|
339
|
-
/>
|
|
340
|
-
)}
|
|
341
|
-
|
|
342
|
-
{backHandlerLogOut && (
|
|
343
|
-
<CBackHandler
|
|
344
|
-
type={6}
|
|
345
|
-
callBack={(val) => (val == undefined ? null : (setBackHandlerLogOut(val), navigation.goBack()))}
|
|
346
|
-
close={(val) => (val == undefined ? null : setBackHandlerLogOut(val))}
|
|
347
|
-
/>
|
|
348
|
-
)}
|
|
349
|
-
</View>
|
|
350
|
-
);
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
export default HeaderBlock;
|