@jescon-technologies/react-native-ui-kit 0.0.5 → 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,438 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { View, Text, TextInput, TouchableOpacity, FlatList, Image, Dimensions, StyleSheet, Keyboard } from 'react-native';
|
|
3
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
4
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
5
|
-
import Icons from '../Common/Icons';
|
|
6
|
-
import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
7
|
-
import { ArrayCheck, ValueCheck, getLoading, isNU, isNUQZ, notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
8
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
9
|
-
import CAwesomeButton from '../CustomComponents/CAwesomeButton';
|
|
10
|
-
import CCommentOverlay from '../CustomComponents/CCommentOverlay';
|
|
11
|
-
import Loader from '../Custom/Loader';
|
|
12
|
-
|
|
13
|
-
export default function SSearch(props) {
|
|
14
|
-
const [dropdowndata, setDropDownData] = useState([]);
|
|
15
|
-
const [CommentOverlay, setCommentOverlay] = useState(false);
|
|
16
|
-
const [CommentOverlayData, setCommentOverlayData] = useState({
|
|
17
|
-
'code': 0,
|
|
18
|
-
'displaytext': '',
|
|
19
|
-
'displayheading': '',
|
|
20
|
-
});
|
|
21
|
-
const textInputRef = useRef(null);
|
|
22
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
23
|
-
const [refresh, setRefresh] = useState(0);
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
ValueCheck(props.editable) ? FetchDropdownList() : FetchList();
|
|
27
|
-
}, []);
|
|
28
|
-
|
|
29
|
-
function FetchDropdownList() {
|
|
30
|
-
let buttonapi = APIURL + props.dropdownapi;
|
|
31
|
-
console.log('Searchbarlink___________________', 'get', buttonapi);
|
|
32
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
33
|
-
.then(function (response) {
|
|
34
|
-
if (response.data.data != null && response.data.data != undefined) {
|
|
35
|
-
setDropDownData(response.data.data);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
setDropDownData([]);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function FetchList() {
|
|
44
|
-
setDropDownData(props.dropdownarray);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function saveDataConsultation(blockData, textdata, comments) {
|
|
48
|
-
console.log('saveDataConsultation', blockData, textdata);
|
|
49
|
-
|
|
50
|
-
setIsLoading(true);
|
|
51
|
-
let output = {
|
|
52
|
-
'groups': {
|
|
53
|
-
'procedurename': 'hosumrconsultationactivity1',
|
|
54
|
-
'hosuconsultant': Global.userData.hosuconsultant,
|
|
55
|
-
'consultationstatus': blockData,
|
|
56
|
-
'consultationremarks': isNU(comments) ? comments : '',
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
let buttonapi = APIURL + 'commondelete/RnCommonDelete';
|
|
62
|
-
console.log('output', output, buttonapi);
|
|
63
|
-
|
|
64
|
-
NetworkServiceCall('post', buttonapi, output)
|
|
65
|
-
.then(function (response) {
|
|
66
|
-
console.log('response of saved.....', JSON.stringify(response));
|
|
67
|
-
if (response.httpstatus == 200) {
|
|
68
|
-
Global.userData.consultationstatus = blockData; //started
|
|
69
|
-
setRefresh(refresh + 1);
|
|
70
|
-
props.onRefresh(true);
|
|
71
|
-
notifyMessage(textdata);
|
|
72
|
-
setIsLoading(false);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
notifyMessage('Data not saved', 2);
|
|
76
|
-
setIsLoading(false);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
getLoading(v => setIsLoading(false));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<View style={{ marginTop: normalize(3), borderWidth: 0 }}>
|
|
84
|
-
|
|
85
|
-
{ArrayCheck(dropdowndata) ?
|
|
86
|
-
<View style={{ flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-evenly',borderWidth:0 }}>
|
|
87
|
-
{(dropdowndata).map((item, i) => {
|
|
88
|
-
return (
|
|
89
|
-
<TouchableOpacity key={i}
|
|
90
|
-
style={{
|
|
91
|
-
flexDirection: 'column',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
borderRadius: 10,
|
|
94
|
-
backgroundColor: '#fff', // item.selected ? '#d7ffbc' : '#fff',
|
|
95
|
-
elevation: 2,
|
|
96
|
-
borderColor: 'lightblue',
|
|
97
|
-
borderWidth: 0.5,
|
|
98
|
-
padding: normalize(3),
|
|
99
|
-
paddingHorizontal: normalize(5),
|
|
100
|
-
marginLeft: normalize(3),
|
|
101
|
-
marginTop: normalize(3),
|
|
102
|
-
marginBottom: normalize(3),
|
|
103
|
-
}}
|
|
104
|
-
onPress={() => getSelection(item)}
|
|
105
|
-
>
|
|
106
|
-
<Icons.FontAwesome
|
|
107
|
-
name={ValueCheck(item.iconname) ? item.iconname : 'dot-circle-o'}
|
|
108
|
-
color={Global.AppTheme.primary_color} size={normalize(20)}
|
|
109
|
-
style={{
|
|
110
|
-
paddingRight: normalize(4),
|
|
111
|
-
paddingLeft: normalize(4),
|
|
112
|
-
}}
|
|
113
|
-
/>
|
|
114
|
-
<Text adjustsFontSizeToFit style={{
|
|
115
|
-
fontSize: normalize(7),
|
|
116
|
-
fontWeight: item.selected ? '800' : 'normal',
|
|
117
|
-
color: Global.AppTheme.primary_color,
|
|
118
|
-
}}>
|
|
119
|
-
{item.displayvalue}
|
|
120
|
-
</Text>
|
|
121
|
-
</TouchableOpacity>
|
|
122
|
-
);
|
|
123
|
-
})}
|
|
124
|
-
</View> : null}
|
|
125
|
-
|
|
126
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
|
|
127
|
-
|
|
128
|
-
{props.consultationbuttons ?
|
|
129
|
-
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
|
|
130
|
-
<CAwesomeButton
|
|
131
|
-
callback={(k) => {
|
|
132
|
-
if (!isNUQZ(Global.userData.consultationstatus)) { //start
|
|
133
|
-
saveDataConsultation(1, 'Consultation Started.');
|
|
134
|
-
}
|
|
135
|
-
else if (Global.userData.consultationstatus == 1) { //start
|
|
136
|
-
setCommentOverlayData(
|
|
137
|
-
{
|
|
138
|
-
'code': 2,
|
|
139
|
-
'displaytext': 'Consultation Paused',
|
|
140
|
-
'displayheading': 'PAUSE REASON',
|
|
141
|
-
});
|
|
142
|
-
setCommentOverlay(true);
|
|
143
|
-
}
|
|
144
|
-
else if (Global.userData.consultationstatus == 2) {
|
|
145
|
-
saveDataConsultation(3, 'Consultation Resumed.');
|
|
146
|
-
}
|
|
147
|
-
else if (Global.userData.consultationstatus == 3) {
|
|
148
|
-
setCommentOverlayData(
|
|
149
|
-
{
|
|
150
|
-
'code': 2,
|
|
151
|
-
'displaytext': 'Consultation Paused',
|
|
152
|
-
'displayheading': 'PAUSE REASON',
|
|
153
|
-
});
|
|
154
|
-
setCommentOverlay(true);
|
|
155
|
-
}
|
|
156
|
-
else if (Global.userData.consultationstatus == 4) {
|
|
157
|
-
saveDataConsultation(1, 'Consultation Started.');
|
|
158
|
-
}
|
|
159
|
-
}}
|
|
160
|
-
buttonstyle={{
|
|
161
|
-
'borderRadius': 100,
|
|
162
|
-
'borderWidth': 0.5,
|
|
163
|
-
'height': normalize(30),
|
|
164
|
-
'width': normalize(29),
|
|
165
|
-
'backgroundColor': (Global.userData.consultationstatus == 0) ? 'darkgreen' : (Global.userData.consultationstatus == 1) ? '#ff8119' : (Global.userData.consultationstatus == 2) ? 'darkblue' : (Global.userData.consultationstatus == 3) ? '#ff8119' : 'green',
|
|
166
|
-
// 'backgroundColor': ValueCheck(blockData.item.bookingstatus) ? "#7a1241" : Global.AppTheme.primary_color,
|
|
167
|
-
'paddingHorizontal': 0,
|
|
168
|
-
'raiseLevel': 3,
|
|
169
|
-
'paddingBottom': 0,
|
|
170
|
-
'borderColor': 'grey',
|
|
171
|
-
'paddingTop': 0,
|
|
172
|
-
'style': {
|
|
173
|
-
padding: 0,
|
|
174
|
-
marginHorizontal: 2,
|
|
175
|
-
},
|
|
176
|
-
}}
|
|
177
|
-
viewstyle={{
|
|
178
|
-
borderWidth: 0,
|
|
179
|
-
borderRadius: 0,
|
|
180
|
-
justifyContent: 'center',
|
|
181
|
-
alignItems: 'center',
|
|
182
|
-
}}
|
|
183
|
-
icon={{
|
|
184
|
-
'icongroup': 5,
|
|
185
|
-
'name': 'user-md',
|
|
186
|
-
'color': 'white',
|
|
187
|
-
'size': normalize(18),
|
|
188
|
-
'style': {
|
|
189
|
-
textAlign: 'center',
|
|
190
|
-
},
|
|
191
|
-
}}
|
|
192
|
-
// text={{
|
|
193
|
-
// fontSize: normalize(6),
|
|
194
|
-
// fontWeight: 'bold',
|
|
195
|
-
// color: 'white',
|
|
196
|
-
// textAlign: 'center',
|
|
197
|
-
// textShadowColor: 'black',
|
|
198
|
-
// textShadowRadius: 1,
|
|
199
|
-
// textShadowOffset: { width: 1, height: 1 },
|
|
200
|
-
// }}
|
|
201
|
-
displaytext={'start'}
|
|
202
|
-
/>
|
|
203
|
-
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }} >{(Global.userData.consultationstatus == 0) ? 'START' : (Global.userData.consultationstatus == 1) ? 'PAUSE' : (Global.userData.consultationstatus == 2) ? 'RESUME' : (Global.userData.consultationstatus == 3) ? 'PAUSE' : 'START'}</Text>
|
|
204
|
-
</View>
|
|
205
|
-
: null}
|
|
206
|
-
|
|
207
|
-
{ValueCheck(props.onChangeText) ? <View
|
|
208
|
-
style={{
|
|
209
|
-
flexDirection: 'row',
|
|
210
|
-
borderWidth: 0,
|
|
211
|
-
borderColor: 'black',
|
|
212
|
-
justifyContent: 'flex-start',
|
|
213
|
-
alignItems: 'flex-start',
|
|
214
|
-
borderRadius: 50,
|
|
215
|
-
width: props.consultationbuttons ? '65%' : ValueCheck(props.onSearch) ? '85%' : '95%',
|
|
216
|
-
marginHorizontal: normalize(5),
|
|
217
|
-
marginBottom: Dimensions.get('window').height * 0.003,
|
|
218
|
-
height: normalize(35),
|
|
219
|
-
backgroundColor: '#f1f3f6',
|
|
220
|
-
marginTop: 0,
|
|
221
|
-
padding: 5,
|
|
222
|
-
alignItems: 'center',
|
|
223
|
-
}} >
|
|
224
|
-
|
|
225
|
-
<View style={{ flex: 1, paddingLeft: '1%', width: '70%' }}>
|
|
226
|
-
<TextInput
|
|
227
|
-
ref={textInputRef}
|
|
228
|
-
style={{
|
|
229
|
-
color: 'black',
|
|
230
|
-
width: '100%',
|
|
231
|
-
marginLeft: '1%',
|
|
232
|
-
marginRight: '1%',
|
|
233
|
-
fontWeight: 'bold',
|
|
234
|
-
fontSize: normalize(18),
|
|
235
|
-
textAlign: 'justify',
|
|
236
|
-
padding: 0, height: '100%', marginBottom: -(Dimensions.get('window').height * 0.003),
|
|
237
|
-
}}
|
|
238
|
-
editable={true}
|
|
239
|
-
blurOnSubmit={true}
|
|
240
|
-
keyboardType="default"
|
|
241
|
-
placeholder={'Search...'}
|
|
242
|
-
placeholderTextColor={'lightblue'}
|
|
243
|
-
autoCapitalize={'characters'}
|
|
244
|
-
{...props}
|
|
245
|
-
/>
|
|
246
|
-
</View>
|
|
247
|
-
{/* <TouchableOpacity
|
|
248
|
-
onPress={() => getVisibility()}
|
|
249
|
-
// hitSlop={{ right: 5, left: 5, top: 5, bottom: 5 }}
|
|
250
|
-
style={{ borderWidth: 0, marginRight: normalize(5) }}>
|
|
251
|
-
<Icons.MaterialCommunityIcons name="close" color={Global.AppTheme.primary_color} size={normalize(20)} />
|
|
252
|
-
</TouchableOpacity> */}
|
|
253
|
-
{ValueCheck(props.onBarCodeScan) ?
|
|
254
|
-
<View style={{
|
|
255
|
-
borderWidth: 0,
|
|
256
|
-
paddingRight: '1%', alignItems: 'flex-end',
|
|
257
|
-
}}>
|
|
258
|
-
<TouchableOpacity style={{
|
|
259
|
-
width: '80%', alignItems: 'flex-end',
|
|
260
|
-
}}
|
|
261
|
-
onPress={() => ValueCheck(props.onBarCodeScan) ? props.onBarCodeScan(true) : null}>
|
|
262
|
-
<Image style={{ width: 30, height: 32 }}
|
|
263
|
-
source={{uri: `${APIURL}file/getCommonFile/image/barcode2.png`}}
|
|
264
|
-
/>
|
|
265
|
-
</TouchableOpacity>
|
|
266
|
-
</View> : null}
|
|
267
|
-
|
|
268
|
-
</View> : null}
|
|
269
|
-
|
|
270
|
-
{ValueCheck(props.onSearch) ?
|
|
271
|
-
<TouchableOpacity style={{}}
|
|
272
|
-
onPress={() => ValueCheck(props.onSearch) ? props.onSearch(true) : null}
|
|
273
|
-
>
|
|
274
|
-
<Icons.FontAwesome5 name={'search'} color={'black'} size={normalize(23)} />
|
|
275
|
-
</TouchableOpacity> : null}
|
|
276
|
-
|
|
277
|
-
{props.consultationbuttons ?
|
|
278
|
-
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
|
|
279
|
-
<CAwesomeButton
|
|
280
|
-
callback={(k) => {
|
|
281
|
-
console.log('CAwesomeButton completed');
|
|
282
|
-
setCommentOverlayData(
|
|
283
|
-
{
|
|
284
|
-
'code': 4,
|
|
285
|
-
'displaytext': 'Consultation Completed',
|
|
286
|
-
'displayheading': 'COMPLETION REASON',
|
|
287
|
-
});
|
|
288
|
-
setCommentOverlay(true);
|
|
289
|
-
}}
|
|
290
|
-
buttonstyle={{
|
|
291
|
-
'borderRadius': 100,
|
|
292
|
-
'borderWidth': 0.5,
|
|
293
|
-
'height': normalize(30),
|
|
294
|
-
'width': normalize(29),
|
|
295
|
-
'backgroundColor': 'darkred',
|
|
296
|
-
// 'backgroundColor': ValueCheck(blockData.item.bookingstatus) ? "#7a1241" : Global.AppTheme.primary_color,
|
|
297
|
-
'paddingHorizontal': 0,
|
|
298
|
-
'raiseLevel': 3,
|
|
299
|
-
'paddingBottom': 0,
|
|
300
|
-
'borderColor': 'grey',
|
|
301
|
-
'paddingTop': 0,
|
|
302
|
-
'style': {
|
|
303
|
-
padding: 0,
|
|
304
|
-
marginHorizontal: 2,
|
|
305
|
-
},
|
|
306
|
-
}}
|
|
307
|
-
viewstyle={{
|
|
308
|
-
borderWidth: 0,
|
|
309
|
-
borderRadius: 0,
|
|
310
|
-
justifyContent: 'center',
|
|
311
|
-
alignItems: 'center',
|
|
312
|
-
}}
|
|
313
|
-
icon={{
|
|
314
|
-
'icongroup': 3,
|
|
315
|
-
'name': 'account-multiple-check',
|
|
316
|
-
'color': 'white',
|
|
317
|
-
'size': normalize(19),
|
|
318
|
-
'style': {
|
|
319
|
-
textAlign: 'center',
|
|
320
|
-
},
|
|
321
|
-
}}
|
|
322
|
-
// text={{
|
|
323
|
-
// fontSize: normalize(6),
|
|
324
|
-
// fontWeight: 'bold',
|
|
325
|
-
// color: 'white',
|
|
326
|
-
// textAlign: 'center',
|
|
327
|
-
// textShadowColor: 'black',
|
|
328
|
-
// textShadowRadius: 1,
|
|
329
|
-
// textShadowOffset: { width: 1, height: 1 },
|
|
330
|
-
// }}
|
|
331
|
-
displaytext={'COMPLETE'}
|
|
332
|
-
/>
|
|
333
|
-
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>COMPLETE</Text>
|
|
334
|
-
</View>
|
|
335
|
-
: null}
|
|
336
|
-
</View>
|
|
337
|
-
{CommentOverlay && isNU(CommentOverlayData) && isNU(CommentOverlayData.displaytext) ?
|
|
338
|
-
<CCommentOverlay
|
|
339
|
-
disabled={false}
|
|
340
|
-
icon={{
|
|
341
|
-
'name': 'badge-account',
|
|
342
|
-
'icongroup': 3,
|
|
343
|
-
'size': normalize(15),
|
|
344
|
-
'style': {
|
|
345
|
-
marginHorizontal: normalize(10),
|
|
346
|
-
},
|
|
347
|
-
}}
|
|
348
|
-
footericon={{
|
|
349
|
-
'name': 'user-md',
|
|
350
|
-
'icongroup': 5,
|
|
351
|
-
'color': Global.AppTheme.primary_color,
|
|
352
|
-
'size': normalize(25),
|
|
353
|
-
'style': {
|
|
354
|
-
marginHorizontal: normalize(10),
|
|
355
|
-
},
|
|
356
|
-
}}
|
|
357
|
-
footerbuttontext={'SAVE'}
|
|
358
|
-
heading={isNU(CommentOverlayData) && isNU(CommentOverlayData.displayheading) ? CommentOverlayData.displayheading : ''}
|
|
359
|
-
overlaystyle={{
|
|
360
|
-
borderRadius: 10,
|
|
361
|
-
height: Dimensions.get('window').height * 0.38,
|
|
362
|
-
borderWidth: 0,
|
|
363
|
-
borderColor: 'darkblue',
|
|
364
|
-
alignSelf: 'center',
|
|
365
|
-
width: Dimensions.get('screen').width * 1,
|
|
366
|
-
alignItems: 'center',
|
|
367
|
-
justifyContent: 'flex-start',
|
|
368
|
-
padding: 0,
|
|
369
|
-
backgroundColor: 'transparent',
|
|
370
|
-
position: 'absolute',
|
|
371
|
-
bottom: 0,
|
|
372
|
-
|
|
373
|
-
// position: 'absolute',
|
|
374
|
-
// bottom: 0,
|
|
375
|
-
// top: Dimensions.get('screen').height * 0.5,
|
|
376
|
-
// width: Dimensions.get('screen').width,
|
|
377
|
-
// borderRadius: 20,
|
|
378
|
-
// borderWidth: 2,
|
|
379
|
-
// borderColor: '#e0e0e0',
|
|
380
|
-
// paddingHorizontal: normalize(5),
|
|
381
|
-
}}
|
|
382
|
-
data={''}
|
|
383
|
-
callback={val => {
|
|
384
|
-
// console.log('callback from overlay');
|
|
385
|
-
|
|
386
|
-
}}
|
|
387
|
-
onsavecallback={val => {
|
|
388
|
-
setCommentOverlay(false);
|
|
389
|
-
saveDataConsultation(CommentOverlayData.code, CommentOverlayData.displaytext, val);
|
|
390
|
-
// console.log('callback from overlay');
|
|
391
|
-
|
|
392
|
-
}}
|
|
393
|
-
|
|
394
|
-
OverlayClose={val => {
|
|
395
|
-
console.log('callback from OverlayClose');
|
|
396
|
-
setCommentOverlay(false);
|
|
397
|
-
}}
|
|
398
|
-
|
|
399
|
-
/>
|
|
400
|
-
|
|
401
|
-
: null}
|
|
402
|
-
{isLoading ? <Loader displaytext={true} /> : null}
|
|
403
|
-
</View >
|
|
404
|
-
);
|
|
405
|
-
|
|
406
|
-
function getVisibility() {
|
|
407
|
-
if (ArrayCheck(dropdowndata)) {
|
|
408
|
-
dropdowndata.map((item) => item.selected = false);
|
|
409
|
-
Keyboard.dismiss();
|
|
410
|
-
}
|
|
411
|
-
setRefresh(refresh + 1);
|
|
412
|
-
ValueCheck(props.visibility) ? props.visibility(false) : null;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
function getSelection(params) {
|
|
416
|
-
if (ArrayCheck(dropdowndata)) {
|
|
417
|
-
dropdowndata.map((item) => item.selected = false);
|
|
418
|
-
}
|
|
419
|
-
params.selected = !params.selected;
|
|
420
|
-
ValueCheck(props.onChangeData) ? props.onChangeData(params) : null;
|
|
421
|
-
if (textInputRef.current) {
|
|
422
|
-
textInputRef.current.focus();
|
|
423
|
-
}
|
|
424
|
-
setRefresh(refresh + 1);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
const styles = StyleSheet.create({
|
|
429
|
-
barcode_icon_view: {
|
|
430
|
-
paddingRight: '1%', width: '20%', alignItems: 'flex-end',
|
|
431
|
-
},
|
|
432
|
-
barcode_icon_inner_view: {
|
|
433
|
-
width: '80%', alignItems: 'flex-end',
|
|
434
|
-
},
|
|
435
|
-
barcode_icon: {
|
|
436
|
-
width: 30, height: 32,
|
|
437
|
-
},
|
|
438
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextInput, View, StyleSheet, Image,TouchableOpacity } from 'react-native';
|
|
3
|
-
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
4
|
-
import ComponentStyles from '../CommonStyle/componentStyle';
|
|
5
|
-
|
|
6
|
-
const SSearchBar = (props) => {
|
|
7
|
-
const [localSearchData, setLocalSearchData] = React.useState('');
|
|
8
|
-
return (
|
|
9
|
-
<View
|
|
10
|
-
style={[ComponentStyles.searchTextbox_View,
|
|
11
|
-
layoutstyles.overlay_searchTextbox_View,
|
|
12
|
-
]}
|
|
13
|
-
>
|
|
14
|
-
<View style={layoutstyles.textinput_view}>
|
|
15
|
-
<TextInput
|
|
16
|
-
style={[ComponentStyles.searchTextbox]}
|
|
17
|
-
editable={true}
|
|
18
|
-
autoCapitalize={'characters'}
|
|
19
|
-
keyboardType={'default'}
|
|
20
|
-
placeholder="Search"
|
|
21
|
-
value={localSearchData}
|
|
22
|
-
onChangeText={(text) => {
|
|
23
|
-
setLocalSearchData(text);
|
|
24
|
-
props.onChangeText(text);
|
|
25
|
-
}}
|
|
26
|
-
/>
|
|
27
|
-
</View>
|
|
28
|
-
|
|
29
|
-
<TouchableOpacity
|
|
30
|
-
disabled={ValueCheck(props.callBack) ? false : true}
|
|
31
|
-
onPress={() => props.callBack(true)} >
|
|
32
|
-
<Image style={[ComponentStyles.searchIcon]}
|
|
33
|
-
source={{ uri: 'https://i.ibb.co/j8ywYpJ/search.png' }}
|
|
34
|
-
/>
|
|
35
|
-
</TouchableOpacity>
|
|
36
|
-
|
|
37
|
-
</View>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
export default SSearchBar;
|
|
41
|
-
|
|
42
|
-
const layoutstyles = StyleSheet.create({
|
|
43
|
-
overlay_searchTextbox_View: {
|
|
44
|
-
width: '93%',
|
|
45
|
-
alignSelf: 'center',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
textinput_view: {
|
|
50
|
-
flex: 1,
|
|
51
|
-
paddingLeft: '1%',
|
|
52
|
-
},
|
|
53
|
-
});
|