@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.
Files changed (191) hide show
  1. package/index.d.ts +2 -66
  2. package/index.js +1 -66
  3. package/package.json +1 -1
  4. package/src/Alerts/AAlert.js +0 -137
  5. package/src/Alerts/AAlertIOS.js +0 -97
  6. package/src/Alerts/ABlink.js +0 -40
  7. package/src/Common/Icons.js +0 -49
  8. package/src/Common/NetworkServiceCall.js +0 -265
  9. package/src/CommonStyle/CommonTheme.js +0 -11
  10. package/src/CommonStyle/ComponentFunctions.js +0 -632
  11. package/src/CommonStyle/PopupStyle.js +0 -146
  12. package/src/CommonStyle/commonStyle.js +0 -93
  13. package/src/CommonStyle/componentStyle.js +0 -545
  14. package/src/CommonStyle/optionListStyles.js +0 -175
  15. package/src/Components/ByProductPage.js +0 -200
  16. package/src/Components/CDropDownListNew.js +0 -153
  17. package/src/Components/CSupplierList.js +0 -88
  18. package/src/Components/CVerificationCard.js +0 -2822
  19. package/src/Components/CustomButton.js +0 -67
  20. package/src/Components/CustomCard.js +0 -127
  21. package/src/Components/CustomTextInput.js +0 -47
  22. package/src/Components/EquipmentPage.js +0 -313
  23. package/src/Components/FilterInput.Copy.js +0 -723
  24. package/src/Components/FilterInput.js +0 -569
  25. package/src/Components/HSubHeading.js +0 -68
  26. package/src/Components/HeaderCard.js +0 -40
  27. package/src/Components/MoreOptionsScreen.js +0 -251
  28. package/src/Components/NonSwipableProductCard.js +0 -226
  29. package/src/Components/NonSwipableSupplierCard.js +0 -348
  30. package/src/Components/ProductCard.js +0 -1336
  31. package/src/Components/QualityProductCard.js +0 -1059
  32. package/src/Components/RateProductCard.js +0 -1452
  33. package/src/Components/RawMaterial.js +0 -261
  34. package/src/Components/SDropDownEdited.js +0 -549
  35. package/src/Components/SDropDownNew.js +0 -529
  36. package/src/Components/SHelpDescription.js +0 -147
  37. package/src/Components/STextInputNew.js +0 -510
  38. package/src/Components/SearchProductCard.js +0 -470
  39. package/src/Components/StageByProduct.js +0 -199
  40. package/src/Components/SupplierCard.js +0 -243
  41. package/src/Components/SupplierInvoiceCard.js +0 -405
  42. package/src/Components/SwipableSupplierCard.js +0 -136
  43. package/src/Components/TagTemplate.js +0 -74
  44. package/src/Components/WrappedComponent.js +0 -25
  45. package/src/Custom/CBooking.js +0 -944
  46. package/src/Custom/CBookingPostpone.js +0 -1822
  47. package/src/Custom/CCalendar.js +0 -560
  48. package/src/Custom/CCard.js +0 -880
  49. package/src/Custom/CDetailCard.js +0 -205
  50. package/src/Custom/CHelpImage.js +0 -52
  51. package/src/Custom/CReport.js +0 -569
  52. package/src/Custom/CScrollView.js +0 -73
  53. package/src/Custom/CSignature.js +0 -112
  54. package/src/Custom/CSliderMenu.js +0 -339
  55. package/src/Custom/CSupplierCard.js +0 -99
  56. package/src/Custom/CTemplateCard.js +0 -438
  57. package/src/Custom/CTokenAllocation.js +0 -1402
  58. package/src/Custom/CTokenListOverlay.js +0 -122
  59. package/src/Custom/CWardStatus.js +0 -444
  60. package/src/Custom/Charts/CBarChart.js +0 -218
  61. package/src/Custom/Charts/CDashBoardList.js +0 -133
  62. package/src/Custom/Charts/CDashBoardTable.js +0 -172
  63. package/src/Custom/Charts/CLineChart.js +0 -193
  64. package/src/Custom/Charts/CPieChart.js +0 -186
  65. package/src/Custom/Loader.js +0 -182
  66. package/src/Custom/OUserView.js +0 -1121
  67. package/src/Custom/PreviewDosage.js +0 -115
  68. package/src/Custom/SearchLoader.js +0 -32
  69. package/src/Custom/TableComponent/CActivityTable.js +0 -707
  70. package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
  71. package/src/Custom/TableComponent/CTable.js +0 -185
  72. package/src/Custom/TableComponent/CTextBody.js +0 -40
  73. package/src/Custom/TableComponent/CTextHeader.js +0 -17
  74. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
  75. package/src/Custom/TableComponent/SDropdownTable.js +0 -491
  76. package/src/Custom/TableComponent/TagTable.js +0 -1200
  77. package/src/CustomComponents/CAddColumn.js +0 -140
  78. package/src/CustomComponents/CAssessmentDelete.js +0 -307
  79. package/src/CustomComponents/CAwesomeButton.js +0 -83
  80. package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
  81. package/src/CustomComponents/CBackHandler.js +0 -273
  82. package/src/CustomComponents/CCalendar.js +0 -243
  83. package/src/CustomComponents/CCommentOverlay.js +0 -202
  84. package/src/CustomComponents/CComments.js +0 -162
  85. package/src/CustomComponents/CContainerView.js +0 -24
  86. package/src/CustomComponents/CCustomTextInput.js +0 -336
  87. package/src/CustomComponents/CDetailView.js +0 -40
  88. package/src/CustomComponents/CDropDownList.js +0 -153
  89. package/src/CustomComponents/CDropdownSelect.js +0 -555
  90. package/src/CustomComponents/CFooterView.js +0 -42
  91. package/src/CustomComponents/CImagePickerSave.js +0 -316
  92. package/src/CustomComponents/CModalOverlay.js +0 -91
  93. package/src/CustomComponents/CNetworkStatus.js +0 -327
  94. package/src/CustomComponents/CNotesInstructions.js +0 -1000
  95. package/src/CustomComponents/COverlay.js +0 -81
  96. package/src/CustomComponents/CRemarks.js +0 -176
  97. package/src/CustomComponents/CRowAdd.js +0 -143
  98. package/src/CustomComponents/CSummaryDropDown.js +0 -327
  99. package/src/CustomComponents/CText.js +0 -9
  100. package/src/CustomComponents/CVectorIcon.js +0 -34
  101. package/src/CustomComponents/HtmlContentViewer.js +0 -65
  102. package/src/CustomComponents/PdfContentViewer.js +0 -90
  103. package/src/CustomComponents/SDropDownDosage.js +0 -1087
  104. package/src/CustomComponents/SwipableProductCard.js +0 -246
  105. package/src/CustomComponents/SwipableProductImageCard.js +0 -254
  106. package/src/CustomComponents/WorkOrderDetails.js +0 -1216
  107. package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
  108. package/src/HOC/ConfirmOverlay.js +0 -192
  109. package/src/HOC/HHeading.js +0 -70
  110. package/src/HOC/HMoreButton.js +0 -88
  111. package/src/HOC/HNatureHeading.js +0 -402
  112. package/src/HOC/HOCIcons.js +0 -80
  113. package/src/HOC/HOverlayCentered.js +0 -140
  114. package/src/HOC/HShadowButton.js +0 -45
  115. package/src/HOC/HShadowCountButton.js +0 -82
  116. package/src/HOC/OptionOverlay.js +0 -48
  117. package/src/Json/Chart.json +0 -818
  118. package/src/Json/Consultation.json +0 -622
  119. package/src/Json/CreditBill.json +0 -490
  120. package/src/Json/Dropdown.json +0 -216
  121. package/src/Json/DropdownConsultation.json +0 -228
  122. package/src/Json/DynamicReports.json +0 -623
  123. package/src/Json/Footer.json +0 -79
  124. package/src/Media/AudioScreen.js +0 -342
  125. package/src/Media/BarcodeScan.js +0 -145
  126. package/src/Media/CAudioPlay.js +0 -228
  127. package/src/Media/CCaptureImageWithoutEdit.js +0 -330
  128. package/src/Media/CImageGallery.js +0 -289
  129. package/src/Media/CImageZoom.js +0 -82
  130. package/src/Media/CSingleImage.js +0 -391
  131. package/src/Media/CSketchCanvas.js +0 -76
  132. package/src/Media/CVideoPlay.js +0 -31
  133. package/src/Media/DocumentScreen.js +0 -362
  134. package/src/Media/DrawingScreen.js +0 -578
  135. package/src/Media/ImageScreen.js +0 -309
  136. package/src/Media/RecordAudio.js +0 -250
  137. package/src/Media/RecordVideo.js +0 -223
  138. package/src/Media/VideoScreen.js +0 -378
  139. package/src/Navigation/PageNavigation.js +0 -224
  140. package/src/Navigation/useFocusEffect.js +0 -2
  141. package/src/Navigation/useFocusEffect.native.js +0 -1
  142. package/src/Navigation/useFocusEffect.web.js +0 -1
  143. package/src/Navigation/useIsFocused.js +0 -1
  144. package/src/Navigation/useIsFocused.native.js +0 -1
  145. package/src/Navigation/useIsFocused.web.js +0 -1
  146. package/src/Navigation/useNavigation.js +0 -2
  147. package/src/Navigation/useNavigation.native.js +0 -1
  148. package/src/Navigation/useNavigation.web.js +0 -1
  149. package/src/Screens/CMedications.js +0 -528
  150. package/src/Screens/CWebViewGallery.js +0 -203
  151. package/src/Screens/ChartScan.js +0 -279
  152. package/src/Screens/ChartScreenNew.js +0 -1579
  153. package/src/Screens/Consultation.js +0 -1500
  154. package/src/Screens/Dashboard.js +0 -778
  155. package/src/Screens/FileExplorer.js +0 -288
  156. package/src/Screens/Footer.js +0 -340
  157. package/src/Screens/ForgotPassword.js +0 -288
  158. package/src/Screens/HeaderBlock.js +0 -353
  159. package/src/Screens/Login.js +0 -328
  160. package/src/Screens/Notification.js +0 -149
  161. package/src/Screens/OcrScreen.js +0 -20
  162. package/src/Screens/PdfPreview.js +0 -507
  163. package/src/Screens/RegistrationDetails.js +0 -467
  164. package/src/Screens/SearchScreen.js +0 -582
  165. package/src/Screens/Splash.js +0 -788
  166. package/src/Screens/SwipeLeftView.js +0 -1867
  167. package/src/StaticComponents/SAlphabet.js +0 -47
  168. package/src/StaticComponents/SCheckBox.js +0 -42
  169. package/src/StaticComponents/SDatePicker.js +0 -208
  170. package/src/StaticComponents/SDatePickerLabel.js +0 -253
  171. package/src/StaticComponents/SDatePickerNew.js +0 -258
  172. package/src/StaticComponents/SDateTimePickerNew.js +0 -381
  173. package/src/StaticComponents/SDropDownGenerate.js +0 -450
  174. package/src/StaticComponents/SDropDownHoc.js +0 -636
  175. package/src/StaticComponents/SDropDownIcon.js +0 -500
  176. package/src/StaticComponents/SMenuBox.js +0 -131
  177. package/src/StaticComponents/SOverlay.js +0 -177
  178. package/src/StaticComponents/SOverlayTextInput.js +0 -109
  179. package/src/StaticComponents/SSearch.js +0 -438
  180. package/src/StaticComponents/SSearchBar.js +0 -53
  181. package/src/StaticComponents/SSpeedDial.js +0 -303
  182. package/src/StaticComponents/STextInput.js +0 -289
  183. package/src/StaticComponents/STextInputProps.js +0 -36
  184. package/src/StaticComponents/STimePicker.js +0 -171
  185. package/src/StaticComponents/STimingDropDownNew.js +0 -1585
  186. package/src/StaticComponents/STimingSwitch.js +0 -34
  187. package/src/layout/CContainerView.js +0 -21
  188. package/src/layout/CDetailView.js +0 -81
  189. package/src/layout/HeaderBlock.js +0 -353
  190. package/src/layout/INVLoginLayout.js +0 -657
  191. package/src/layout/Loader.js +0 -176
