@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,288 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useContext } from 'react';
|
|
2
|
-
import FontAwesome from 'react-native-vector-icons/FontAwesome5';
|
|
3
|
-
import {
|
|
4
|
-
Text,
|
|
5
|
-
View,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
BackHandler,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import Entypo from 'react-native-vector-icons/Entypo';
|
|
10
|
-
import ImageScreen from '../Media/ImageScreen';
|
|
11
|
-
import AudioScreen from '../Media/AudioScreen';
|
|
12
|
-
import VideoScreen from '../Media/VideoScreen';
|
|
13
|
-
import HeaderBlock from './HeaderBlock';
|
|
14
|
-
import CDetailView from '../CustomComponents/CDetailView';
|
|
15
|
-
import CContainerView from '../CustomComponents/CContainerView';
|
|
16
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
17
|
-
import DrawingScreen from '../Media/DrawingScreen';
|
|
18
|
-
import DocumentScreen from '../Media/DocumentScreen';
|
|
19
|
-
import HShadowButton from '../HOC/HShadowButton';
|
|
20
|
-
import { CButtonShadow, isBNUL, isNU } from '../CommonStyle/ComponentFunctions';
|
|
21
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
22
|
-
//
|
|
23
|
-
export default function FileExplorer(props) {
|
|
24
|
-
|
|
25
|
-
const navigation = useNavigation();
|
|
26
|
-
// console.log("PROPSSSSSSSSSSSSSS FILE EXPLORERERERRERERRERER",JSON.stringify(props))
|
|
27
|
-
const [stage, setStage] = useState(props.route.params.visibility != undefined ? props.route.params.visibility : 1);
|
|
28
|
-
const [visibility, setVisibility] = useState(props.route.params.visibility != undefined ? props.route.params.visibility : 0);
|
|
29
|
-
|
|
30
|
-
// useEffect(() => {
|
|
31
|
-
// const backAction = () => {
|
|
32
|
-
// props.navigation.goBack();
|
|
33
|
-
// return true;
|
|
34
|
-
// };
|
|
35
|
-
// const backHandler = BackHandler.addEventListener(
|
|
36
|
-
// 'hardwareBackPress',
|
|
37
|
-
// backAction,
|
|
38
|
-
// );
|
|
39
|
-
// return () => backHandler.remove();
|
|
40
|
-
// });
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
const backAction = () => {
|
|
44
|
-
if (!navigation.isFocused()) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
navigation.goBack();
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const backHandler = BackHandler.addEventListener(
|
|
55
|
-
"hardwareBackPress",
|
|
56
|
-
backAction
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
return () => backHandler.remove();
|
|
60
|
-
}, [navigation]);
|
|
61
|
-
|
|
62
|
-
const IconData = [
|
|
63
|
-
{
|
|
64
|
-
name: 'folder-images',
|
|
65
|
-
displaytext: 'Image',
|
|
66
|
-
colour: '#3dc6bd',
|
|
67
|
-
state: 1,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: 'video',
|
|
71
|
-
displaytext: 'Video',
|
|
72
|
-
colour: 'red',
|
|
73
|
-
state: 3,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: 'music',
|
|
77
|
-
displaytext: 'Audio',
|
|
78
|
-
colour: '#b04ebf',
|
|
79
|
-
state: 2,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'folder',
|
|
83
|
-
displaytext: 'Document',
|
|
84
|
-
colour: 'darkgreen',
|
|
85
|
-
state: 4,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'folder-images',
|
|
89
|
-
displaytext: 'Draw',
|
|
90
|
-
colour: '#800000',
|
|
91
|
-
state: 5,
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
let data;
|
|
96
|
-
const [gallery, setGallery] = useState(props.route.params.data);
|
|
97
|
-
var editstatus = props.route.params.eventData;
|
|
98
|
-
|
|
99
|
-
gallery != null && gallery != undefined ? (data = gallery) : null;
|
|
100
|
-
|
|
101
|
-
// console.log("GALLERYYYYYYY SAVEVEVEVVEVEVEVVEVEVEVEVVE", JSON.stringify(data))
|
|
102
|
-
|
|
103
|
-
function findFilesLength(item) {
|
|
104
|
-
|
|
105
|
-
if (item.state == 1) {
|
|
106
|
-
return isNU(data) && isBNUL(data.savedimages) ? data.savedimages.length : 0
|
|
107
|
-
}
|
|
108
|
-
else if (item.state == 2) {
|
|
109
|
-
return isNU(data) && isBNUL(data.savedaudio) ? data.savedaudio.length : 0
|
|
110
|
-
}
|
|
111
|
-
else if (item.state == 3) {
|
|
112
|
-
return isNU(data) && isBNUL(data.savedvideo) ? data.savedvideo.length : 0
|
|
113
|
-
}
|
|
114
|
-
else if (item.state == 4) {
|
|
115
|
-
return isNU(data) && isBNUL(data.savedpdf) ? data.savedpdf.length : 0
|
|
116
|
-
}
|
|
117
|
-
else if (item.state == 5) {
|
|
118
|
-
return isNU(data) && isBNUL(data.saveddoc) ? data.saveddoc.length : 0
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
return 0
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function mainView() {
|
|
127
|
-
|
|
128
|
-
// console.log('mainView', JSON.stringify(data.savedimages.length));
|
|
129
|
-
|
|
130
|
-
return (
|
|
131
|
-
<>
|
|
132
|
-
<View style={{}}>
|
|
133
|
-
<View
|
|
134
|
-
style={{
|
|
135
|
-
flexDirection: 'row',
|
|
136
|
-
width: '100%',
|
|
137
|
-
alignItems: 'center',
|
|
138
|
-
justifyContent: 'space-evenly',
|
|
139
|
-
}}>
|
|
140
|
-
{IconData.map((item, k) => {
|
|
141
|
-
return (
|
|
142
|
-
visibility == item.state || visibility == 0 ?
|
|
143
|
-
|
|
144
|
-
<View>
|
|
145
|
-
<HShadowButton
|
|
146
|
-
useicon={true}
|
|
147
|
-
usetext={true}
|
|
148
|
-
buttonstyle={{
|
|
149
|
-
margin: normalize(5),
|
|
150
|
-
borderLeftWidth: 0,
|
|
151
|
-
borderBottomWidth: 0,
|
|
152
|
-
borderRadius: 5,
|
|
153
|
-
borderWidth: 0,
|
|
154
|
-
borderColor: Global.AppTheme.primary_color,
|
|
155
|
-
justifyContent: 'center',
|
|
156
|
-
alignItems: 'center',
|
|
157
|
-
backgroundColor: item.state == stage ? '#bdd8d8' : 'white',
|
|
158
|
-
height: normalize(40),
|
|
159
|
-
width: normalize(40),
|
|
160
|
-
...CButtonShadow(),
|
|
161
|
-
}}
|
|
162
|
-
icongroup={11}
|
|
163
|
-
iconcolor={item.colour}
|
|
164
|
-
iconname={item.name}
|
|
165
|
-
iconsize={normalize(23)}
|
|
166
|
-
iconstyle={{ textAlign: 'center', borderWidth: 0 }}
|
|
167
|
-
displaytext={item.displaytext}
|
|
168
|
-
buttonCallback={() => {
|
|
169
|
-
setStage(item.state)
|
|
170
|
-
}}
|
|
171
|
-
textstyle={{
|
|
172
|
-
color: Global.AppTheme.primary_color,
|
|
173
|
-
fontSize: normalize(8),
|
|
174
|
-
textAlign: 'center',
|
|
175
|
-
fontWeight: 'normal'
|
|
176
|
-
}}
|
|
177
|
-
|
|
178
|
-
/>
|
|
179
|
-
{isNU(findFilesLength(item)) && findFilesLength(item) != 0 ?
|
|
180
|
-
<View style={{ position: 'absolute', top: -2, right: -2, borderWidth: 0.5, borderColor: 'lightgrey', elevation: 1, borderRadius: 1000, backgroundColor: Global.AppTheme.primary_color, height: normalize(18), width: normalize(18), justifyContent: 'center', alignItems: 'center' }}>
|
|
181
|
-
<Text adjustsFontSizeToFit numberOfLines={1} style={{ textAlign: 'center', fontSize: normalize(10), color: 'white', fontWeight: 'bold' }}>
|
|
182
|
-
{findFilesLength(item)}
|
|
183
|
-
</Text>
|
|
184
|
-
</View>
|
|
185
|
-
: null
|
|
186
|
-
}
|
|
187
|
-
</View>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
// <TouchableOpacity key={k}
|
|
191
|
-
// onPress={() => setStage(item.state)}>
|
|
192
|
-
// <View
|
|
193
|
-
// style={{
|
|
194
|
-
// width: '100%',
|
|
195
|
-
// flexDirection: 'column',
|
|
196
|
-
// alignItems: 'center',
|
|
197
|
-
// justifyContent: 'center',
|
|
198
|
-
// }}>
|
|
199
|
-
// <View
|
|
200
|
-
// style={{
|
|
201
|
-
// backgroundColor:
|
|
202
|
-
// item.state == stage ? 'black' : 'white',
|
|
203
|
-
// alignItems: 'center',
|
|
204
|
-
// justifyContent: 'center',
|
|
205
|
-
// width: normalize(40),
|
|
206
|
-
// height: normalize(40),
|
|
207
|
-
// borderRadius: normalize(40) / 2,
|
|
208
|
-
// }}>
|
|
209
|
-
// <Entypo
|
|
210
|
-
// name={item.name}
|
|
211
|
-
// size={normalize(24)}
|
|
212
|
-
// color={item.colour}
|
|
213
|
-
// />
|
|
214
|
-
// </View>
|
|
215
|
-
// <View>
|
|
216
|
-
// <Text
|
|
217
|
-
// style={{
|
|
218
|
-
// color: item.state == stage ? 'lightblue' : 'black',
|
|
219
|
-
// fontSize: normalize(16),
|
|
220
|
-
// fontWeight: 'bold',
|
|
221
|
-
// }}>
|
|
222
|
-
// {item.displaytext}
|
|
223
|
-
// </Text>
|
|
224
|
-
// </View>
|
|
225
|
-
// </View>
|
|
226
|
-
// </TouchableOpacity>
|
|
227
|
-
|
|
228
|
-
: null
|
|
229
|
-
);
|
|
230
|
-
})}
|
|
231
|
-
</View>
|
|
232
|
-
</View>
|
|
233
|
-
|
|
234
|
-
{stage == 1 ?
|
|
235
|
-
<ImageScreen
|
|
236
|
-
data={data}
|
|
237
|
-
editStatus={val =>
|
|
238
|
-
val == undefined ? null : props.route.params.onselect(editstatus)
|
|
239
|
-
}
|
|
240
|
-
/>
|
|
241
|
-
|
|
242
|
-
: stage == 2 ?
|
|
243
|
-
<AudioScreen
|
|
244
|
-
data={data}
|
|
245
|
-
editStatus={val =>
|
|
246
|
-
val == undefined ? null : props.route.params.onselect(editstatus)
|
|
247
|
-
}
|
|
248
|
-
/> :
|
|
249
|
-
stage == 3 ?
|
|
250
|
-
<VideoScreen
|
|
251
|
-
data={data}
|
|
252
|
-
editStatus={val =>
|
|
253
|
-
val == undefined ? null : props.route.params.onselect(editstatus)
|
|
254
|
-
}
|
|
255
|
-
/>
|
|
256
|
-
: stage == 5 ?
|
|
257
|
-
<DrawingScreen
|
|
258
|
-
data={data}
|
|
259
|
-
editStatus={val =>
|
|
260
|
-
val == undefined ? null : props.route.params.onselect(editstatus)
|
|
261
|
-
}
|
|
262
|
-
/> :
|
|
263
|
-
<DocumentScreen
|
|
264
|
-
data={data}
|
|
265
|
-
editStatus={val =>
|
|
266
|
-
val == undefined ? null : props.route.params.onselect(editstatus)
|
|
267
|
-
}
|
|
268
|
-
/>
|
|
269
|
-
}
|
|
270
|
-
</>
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return (
|
|
276
|
-
props.route.params.componenttype ?
|
|
277
|
-
mainView()
|
|
278
|
-
:
|
|
279
|
-
<CContainerView>
|
|
280
|
-
<HeaderBlock style={{ marginBottom: 30 }} />
|
|
281
|
-
<CDetailView>
|
|
282
|
-
{mainView()}
|
|
283
|
-
</CDetailView>
|
|
284
|
-
</CContainerView>
|
|
285
|
-
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
|
package/src/Screens/Footer.js
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import React, { useState, memo, useEffect, useContext } from 'react';
|
|
2
|
-
import { TouchableOpacity, Text, View, FlatList, Switch, Dimensions } from 'react-native';
|
|
3
|
-
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
|
4
|
-
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
5
|
-
import RNExitApp from 'react-native-exit-app';
|
|
6
|
-
import InsureResponseComponentContext from '../Handlers/insureResponseComponentContext';
|
|
7
|
-
import { Menu, MenuOptions, MenuOption, MenuTrigger, } from 'react-native-popup-menu';
|
|
8
|
-
import Loader from '../Custom/Loader';
|
|
9
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
10
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
11
|
-
import { CButtonShadow, isBNUL, isNU } from '../CommonStyle/ComponentFunctions';
|
|
12
|
-
import HShadowButton from '../HOC/HShadowButton';
|
|
13
|
-
|
|
14
|
-
const Footer = props => {
|
|
15
|
-
|
|
16
|
-
const { responseJSON, setResponseJSON } = useContext(InsureResponseComponentContext);
|
|
17
|
-
|
|
18
|
-
const [usertype] = useState(Global.PatientDetails != null && Global.PatientDetails.usertype != undefined ? Global.PatientDetails.usertype : "A")
|
|
19
|
-
let UserSpecificFooter = props.footerIcon != undefined ? (props.footerIcon).filter(obj => {
|
|
20
|
-
return obj.itemid != 2
|
|
21
|
-
}) : []
|
|
22
|
-
|
|
23
|
-
let UserSpecificMoreButton = props.footerIcon != undefined ? props.footerIcon.map(obj => ({
|
|
24
|
-
morebutton: obj.morebuttons && obj.morebuttons != null && obj.morebuttons != undefined ? obj.morebuttons.filter(element => { return element.itemid == 5 }) : null
|
|
25
|
-
})) : []
|
|
26
|
-
|
|
27
|
-
var editVar =
|
|
28
|
-
props.footerIcon != null && props.footerIcon != undefined
|
|
29
|
-
? props.footerIcon
|
|
30
|
-
: null;
|
|
31
|
-
|
|
32
|
-
if (editVar != undefined && editVar != null) {
|
|
33
|
-
var result = editVar.filter(obj => {
|
|
34
|
-
return obj.heading === 'More';
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function actionButton(data) {
|
|
39
|
-
props.buttonFunction(data)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function moreButton(data) {
|
|
43
|
-
props.buttonFunction(data)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function getIconColor(color) {
|
|
47
|
-
switch (color) {
|
|
48
|
-
case 0:
|
|
49
|
-
return Global.AppTheme.primary_color;
|
|
50
|
-
break;
|
|
51
|
-
case 1:
|
|
52
|
-
return '#f76c8f';
|
|
53
|
-
break;
|
|
54
|
-
case 2:
|
|
55
|
-
return 'lightgreen';
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
return Global.AppTheme.primary_color;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function renderFooter(data) {
|
|
64
|
-
|
|
65
|
-
var x = usertype == "A" ? data.item.morebuttons : UserSpecificMoreButton[UserSpecificMoreButton.length - 1].morebutton
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<View style={{ borderWidth: 0 }}>
|
|
69
|
-
{data.item.heading == 'More' ? (
|
|
70
|
-
<View style={{ borderWidth: 0 }}>
|
|
71
|
-
<Menu>
|
|
72
|
-
<MenuTrigger>
|
|
73
|
-
<HShadowButton
|
|
74
|
-
useicon={true}
|
|
75
|
-
usetext={true}
|
|
76
|
-
disabled={true}
|
|
77
|
-
buttonstyle={{
|
|
78
|
-
...CButtonShadow(),
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
borderWidth: 1,
|
|
82
|
-
borderColor: 'lightblue',
|
|
83
|
-
borderRadius: 10,
|
|
84
|
-
height: normalize(40),
|
|
85
|
-
width: normalize(50),
|
|
86
|
-
marginVertical: normalize(7),
|
|
87
|
-
backgroundColor: 'white'
|
|
88
|
-
}}
|
|
89
|
-
iconcolor={Global.AppTheme.primary_color}
|
|
90
|
-
icongroup={3}
|
|
91
|
-
iconname={'dots-horizontal-circle'}
|
|
92
|
-
iconsize={normalize(24)}
|
|
93
|
-
displaytext={'More'}
|
|
94
|
-
buttonCallback={() => {
|
|
95
|
-
|
|
96
|
-
}}
|
|
97
|
-
textstyle={{
|
|
98
|
-
color: Global.AppTheme.primary_color,
|
|
99
|
-
fontSize: normalize(9),
|
|
100
|
-
textAlign: 'center',
|
|
101
|
-
alignSelf: 'center'
|
|
102
|
-
}}
|
|
103
|
-
/>
|
|
104
|
-
{/* <View style={{
|
|
105
|
-
...CButtonShadow(),
|
|
106
|
-
alignItems: 'center',
|
|
107
|
-
borderWidth: 1,
|
|
108
|
-
borderColor: 'lightblue',
|
|
109
|
-
borderRadius: 10,
|
|
110
|
-
height: normalize(40),
|
|
111
|
-
width: normalize(50),
|
|
112
|
-
marginVertical: normalize(7)
|
|
113
|
-
}}>
|
|
114
|
-
<MaterialCommunityIcons
|
|
115
|
-
name={'dots-horizontal-circle'}
|
|
116
|
-
color={Global.AppTheme.primary_color}
|
|
117
|
-
size={normalize(24)}
|
|
118
|
-
/>
|
|
119
|
-
<Text
|
|
120
|
-
style={{
|
|
121
|
-
color: Global.AppTheme.primary_color,
|
|
122
|
-
fontSize: normalize(9),
|
|
123
|
-
alignSelf: 'center',
|
|
124
|
-
}}>
|
|
125
|
-
{"More"}
|
|
126
|
-
</Text>
|
|
127
|
-
</View> */}
|
|
128
|
-
</MenuTrigger>
|
|
129
|
-
<MenuOptions
|
|
130
|
-
optionsContainerStyle={{ marginTop: normalize(-52) }}
|
|
131
|
-
customStyles={{ optionsContainer: { width: '100%', shadowColor: '#ffffff00', backgroundColor: '#ffffffff' }, optionText: {}, }}>
|
|
132
|
-
<View style={{ flexDirection: 'row', flexWrap: 'wrap-reverse', justifyContent: 'flex-end', borderWidth: 0 }}>
|
|
133
|
-
{/* <MenuOptions
|
|
134
|
-
customStyles={{
|
|
135
|
-
optionsContainer: { width: '35%' },
|
|
136
|
-
optionText: {},
|
|
137
|
-
}}>
|
|
138
|
-
<View> */}
|
|
139
|
-
{x != null &&
|
|
140
|
-
x != undefined &&
|
|
141
|
-
x.map((item, key) => {
|
|
142
|
-
return (
|
|
143
|
-
|
|
144
|
-
<MenuOption
|
|
145
|
-
key={key}
|
|
146
|
-
onSelect={() => {
|
|
147
|
-
moreButton(item, item.functionname, data.item)
|
|
148
|
-
}}
|
|
149
|
-
style={{ marginHorizontal: normalize(3) }}>
|
|
150
|
-
<HShadowButton
|
|
151
|
-
useicon={true}
|
|
152
|
-
usetext={true}
|
|
153
|
-
disabled={true}
|
|
154
|
-
buttonstyle={{
|
|
155
|
-
...CButtonShadow(),
|
|
156
|
-
alignItems: 'center',
|
|
157
|
-
justifyContent: 'center',
|
|
158
|
-
borderWidth: 1,
|
|
159
|
-
borderColor: 'lightblue',
|
|
160
|
-
borderRadius: 10,
|
|
161
|
-
height: normalize(40),
|
|
162
|
-
width: normalize(50),
|
|
163
|
-
marginVertical: normalize(7),
|
|
164
|
-
backgroundColor: 'white'
|
|
165
|
-
}}
|
|
166
|
-
iconcolor={Global.AppTheme.primary_color}
|
|
167
|
-
icongroup={4}
|
|
168
|
-
iconname={item.iconname}
|
|
169
|
-
iconsize={normalize(24)}
|
|
170
|
-
displaytext={item.heading}
|
|
171
|
-
buttonCallback={() => {
|
|
172
|
-
// getFunctions(item)
|
|
173
|
-
}}
|
|
174
|
-
textstyle={{
|
|
175
|
-
color: Global.AppTheme.primary_color,
|
|
176
|
-
fontSize: normalize(9),
|
|
177
|
-
textAlign: 'center',
|
|
178
|
-
alignSelf: 'center'
|
|
179
|
-
}}
|
|
180
|
-
/>
|
|
181
|
-
</MenuOption>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
// <MenuOption
|
|
185
|
-
// key={key}
|
|
186
|
-
// onSelect={() => moreButton(item, item.functionname, data.item)}
|
|
187
|
-
// style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
188
|
-
// <FontAwesome
|
|
189
|
-
// name={item.iconname}
|
|
190
|
-
// color={item.iconcolor ? item.iconcolor : Global.AppTheme.primary_color}
|
|
191
|
-
// size={normalize(23)}
|
|
192
|
-
// />
|
|
193
|
-
// <Text
|
|
194
|
-
// style={{
|
|
195
|
-
// fontSize: normalize(10),
|
|
196
|
-
// marginLeft: '10%',
|
|
197
|
-
// }}>
|
|
198
|
-
// {item.heading}
|
|
199
|
-
// </Text>
|
|
200
|
-
// </MenuOption>
|
|
201
|
-
);
|
|
202
|
-
})}
|
|
203
|
-
</View>
|
|
204
|
-
</MenuOptions>
|
|
205
|
-
</Menu>
|
|
206
|
-
</View>
|
|
207
|
-
) : (
|
|
208
|
-
|
|
209
|
-
<HShadowButton
|
|
210
|
-
useicon={true}
|
|
211
|
-
usetext={true}
|
|
212
|
-
disabled={false}
|
|
213
|
-
buttonstyle={{
|
|
214
|
-
...CButtonShadow(),
|
|
215
|
-
alignItems: 'center',
|
|
216
|
-
justifyContent: 'center',
|
|
217
|
-
borderWidth: 1,
|
|
218
|
-
borderColor: 'lightblue',
|
|
219
|
-
borderRadius: 10,
|
|
220
|
-
height: normalize(40),
|
|
221
|
-
width: normalize(50),
|
|
222
|
-
marginVertical: normalize(7),
|
|
223
|
-
backgroundColor: 'white'
|
|
224
|
-
}}
|
|
225
|
-
iconcolor={CheckSaveColor(data, responseJSON)}
|
|
226
|
-
icongroup={4}
|
|
227
|
-
iconname={data.item.iconname}
|
|
228
|
-
iconsize={normalize(24)}
|
|
229
|
-
displaytext={data.item.heading}
|
|
230
|
-
buttonCallback={() => {
|
|
231
|
-
actionButton(data.item)
|
|
232
|
-
}}
|
|
233
|
-
textstyle={{
|
|
234
|
-
color: Global.AppTheme.primary_color,
|
|
235
|
-
fontSize: normalize(9),
|
|
236
|
-
textAlign: 'center',
|
|
237
|
-
alignSelf: 'center'
|
|
238
|
-
}}
|
|
239
|
-
/>
|
|
240
|
-
// <TouchableOpacity
|
|
241
|
-
// onPress={() => {
|
|
242
|
-
// actionButton(data.item)
|
|
243
|
-
// }}
|
|
244
|
-
// style={{
|
|
245
|
-
// borderWidth: 1,
|
|
246
|
-
// borderColor: 'lightblue',
|
|
247
|
-
// borderRadius: 10,
|
|
248
|
-
// height: normalize(40),
|
|
249
|
-
// width: normalize(50),
|
|
250
|
-
// marginVertical: normalize(7),
|
|
251
|
-
// justifyContent: 'center',
|
|
252
|
-
// alignItems: 'center',
|
|
253
|
-
// }}>
|
|
254
|
-
// <FontAwesome
|
|
255
|
-
// name={data.item.iconname}
|
|
256
|
-
// color={CheckSaveColor(data, responseJSON)}
|
|
257
|
-
// size={normalize(24)}
|
|
258
|
-
// />
|
|
259
|
-
// <Text numberOfLines={1} adjustsFontSizeToFit style={{ color: Global.AppTheme.primary_color, fontSize: normalize(9) }}>
|
|
260
|
-
// {data.item.heading}
|
|
261
|
-
// </Text>
|
|
262
|
-
// </TouchableOpacity>
|
|
263
|
-
// <AwesomeButton
|
|
264
|
-
// onPress={() => actionButton(data.item)}
|
|
265
|
-
// borderRadius={10}
|
|
266
|
-
// borderWidth={1}
|
|
267
|
-
// height={normalize(40)}
|
|
268
|
-
// width={normalize(55)}
|
|
269
|
-
// backgroundColor={"#fff"}
|
|
270
|
-
// paddingHorizontal={0}
|
|
271
|
-
// raiseLevel={2}
|
|
272
|
-
// paddingBottom={0}
|
|
273
|
-
// borderColor={'lightblue'}
|
|
274
|
-
// paddingTop={0}>
|
|
275
|
-
|
|
276
|
-
// <View style={{ alignItems: 'center', width: normalize(50) }} >
|
|
277
|
-
// <FontAwesome
|
|
278
|
-
// name={data.item.iconname}
|
|
279
|
-
// // color={(data.item.heading == 'Save' && responseJSON.editStatus) ? '#f76c8f' : Global.AppTheme.primary_color}
|
|
280
|
-
// color={CheckSaveColor(data, responseJSON)}
|
|
281
|
-
// size={normalize(22)}
|
|
282
|
-
// />
|
|
283
|
-
// <Text numberOfLines={1} style={{ color: Global.AppTheme.primary_color, fontSize: normalize(10) }}>
|
|
284
|
-
// {data.item.heading}
|
|
285
|
-
// </Text>
|
|
286
|
-
// </View>
|
|
287
|
-
// </AwesomeButton>
|
|
288
|
-
)}
|
|
289
|
-
</View>
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function CheckSaveColor(data, context) {
|
|
294
|
-
|
|
295
|
-
if (data.item.heading == 'Save' && isNU(context) && isBNUL(context.consultation) && CheckIfEdited(context.consultation)) {
|
|
296
|
-
return '#f76c8f'
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
return Global.AppTheme.primary_color
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
function CheckIfEdited(array) {
|
|
304
|
-
|
|
305
|
-
let prevcodearray = array.filter((i, k) => { return i.editStatus ? { ...i } : undefined });
|
|
306
|
-
let prevcode = isBNUL(prevcodearray) ? true : false;
|
|
307
|
-
return prevcode;
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return (
|
|
317
|
-
<View
|
|
318
|
-
style={[{
|
|
319
|
-
// ...CFooterShadow(), // offsetX offsetY blurRadius spreadDistance color
|
|
320
|
-
minHeight: Dimensions.get('screen').height * 0.06,
|
|
321
|
-
paddingVertical: 5,
|
|
322
|
-
justifyContent: 'center',
|
|
323
|
-
backgroundColor: 'white',
|
|
324
|
-
borderTopWidth: 1,
|
|
325
|
-
borderTopColor: 'lightgrey'
|
|
326
|
-
}, props.style]}
|
|
327
|
-
>
|
|
328
|
-
<View style={{ flexDirection: 'row'}}>
|
|
329
|
-
<FlatList
|
|
330
|
-
data={usertype == "A" ? props.footerIcon : UserSpecificFooter}
|
|
331
|
-
contentContainerStyle={{ flexDirection: 'row', justifyContent: 'space-between', paddingHorizontal: normalize(5) }}
|
|
332
|
-
renderItem={renderFooter}
|
|
333
|
-
keyExtractor={item => item.itemid}
|
|
334
|
-
/>
|
|
335
|
-
</View>
|
|
336
|
-
</View>
|
|
337
|
-
);
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
export default memo(Footer);
|