@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.8
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/index.d.ts +2 -66
- package/index.js +1 -66
- package/package.json +1 -1
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- 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
package/src/Screens/Login.js
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
StatusBar,
|
|
5
|
-
Text,
|
|
6
|
-
Image,
|
|
7
|
-
Platform,
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
Dimensions,
|
|
10
|
-
StyleSheet,
|
|
11
|
-
ScrollView,
|
|
12
|
-
TouchableWithoutFeedback,
|
|
13
|
-
Keyboard,
|
|
14
|
-
SafeAreaView,
|
|
15
|
-
Linking,
|
|
16
|
-
BackHandler,
|
|
17
|
-
} from 'react-native';
|
|
18
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
19
|
-
import Icon from '../Common/Icons';
|
|
20
|
-
import Loader from '../Custom/Loader';
|
|
21
|
-
import { useIsFocused } from '../Navigation/useIsFocused';
|
|
22
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
23
|
-
import RNFetchBlob from 'react-native-blob-util';
|
|
24
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
25
|
-
import { isNU } from '../CommonStyle/ComponentFunctions';
|
|
26
|
-
import RNExitApp from 'react-native-exit-app';
|
|
27
|
-
import HView from '../HOC/HView';
|
|
28
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Login Component
|
|
32
|
-
*
|
|
33
|
-
* Handles the main login screen functionality of the application
|
|
34
|
-
*
|
|
35
|
-
* @param {Object} props - Component props passed from parent
|
|
36
|
-
* @returns {React.ReactElement} Rendered login screen
|
|
37
|
-
*/
|
|
38
|
-
function Login(props) {
|
|
39
|
-
// State variables
|
|
40
|
-
const [data, setData] = useState(props.route.params.data);
|
|
41
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
42
|
-
|
|
43
|
-
// Hooks and dimensions
|
|
44
|
-
const { width, height } = Dimensions.get('screen');
|
|
45
|
-
const isFocused = useIsFocused();
|
|
46
|
-
const navigation = useNavigation();
|
|
47
|
-
|
|
48
|
-
// Handle back button press to exit app
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
const backAction = () => {
|
|
51
|
-
if (!navigation.isFocused()) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
RNExitApp.exitApp();
|
|
56
|
-
return true;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const backHandler = BackHandler.addEventListener(
|
|
60
|
-
'hardwareBackPress',
|
|
61
|
-
backAction,
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
return () => backHandler.remove();
|
|
65
|
-
}, [navigation]);
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Get file extension from filename
|
|
69
|
-
* @param {string} filename - The file name to extract extension from
|
|
70
|
-
* @returns {string|undefined} - The file extension
|
|
71
|
-
*/
|
|
72
|
-
const getExtention = filename => {
|
|
73
|
-
return /[.]/.exec(filename) ? /[^.]+$/.exec(filename) : undefined;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Downloads an image from URL to device storage
|
|
78
|
-
*/
|
|
79
|
-
const downloadImage = () => {
|
|
80
|
-
let date = new Date();
|
|
81
|
-
let image_URL = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
|
|
82
|
-
let ext = getExtention(image_URL);
|
|
83
|
-
ext = '.' + ext[0];
|
|
84
|
-
|
|
85
|
-
const { config, fs } = RNFetchBlob;
|
|
86
|
-
let PictureDir = fs.dirs.PictureDir;
|
|
87
|
-
|
|
88
|
-
let options = {
|
|
89
|
-
fileCache: true,
|
|
90
|
-
addAndroidDownloads: {
|
|
91
|
-
useDownloadManager: true,
|
|
92
|
-
notification: true,
|
|
93
|
-
path: PictureDir + '/image_' + Math.floor(date.getTime() + date.getSeconds() / 2) + ext,
|
|
94
|
-
description: 'Image',
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
config(options)
|
|
99
|
-
.fetch('GET', image_URL)
|
|
100
|
-
.then(res => {
|
|
101
|
-
console.log('res -> ', JSON.stringify(res));
|
|
102
|
-
alert('Image Downloaded Successfully.');
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const hospitalBgImage = Global.HospitalData?.bgimage || 'https://i.ibb.co/jvj0wdH/Adams-Neilson.jpg';
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<SafeAreaView style={styles.container}>
|
|
110
|
-
<StatusBar
|
|
111
|
-
translucent
|
|
112
|
-
backgroundColor="transparent"
|
|
113
|
-
barStyle={Platform.OS === 'ios' ? 'light-content' : 'dark-content'} />
|
|
114
|
-
|
|
115
|
-
<TouchableWithoutFeedback>
|
|
116
|
-
<View style={styles.container}>
|
|
117
|
-
{/* App Title */}
|
|
118
|
-
<Text
|
|
119
|
-
style={[
|
|
120
|
-
styles.titleText,
|
|
121
|
-
{
|
|
122
|
-
paddingHorizontal: 30,
|
|
123
|
-
textShadowColor: Global.AppTheme.primary_color,
|
|
124
|
-
textShadowOffset: { width: normalize(5), height: normalize(5) },
|
|
125
|
-
textShadowRadius: normalize(15),
|
|
126
|
-
textAlign: 'center',
|
|
127
|
-
},
|
|
128
|
-
]}
|
|
129
|
-
>
|
|
130
|
-
{'HOMES'}
|
|
131
|
-
</Text>
|
|
132
|
-
|
|
133
|
-
<ScrollView keyboardShouldPersistTaps="handled">
|
|
134
|
-
<View style={styles.contentContainer}>
|
|
135
|
-
{/* Header Image */}
|
|
136
|
-
<View>
|
|
137
|
-
<Image
|
|
138
|
-
style={styles.headerImage}
|
|
139
|
-
source={{ uri: hospitalBgImage }}
|
|
140
|
-
/>
|
|
141
|
-
|
|
142
|
-
{/* Customer Service Button */}
|
|
143
|
-
<TouchableOpacity
|
|
144
|
-
style={styles.customerServiceButton}
|
|
145
|
-
onPress={() => Linking.openURL(`tel:${Global.HospitalData.customercare}`)}
|
|
146
|
-
>
|
|
147
|
-
<Icon.AntDesign
|
|
148
|
-
name="customerservice"
|
|
149
|
-
color="#fff"
|
|
150
|
-
size={normalize(17)}
|
|
151
|
-
/>
|
|
152
|
-
</TouchableOpacity>
|
|
153
|
-
</View>
|
|
154
|
-
|
|
155
|
-
{/* Login Form */}
|
|
156
|
-
<View style={styles.bottomView}>
|
|
157
|
-
<HView
|
|
158
|
-
component={'InsureLoginLayout'}
|
|
159
|
-
loader={val => (val === undefined ? null : setIsLoading(val))}
|
|
160
|
-
/>
|
|
161
|
-
</View>
|
|
162
|
-
</View>
|
|
163
|
-
|
|
164
|
-
{/* Company Logo Section */}
|
|
165
|
-
<View style={styles.companyLogoSection}>
|
|
166
|
-
<TouchableOpacity
|
|
167
|
-
onPress={() => Linking.openURL('http://jescontechnologies.com/')}
|
|
168
|
-
style={styles.footer_container}
|
|
169
|
-
>
|
|
170
|
-
<View style={styles.companyinfo_container}>
|
|
171
|
-
<Image
|
|
172
|
-
style={styles.companyLogo}
|
|
173
|
-
source={{ uri: 'https://i.ibb.co/dkNbcDN/jesconnewlogo.jpg' }}
|
|
174
|
-
/>
|
|
175
|
-
<Image
|
|
176
|
-
style={styles.company_icon}
|
|
177
|
-
source={{ uri: `${APIURL}insurancefile/getCommonFile/image/companyaddress_transparent.png` }}
|
|
178
|
-
/>
|
|
179
|
-
</View>
|
|
180
|
-
</TouchableOpacity>
|
|
181
|
-
</View>
|
|
182
|
-
</ScrollView>
|
|
183
|
-
|
|
184
|
-
{/* App Version Display */}
|
|
185
|
-
<View style={styles.versionContainer}>
|
|
186
|
-
{Platform.OS !== 'ios' && (
|
|
187
|
-
<Text style={styles.versionText}>
|
|
188
|
-
{Global.CodePushVersion}
|
|
189
|
-
</Text>
|
|
190
|
-
)}
|
|
191
|
-
<Text style={styles.versionText}>
|
|
192
|
-
{isNU(Global.version) ? `V ${Global.version}` : null}
|
|
193
|
-
</Text>
|
|
194
|
-
</View>
|
|
195
|
-
|
|
196
|
-
{/* Footer Icons */}
|
|
197
|
-
{/* <View style={styles.footerIconsContainer}>
|
|
198
|
-
<View style={styles.footerIconsRow}>
|
|
199
|
-
{data?.loginfootericons?.map((item, i) => (
|
|
200
|
-
<CVectorIcon
|
|
201
|
-
key={i}
|
|
202
|
-
data={{
|
|
203
|
-
disabled: false,
|
|
204
|
-
displaytext: item.displaytext,
|
|
205
|
-
fontcolor: item.color,
|
|
206
|
-
fontWeight: 'bold',
|
|
207
|
-
size: 12,
|
|
208
|
-
iconname: item.iconname,
|
|
209
|
-
iconcolor: item.color,
|
|
210
|
-
iconsize: 22,
|
|
211
|
-
functionid: 'DF01',
|
|
212
|
-
}}
|
|
213
|
-
callBack={val =>
|
|
214
|
-
val === undefined
|
|
215
|
-
? null
|
|
216
|
-
: props.navigation.navigate('WebPage', { data: item })
|
|
217
|
-
}
|
|
218
|
-
/>
|
|
219
|
-
))}
|
|
220
|
-
</View>
|
|
221
|
-
</View> */}
|
|
222
|
-
|
|
223
|
-
{/* Loading Indicator */}
|
|
224
|
-
{isLoading && <Loader displaytext={true} />}
|
|
225
|
-
</View>
|
|
226
|
-
</TouchableWithoutFeedback>
|
|
227
|
-
</SafeAreaView>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export default Login;
|
|
232
|
-
|
|
233
|
-
const styles = StyleSheet.create({
|
|
234
|
-
container: {
|
|
235
|
-
flex: 1,
|
|
236
|
-
},
|
|
237
|
-
contentContainer: {
|
|
238
|
-
flex: 1,
|
|
239
|
-
marginBottom: Platform.OS !== 'web' ? normalize(100) : normalize(50),
|
|
240
|
-
},
|
|
241
|
-
titleText: {
|
|
242
|
-
position: 'absolute',
|
|
243
|
-
top: Dimensions.get('screen').height * 0.05,
|
|
244
|
-
alignSelf: 'center',
|
|
245
|
-
color: '#fff',
|
|
246
|
-
zIndex: 1,
|
|
247
|
-
elevation: 5,
|
|
248
|
-
fontWeight: 'bold',
|
|
249
|
-
fontSize: normalize(40),
|
|
250
|
-
},
|
|
251
|
-
headerImage: {
|
|
252
|
-
height: Dimensions.get('screen').height * 0.25,
|
|
253
|
-
width: '100%',
|
|
254
|
-
opacity: 0.7,
|
|
255
|
-
},
|
|
256
|
-
customerServiceButton: {
|
|
257
|
-
position: 'absolute',
|
|
258
|
-
top: normalize(60),
|
|
259
|
-
right: normalize(20),
|
|
260
|
-
backgroundColor: Global.AppTheme.primary_color,
|
|
261
|
-
padding: normalize(5),
|
|
262
|
-
borderRadius: 1000,
|
|
263
|
-
},
|
|
264
|
-
bottomView: {
|
|
265
|
-
backgroundColor: '#fff',
|
|
266
|
-
opacity: 0.95,
|
|
267
|
-
marginTop: normalize(-50),
|
|
268
|
-
borderRadius: normalize(20),
|
|
269
|
-
marginHorizontal: normalize(7),
|
|
270
|
-
paddingHorizontal: normalize(15),
|
|
271
|
-
},
|
|
272
|
-
companyLogoSection: {
|
|
273
|
-
position: Platform.OS !== 'web' && 'absolute',
|
|
274
|
-
bottom: normalize(50),
|
|
275
|
-
backgroundColor: '#fff',
|
|
276
|
-
},
|
|
277
|
-
footer_container: {
|
|
278
|
-
marginBottom: '1%',
|
|
279
|
-
alignItems: 'center',
|
|
280
|
-
width: '100%',
|
|
281
|
-
},
|
|
282
|
-
companyinfo_container: {
|
|
283
|
-
flexDirection: 'row',
|
|
284
|
-
height: normalize(45),
|
|
285
|
-
width: '100%',
|
|
286
|
-
justifyContent: 'flex-start',
|
|
287
|
-
alignItems: 'flex-start',
|
|
288
|
-
},
|
|
289
|
-
companyLogo: {
|
|
290
|
-
width: '47%',
|
|
291
|
-
height: '100%',
|
|
292
|
-
borderRadius: 0,
|
|
293
|
-
margin: 5,
|
|
294
|
-
resizeMode: 'cover',
|
|
295
|
-
},
|
|
296
|
-
company_icon: {
|
|
297
|
-
width: '47%',
|
|
298
|
-
height: '100%',
|
|
299
|
-
borderRadius: 0,
|
|
300
|
-
margin: 5,
|
|
301
|
-
resizeMode: 'contain',
|
|
302
|
-
},
|
|
303
|
-
versionContainer: {
|
|
304
|
-
position: 'absolute',
|
|
305
|
-
bottom: 0,
|
|
306
|
-
zIndex: 1,
|
|
307
|
-
alignSelf: 'center',
|
|
308
|
-
},
|
|
309
|
-
versionText: {
|
|
310
|
-
color: Global.AppTheme.secondary_color,
|
|
311
|
-
fontSize: normalize(10),
|
|
312
|
-
alignSelf: 'center',
|
|
313
|
-
fontWeight: 'bold',
|
|
314
|
-
},
|
|
315
|
-
footerIconsContainer: {
|
|
316
|
-
position: 'absolute',
|
|
317
|
-
bottom: 0,
|
|
318
|
-
backgroundColor: '#fff',
|
|
319
|
-
width: '100%',
|
|
320
|
-
height: normalize(45),
|
|
321
|
-
justifyContent: 'center',
|
|
322
|
-
},
|
|
323
|
-
footerIconsRow: {
|
|
324
|
-
flexDirection: 'row',
|
|
325
|
-
justifyContent: 'space-between',
|
|
326
|
-
paddingHorizontal: normalize(15),
|
|
327
|
-
},
|
|
328
|
-
});
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, FlatList, TouchableOpacity, RefreshControl, Linking } from 'react-native';
|
|
3
|
-
import Ionicons from 'react-native-vector-icons/Ionicons';
|
|
4
|
-
import moment from 'moment';
|
|
5
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
6
|
-
import { notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
7
|
-
import CContainerView from '../CustomComponents/CContainerView';
|
|
8
|
-
import HeaderBlock from './HeaderBlock';
|
|
9
|
-
import CDetailView from '../CustomComponents/CDetailView';
|
|
10
|
-
import NotificationContext from '../Handlers/NoticationsContext';
|
|
11
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
12
|
-
import HHeading from '../HOC/HHeading';
|
|
13
|
-
import Icons from '../Common/Icons';
|
|
14
|
-
|
|
15
|
-
const Notifications = (props) => {
|
|
16
|
-
|
|
17
|
-
var TestArray = [{ "code": 12, "displayheader": "UPDATE", "displaytext": "Updates are available ", "status": true, "patientnumber": 0, "patientname": "", "tokennumber": 0, "phonenumber": "", "qrcode": 0, "date": "2022-12-07T15:59:00", "time": "2022-12-07T15:59:00" }, { "code": 11, "displayheader": "Consultation", "displaytext": "Booking is confirmed on 31st Dec 2022 for CHRISTY MARIA; Token Number :6 Patient name :HAROLD LOUIS TEST", "status": false, "patientnumber": 0, "patientname": "HAROLD LOUIS TEST", "tokennumber": 6, "phonenumber": "7338483582", "qrcode": 2345, "date": "2022-12-07T15:15:00", "time": "2022-12-07T15:15:00" }, { "code": 8, "displayheader": "Consultation", "displaytext": "Booking is confirmed on 30th Dec 2022 for SR.ROSE MAVELIKUNNEL MBBS,DGO; Token Number :19 Patient name :ALVIN ANTONY", "status": false, "patientnumber": 0, "patientname": "ALVIN ANTONY", "tokennumber": 19, "phonenumber": "7338483582", "qrcode": 2345, "date": "2022-12-06T14:53:00", "time": "2022-12-06T14:53:00" }, { "code": 7, "displayheader": "Consultation", "displaytext": "Booking is confirmed on 28th Dec 2022 for CHRISTY MARIA; Token Number :4 Patient name :HAROLD LOUIS", "status": false, "patientnumber": 0, "patientname": "HAROLD LOUIS", "tokennumber": 4, "phonenumber": "7338483582", "qrcode": 2345, "date": "2022-12-05T16:23:00", "time": "2022-12-05T16:23:00" }, { "code": 1, "displayheader": "HEADER", "displaytext": "NOTIFICATIONS", "status": false, "patientnumber": 0, "patientname": "", "tokennumber": 0, "phonenumber": "", "qrcode": 0, "date": "2022-12-05T12:28:00", "time": "2022-12-05T12:28:00" }]
|
|
18
|
-
|
|
19
|
-
const NoticationData = React.useContext(
|
|
20
|
-
NotificationContext,
|
|
21
|
-
);
|
|
22
|
-
// console.log("RRRRRRRRRREEEEEEEEESSSSSVARRRRRRRRRR",JSON.stringify(NoticationData))
|
|
23
|
-
var today = new Date()
|
|
24
|
-
const [NotificationArr, setNotificationArr] = useState(NoticationData)
|
|
25
|
-
const [refresh, setRefresh] = useState(0)
|
|
26
|
-
const [pulltorefresh] = useState(false)
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<CContainerView>
|
|
30
|
-
<HeaderBlock navigation={props.navigation} />
|
|
31
|
-
|
|
32
|
-
<CDetailView userlist={false}>
|
|
33
|
-
<View style={{ marginTop: normalize(-3), flex: 1 }}>
|
|
34
|
-
<HHeading
|
|
35
|
-
styles={{
|
|
36
|
-
"iconname": 'bell',
|
|
37
|
-
"bgcolor": "#f2efef",
|
|
38
|
-
"iconsize": 16,
|
|
39
|
-
"iconcolor": Global.AppTheme.primary_color,
|
|
40
|
-
"displaytext": "Notifications",
|
|
41
|
-
"textsize": 14,
|
|
42
|
-
"textcolor": Global.AppTheme.primary_color
|
|
43
|
-
}}
|
|
44
|
-
callBack={val => (val == undefined ? null : console.log(val))}>
|
|
45
|
-
</HHeading>
|
|
46
|
-
|
|
47
|
-
<View style={{ flex: 1, backgroundColor: '#f2efef' }}>
|
|
48
|
-
<FlatList
|
|
49
|
-
data={NotificationArr}
|
|
50
|
-
renderItem={renderItem}
|
|
51
|
-
style={{ flex: 1 }}
|
|
52
|
-
initialNumToRender={10}
|
|
53
|
-
maxToRenderPerBatch={20}
|
|
54
|
-
refreshControl={
|
|
55
|
-
<RefreshControl
|
|
56
|
-
refreshing={pulltorefresh}
|
|
57
|
-
size={"large"}
|
|
58
|
-
tintColor={"blue"}
|
|
59
|
-
colors={["red", "green", "cyan", "black"]}
|
|
60
|
-
progressBackgroundColor={"white"}
|
|
61
|
-
onRefresh={() => console.log("......Refresh.....")}
|
|
62
|
-
/>
|
|
63
|
-
}
|
|
64
|
-
contentContainerStyle={{ marginHorizontal: 10 }}
|
|
65
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
66
|
-
/>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
69
|
-
</CDetailView>
|
|
70
|
-
</CContainerView>
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
function urlify(text) {
|
|
74
|
-
var urlRegex = /(https?:\/\/[^\s]+)/g;
|
|
75
|
-
var x
|
|
76
|
-
text.replace(urlRegex, function (url) {
|
|
77
|
-
x = url
|
|
78
|
-
})
|
|
79
|
-
return x
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function getLink(params) {
|
|
83
|
-
var linkUrl = urlify(params.displaytext)
|
|
84
|
-
if (linkUrl != undefined && linkUrl != null) {
|
|
85
|
-
Linking.openURL(linkUrl).catch(err => notifyMessage("Couldn't load page", 4))
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function getNotification(data) {
|
|
90
|
-
switch (data.type) {
|
|
91
|
-
case 4: console.log("LAB RESULTS PRESSED")
|
|
92
|
-
break;
|
|
93
|
-
|
|
94
|
-
default: getLink(data)
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
data.status = false
|
|
99
|
-
setRefresh(refresh + 1)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getIcons(data) {
|
|
103
|
-
switch (data.type) {
|
|
104
|
-
case 4: return "microscope"
|
|
105
|
-
default:return "bell"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function getTimeCalculate(datePassed) {
|
|
110
|
-
var newDate = moment(today).format('DD/MM/YYYY');
|
|
111
|
-
var fromdate = moment(datePassed).format('DD/MM/YYYY');
|
|
112
|
-
|
|
113
|
-
var a = moment(newDate, 'DD/MM/YYYY');
|
|
114
|
-
var b = moment(fromdate, 'DD/MM/YYYY');
|
|
115
|
-
var diffDays = b.diff(a, 'days');
|
|
116
|
-
return -diffDays == 0 ? "Today" : -diffDays + " Days ago"
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function renderItem({ item }) {
|
|
120
|
-
return (
|
|
121
|
-
<TouchableOpacity onPress={() => getNotification(item)}
|
|
122
|
-
style={{
|
|
123
|
-
backgroundColor: !item.status ? 'transparent' : '#fff', marginVertical: normalize(4),
|
|
124
|
-
flexDirection: 'row', paddingVertical: 10, borderRadius: 10, borderWidth: 1, borderColor: '#d8d6d6'
|
|
125
|
-
}}>
|
|
126
|
-
<View style={{ alignItems: 'center', justifyContent: 'center', width: '15%' }}>
|
|
127
|
-
<Icons.FontAwesome5 name={getIcons(item)} color="black" size={normalize(25)} />
|
|
128
|
-
</View>
|
|
129
|
-
<View style={{ flexDirection: 'column', width: '80%' }}>
|
|
130
|
-
<Text style={{ fontWeight: '700', color: '#626263' }}>{item.displayheader}</Text>
|
|
131
|
-
<Text style={{ fontSize: normalize(12), color: '#626263' }}>{item.displaytext}</Text>
|
|
132
|
-
<View style={{ flexDirection: 'column' }}>
|
|
133
|
-
<Text style={{ fontSize: normalize(12), color: '#626263' }}>{getTimeCalculate(item.time)} |{" "}
|
|
134
|
-
<Ionicons name={item.status ? 'eye-outline' : 'ios-eye-off-outline'} color="#626263"
|
|
135
|
-
size={normalize(15)} />
|
|
136
|
-
</Text>
|
|
137
|
-
</View>
|
|
138
|
-
</View>
|
|
139
|
-
|
|
140
|
-
{ValueCheck(item.user) ?
|
|
141
|
-
<View style={{ position: 'absolute', bottom: normalize(5), right: normalize(5) }}>
|
|
142
|
-
<Text style={{ fontSize: normalize(11), color: '#626263' }}>{"USERNAME"}</Text>
|
|
143
|
-
</View> : null}
|
|
144
|
-
|
|
145
|
-
</TouchableOpacity>
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export default Notifications;
|
package/src/Screens/OcrScreen.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import COcrScanner from "../CustomComponents/COcrScanner";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default function OcrScreen(props) {
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<COcrScanner
|
|
8
|
-
imageurl={[
|
|
9
|
-
{
|
|
10
|
-
"url": "https://imgv3.fotor.com/images/blog-cover-image/How-to-Make-Text-Stand-Out-And-More-Readable.jpg"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"url": "https://im.indiatimes.in/content/2022/Sep/Kerala-Doctors-Handwriting-Goes-Viral-For-Being-Too-Neat_633690f2b67a7.jpg?w=1200&h=900&cc=1&webp=1&q=75"
|
|
14
|
-
}
|
|
15
|
-
]}
|
|
16
|
-
pdfurl={[{ "url": "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf" }]}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
}
|