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

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 (177) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +0 -4
  3. package/package.json +3 -2
  4. package/src/Alerts/AAlert.js +3 -3
  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/VideoScreen.js +2 -7
  127. package/src/Navigation/PageNavigation.js +224 -0
  128. package/src/Navigation/useFocusEffect.js +2 -0
  129. package/src/Navigation/useFocusEffect.native.js +1 -0
  130. package/src/Navigation/useFocusEffect.web.js +1 -0
  131. package/src/Navigation/useIsFocused.js +1 -0
  132. package/src/Navigation/useIsFocused.native.js +1 -0
  133. package/src/Navigation/useIsFocused.web.js +1 -0
  134. package/src/Navigation/useNavigation.js +2 -0
  135. package/src/Navigation/useNavigation.native.js +1 -0
  136. package/src/Navigation/useNavigation.web.js +1 -0
  137. package/src/Screens/CMedications.js +528 -0
  138. package/src/Screens/CWebViewGallery.js +203 -0
  139. package/src/Screens/ChartScan.js +279 -0
  140. package/src/Screens/ChartScreenNew.js +1579 -0
  141. package/src/Screens/Consultation.js +1500 -0
  142. package/src/Screens/Dashboard.js +778 -0
  143. package/src/Screens/FileExplorer.js +288 -0
  144. package/src/Screens/Footer.js +340 -0
  145. package/src/Screens/ForgotPassword.js +288 -0
  146. package/src/Screens/HeaderBlock.js +353 -0
  147. package/src/Screens/Login.js +328 -0
  148. package/src/Screens/Notification.js +149 -0
  149. package/src/Screens/OcrScreen.js +20 -0
  150. package/src/Screens/PdfPreview.js +507 -0
  151. package/src/Screens/RegistrationDetails.js +467 -0
  152. package/src/Screens/SearchScreen.js +582 -0
  153. package/src/Screens/Splash.js +788 -0
  154. package/src/Screens/SwipeLeftView.js +1867 -0
  155. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  156. package/src/StaticComponents/SDatePickerNew.js +1 -1
  157. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  158. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  159. package/src/StaticComponents/SDropDownHoc.js +4 -4
  160. package/src/StaticComponents/SDropDownIcon.js +1 -1
  161. package/src/StaticComponents/SMenuBox.js +2 -2
  162. package/src/StaticComponents/SSearch.js +2 -2
  163. package/src/StaticComponents/STextInput.js +1 -1
  164. package/src/StaticComponents/STimePicker.js +1 -1
  165. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  166. package/src/StaticComponents/STimingSwitch.js +1 -1
  167. package/src/layout/CContainerView.js +1 -1
  168. package/src/layout/CDetailView.js +3 -3
  169. package/src/layout/HeaderBlock.js +5 -5
  170. package/src/layout/INVLoginLayout.js +3 -4
  171. package/src/layout/Loader.js +2 -2
  172. package/src/HOC/HAbsolute.js +0 -56
  173. package/src/HOC/HDiscontinue.js +0 -105
  174. package/src/HOC/HOverlay.js +0 -99
  175. package/src/layout/FooterBlock.js +0 -821
  176. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  177. /package/src/{common → Common}/Icons.js +0 -0