@@ -1,288 +0,0 @@
1
- import React, { useState, useEffect, useContext } from 'react';
2
- import FontAwesome from 'react-native-vector-icons/FontAwesome5';
3
- import {
4
- Text,
5
- View,
6
- TouchableOpacity,
7
- BackHandler,
8
- } from 'react-native';
9
- import Entypo from 'react-native-vector-icons/Entypo';
10
- import ImageScreen from '../Media/ImageScreen';
11
- import AudioScreen from '../Media/AudioScreen';
12
- import VideoScreen from '../Media/VideoScreen';
13
- import HeaderBlock from './HeaderBlock';
14
- import CDetailView from '../CustomComponents/CDetailView';
15
- import CContainerView from '../CustomComponents/CContainerView';
16
- import { normalize } from '../CommonStyle/componentStyle';
17
- import DrawingScreen from '../Media/DrawingScreen';
18
- import DocumentScreen from '../Media/DocumentScreen';
19
- import HShadowButton from '../HOC/HShadowButton';
20
- import { CButtonShadow, isBNUL, isNU } from '../CommonStyle/ComponentFunctions';
21
- import { Global } from '../../../../../src/Common/Global';
22
- //
23
- export default function FileExplorer(props) {
24
-
25
- const navigation = useNavigation();
26
- // console.log("PROPSSSSSSSSSSSSSS FILE EXPLORERERERRERERRERER",JSON.stringify(props))
27
- const [stage, setStage] = useState(props.route.params.visibility != undefined ? props.route.params.visibility : 1);
28
- const [visibility, setVisibility] = useState(props.route.params.visibility != undefined ? props.route.params.visibility : 0);
29
-
30
- // useEffect(() => {
31
- // const backAction = () => {
32
- // props.navigation.goBack();
33
- // return true;
34
- // };
35
- // const backHandler = BackHandler.addEventListener(
36
- // 'hardwareBackPress',
37
- // backAction,
38
- // );
39
- // return () => backHandler.remove();
40
- // });
41
-
42
- useEffect(() => {
43
- const backAction = () => {
44
- if (!navigation.isFocused()) {
45
- return false;
46
- }
47
- else {
48
- navigation.goBack();
49
-
50
- }
51
- return true;
52
- };
53
-
54
- const backHandler = BackHandler.addEventListener(
55
- "hardwareBackPress",
56
- backAction
57
- );
58
-
59
- return () => backHandler.remove();
60
- }, [navigation]);
61
-
62
- const IconData = [
63
- {
64
- name: 'folder-images',
65
- displaytext: 'Image',
66
- colour: '#3dc6bd',
67
- state: 1,
68
- },
69
- {
70
- name: 'video',
71
- displaytext: 'Video',
72
- colour: 'red',
73
- state: 3,
74
- },
75
- {
76
- name: 'music',
77
- displaytext: 'Audio',
78
- colour: '#b04ebf',
79
- state: 2,
80
- },
81
- {
82
- name: 'folder',
83
- displaytext: 'Document',
84
- colour: 'darkgreen',
85
- state: 4,
86
- },
87
- {
88
- name: 'folder-images',
89
- displaytext: 'Draw',
90
- colour: '#800000',
91
- state: 5,
92
- },
93
- ];
94
-
95
- let data;
96
- const [gallery, setGallery] = useState(props.route.params.data);
97
- var editstatus = props.route.params.eventData;
98
-
99
- gallery != null && gallery != undefined ? (data = gallery) : null;
100
-
101
- // console.log("GALLERYYYYYYY SAVEVEVEVVEVEVEVVEVEVEVEVVE", JSON.stringify(data))
102
-
103
- function findFilesLength(item) {
104
-
105
- if (item.state == 1) {
106
- return isNU(data) && isBNUL(data.savedimages) ? data.savedimages.length : 0
107
- }
108
- else if (item.state == 2) {
109
- return isNU(data) && isBNUL(data.savedaudio) ? data.savedaudio.length : 0
110
- }
111
- else if (item.state == 3) {
112
- return isNU(data) && isBNUL(data.savedvideo) ? data.savedvideo.length : 0
113
- }
114
- else if (item.state == 4) {
115
- return isNU(data) && isBNUL(data.savedpdf) ? data.savedpdf.length : 0
116
- }
117
- else if (item.state == 5) {
118
- return isNU(data) && isBNUL(data.saveddoc) ? data.saveddoc.length : 0
119
- }
120
- else {
121
- return 0
122
- }
123
-
124
- }
125
-
126
- function mainView() {
127
-
128
- // console.log('mainView', JSON.stringify(data.savedimages.length));
129
-
130
- return (
131
- <>
132
- <View style={{}}>
133
- <View
134
- style={{
135
- flexDirection: 'row',
136
- width: '100%',
137
- alignItems: 'center',
138
- justifyContent: 'space-evenly',
139
- }}>
140
- {IconData.map((item, k) => {
141
- return (
142
- visibility == item.state || visibility == 0 ?
143
-
144
- <View>
145
- <HShadowButton
146
- useicon={true}
147
- usetext={true}
148
- buttonstyle={{
149
- margin: normalize(5),
150
- borderLeftWidth: 0,
151
- borderBottomWidth: 0,
152
- borderRadius: 5,
153
- borderWidth: 0,
154
- borderColor: Global.AppTheme.primary_color,
155
- justifyContent: 'center',
156
- alignItems: 'center',
157
- backgroundColor: item.state == stage ? '#bdd8d8' : 'white',
158
- height: normalize(40),
159
- width: normalize(40),
160
- ...CButtonShadow(),
161
- }}
162
- icongroup={11}
163
- iconcolor={item.colour}
164
- iconname={item.name}
165
- iconsize={normalize(23)}
166
- iconstyle={{ textAlign: 'center', borderWidth: 0 }}
167
- displaytext={item.displaytext}
168
- buttonCallback={() => {
169
- setStage(item.state)
170
- }}
171
- textstyle={{
172
- color: Global.AppTheme.primary_color,
173
- fontSize: normalize(8),
174
- textAlign: 'center',
175
- fontWeight: 'normal'
176
- }}
177
-
178
- />
179
- {isNU(findFilesLength(item)) && findFilesLength(item) != 0 ?
180
- <View style={{ position: 'absolute', top: -2, right: -2, borderWidth: 0.5, borderColor: 'lightgrey', elevation: 1, borderRadius: 1000, backgroundColor: Global.AppTheme.primary_color, height: normalize(18), width: normalize(18), justifyContent: 'center', alignItems: 'center' }}>
181
- <Text adjustsFontSizeToFit numberOfLines={1} style={{ textAlign: 'center', fontSize: normalize(10), color: 'white', fontWeight: 'bold' }}>
182
- {findFilesLength(item)}
183
- </Text>
184
- </View>
185
- : null
186
- }
187
- </View>
188
-
189
-
190
- // <TouchableOpacity key={k}
191
- // onPress={() => setStage(item.state)}>
192
- // <View
193
- // style={{
194
- // width: '100%',
195
- // flexDirection: 'column',
196
- // alignItems: 'center',
197
- // justifyContent: 'center',
198
- // }}>
199
- // <View
200
- // style={{
201
- // backgroundColor:
202
- // item.state == stage ? 'black' : 'white',
203
- // alignItems: 'center',
204
- // justifyContent: 'center',
205
- // width: normalize(40),
206
- // height: normalize(40),
207
- // borderRadius: normalize(40) / 2,
208
- // }}>
209
- // <Entypo
210
- // name={item.name}
211
- // size={normalize(24)}
212
- // color={item.colour}
213
- // />
214
- // </View>
215
- // <View>
216
- // <Text
217
- // style={{
218
- // color: item.state == stage ? 'lightblue' : 'black',
219
- // fontSize: normalize(16),
220
- // fontWeight: 'bold',
221
- // }}>
222
- // {item.displaytext}
223
- // </Text>
224
- // </View>
225
- // </View>
226
- // </TouchableOpacity>
227
-
228
- : null
229
- );
230
- })}
231
- </View>
232
- </View>
233
-
234
- {stage == 1 ?
235
- <ImageScreen
236
- data={data}
237
- editStatus={val =>
238
- val == undefined ? null : props.route.params.onselect(editstatus)
239
- }
240
- />
241
-
242
- : stage == 2 ?
243
- <AudioScreen
244
- data={data}
245
- editStatus={val =>
246
- val == undefined ? null : props.route.params.onselect(editstatus)
247
- }
248
- /> :
249
- stage == 3 ?
250
- <VideoScreen
251
- data={data}
252
- editStatus={val =>
253
- val == undefined ? null : props.route.params.onselect(editstatus)
254
- }
255
- />
256
- : stage == 5 ?
257
- <DrawingScreen
258
- data={data}
259
- editStatus={val =>
260
- val == undefined ? null : props.route.params.onselect(editstatus)
261
- }
262
- /> :
263
- <DocumentScreen
264
- data={data}
265
- editStatus={val =>
266
- val == undefined ? null : props.route.params.onselect(editstatus)
267
- }
268
- />
269
- }
270
- </>
271
- )
272
-
273
- }
274
-
275
- return (
276
- props.route.params.componenttype ?
277
- mainView()
278
- :
279
- <CContainerView>
280
- <HeaderBlock style={{ marginBottom: 30 }} />
281
- <CDetailView>
282
- {mainView()}
283
- </CDetailView>
284
- </CContainerView>
285
-
286
- );
287
- }
288
-
@@ -1,340 +0,0 @@
1
- import React, { useState, memo, useEffect, useContext } from 'react';
2
- import { TouchableOpacity, Text, View, FlatList, Switch, Dimensions } from 'react-native';
3
- import FontAwesome from 'react-native-vector-icons/FontAwesome';
4
- import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
5
- import RNExitApp from 'react-native-exit-app';
6
- import InsureResponseComponentContext from '../Handlers/insureResponseComponentContext';
7
- import { Menu, MenuOptions, MenuOption, MenuTrigger, } from 'react-native-popup-menu';
8
- import Loader from '../Custom/Loader';
9
- import { Global } from '../../../../../src/Common/Global';
10
- import { normalize } from '../CommonStyle/componentStyle';
11
- import { CButtonShadow, isBNUL, isNU } from '../CommonStyle/ComponentFunctions';
12
- import HShadowButton from '../HOC/HShadowButton';
13
-
14
- const Footer = props => {
15
-
16
- const { responseJSON, setResponseJSON } = useContext(InsureResponseComponentContext);
17
-
18
- const [usertype] = useState(Global.PatientDetails != null && Global.PatientDetails.usertype != undefined ? Global.PatientDetails.usertype : "A")
19
- let UserSpecificFooter = props.footerIcon != undefined ? (props.footerIcon).filter(obj => {
20
- return obj.itemid != 2
21
- }) : []
22
-
23
- let UserSpecificMoreButton = props.footerIcon != undefined ? props.footerIcon.map(obj => ({
24
- morebutton: obj.morebuttons && obj.morebuttons != null && obj.morebuttons != undefined ? obj.morebuttons.filter(element => { return element.itemid == 5 }) : null
25
- })) : []
26
-
27
- var editVar =
28
- props.footerIcon != null && props.footerIcon != undefined
29
- ? props.footerIcon
30
- : null;
31
-
32
- if (editVar != undefined && editVar != null) {
33
- var result = editVar.filter(obj => {
34
- return obj.heading === 'More';
35
- });
36
- }
37
-
38
- function actionButton(data) {
39
- props.buttonFunction(data)
40
- }
41
-
42
- function moreButton(data) {
43
- props.buttonFunction(data)
44
- }
45
-
46
- function getIconColor(color) {
47
- switch (color) {
48
- case 0:
49
- return Global.AppTheme.primary_color;
50
- break;
51
- case 1:
52
- return '#f76c8f';
53
- break;
54
- case 2:
55
- return 'lightgreen';
56
- break;
57
- default:
58
- return Global.AppTheme.primary_color;
59
- break;
60
- }
61
- }
62
-
63
- function renderFooter(data) {
64
-
65
- var x = usertype == "A" ? data.item.morebuttons : UserSpecificMoreButton[UserSpecificMoreButton.length - 1].morebutton
66
-
67
- return (
68
- <View style={{ borderWidth: 0 }}>
69
- {data.item.heading == 'More' ? (
70
- <View style={{ borderWidth: 0 }}>
71
- <Menu>
72
- <MenuTrigger>
73
- <HShadowButton
74
- useicon={true}
75
- usetext={true}
76
- disabled={true}
77
- buttonstyle={{
78
- ...CButtonShadow(),
79
- alignItems: 'center',
80
- justifyContent: 'center',
81
- borderWidth: 1,
82
- borderColor: 'lightblue',
83
- borderRadius: 10,
84
- height: normalize(40),
85
- width: normalize(50),
86
- marginVertical: normalize(7),
87
- backgroundColor: 'white'
88
- }}
89
- iconcolor={Global.AppTheme.primary_color}
90
- icongroup={3}
91
- iconname={'dots-horizontal-circle'}
92
- iconsize={normalize(24)}
93
- displaytext={'More'}
94
- buttonCallback={() => {
95
-
96
- }}
97
- textstyle={{
98
- color: Global.AppTheme.primary_color,
99
- fontSize: normalize(9),
100
- textAlign: 'center',
101
- alignSelf: 'center'
102
- }}
103
- />
104
- {/* <View style={{
105
- ...CButtonShadow(),
106
- alignItems: 'center',
107
- borderWidth: 1,
108
- borderColor: 'lightblue',
109
- borderRadius: 10,
110
- height: normalize(40),
111
- width: normalize(50),
112
- marginVertical: normalize(7)
113
- }}>
114
- <MaterialCommunityIcons
115
- name={'dots-horizontal-circle'}
116
- color={Global.AppTheme.primary_color}
117
- size={normalize(24)}
118
- />
119
- <Text
120
- style={{
121
- color: Global.AppTheme.primary_color,
122
- fontSize: normalize(9),
123
- alignSelf: 'center',
124
- }}>
125
- {"More"}
126
- </Text>
127
- </View> */}
128
- </MenuTrigger>
129
- <MenuOptions
130
- optionsContainerStyle={{ marginTop: normalize(-52) }}
131
- customStyles={{ optionsContainer: { width: '100%', shadowColor: '#ffffff00', backgroundColor: '#ffffffff' }, optionText: {}, }}>
132
- <View style={{ flexDirection: 'row', flexWrap: 'wrap-reverse', justifyContent: 'flex-end', borderWidth: 0 }}>
133
- {/* <MenuOptions
134
- customStyles={{
135
- optionsContainer: { width: '35%' },
136
- optionText: {},
137
- }}>
138
- <View> */}
139
- {x != null &&
140
- x != undefined &&
141
- x.map((item, key) => {
142
- return (
143
-
144
- <MenuOption
145
- key={key}
146
- onSelect={() => {
147
- moreButton(item, item.functionname, data.item)
148
- }}
149
- style={{ marginHorizontal: normalize(3) }}>
150
- <HShadowButton
151
- useicon={true}
152
- usetext={true}
153
- disabled={true}
154
- buttonstyle={{
155
- ...CButtonShadow(),
156
- alignItems: 'center',
157
- justifyContent: 'center',
158
- borderWidth: 1,
159
- borderColor: 'lightblue',
160
- borderRadius: 10,
161
- height: normalize(40),
162
- width: normalize(50),
163
- marginVertical: normalize(7),
164
- backgroundColor: 'white'
165
- }}
166
- iconcolor={Global.AppTheme.primary_color}
167
- icongroup={4}
168
- iconname={item.iconname}
169
- iconsize={normalize(24)}
170
- displaytext={item.heading}
171
- buttonCallback={() => {
172
- // getFunctions(item)
173
- }}
174
- textstyle={{
175
- color: Global.AppTheme.primary_color,
176
- fontSize: normalize(9),
177
- textAlign: 'center',
178
- alignSelf: 'center'
179
- }}
180
- />
181
- </MenuOption>
182
-
183
-
184
- // <MenuOption
185
- // key={key}
186
- // onSelect={() => moreButton(item, item.functionname, data.item)}
187
- // style={{ flexDirection: 'row', alignItems: 'center' }}>
188
- // <FontAwesome
189
- // name={item.iconname}
190
- // color={item.iconcolor ? item.iconcolor : Global.AppTheme.primary_color}
191
- // size={normalize(23)}
192
- // />
193
- // <Text
194
- // style={{
195
- // fontSize: normalize(10),
196
- // marginLeft: '10%',
197
- // }}>
198
- // {item.heading}
199
- // </Text>
200
- // </MenuOption>
201
- );
202
- })}
203
- </View>
204
- </MenuOptions>
205
- </Menu>
206
- </View>
207
- ) : (
208
-
209
- <HShadowButton
210
- useicon={true}
211
- usetext={true}
212
- disabled={false}
213
- buttonstyle={{
214
- ...CButtonShadow(),
215
- alignItems: 'center',
216
- justifyContent: 'center',
217
- borderWidth: 1,
218
- borderColor: 'lightblue',
219
- borderRadius: 10,
220
- height: normalize(40),
221
- width: normalize(50),
222
- marginVertical: normalize(7),
223
- backgroundColor: 'white'
224
- }}
225
- iconcolor={CheckSaveColor(data, responseJSON)}
226
- icongroup={4}
227
- iconname={data.item.iconname}
228
- iconsize={normalize(24)}
229
- displaytext={data.item.heading}
230
- buttonCallback={() => {
231
- actionButton(data.item)
232
- }}
233
- textstyle={{
234
- color: Global.AppTheme.primary_color,
235
- fontSize: normalize(9),
236
- textAlign: 'center',
237
- alignSelf: 'center'
238
- }}
239
- />
240
- // <TouchableOpacity
241
- // onPress={() => {
242
- // actionButton(data.item)
243
- // }}
244
- // style={{
245
- // borderWidth: 1,
246
- // borderColor: 'lightblue',
247
- // borderRadius: 10,
248
- // height: normalize(40),
249
- // width: normalize(50),
250
- // marginVertical: normalize(7),
251
- // justifyContent: 'center',
252
- // alignItems: 'center',
253
- // }}>
254
- // <FontAwesome
255
- // name={data.item.iconname}
256
- // color={CheckSaveColor(data, responseJSON)}
257
- // size={normalize(24)}
258
- // />
259
- // <Text numberOfLines={1} adjustsFontSizeToFit style={{ color: Global.AppTheme.primary_color, fontSize: normalize(9) }}>
260
- // {data.item.heading}
261
- // </Text>
262
- // </TouchableOpacity>
263
- // <AwesomeButton
264
- // onPress={() => actionButton(data.item)}
265
- // borderRadius={10}
266
- // borderWidth={1}
267
- // height={normalize(40)}
268
- // width={normalize(55)}
269
- // backgroundColor={"#fff"}
270
- // paddingHorizontal={0}
271
- // raiseLevel={2}
272
- // paddingBottom={0}
273
- // borderColor={'lightblue'}
274
- // paddingTop={0}>
275
-
276
- // <View style={{ alignItems: 'center', width: normalize(50) }} >
277
- // <FontAwesome
278
- // name={data.item.iconname}
279
- // // color={(data.item.heading == 'Save' && responseJSON.editStatus) ? '#f76c8f' : Global.AppTheme.primary_color}
280
- // color={CheckSaveColor(data, responseJSON)}
281
- // size={normalize(22)}
282
- // />
283
- // <Text numberOfLines={1} style={{ color: Global.AppTheme.primary_color, fontSize: normalize(10) }}>
284
- // {data.item.heading}
285
- // </Text>
286
- // </View>
287
- // </AwesomeButton>
288
- )}
289
- </View>
290
- );
291
- }
292
-
293
- function CheckSaveColor(data, context) {
294
-
295
- if (data.item.heading == 'Save' && isNU(context) && isBNUL(context.consultation) && CheckIfEdited(context.consultation)) {
296
- return '#f76c8f'
297
- }
298
- else {
299
- return Global.AppTheme.primary_color
300
- }
301
- }
302
-
303
- function CheckIfEdited(array) {
304
-
305
- let prevcodearray = array.filter((i, k) => { return i.editStatus ? { ...i } : undefined });
306
- let prevcode = isBNUL(prevcodearray) ? true : false;
307
- return prevcode;
308
-
309
- }
310
-
311
-
312
-
313
-
314
-
315
-
316
- return (
317
- <View
318
- style={[{
319
- // ...CFooterShadow(), // offsetX offsetY blurRadius spreadDistance color
320
- minHeight: Dimensions.get('screen').height * 0.06,
321
- paddingVertical: 5,
322
- justifyContent: 'center',
323
- backgroundColor: 'white',
324
- borderTopWidth: 1,
325
- borderTopColor: 'lightgrey'
326
- }, props.style]}
327
- >
328
- <View style={{ flexDirection: 'row'}}>
329
- <FlatList
330
- data={usertype == "A" ? props.footerIcon : UserSpecificFooter}
331
- contentContainerStyle={{ flexDirection: 'row', justifyContent: 'space-between', paddingHorizontal: normalize(5) }}
332
- renderItem={renderFooter}
333
- keyExtractor={item => item.itemid}
334
- />
335
- </View>
336
- </View>
337
- );
338
- };
339
-
340
- export default memo(Footer);