@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
|
@@ -1,582 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
View,
|
|
3
|
-
StyleSheet,
|
|
4
|
-
ScrollView,
|
|
5
|
-
Text,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
TextInput,
|
|
8
|
-
Dimensions,
|
|
9
|
-
Platform,
|
|
10
|
-
} from 'react-native';
|
|
11
|
-
import React, { useContext, useEffect, useState} from 'react';
|
|
12
|
-
import { FlatList } from 'react-native';
|
|
13
|
-
//import { useNavigation } from '@react-navigation/native';
|
|
14
|
-
import moment from 'moment';
|
|
15
|
-
|
|
16
|
-
// Custom Components
|
|
17
|
-
import FilterInput from '../CustomComponents/FilterInput';
|
|
18
|
-
import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
19
|
-
import HeaderBlock from './HeaderBlock';
|
|
20
|
-
import CContainerView from '../CustomComponents/CContainerView';
|
|
21
|
-
import CDetailView from '../CustomComponents/CDetailView';
|
|
22
|
-
import Loader from '../Custom/Loader';
|
|
23
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
24
|
-
import CFooterView from '../CustomComponents/CFooterView';
|
|
25
|
-
import ContextBio from '../Handlers/ContextBio';
|
|
26
|
-
import HShadowCountButton from '../HOC/HShadowCountButton';
|
|
27
|
-
import { CButtonShadow, CShadowDynamic } from '../CommonStyle/ComponentFunctions';
|
|
28
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
29
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
30
|
-
import CCard from '../Custom/CCard';
|
|
31
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
32
|
-
|
|
33
|
-
import HShadowButton from '../HOC/HShadowButton';
|
|
34
|
-
|
|
35
|
-
const CSearchScreen = ({ route }) => {
|
|
36
|
-
console.log('SearchScreen route params:', JSON.stringify(route));
|
|
37
|
-
const { searchKey } = route?.params || {};
|
|
38
|
-
const { filteredData, setFilteredData } = useContext(ContextBio);
|
|
39
|
-
const [inputs, setInputs] = useState([]);
|
|
40
|
-
const [enteredInputs, setEnteredInputs] = useState([]);
|
|
41
|
-
const [operators, setOperators] = useState([]);
|
|
42
|
-
const [txtOperators, setTxtOperators] = useState([]);
|
|
43
|
-
const [loading, setLoading] = useState(false);
|
|
44
|
-
const [searchLoading, setSearchLoading] = useState(false);
|
|
45
|
-
const [valuesVisibility, setValuesVisibility] = useState(false);
|
|
46
|
-
const [selectedInput, setSelectedInput] = useState(null);
|
|
47
|
-
const [option, setOption] = useState(null);
|
|
48
|
-
const navigation = useNavigation();
|
|
49
|
-
const FooterArr = [
|
|
50
|
-
{
|
|
51
|
-
keyid: 2,
|
|
52
|
-
displaytext: 'Search',
|
|
53
|
-
size: 10,
|
|
54
|
-
iconname: 'search',
|
|
55
|
-
iconcolor: '#a30e0e',
|
|
56
|
-
fontcolor: '#a30e0e',
|
|
57
|
-
shadowcolor: '#ffe5e5',
|
|
58
|
-
selected: false,
|
|
59
|
-
visibility: true,
|
|
60
|
-
iconsize: 20,
|
|
61
|
-
functionid: 'D02',
|
|
62
|
-
count: false,
|
|
63
|
-
countValue: 0,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
keyid: 1,
|
|
67
|
-
displaytext: !valuesVisibility ? 'View' : 'Hide',
|
|
68
|
-
size: 10,
|
|
69
|
-
iconname: 'file-alt',
|
|
70
|
-
iconcolor: '#a30e0e',
|
|
71
|
-
fontcolor: '#a30e0e',
|
|
72
|
-
shadowcolor: '#ffe5e5',
|
|
73
|
-
selected: false,
|
|
74
|
-
visibility: true,
|
|
75
|
-
iconsize: 20,
|
|
76
|
-
functionid: 'D01',
|
|
77
|
-
count: false,
|
|
78
|
-
countValue: 0,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
keyid: 3,
|
|
82
|
-
displaytext: 'Clear All',
|
|
83
|
-
size: 10,
|
|
84
|
-
iconname: 'eraser',
|
|
85
|
-
iconcolor: '#a30e0e',
|
|
86
|
-
fontcolor: '#a30e0e',
|
|
87
|
-
shadowcolor: '#ffe5e5',
|
|
88
|
-
selected: false,
|
|
89
|
-
visibility: true,
|
|
90
|
-
iconsize: 20,
|
|
91
|
-
functionid: 'D03',
|
|
92
|
-
count: false,
|
|
93
|
-
countValue: 0,
|
|
94
|
-
},
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
const clearAllInputs = () => {
|
|
98
|
-
const clearedInputs = inputs.map(input => ({
|
|
99
|
-
...input,
|
|
100
|
-
searchvalue: Array.isArray(input.searchvalue) ? [] : '',
|
|
101
|
-
selected: false,
|
|
102
|
-
}));
|
|
103
|
-
|
|
104
|
-
setInputs(clearedInputs);
|
|
105
|
-
setEnteredInputs([]);
|
|
106
|
-
setFilteredData([]);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const onPressFooter = val => {
|
|
110
|
-
switch (val.functionid) {
|
|
111
|
-
case 'D01':
|
|
112
|
-
setValuesVisibility(!valuesVisibility);
|
|
113
|
-
break;
|
|
114
|
-
case 'D02':
|
|
115
|
-
handleSearch();
|
|
116
|
-
break;
|
|
117
|
-
case 'D03':
|
|
118
|
-
clearAllInputs();
|
|
119
|
-
break;
|
|
120
|
-
default:
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const handleInputSelect = inputIndex => {
|
|
126
|
-
setSelectedInput(inputIndex);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const handleCardPress = itemData => {
|
|
130
|
-
navigation.navigate('Dashboard', {
|
|
131
|
-
patientData: itemData,
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const handleInputChange = (index, text) => {
|
|
136
|
-
const newInputs = [...inputs];
|
|
137
|
-
newInputs[index].searchvalue = text;
|
|
138
|
-
|
|
139
|
-
setEnteredInputs(prev => {
|
|
140
|
-
const updated = prev.filter(item => item.index !== index);
|
|
141
|
-
return [...updated, { ...newInputs[index], index }];
|
|
142
|
-
});
|
|
143
|
-
setInputs(newInputs);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const handleSearch = () => {
|
|
147
|
-
const updatedInputs = inputs.map(input => ({
|
|
148
|
-
...input,
|
|
149
|
-
selected: Object.keys(input.searchvalue || {}).length > 0,
|
|
150
|
-
}));
|
|
151
|
-
|
|
152
|
-
const groups = {
|
|
153
|
-
procedurename: 'rnsusearchdetail',
|
|
154
|
-
search: updatedInputs,
|
|
155
|
-
searchkey: searchKey,
|
|
156
|
-
};
|
|
157
|
-
const dataset = { groups };
|
|
158
|
-
|
|
159
|
-
console.log('Search dataset:', JSON.stringify(dataset));
|
|
160
|
-
const buttonapi = `${APIURL}insurancesaveresponse/RnResponse`;
|
|
161
|
-
console.log('buttonapi', JSON.stringify(buttonapi))
|
|
162
|
-
setSearchLoading(true);
|
|
163
|
-
NetworkServiceCall('post', buttonapi, dataset).then(function (response) {
|
|
164
|
-
console.log('RESPONSEDATA-------', JSON.stringify(response))
|
|
165
|
-
if (response.httpstatus == 200) {
|
|
166
|
-
setFilteredData(response.data.response.cardcontent);
|
|
167
|
-
addTextOperators('');
|
|
168
|
-
addOperators('');
|
|
169
|
-
setValuesVisibility(false);
|
|
170
|
-
} else {
|
|
171
|
-
console.log('Search failed');
|
|
172
|
-
}
|
|
173
|
-
setSearchLoading(false);
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const addOptionsToSelectInputs = data => {
|
|
178
|
-
setOption(data);
|
|
179
|
-
const updatedInputs = inputs.map(input => {
|
|
180
|
-
if (input.searchtype === 'select') {
|
|
181
|
-
return { ...input, searchoperators: data };
|
|
182
|
-
}
|
|
183
|
-
return input;
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
return updatedInputs;
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const addOptionsUpdate = data => {
|
|
190
|
-
setInputs(addOptionsToSelectInputs(data));
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
const addOperators = data => {
|
|
194
|
-
setOperators(data);
|
|
195
|
-
const updatedInputs = inputs.map(input => {
|
|
196
|
-
if (
|
|
197
|
-
input.searchtype === 'number' ||
|
|
198
|
-
input.searchtype === 'date' ||
|
|
199
|
-
input.searchtype === 'text' ||
|
|
200
|
-
input.searchtype === 'mobile'
|
|
201
|
-
) {
|
|
202
|
-
return { ...input, searchoperators: data };
|
|
203
|
-
}
|
|
204
|
-
return input;
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
return updatedInputs;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
const addOperatorsUpdate = data => {
|
|
211
|
-
setInputs(addOperators(data));
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
const addTextOperators = data => {
|
|
215
|
-
setTxtOperators(data);
|
|
216
|
-
const updatedInputs = inputs.map(input => {
|
|
217
|
-
if (input.searchtype === 'text' || input.searchtype === 'mobile') {
|
|
218
|
-
return { ...input, searchoperators: data };
|
|
219
|
-
}
|
|
220
|
-
return input;
|
|
221
|
-
});
|
|
222
|
-
return updatedInputs;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
const addTextOperatorsUpdate = data => {
|
|
226
|
-
setInputs(addTextOperators(data));
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
function showOperatorsLabel(value) {
|
|
230
|
-
const operator = operators.value === value;
|
|
231
|
-
return operator ? operators.displayvalue : null;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function showTextOperatorsLabel(value) {
|
|
235
|
-
const operator = txtOperators?.value === value;
|
|
236
|
-
return operator ? txtOperators.displayvalue : null;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
function genderOptionLabel(value) {
|
|
240
|
-
const opt = option?.value === value;
|
|
241
|
-
return opt ? option.displayvalue : null;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function getSearchLabels() {
|
|
245
|
-
setLoading(true);
|
|
246
|
-
const buttonapi = `${APIURL}insuranceadvanceget/emrcommonget/rnsusearchlayout ${searchKey}`;
|
|
247
|
-
|
|
248
|
-
NetworkServiceCall('get', buttonapi, '').then(function (response) {
|
|
249
|
-
if (response.httpstatus == 200 && response.data) {
|
|
250
|
-
setInputs(response.data.search);
|
|
251
|
-
} else {
|
|
252
|
-
//notifyMessage('No Labels found');
|
|
253
|
-
}
|
|
254
|
-
setLoading(false);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
useEffect(() => {
|
|
259
|
-
getSearchLabels();
|
|
260
|
-
}, []);
|
|
261
|
-
|
|
262
|
-
return (
|
|
263
|
-
<CContainerView>
|
|
264
|
-
{ <HeaderBlock
|
|
265
|
-
navigation={navigation.navigate}
|
|
266
|
-
callback={() => navigation.navigate('Dashboard')}
|
|
267
|
-
/> }
|
|
268
|
-
|
|
269
|
-
<CDetailView hideCard={true}>
|
|
270
|
-
{loading ? (
|
|
271
|
-
<View style={styles.centerContainer}>
|
|
272
|
-
<Loader />
|
|
273
|
-
</View>
|
|
274
|
-
) : (
|
|
275
|
-
<View style={styles.container}>
|
|
276
|
-
<View style={styles.inputsContainer}>
|
|
277
|
-
<ScrollView
|
|
278
|
-
horizontal={true}
|
|
279
|
-
contentContainerStyle={styles.scrollContent}
|
|
280
|
-
showsHorizontalScrollIndicator={false}>
|
|
281
|
-
<View style={styles.inputsRow}>
|
|
282
|
-
{inputs?.map((input, index) => (
|
|
283
|
-
<View style={{padding:Platform.OS === 'web'&& '1%'}}>
|
|
284
|
-
<FilterInput
|
|
285
|
-
key={input?.searchlabel + index}
|
|
286
|
-
onSelect={() => handleInputSelect(index)}
|
|
287
|
-
selected={selectedInput === index}
|
|
288
|
-
label={input?.searchlabel}
|
|
289
|
-
iconName={input?.searchicon}
|
|
290
|
-
iconSize={24}
|
|
291
|
-
btnBorderColor={'#094485'}
|
|
292
|
-
inputValue={input?.searchvalue}
|
|
293
|
-
type={input?.searchtype}
|
|
294
|
-
addTextOperators={addTextOperatorsUpdate}
|
|
295
|
-
addOptionsUpdate={addOptionsUpdate}
|
|
296
|
-
addOperatorsUpdate={addOperatorsUpdate}
|
|
297
|
-
onChangeText={text => handleInputChange(index, text)}
|
|
298
|
-
/>
|
|
299
|
-
</View>
|
|
300
|
-
))}
|
|
301
|
-
</View>
|
|
302
|
-
</ScrollView>
|
|
303
|
-
|
|
304
|
-
{valuesVisibility && (
|
|
305
|
-
<View style={styles.valuesContainer}>
|
|
306
|
-
<Text style={styles.valuesTitle}>Current Filters:</Text>
|
|
307
|
-
<ScrollView>
|
|
308
|
-
{enteredInputs.map((input, index) => (
|
|
309
|
-
<View key={input.searchlabel + index} style={styles.valueItem}>
|
|
310
|
-
{input.searchtype !== 'date' &&
|
|
311
|
-
input.searchtype !== 'number' &&
|
|
312
|
-
input.searchtype !== 'text' &&
|
|
313
|
-
input.searchtype !== 'mobile' ? (
|
|
314
|
-
input.searchvalue ? (
|
|
315
|
-
<Text style={styles.valueText}>
|
|
316
|
-
<Text style={styles.valueLabel}>{input.searchlabel}:</Text>{' '}
|
|
317
|
-
{genderOptionLabel(input.searchvalue.firstValue)}
|
|
318
|
-
</Text>
|
|
319
|
-
) : null
|
|
320
|
-
) : null}
|
|
321
|
-
|
|
322
|
-
{input.searchtype === 'date' &&
|
|
323
|
-
Object.keys(input.searchvalue).length > 0 ? (
|
|
324
|
-
<Text style={styles.valueText}>
|
|
325
|
-
<Text style={styles.valueLabel}>{input.searchlabel}:</Text>{' '}
|
|
326
|
-
{moment(input.searchvalue.firstValue).format(
|
|
327
|
-
'DD-MM-YYYY',
|
|
328
|
-
)}{' '}
|
|
329
|
-
, {showOperatorsLabel(input?.searchvalue.operator)}{' '}
|
|
330
|
-
,{' '}
|
|
331
|
-
{moment(input.searchvalue.secondValue).format(
|
|
332
|
-
'DD-MM-YYYY',
|
|
333
|
-
)}
|
|
334
|
-
</Text>
|
|
335
|
-
) : null}
|
|
336
|
-
|
|
337
|
-
{input.searchtype === 'number' &&
|
|
338
|
-
Object.keys(input.searchvalue).length > 0 ? (
|
|
339
|
-
<Text style={styles.valueText}>
|
|
340
|
-
<Text style={styles.valueLabel}>{input.searchlabel}:</Text>{' '}
|
|
341
|
-
{input.searchvalue.firstValue}{' '}
|
|
342
|
-
, {showOperatorsLabel(input?.searchvalue.operator)}{' '}
|
|
343
|
-
, {input.searchvalue.secondValue}
|
|
344
|
-
</Text>
|
|
345
|
-
) : null}
|
|
346
|
-
|
|
347
|
-
{(input.searchtype === 'text' ||
|
|
348
|
-
input.searchtype === 'mobile') &&
|
|
349
|
-
Object.keys(input.searchvalue).length > 0 ? (
|
|
350
|
-
<Text style={styles.valueText}>
|
|
351
|
-
<Text style={styles.valueLabel}>{input.searchlabel}:</Text>{' '}
|
|
352
|
-
{input.searchvalue.firstValue}{' '}
|
|
353
|
-
{showTextOperatorsLabel(
|
|
354
|
-
input?.searchvalue.operator,
|
|
355
|
-
)}
|
|
356
|
-
</Text>
|
|
357
|
-
) : null}
|
|
358
|
-
</View>
|
|
359
|
-
))}
|
|
360
|
-
</ScrollView>
|
|
361
|
-
</View>
|
|
362
|
-
)}
|
|
363
|
-
</View>
|
|
364
|
-
|
|
365
|
-
<View style={styles.resultsContainer}>
|
|
366
|
-
<View style={styles.resultsHeader}>
|
|
367
|
-
<Text style={styles.resultsTitle}>Search Results</Text>
|
|
368
|
-
{filteredData?.length > 0 && (
|
|
369
|
-
<Text style={styles.resultsCount}>
|
|
370
|
-
{filteredData.length} {filteredData.length === 1 ? 'result' : 'results'}
|
|
371
|
-
</Text>
|
|
372
|
-
)}
|
|
373
|
-
</View>
|
|
374
|
-
|
|
375
|
-
{searchLoading ? (
|
|
376
|
-
<View style={styles.centerContainer}>
|
|
377
|
-
<Loader />
|
|
378
|
-
</View>
|
|
379
|
-
) : filteredData?.length > 0 ? (
|
|
380
|
-
<FlatList
|
|
381
|
-
data={filteredData}
|
|
382
|
-
keyExtractor={(item, index) =>
|
|
383
|
-
item?.backgroundColor?.toString() + index
|
|
384
|
-
}
|
|
385
|
-
renderItem={({ item, i }) => (
|
|
386
|
-
<CCard
|
|
387
|
-
onPress={() => {
|
|
388
|
-
handleCardPress(item);
|
|
389
|
-
}}
|
|
390
|
-
data={[
|
|
391
|
-
{
|
|
392
|
-
datalistid: i + 1,
|
|
393
|
-
bordercolor: '#143A81',
|
|
394
|
-
hopapatient: item?.hopapatient,
|
|
395
|
-
verified: false,
|
|
396
|
-
homrpatientchartdetailstatus: 0,
|
|
397
|
-
homrpatientchart: 0,
|
|
398
|
-
flag: item?.flag,
|
|
399
|
-
profilecontent: [
|
|
400
|
-
{
|
|
401
|
-
patientno: item?.id,
|
|
402
|
-
patientname: item?.name,
|
|
403
|
-
heading3: '',
|
|
404
|
-
patienttype: 'IP',
|
|
405
|
-
gender:
|
|
406
|
-
item?.description == 'F' ? 'FEMALE' : 'MALE',
|
|
407
|
-
age: item?.detail,
|
|
408
|
-
mobileno: item?.mobileno,
|
|
409
|
-
badgecolor: 'rgb(255,255,255)',
|
|
410
|
-
badgenumber: item?.bedno,
|
|
411
|
-
logo1: '',
|
|
412
|
-
place: item?.district,
|
|
413
|
-
clinicalunit: item?.clinicalunit,
|
|
414
|
-
admitteddoctor: item?.admitteddoctor,
|
|
415
|
-
subheading3: item?.housename,
|
|
416
|
-
},
|
|
417
|
-
],
|
|
418
|
-
},
|
|
419
|
-
]}
|
|
420
|
-
/>
|
|
421
|
-
)}
|
|
422
|
-
contentContainerStyle={styles.listContent}
|
|
423
|
-
showsVerticalScrollIndicator={false}
|
|
424
|
-
/>
|
|
425
|
-
) : (
|
|
426
|
-
<View style={styles.emptyState}>
|
|
427
|
-
<Text style={styles.emptyStateText}>
|
|
428
|
-
No results found. Try adjusting your search criteria.
|
|
429
|
-
</Text>
|
|
430
|
-
</View>
|
|
431
|
-
)}
|
|
432
|
-
</View>
|
|
433
|
-
</View>
|
|
434
|
-
)}
|
|
435
|
-
</CDetailView>
|
|
436
|
-
|
|
437
|
-
<CFooterView style={styles.footerButtons}>
|
|
438
|
-
{FooterArr.map((item, i) =>
|
|
439
|
-
item.visibility ? (
|
|
440
|
-
<HShadowButton
|
|
441
|
-
key={item.keyid}
|
|
442
|
-
useicon={true}
|
|
443
|
-
usetext={true}
|
|
444
|
-
disabled={false}
|
|
445
|
-
buttonstyle={[styles.footerButton, CShadowDynamic(-3, 3, 5, 0, Global.AppTheme.primary_color)]}
|
|
446
|
-
iconcolor={Global.AppTheme.primary_color}
|
|
447
|
-
icongroup={item.icongroup ? item.icongroup : 5}
|
|
448
|
-
iconname={item.iconname}
|
|
449
|
-
iconsize={normalize(24)}
|
|
450
|
-
displaytext={item.displaytext}
|
|
451
|
-
count={item.count}
|
|
452
|
-
countValue={item.countValue}
|
|
453
|
-
buttonCallback={() => onPressFooter(item)}
|
|
454
|
-
textstyle={styles.footerButtonText}
|
|
455
|
-
/>
|
|
456
|
-
) : null,
|
|
457
|
-
)}
|
|
458
|
-
</CFooterView>
|
|
459
|
-
</CContainerView>
|
|
460
|
-
);
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
const styles = StyleSheet.create({
|
|
464
|
-
container: {
|
|
465
|
-
flex: 1,
|
|
466
|
-
backgroundColor: '#f8f9fa',
|
|
467
|
-
},
|
|
468
|
-
centerContainer: {
|
|
469
|
-
flex: 1,
|
|
470
|
-
justifyContent: 'center',
|
|
471
|
-
alignItems: 'center',
|
|
472
|
-
},
|
|
473
|
-
inputsContainer: {
|
|
474
|
-
paddingVertical: 5,
|
|
475
|
-
backgroundColor: '#fff',
|
|
476
|
-
borderBottomWidth: 1,
|
|
477
|
-
borderBottomColor: '#e9ecef',
|
|
478
|
-
},
|
|
479
|
-
scrollContent: {
|
|
480
|
-
paddingHorizontal: 10,
|
|
481
|
-
},
|
|
482
|
-
inputsRow: {
|
|
483
|
-
flexDirection: 'row',
|
|
484
|
-
},
|
|
485
|
-
valuesContainer: {
|
|
486
|
-
backgroundColor: '#f8f9fa',
|
|
487
|
-
borderWidth: 1,
|
|
488
|
-
margin: 10,
|
|
489
|
-
marginTop: 5,
|
|
490
|
-
borderRadius: 8,
|
|
491
|
-
borderColor: '#dee2e6',
|
|
492
|
-
padding: 15,
|
|
493
|
-
maxHeight: 150,
|
|
494
|
-
},
|
|
495
|
-
valuesTitle: {
|
|
496
|
-
fontSize: 16,
|
|
497
|
-
fontWeight: '600',
|
|
498
|
-
color: '#094485',
|
|
499
|
-
marginBottom: 10,
|
|
500
|
-
},
|
|
501
|
-
valueItem: {
|
|
502
|
-
paddingVertical: 3,
|
|
503
|
-
},
|
|
504
|
-
valueText: {
|
|
505
|
-
color: '#495057',
|
|
506
|
-
fontSize: 14,
|
|
507
|
-
lineHeight: 20,
|
|
508
|
-
},
|
|
509
|
-
valueLabel: {
|
|
510
|
-
fontWeight: '600',
|
|
511
|
-
color: '#343a40',
|
|
512
|
-
},
|
|
513
|
-
resultsContainer: {
|
|
514
|
-
flex: 2,
|
|
515
|
-
padding: 10,
|
|
516
|
-
},
|
|
517
|
-
resultsHeader: {
|
|
518
|
-
flexDirection: 'row',
|
|
519
|
-
justifyContent: 'space-between',
|
|
520
|
-
alignItems: 'center',
|
|
521
|
-
marginBottom: 15,
|
|
522
|
-
paddingHorizontal: 5,
|
|
523
|
-
},
|
|
524
|
-
resultsTitle: {
|
|
525
|
-
fontSize: 18,
|
|
526
|
-
fontWeight: '700',
|
|
527
|
-
color: '#094485',
|
|
528
|
-
},
|
|
529
|
-
resultsCount: {
|
|
530
|
-
fontSize: 14,
|
|
531
|
-
color: '#6c757d',
|
|
532
|
-
},
|
|
533
|
-
listContent: {
|
|
534
|
-
paddingBottom: 10,
|
|
535
|
-
},
|
|
536
|
-
emptyState: {
|
|
537
|
-
flex: 1,
|
|
538
|
-
justifyContent: 'center',
|
|
539
|
-
alignItems: 'center',
|
|
540
|
-
paddingVertical: 40,
|
|
541
|
-
},
|
|
542
|
-
emptyStateText: {
|
|
543
|
-
fontSize: 16,
|
|
544
|
-
color: '#6c757d',
|
|
545
|
-
textAlign: 'center',
|
|
546
|
-
lineHeight: 24,
|
|
547
|
-
},
|
|
548
|
-
footerButtons: {
|
|
549
|
-
flexDirection: 'row',
|
|
550
|
-
alignItems: 'center',
|
|
551
|
-
justifyContent: "flex-start",
|
|
552
|
-
},
|
|
553
|
-
footerButton: {
|
|
554
|
-
borderRadius: 10,
|
|
555
|
-
borderWidth: 0.5,
|
|
556
|
-
height: Dimensions.get('screen').height * 0.054,
|
|
557
|
-
width: Dimensions.get('screen').height * 0.07,
|
|
558
|
-
backgroundColor: '#fff',
|
|
559
|
-
paddingHorizontal: 0,
|
|
560
|
-
paddingBottom: 0,
|
|
561
|
-
paddingTop: 0,
|
|
562
|
-
borderColor: Global.AppTheme.primary_color,
|
|
563
|
-
justifyContent: 'center',
|
|
564
|
-
alignItems: 'center',
|
|
565
|
-
marginHorizontal: normalize(3),
|
|
566
|
-
elevation: 4, // raiseLevel equivalent for Android
|
|
567
|
-
shadowColor: '#ffe5e5', // optional for iOS shadow
|
|
568
|
-
shadowOffset: { width: 0, height: 2 },
|
|
569
|
-
shadowOpacity: 0.2,
|
|
570
|
-
shadowRadius: 2,
|
|
571
|
-
},
|
|
572
|
-
footerButtonText: {
|
|
573
|
-
color: Global.AppTheme.primary_color,
|
|
574
|
-
fontSize: normalize(10),
|
|
575
|
-
fontWeight: '600',
|
|
576
|
-
textAlign: 'center',
|
|
577
|
-
alignSelf: 'center',
|
|
578
|
-
},
|
|
579
|
-
});
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
export default CSearchScreen;
|