@@ -0,0 +1,555 @@
1
+ import React, { useState, useEffect, useContext } from 'react';
2
+ import {
3
+ Text,
4
+ TextInput,
5
+ StyleSheet,
6
+ View,
7
+ Image,
8
+ TouchableOpacity,
9
+ ScrollView,
10
+ Dimensions,
11
+ FlatList,
12
+ TouchableWithoutFeedback,
13
+ Switch,
14
+ } from 'react-native';
15
+ import { colors } from '../CommonStyle/commonStyle';
16
+ // import { useDimensions } from '@react-native-community/hooks';
17
+ import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
18
+ import { getListviewItem, getListviewItemText } from '../CommonStyle/PopupStyle';
19
+ import AntDesign from 'react-native-vector-icons/AntDesign';
20
+ import Loader from '../Custom/Loader';
21
+ import Entypo from 'react-native-vector-icons/Entypo';
22
+ import { APIURL } from '../../../../../src/Common/apiConstants';
23
+ import { getLoading, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
24
+ import Icons, { MaterialCommunityIcons } from '../Common/Icons';
25
+ import CAwesomeButton from './CAwesomeButton';
26
+ import SAlphabet from '../StaticComponents/SAlphabet';
27
+ import SSearchBar from '../StaticComponents/SSearchBar';
28
+ import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
29
+ import { Global } from '../../../../../src/Common/Global';
30
+
31
+ function CDropdownSelect(props) {
32
+
33
+ const { width, height } = Dimensions.get('window');
34
+ const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
35
+ const [searchData, setSearchData] = useState('');
36
+ const [selectedArray, setSelectedArray] = useState([]);
37
+ // const [displayData, setDisplayData] = useState(ParameterDropdown.components)
38
+ const [displayData, setDisplayData] = useState();
39
+ const [apidata, SetApiData] = useState(props.count == 1 ? props.data.dropdownapi : props.count == 0 ? props.dropdownapi : null);
40
+ const [views, setViews] = useState(false);
41
+ const [tempString, settempString] = useState([]);
42
+ const [componentAccess, setComponentAccess] = useState(0);
43
+ const [selected, setSelected] = useState(0);
44
+ const [stage, setStage] = useState(1);
45
+ const [parameterName, setParameterName] = useState('');
46
+ const [alphaindex, setAlphaIndex] = useState();
47
+ const [filterPurpose, setFilterPurpose] = useState([]);
48
+ const [alphaFilter, setAlphaFilter] = useState(false);
49
+ const [isLoading, setIsLoading] = useState(false);
50
+ const [editParameter, setEditParameter] = useState([]);
51
+ const [editDataValue, setEditDataValue] = useState(0);
52
+ const radio_Access = [
53
+ { displayvalue: 'Detail', datavalue: 0, checked: false },
54
+ { displayvalue: 'Date', datavalue: 1, checked: false },
55
+ ];
56
+
57
+ useEffect(() => {
58
+
59
+ let buttonapi = APIURL + apidata;
60
+ setIsLoading(true);
61
+ console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', JSON.stringify(buttonapi));
62
+ NetworkServiceCall('get', buttonapi, '').then(function (response) {
63
+ if (
64
+ response.httpstatus == 200 &&
65
+ response.data.data != null &&
66
+ response.data.data.length > 0
67
+ ) {
68
+ setDisplayData(response.data.data);
69
+ setViews(true);
70
+ setIsLoading(false);
71
+ } else {
72
+ setIsLoading(false);
73
+ }
74
+ });
75
+
76
+ getLoading(v => setIsLoading(false));
77
+ }, []);
78
+
79
+ function onEditParameter() {
80
+ console.log('OnEdit TempString', editParameter);
81
+ if (editParameter.length == 1) {
82
+ setStage(2);
83
+ setParameterName(editParameter[0].displayvalue);
84
+ setEditDataValue(editParameter[0].datavalue);
85
+ } else {
86
+ notifyMessage('Please select one Parameter',3);
87
+ }
88
+ }
89
+
90
+ function RetrieveParameter() {
91
+ setStage(1);
92
+ setIsLoading(true);
93
+ setEditParameter([]);
94
+ settempString([]);
95
+ setEditDataValue(0);
96
+ let buttonapi = APIURL + apidata;
97
+ console.log('api callll dropdownselect............', buttonapi);
98
+ NetworkServiceCall('get', buttonapi, '').then(function (response) {
99
+ if (
100
+ response.httpstatus == 200 &&
101
+ response.data.data != null &&
102
+ response.data.data.length > 0
103
+ ) {
104
+ setDisplayData(response.data.data);
105
+ setViews(true);
106
+ setIsLoading(false);
107
+ } else {
108
+ setIsLoading(false);
109
+ }
110
+ });
111
+ getLoading(v => setIsLoading(false));
112
+ }
113
+
114
+ function onSelect() {
115
+ if (tempString.length > 0) {
116
+ var x = tempString.map((item) => ({
117
+ ...item,
118
+ 'displaytext': item.displayvalue,
119
+ }));
120
+ props.onselect(x);
121
+ }
122
+ }
123
+
124
+ function getRadioContainer(backgroundcolor) {
125
+ return {
126
+ ...ComponentStyles.radioContainer,
127
+ backgroundColor: backgroundcolor,
128
+ justifyContent: 'space-evenly',
129
+ borderRadius: normalize(10),
130
+ };
131
+ }
132
+
133
+ function getOuterRadioButton(bordercolor) {
134
+ return {
135
+ ...ComponentStyles.outerRadioButton,
136
+ borderColor: bordercolor,
137
+ };
138
+ }
139
+
140
+ function fnSetName(changevalue) {
141
+ setParameterName(changevalue);
142
+ }
143
+
144
+ function fnRadioAcesss(data) {
145
+ setComponentAccess(data.datavalue);
146
+ }
147
+
148
+ function saveAssessmentDetail() {
149
+ // console.log('TempString', tempString);
150
+ // console.log('EditParameter', editParameter);
151
+ // console.log("componentAccess", componentAccess)
152
+ setIsLoading(true);
153
+ let dataset = {
154
+ componentname: componentAccess == 0 ? 'overlay' : 'date',
155
+ hosumrassessmentdetail: 0,
156
+ hosumrassessment: props.data != undefined && props.data.hosumrassessment != undefined ? props.data.hosumrassessment : 0,
157
+ hosumrclassificationnature: props.hosumrclassificationnature,
158
+ nature: props.nature,
159
+ assessmentdetail: '',
160
+ flag: editDataValue > 0 ? 2 : 1,
161
+ remarks: '',
162
+ };
163
+ let buttonapi;
164
+
165
+ setStage(2);
166
+ if (parameterName != null &&
167
+ parameterName != undefined &&
168
+ parameterName != '') {
169
+ if (props.count == 1) {
170
+ dataset.procedurename = 'hosumrassessmentdetail1';
171
+ dataset.assessmentdetail = parameterName;
172
+ dataset.hosumrassessment = props.data.hosumrassessment;
173
+ dataset.hosumrassessmentdetail =
174
+ tempString != null && tempString != undefined && tempString.length > 0
175
+ ? tempString[0].datavalue
176
+ : 0;
177
+ buttonapi = APIURL + 'commontemplatesave/RnCommonTemplateSave';
178
+ } else {
179
+ dataset.assessment = parameterName;
180
+ dataset.procedurename = 'hosumrassessment1';
181
+ dataset.hosumrclassificationnature = props.hosumrclassificationnature;
182
+ buttonapi = APIURL + 'commontemplatesave/RnCommonTemplateSave';
183
+ }
184
+
185
+ var output = { groups: dataset };
186
+ console.log('datasetttttttttttttttt', output);
187
+ console.log('APIIIIIIIIIIIIIIIIIIII', buttonapi);
188
+
189
+ NetworkServiceCall('post', buttonapi, output).then(function (response) {
190
+ console.log('SSAVE RESPOSNEEEEEE VVVVVVVVV EEEEEE RRRRRRRR YYYYYYYYYY', JSON.stringify(response));
191
+ if (response.httpstatus == 200
192
+ && response.data != undefined && response.data != null
193
+ && response.data.code != undefined && response.data.code > 0) {
194
+ notifyMessage('Data Saved!!!!!',1);
195
+ RetrieveParameter();
196
+ setIsLoading(false);
197
+ } else {
198
+ notifyMessage('Data Not Saved!!!!!',2);
199
+ setIsLoading(false);
200
+ }
201
+ });
202
+ } else {
203
+ notifyMessage('Please fill required column',3);
204
+ setIsLoading(false);
205
+ }
206
+ getLoading(v => setIsLoading(false));
207
+ }
208
+
209
+ function getFooterIconClick(item) {
210
+ console.log('<<<<<<<<LLLL>>>>>>>>>>>>>>>>>>>', JSON.stringify(item.functionid));
211
+ switch (item.functionid) {
212
+ case 'CD01': onSelect();
213
+ break;
214
+ case 'CD02':
215
+ editParameter.length > 0
216
+ ? onEditParameter() : null;
217
+ break;
218
+ }
219
+ }
220
+
221
+ function getOverlayScreenChildContainer() {
222
+ return {
223
+ height: Dimensions.get('window').height * 0.55,
224
+ flex: 1,
225
+ };
226
+ }
227
+
228
+ function getOverlayScreenContainer() {
229
+ return {
230
+ flexDirection: 'row',
231
+ margin: normalize(5),
232
+ };
233
+ }
234
+
235
+ function onSelectItem(datavalue, multiselect) {
236
+
237
+ if (editParameter.includes(datavalue)) {
238
+ var index = editParameter.indexOf(datavalue);
239
+ if (index > -1) {
240
+ editParameter.splice(index, 1);
241
+ console.log('111111111111111111', editParameter);
242
+ }
243
+ } else {
244
+ editParameter.push(datavalue);
245
+ console.log('22222222222222222222', editParameter);
246
+ }
247
+
248
+ if (multiselect == true) {
249
+ if (tempString.includes(datavalue)) {
250
+ datavalue.selected = !datavalue.selected;
251
+ setSelected(selected + 1);
252
+ var index = tempString.indexOf(datavalue);
253
+ if (index > -1) {
254
+ tempString.splice(index, 1);
255
+ }
256
+ } else {
257
+ datavalue.selected = !datavalue.selected;
258
+ setSelected(selected + 1);
259
+ tempString.push(datavalue);
260
+ }
261
+ }
262
+ }
263
+
264
+ function getOverlayScreenChildlistContainer() {
265
+ return {
266
+ height: Dimensions.get('window').height * 0.60,
267
+ marginBottom: Dimensions.get('window').height * 0.01,
268
+ marginTop: Dimensions.get('window').height * 0.01,
269
+ flexDirection: 'row',
270
+ };
271
+ }
272
+
273
+ function getAlphabetData(alpha, index) {
274
+ var filter = displayData.filter(value => (value.display != undefined ? value.display : '').charAt(0) == alpha);
275
+ setFilterPurpose(filter);
276
+ index == 0 ? setSearchData('') : setSearchData(alpha);
277
+ index == 0 ? setAlphaFilter(false) : setAlphaFilter(true);
278
+ }
279
+
280
+ function GetSearchData(data) {
281
+ const newDropDownData = data.filter(function (item) {
282
+ const dataItem = item.displayvalue
283
+ ? item.displayvalue.toUpperCase()
284
+ : ''.toUpperCase();
285
+ const textData = searchData.toUpperCase();
286
+ return dataItem.indexOf(textData) > -1;
287
+ });
288
+ return (
289
+ <View style={layoutstyles.overlay_screen_listview_container}>
290
+ <View style={getOverlayScreenChildlistContainer()}>
291
+ <ScrollView keyboardShouldPersistTaps="handled">
292
+ <View>
293
+ {newDropDownData != null && newDropDownData.length > 0
294
+ ? newDropDownData.map((item, i) => {
295
+ return (
296
+ <View key={i}>
297
+ <TouchableOpacity
298
+ style={getListviewItem(item.selected, false)}
299
+ onPress={() => onSelectItem(item, true)}
300
+ activeOpacity={0.5}>
301
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
302
+ <Icons.FontAwesome name="dot-circle-o" color={Global.AppTheme.primary_color} size={normalize(12)}
303
+ style={{ paddingHorizontal: normalize(2), paddingLeft: normalize(4) }} />
304
+ <Text
305
+ style={[
306
+ getListviewItemText(item.selected),
307
+ { margin: 2, paddingLeft: 5 },
308
+ ]}>
309
+ {item.displayvalue}
310
+ </Text>
311
+ </View>
312
+ </TouchableOpacity>
313
+ </View>
314
+ );
315
+ })
316
+ : null}
317
+ </View>
318
+ </ScrollView>
319
+
320
+ <View>
321
+ <SAlphabet
322
+ callBack={val =>
323
+ val == undefined ? null : getAlphabetData(val.alpha, val.index)
324
+ } />
325
+ </View>
326
+ </View>
327
+ </View>
328
+ );
329
+ }
330
+
331
+ return (
332
+ <View style={{ backgroundColor: 'transparent', flex: 1 }}>
333
+ <Text
334
+ style={{
335
+ fontSize: normalize(12),
336
+ fontWeight: 'bold',
337
+ textAlign: 'center',
338
+ alignSelf: 'center',
339
+ }}>
340
+ {ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ValueCheck(responseJSON.consultationEdit.heading) ? responseJSON.consultationEdit.heading + ' PARAMETER' : 'PARAMETER' }
341
+ </Text>
342
+
343
+ <View
344
+ style={{
345
+ marginTop: normalize(8),
346
+ width: '100%',
347
+ borderRadius: 5,
348
+ height: normalize(35),
349
+ flexDirection: 'row',
350
+ alignItems: 'center',
351
+ justifyContent: 'space-evenly',
352
+
353
+ }}>
354
+
355
+ {[{ 'display': 'ALL', 'stage': 1, 'color': Global.AppTheme.primary_color, 'iconname': 'archive', 'shadowcolor': '#eaf2ff' },
356
+ { 'display': 'CREATE', 'stage': 2, 'color': Global.AppTheme.primary_color, 'iconname': 'add-to-list', 'shadowcolor': '#eaf2ff' },
357
+ ].map((item, i) => {
358
+ return (
359
+ <TouchableOpacity
360
+ key={i}
361
+ onPress={() => item.display == 'ALL' ? RetrieveParameter() : setStage(2, setParameterName(''))}
362
+ style={{
363
+ borderRadius: 10,
364
+ borderWidth: 1,
365
+ height: normalize(40),
366
+ width: normalize(55),
367
+ backgroundColor: stage == item.stage ? item.shadowcolor : '#fff',
368
+ borderColor: stage == item.stage ? 'white' : Global.AppTheme.primary_color,
369
+ alignItems: 'center',
370
+ justifyContent: 'center',
371
+ padding: 0,
372
+ }}
373
+ >
374
+ <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
375
+ <Icons.Entypo name={item.iconname} style={{ paddingRight: 0 }}
376
+ color={Global.AppTheme.primary_color} size={normalize(17)} />
377
+ <Text style={{
378
+ color: stage == item.stage ? item.color : Global.AppTheme.primary_color,
379
+ fontWeight: stage == item.stage ? 'bold' : 'normal',
380
+ fontSize: normalize(10),
381
+ }}>{item.display}</Text>
382
+ </View>
383
+ </TouchableOpacity>
384
+ );
385
+ })}
386
+ </View>
387
+
388
+ {stage == 1 ? (
389
+ <View style={{ flex: 1 }}>
390
+
391
+ <View style={getOverlayScreenContainer()}>
392
+ <SSearchBar
393
+ onChangeText={val => setSearchData(val)} />
394
+ </View>
395
+
396
+ {views ? (
397
+ <View style={getOverlayScreenChildContainer()}>
398
+ {GetSearchData(displayData)}
399
+ </View>
400
+ ) : null}
401
+ {views ? (
402
+ <View
403
+ style={{
404
+ flexDirection: 'row',
405
+ position: 'absolute',
406
+ bottom: normalize(-5),
407
+ width: '100%',
408
+ }}>
409
+
410
+ <View style={{ flexDirection: 'row' }}>
411
+ {[{ 'displaytext': 'Select', 'size': 10, 'iconname': 'plus-square', 'selected': false, 'visibility': true, 'iconsize': 20, 'functionid': 'CD01' },
412
+ { 'displaytext': 'Edit', 'size': 10, 'iconname': 'edit', 'selected': false, 'visibility': true, 'iconsize': 20, 'functionid': 'CD02' }].map((item, i) => {
413
+ return (
414
+ <View key={i} style={{ paddingLeft: normalize(5) }}>
415
+ <CAwesomeButton
416
+ data={{
417
+ ...item,
418
+ 'shadowcolor': '#f1f3f6',
419
+ 'iconcolor': Global.AppTheme.primary_color,
420
+ 'fontcolor': Global.AppTheme.primary_color,
421
+ }}
422
+ callBack={val => val == undefined ? null : getFooterIconClick(item)}
423
+ />
424
+ </View>);
425
+ })}
426
+ </View>
427
+ </View>
428
+ ) : null}
429
+ </View>
430
+ ) : null}
431
+ {stage == 2 ? (
432
+ <View style={{ flex: 1, marginTop: '5%', marginVertical: 5 }}>
433
+ <View style={layoutstyles.overlay_child_view}>
434
+ <Text style={{ fontSize: normalize(12) }}>Parameter Name:</Text>
435
+
436
+ <TextInput
437
+ multiline={true}
438
+ numberOfLines={4}
439
+ style={[{ height: normalize(100), textAlignVertical: 'top', borderWidth: 0.5, borderRadius: 10 }]}
440
+ editable={true}
441
+ placeholder={'Parameter Name'}
442
+ keyboardType={'default'}
443
+ onChangeText={changevalue => fnSetName(changevalue)}
444
+ value={parameterName}
445
+ />
446
+
447
+ {props.count == 0 ?
448
+ <View style={{ marginTop: '5%' }}>
449
+ {/* <CTitleLabel displaytext={'Component Type'} isrequired={false} /> */}
450
+ <View style={{ flexDirection: 'row', marginTop: '3%' }}>
451
+ {radio_Access.map((block, i) => {
452
+ return (
453
+ <TouchableWithoutFeedback key={i} style={{ width: normalize(20) }}
454
+ onPress={() => fnRadioAcesss(block)}>
455
+ <View
456
+ style={getRadioContainer(
457
+ block.datavalue == componentAccess
458
+ ? '#e1f1f7'
459
+ : colors.color_DeselectRadioBgcolor,
460
+ )}>
461
+ <View
462
+ style={getOuterRadioButton(
463
+ block.datavalue == componentAccess
464
+ ? colors.color_SelectRadioBordercolor
465
+ : colors.colorDeselectRadioBordercolor,
466
+ )}>
467
+ {block.datavalue == componentAccess ? (
468
+ <View style={ComponentStyles.innerRadioButton} />
469
+ ) : null}
470
+ </View>
471
+
472
+ <View>
473
+ <Text style={ComponentStyles.radioButtonText}>
474
+ {block.displayvalue}
475
+ </Text>
476
+ </View>
477
+
478
+ </View>
479
+ </TouchableWithoutFeedback>
480
+ );
481
+ })}
482
+ </View>
483
+ </View>
484
+ : null}
485
+ </View>
486
+
487
+
488
+ <View
489
+ style={{
490
+ position: 'absolute',
491
+ bottom: normalize(0),
492
+ width: '100%',
493
+ }}>
494
+ <TouchableOpacity
495
+ onPress={() => saveAssessmentDetail()}
496
+ style={{
497
+ borderRadius: 10,
498
+ borderWidth: 1,
499
+ height: normalize(40),
500
+ width: normalize(55),
501
+ backgroundColor: '#f1f3f6',
502
+ borderColor: 'white',
503
+ alignItems: 'center',
504
+ justifyContent: 'center',
505
+ }}>
506
+ <View style={{ alignItems: 'center', width: normalize(50) }} >
507
+ <Icons.FontAwesome5 name="save" color={Global.AppTheme.primary_color} size={normalize(20)} />
508
+ <Text numberOfLines={1} style={{ color: Global.AppTheme.primary_color, fontSize: normalize(10) }}>Save</Text>
509
+ </View>
510
+ </TouchableOpacity>
511
+ </View>
512
+
513
+ </View>
514
+ ) : null}
515
+ {isLoading ? <Loader displaytext={true} /> : null}
516
+ </View>
517
+ );
518
+
519
+ }
520
+
521
+ const layoutstyles = StyleSheet.create({
522
+ overlay_screen_listview_container: {
523
+ justifyContent: 'center',
524
+ marginBottom: 10,
525
+
526
+ },
527
+ overlay_searchTextbox_View: {
528
+ width: '96%',
529
+ marginTop: '3%',
530
+
531
+ },
532
+ textinput_view: {
533
+ flex: 1,
534
+ padding: '1%',
535
+
536
+ },
537
+ getListviewItem: {
538
+ borderColor: '#DCDEDD',
539
+ borderWidth: 1,
540
+ borderBottomWidth: 1,
541
+ width: '100%',
542
+ borderRadius: 7,
543
+ justifyContent: 'space-between',
544
+ },
545
+ getListviewItemText: {
546
+ alignContent: 'center',
547
+ margin: 3,
548
+ alignItems: 'center',
549
+ textAlign: 'left',
550
+ fontSize: 12,
551
+ color: 'black',
552
+ },
553
+ });
554
+
555
+ export default CDropdownSelect;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { Dimensions } from 'react-native';
3
+ import { View } from 'react-native';
4
+ import { CFooterShadow } from '../CommonStyle/ComponentFunctions';
5
+ import { Global } from '../../../../../src/Common/Global';
6
+
7
+ /**
8
+ * CFooterView Component
9
+ *
10
+ * A customizable footer component with consistent styling
11
+ *
12
+ * @param {Object} props - Component props
13
+ * @param {Object} props.style - Additional styles to apply to the footer
14
+ * @param {React.ReactNode} props.children - Content to render inside the footer
15
+ * @returns {React.ReactElement} Rendered footer component
16
+ */
17
+ const CFooterView = ({ style, children }) => {
18
+ const screenHeight = Dimensions.get('screen').height;
19
+
20
+ return (
21
+ <View
22
+ style={[
23
+ {
24
+ // Shadow can be enabled by uncommenting:
25
+ // ...CFooterShadow(),
26
+ minHeight: screenHeight * 0.06,
27
+ paddingVertical: 5,
28
+ justifyContent: 'center',
29
+ backgroundColor: 'white',
30
+ borderTopWidth: 1,
31
+ borderTopColor: 'lightgrey',
32
+ marginTop: 'auto',
33
+ },
34
+ style,
35
+ ]}
36
+ >
37
+ {children}
38
+ </View>
39
+ );
40
+ };
41
+
42
+ export default CFooterView;