@jescon-technologies/react-native-ui-kit 0.0.4 → 0.0.6

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.
Files changed (178) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +3 -7
  3. package/package.json +3 -2
  4. package/src/Alerts/AAlert.js +4 -4
  5. package/src/Alerts/AAlertIOS.js +3 -3
  6. package/src/{common → Common}/NetworkServiceCall.js +1 -1
  7. package/src/CommonStyle/CommonTheme.js +11 -0
  8. package/src/CommonStyle/ComponentFunctions.js +632 -0
  9. package/src/CommonStyle/PopupStyle.js +146 -0
  10. package/src/CommonStyle/commonStyle.js +93 -0
  11. package/src/CommonStyle/componentStyle.js +545 -0
  12. package/src/CommonStyle/optionListStyles.js +175 -0
  13. package/src/Components/ByProductPage.js +200 -0
  14. package/src/Components/CDropDownListNew.js +153 -0
  15. package/src/Components/CSupplierList.js +88 -0
  16. package/src/Components/CVerificationCard.js +2822 -0
  17. package/src/Components/CustomButton.js +67 -0
  18. package/src/Components/CustomCard.js +127 -0
  19. package/src/Components/CustomTextInput.js +47 -0
  20. package/src/Components/EquipmentPage.js +313 -0
  21. package/src/Components/FilterInput.Copy.js +723 -0
  22. package/src/Components/FilterInput.js +569 -0
  23. package/src/Components/HSubHeading.js +68 -0
  24. package/src/Components/HeaderCard.js +40 -0
  25. package/src/Components/MoreOptionsScreen.js +251 -0
  26. package/src/Components/NonSwipableProductCard.js +226 -0
  27. package/src/Components/NonSwipableSupplierCard.js +348 -0
  28. package/src/Components/ProductCard.js +1336 -0
  29. package/src/Components/QualityProductCard.js +1059 -0
  30. package/src/Components/RateProductCard.js +1452 -0
  31. package/src/Components/RawMaterial.js +261 -0
  32. package/src/Components/SDropDownEdited.js +549 -0
  33. package/src/Components/SDropDownNew.js +529 -0
  34. package/src/Components/SHelpDescription.js +147 -0
  35. package/src/Components/STextInputNew.js +510 -0
  36. package/src/Components/SearchProductCard.js +470 -0
  37. package/src/Components/StageByProduct.js +199 -0
  38. package/src/Components/SupplierCard.js +243 -0
  39. package/src/Components/SupplierInvoiceCard.js +405 -0
  40. package/src/Components/SwipableSupplierCard.js +136 -0
  41. package/src/Components/TagTemplate.js +74 -0
  42. package/src/Components/WrappedComponent.js +25 -0
  43. package/src/Custom/CBooking.js +944 -0
  44. package/src/Custom/CBookingPostpone.js +1822 -0
  45. package/src/Custom/CCalendar.js +560 -0
  46. package/src/Custom/CCard.js +880 -0
  47. package/src/Custom/CDetailCard.js +205 -0
  48. package/src/Custom/CHelpImage.js +52 -0
  49. package/src/Custom/CReport.js +569 -0
  50. package/src/Custom/CScrollView.js +73 -0
  51. package/src/Custom/CSignature.js +112 -0
  52. package/src/Custom/CSliderMenu.js +339 -0
  53. package/src/Custom/CSupplierCard.js +99 -0
  54. package/src/Custom/CTemplateCard.js +438 -0
  55. package/src/Custom/CTokenAllocation.js +1402 -0
  56. package/src/Custom/CTokenListOverlay.js +122 -0
  57. package/src/Custom/CWardStatus.js +444 -0
  58. package/src/Custom/Charts/CBarChart.js +218 -0
  59. package/src/Custom/Charts/CDashBoardList.js +133 -0
  60. package/src/Custom/Charts/CDashBoardTable.js +172 -0
  61. package/src/Custom/Charts/CLineChart.js +193 -0
  62. package/src/Custom/Charts/CPieChart.js +186 -0
  63. package/src/Custom/Loader.js +182 -0
  64. package/src/Custom/OUserView.js +1121 -0
  65. package/src/Custom/PreviewDosage.js +115 -0
  66. package/src/Custom/SearchLoader.js +32 -0
  67. package/src/Custom/TableComponent/CActivityTable.js +707 -0
  68. package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
  69. package/src/Custom/TableComponent/CTable.js +185 -0
  70. package/src/Custom/TableComponent/CTextBody.js +40 -0
  71. package/src/Custom/TableComponent/CTextHeader.js +17 -0
  72. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
  73. package/src/Custom/TableComponent/SDropdownTable.js +491 -0
  74. package/src/Custom/TableComponent/TagTable.js +1200 -0
  75. package/src/CustomComponents/CAddColumn.js +140 -0
  76. package/src/CustomComponents/CAssessmentDelete.js +307 -0
  77. package/src/CustomComponents/CAwesomeButton.js +83 -0
  78. package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
  79. package/src/CustomComponents/CBackHandler.js +273 -0
  80. package/src/CustomComponents/CCalendar.js +243 -0
  81. package/src/CustomComponents/CCommentOverlay.js +202 -0
  82. package/src/CustomComponents/CComments.js +162 -0
  83. package/src/CustomComponents/CContainerView.js +24 -0
  84. package/src/CustomComponents/CCustomTextInput.js +336 -0
  85. package/src/CustomComponents/CDetailView.js +40 -0
  86. package/src/CustomComponents/CDropDownList.js +153 -0
  87. package/src/CustomComponents/CDropdownSelect.js +555 -0
  88. package/src/CustomComponents/CFooterView.js +42 -0
  89. package/src/CustomComponents/CImagePickerSave.js +316 -0
  90. package/src/CustomComponents/CModalOverlay.js +91 -0
  91. package/src/CustomComponents/CNetworkStatus.js +327 -0
  92. package/src/CustomComponents/CNotesInstructions.js +1000 -0
  93. package/src/CustomComponents/COverlay.js +81 -0
  94. package/src/CustomComponents/CRemarks.js +176 -0
  95. package/src/CustomComponents/CRowAdd.js +143 -0
  96. package/src/CustomComponents/CSummaryDropDown.js +327 -0
  97. package/src/CustomComponents/CText.js +9 -0
  98. package/src/CustomComponents/CVectorIcon.js +34 -0
  99. package/src/CustomComponents/HtmlContentViewer.js +65 -0
  100. package/src/CustomComponents/PdfContentViewer.js +90 -0
  101. package/src/CustomComponents/SDropDownDosage.js +1087 -0
  102. package/src/CustomComponents/SwipableProductCard.js +246 -0
  103. package/src/CustomComponents/SwipableProductImageCard.js +254 -0
  104. package/src/CustomComponents/WorkOrderDetails.js +1216 -0
  105. package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
  106. package/src/HOC/ConfirmOverlay.js +2 -2
  107. package/src/HOC/HMoreButton.js +1 -1
  108. package/src/HOC/HNatureHeading.js +1 -1
  109. package/src/HOC/HShadowButton.js +1 -1
  110. package/src/HOC/HShadowCountButton.js +1 -1
  111. package/src/Json/Chart.json +818 -0
  112. package/src/Json/Consultation.json +622 -0
  113. package/src/Json/CreditBill.json +490 -0
  114. package/src/Json/Dropdown.json +216 -0
  115. package/src/Json/DropdownConsultation.json +228 -0
  116. package/src/Json/DynamicReports.json +623 -0
  117. package/src/Json/Footer.json +79 -0
  118. package/src/Media/AudioScreen.js +2 -7
  119. package/src/Media/CCaptureImageWithoutEdit.js +1 -1
  120. package/src/Media/CImageGallery.js +2 -2
  121. package/src/Media/CSingleImage.js +2 -2
  122. package/src/Media/CVideoPlay.js +1 -1
  123. package/src/Media/DocumentScreen.js +2 -7
  124. package/src/Media/DrawingScreen.js +2 -6
  125. package/src/Media/ImageScreen.js +2 -6
  126. package/src/Media/RecordAudio.js +1 -1
  127. package/src/Media/VideoScreen.js +2 -7
  128. package/src/Navigation/PageNavigation.js +224 -0
  129. package/src/Navigation/useFocusEffect.js +2 -0
  130. package/src/Navigation/useFocusEffect.native.js +1 -0
  131. package/src/Navigation/useFocusEffect.web.js +1 -0
  132. package/src/Navigation/useIsFocused.js +1 -0
  133. package/src/Navigation/useIsFocused.native.js +1 -0
  134. package/src/Navigation/useIsFocused.web.js +1 -0
  135. package/src/Navigation/useNavigation.js +2 -0
  136. package/src/Navigation/useNavigation.native.js +1 -0
  137. package/src/Navigation/useNavigation.web.js +1 -0
  138. package/src/Screens/CMedications.js +528 -0
  139. package/src/Screens/CWebViewGallery.js +203 -0
  140. package/src/Screens/ChartScan.js +279 -0
  141. package/src/Screens/ChartScreenNew.js +1579 -0
  142. package/src/Screens/Consultation.js +1500 -0
  143. package/src/Screens/Dashboard.js +778 -0
  144. package/src/Screens/FileExplorer.js +288 -0
  145. package/src/Screens/Footer.js +340 -0
  146. package/src/Screens/ForgotPassword.js +288 -0
  147. package/src/Screens/HeaderBlock.js +353 -0
  148. package/src/Screens/Login.js +328 -0
  149. package/src/Screens/Notification.js +149 -0
  150. package/src/Screens/OcrScreen.js +20 -0
  151. package/src/Screens/PdfPreview.js +507 -0
  152. package/src/Screens/RegistrationDetails.js +467 -0
  153. package/src/Screens/SearchScreen.js +582 -0
  154. package/src/Screens/Splash.js +788 -0
  155. package/src/Screens/SwipeLeftView.js +1867 -0
  156. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  157. package/src/StaticComponents/SDatePickerNew.js +1 -1
  158. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  159. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  160. package/src/StaticComponents/SDropDownHoc.js +4 -4
  161. package/src/StaticComponents/SDropDownIcon.js +1 -1
  162. package/src/StaticComponents/SMenuBox.js +2 -2
  163. package/src/StaticComponents/SSearch.js +2 -2
  164. package/src/StaticComponents/STextInput.js +1 -1
  165. package/src/StaticComponents/STimePicker.js +1 -1
  166. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  167. package/src/StaticComponents/STimingSwitch.js +1 -1
  168. package/src/layout/CContainerView.js +1 -1
  169. package/src/layout/CDetailView.js +3 -3
  170. package/src/layout/HeaderBlock.js +5 -5
  171. package/src/layout/INVLoginLayout.js +3 -4
  172. package/src/layout/Loader.js +2 -2
  173. package/src/HOC/HAbsolute.js +0 -56
  174. package/src/HOC/HDiscontinue.js +0 -105
  175. package/src/HOC/HOverlay.js +0 -99
  176. package/src/layout/FooterBlock.js +0 -821
  177. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  178. /package/src/{common → Common}/Icons.js +0 -0
@@ -0,0 +1,582 @@
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;