@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,569 +0,0 @@
1
- import React, { useState, useEffect, useRef } from 'react';
2
- import { Text, View, FlatList, TouchableOpacity, Dimensions, ActivityIndicator, ScrollView, Switch, TextInput, TouchableHighlight, Platform } from 'react-native';
3
- import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
4
- import { normalize } from '../CommonStyle/componentStyle';
5
- import { APIURL } from '../../../../../src/Common/apiConstants';
6
- import { ArrayCheck, getLoading, isPermitted, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
7
- import { Global } from '../../../../../src/Common/Global';
8
- import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
9
- import { Icons } from '@jescon-technologies/react-native-ui-kit';;
10
- import CTextHeader from './TableComponent/CTextHeader';
11
- import CTextBody from './TableComponent/CTextBody';
12
- import HHeading from '../HOC/HHeading';
13
- import STimePicker from '../StaticComponents/STimePicker';
14
- import Loader from './Loader';
15
- import moment from 'moment';
16
- import STextInput from '../StaticComponents/STextInput';
17
- import AwesomeButton from 'react-native-really-awesome-button';
18
- import SDropDownNew from '../Components/SDropDownNew';
19
-
20
- import RNFetchBlob from 'rn-fetch-blob';
21
- import RNHTMLtoPDF from 'react-native-html-to-pdf';
22
- import RNPrint from 'react-native-print';
23
- import HReportFormat from '../Html/HReportFormat';
24
- import HReportHeader from '../Html/HReportHeader';
25
- import HReportFooter from '../Html/HReportFooter';
26
- import CFromToDate from '../CustomComponents/CFromToDate';
27
- import CAwesomeButton from '../CustomComponents/CAwesomeButton';
28
- // import { PDFDocument, PDFPage } from 'react-native-pdf-lib';
29
-
30
-
31
- const CReport = (props) => {
32
- const { width, height } = Dimensions.get('screen');
33
- const [data, setData] = useState();
34
- const [stage, setStage] = useState(1);
35
- const [refresh, setRefresh] = useState(0);
36
- const [tokenType, setTokenType] = useState('');
37
- const [isLoading, setIsLoading] = useState(false);
38
- const [date, setDate] = useState({
39
- 'fromdate': moment().format('YYYY-MM-DD'),
40
- 'todate': moment().format('YYYY-MM-DD'),
41
- });
42
- const [consultant, setConsultant] = useState();
43
-
44
- var Report = {
45
- 'title': 'Token Report',
46
- 'fromdate': '',
47
- 'todate': '',
48
- 'tokentype': '',
49
- 'tokentypename': '',
50
- 'hosuconsultant': 0,
51
- 'consultantname': 'DR.MATHEW K C',
52
- 'dateWiseArr': [
53
- {
54
- 'date': '14 November 2023',
55
- 'tokensArr': [
56
- {
57
- 'code': 1,
58
- 'tokenno': 6,
59
- 'morningoreveng': 'Morning',
60
- 'consultationtime': '11:30 AM',
61
- 'reportingtime': '11:00AM',
62
- 'bookingtypename': 'PHONE',
63
- 'totalamount': 0,
64
- 'paymenttype': 'Pay Later',
65
- 'bookedby': 'Harold Louis',
66
- 'mobilenumber': '7338483582',
67
- 'remarks': 'Remarks',
68
- 'color': '#4f4d4d',
69
- },
70
- {
71
- 'code': 2,
72
- 'tokenno': 7,
73
- 'morningoreveng': 'Morning',
74
- 'consultationtime': '11:30 AM',
75
- 'reportingtime': '11:00AM',
76
- 'bookingtypename': 'PHONE',
77
- 'totalamount': 0,
78
- 'paymenttype': 'Pay Later',
79
- 'bookedby': '',
80
- 'mobilenumber': '',
81
- 'remarks': 'Remarks',
82
- 'color': '#4f4d4d',
83
- },
84
- ],
85
- },
86
- {
87
- 'date': '15 November 2023',
88
- 'tokensArr': [
89
- {
90
- 'code': 1,
91
- 'tokenno': 6,
92
- 'morningoreveng': 'Morning',
93
- 'consultationtime': '11:30 AM',
94
- 'reportingtime': '11:00AM',
95
- 'bookingtypename': 'PHONE',
96
- 'totalamount': 0,
97
- 'paymenttype': 'Pay Later',
98
- 'bookedby': 'Harold Louis',
99
- 'mobilenumber': '7338483582',
100
- 'remarks': 'Remarks',
101
- 'color': '#4f4d4d',
102
- },
103
- {
104
- 'code': 2,
105
- 'tokenno': 7,
106
- 'morningoreveng': 'Morning',
107
- 'consultationtime': '11:30 AM',
108
- 'reportingtime': '11:00AM',
109
- 'bookingtypename': 'PHONE',
110
- 'totalamount': 0,
111
- 'paymenttype': 'Pay Later',
112
- 'bookedby': '',
113
- 'mobilenumber': '',
114
- 'remarks': 'Remarks',
115
- 'color': '#4f4d4d',
116
- },
117
- {
118
- 'code': 1,
119
- 'tokenno': 6,
120
- 'morningoreveng': 'Morning',
121
- 'consultationtime': '11:30 AM',
122
- 'reportingtime': '11:00AM',
123
- 'bookingtypename': 'PHONE',
124
- 'totalamount': 0,
125
- 'paymenttype': 'Pay Later',
126
- 'bookedby': 'Harold Louis',
127
- 'mobilenumber': '7338483582',
128
- 'remarks': 'Remarks',
129
- 'color': '#4f4d4d',
130
- },
131
- {
132
- 'code': 2,
133
- 'tokenno': 7,
134
- 'morningoreveng': 'Morning',
135
- 'consultationtime': '11:30 AM',
136
- 'reportingtime': '11:00AM',
137
- 'bookingtypename': 'PHONE',
138
- 'totalamount': 0,
139
- 'paymenttype': 'Pay Later',
140
- 'bookedby': '',
141
- 'mobilenumber': '',
142
- 'remarks': 'Remarks',
143
- 'color': '#4f4d4d',
144
- },
145
- ],
146
- },
147
- ],
148
- };
149
-
150
- function getReportAPI(fromtodate, tokentype) {
151
- var consultantCode = ValueCheck(consultant) ? consultant.datavalue : Global.userData.hosuconsultant;
152
- var tokentypevar = ValueCheck(tokentype) ? tokentype : tokenType;
153
- setDate(fromtodate);
154
- var from = moment(fromtodate.fromdate).format('YYYY-MM-DD');
155
- var to = moment(fromtodate.todate).format('YYYY-MM-DD');
156
- // let buttonapi = APIURL + 'emr/emrcommonget/rnhococonsultationtokenorderweekday ' + 7
157
- var buttonapi = APIURL + 'emr/emrcommonget/rnhosuconsultantbookingreport ' + consultantCode + ',' + "'" + from + "'" + ',' + "'" + to + "'" + ',' + "'" + tokentypevar + "'"
158
- + ',' + stage;
159
- console.log('Button api.....................CReport.....................', JSON.stringify(buttonapi));
160
- setIsLoading(true);
161
- NetworkServiceCall('get', buttonapi, '')
162
- .then(function (response) {
163
- if (response.httpstatus == 200 && response.data != null
164
- && response.data != undefined) {
165
- setData(response.data);
166
- getReport(response.data);
167
- }
168
- else {
169
- setIsLoading(false);
170
- notifyMessage('Data not available,Please try again later', 4);
171
- }
172
- });
173
-
174
- getLoading(v => setIsLoading(false));
175
- }
176
-
177
- function contentdata(data) {
178
- return (`
179
- <style type="text/css">
180
- .studentInfo {
181
- width: 100%;
182
- border-collapse: collapse;
183
- border: 0px solid grey;
184
-
185
- }
186
-
187
- .studentInfo td {
188
-
189
- border: 0.5px solid lightgrey;
190
- }
191
-
192
- .headerTable td {
193
- background: aliceblue;font-size:8px;
194
- border: 0.5px solid lightgrey;
195
- }
196
- .DetailData td {
197
- font-size:14px;text-align: center;
198
- border: 0.5px solid lightgrey;
199
- }
200
- .header {
201
- text-align: left;
202
- font-wight:'bold';
203
- font-size:14px;
204
- }
205
- #rcorners1{
206
- text-align:center;
207
- align-items:center;
208
- justify-content: center;
209
- border-radius: 1500px;
210
- background: red;
211
- padding: 2px;
212
- width: 25px;
213
- }
214
-
215
- </style>
216
-
217
- <div>
218
- ${`<div style="border: 1px solid #000000; margin-top: 0px;padding:0px;">
219
- <span style="
220
- display: inline;
221
- background: #fff;
222
- margin-left:0px;
223
- padding: 0px 2px;
224
- position: relative;
225
- top: -0.6em;
226
- font-size:10px;
227
- font-weight:normal;"
228
- >
229
- Consultant Details
230
- </span>
231
-
232
- <div style="display:flex;flex-direction:column;margin:5px;margin-top:0px;">
233
-
234
- <div style="display:flex;flex-direction:row;">
235
- <div style="display:flex;flex-direction:row;align-items:flex-end;width:50%;">
236
- <div style="width:30%;font-size:8px;">
237
- Consultant :
238
- </div>
239
- <div style="width:50%;font-weight:bold;font-size:10px;">
240
- :&nbsp;${ValueCheck(consultant) ? consultant.displayvalue : Global.userData.username}
241
- </div>
242
- </div>
243
- <div style="display:flex;flex-direction:row;align-items:flex-end;width:50%;">
244
- <div style="width:30%;font-size:8px;">
245
- Token Type :
246
- </div>
247
- <div style="width:50%;font-weight:bold;font-size:10px;">
248
- :&nbsp;${ValueCheck(data) ? data.tokentypename : ''}
249
- </div>
250
- </div>
251
- </div>
252
- ${stage != 1 ?
253
- `<div style="display:flex;flex-direction:row;">
254
- <div style="display:flex;flex-direction:row;align-items:flex-end;width:60%;">
255
- <div style="width:30%;font-size:8px;">
256
- From Date :
257
- </div>
258
- <div style="width:50%;font-weight:bold;font-size:10px;">
259
- :&nbsp;${ValueCheck(data) ? data.fromdate : ''}
260
- </div>
261
- </div>
262
- <div style="display:flex;flex-direction:row;align-items:flex-end;width:60%;">
263
- <div style="width:30%;font-size:8px;">
264
- To Date :
265
- </div>
266
- <div style="width:50%;font-weight:bold;font-size:10px;">
267
- :&nbsp;${ValueCheck(data) ? data.todate : ''}
268
- </div>
269
- </div>
270
- </div>` : ''}
271
-
272
- </div>
273
- </div>
274
- </div>
275
- `}
276
-
277
- <div>
278
- <div style="font-size:10px;text-align: center;padding-top:5px">
279
- Tokens Chart
280
- </div>
281
-
282
- ${ValueCheck(data) && ArrayCheck(data.dateWiseArr) ? data.dateWiseArr.map((subArr, i) => {
283
- return (
284
- `<div style="margin-top:0px">
285
- <table class="studentInfo">
286
- <tbody>
287
-
288
- ${ValueCheck(subArr.tokensArr) && ArrayCheck(subArr.tokensArr) ?
289
- `<tr>
290
- <td class="header" colspan="9"> ${subArr.date} </td>
291
- </tr>` : ''}
292
-
293
- ${i == 0 ?
294
- `<tr class="headerTable">
295
- <td>Token No</td>
296
- <td>Type</td>
297
- <td>Reporting Time</td>
298
- <td>Consultation Time</td>
299
- <td>Nature</td>
300
- <td>Disabled</td>
301
- <td>Mrng/Evng</td>
302
- ${stage != 1 ?
303
- `<td>Patient Name</td>
304
- <td>Mobile No</td>` : ''}
305
- </tr>` : ''}
306
- ${ValueCheck(subArr.tokensArr) && ArrayCheck(subArr.tokensArr) ? subArr.tokensArr.map((subArray) => {
307
- return (
308
- `<tr class="DetailData">
309
- <td style="width:5%;font-size:16px;font-weight:bold;color: ${ValueCheck(subArray.disabledtoken) ? 'red' : ValueCheck(subArray.bookedstatus) ? 'green' : 'black'};">${subArray.tokenno}</td>
310
- <td style="width:7%;">${subArray.bookingtypename}</td>
311
- <td style="width:8%;">${subArray.reportingtime}</td>
312
- <td style="width:8%;">${subArray.consultationtime}</td>
313
- <td style="width:8%;">${ValueCheck(subArray.onlinetoken) ? subArray.onlinetoken : ''}</td>
314
- <td style="width:8%;">${ValueCheck(subArray.disabledtoken) ? 'YES' : 'NO'}</td>
315
- <td style="width:8%;">${ValueCheck(subArray.morningoreveng) ? subArray.morningoreveng : ''}</td>
316
- ${stage != 1 ?
317
- `<td style="width:8%;">${subArray.bookedby}</td>
318
- <td style="width:8%;">${subArray.mobilenumber}</td>` : ''}
319
- </tr>`
320
- );
321
- }).join('') : ''}
322
-
323
- </tbody>
324
- </table>
325
- </div>`
326
- );
327
- }).join('') : ''}
328
-
329
-
330
-
331
- </div>
332
- </div>
333
- `);
334
- }
335
-
336
- const getReport = async (data) => {
337
- if (Platform.OS === 'web') {
338
- window.electronAPI.savePDF(data);
339
- return;
340
- }
341
- if (await isPermitted()) {
342
- const htmlresult = await RNHTMLtoPDF.convert({
343
- html: HReportFormat(contentdata(data), HReportHeader(), HReportFooter(), '110px', '80px'),
344
- fileName: 'pdf',
345
- base64: true,
346
- });
347
- setIsLoading(false);
348
- RNPrint.print({ filePath: htmlresult.filePath });
349
-
350
- // var x = []
351
- // for (let i = 0; i < 30; i++) {
352
- // var y = PDFPage
353
- // .modify(0)
354
- // .drawText(`Page ${i + 1}`, {
355
- // x: 400,
356
- // color: '#F62727',
357
- // })
358
- // y.page.pageIndex = i
359
- // x.push(y)
360
- // }
361
- // var z = x.map((item) => { return JSON.stringify(item) }).toString(',')
362
- // // console.log("..............................", z)
363
- // PDFDocument
364
- // .modify(htmlresult.filePath)
365
- // .modifyPages({"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 1"}],"pageIndex":0}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 2"}],"pageIndex":1}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 3"}],"pageIndex":2}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 4"}],"pageIndex":3}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 5"}],"pageIndex":4}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 6"}],"pageIndex":5}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 7"}],"pageIndex":6}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 8"}],"pageIndex":7}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 9"}],"pageIndex":8}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 10"}],"pageIndex":9}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 11"}],"pageIndex":10}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 12"}],"pageIndex":11}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 13"}],"pageIndex":12}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 14"}],"pageIndex":13}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 15"}],"pageIndex":14}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 16"}],"pageIndex":15}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 17"}],"pageIndex":16}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 18"}],"pageIndex":17}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 19"}],"pageIndex":18}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 20"}],"pageIndex":19}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 21"}],"pageIndex":20}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 22"}],"pageIndex":21}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 23"}],"pageIndex":22}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 24"}],"pageIndex":23}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 25"}],"pageIndex":24}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 26"}],"pageIndex":25}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 27"}],"pageIndex":26}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 28"}],"pageIndex":27}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 29"}],"pageIndex":28}},{"page":{"actions":[{"x":400,"y":0,"color":"#F62727","fontSize":12,"fontName":"Times New Roman","type":"text","value":"Page 30"}],"pageIndex":29}})
366
- // .write()
367
- // .then(path => {
368
- // RNPrint.print({ filePath: path });
369
- // });
370
- }
371
- };
372
-
373
- function getObj(params) {
374
- params.map((item) => { return item; });
375
- }
376
-
377
- return (
378
- <View style={{ flex: 1, marginTop: normalize(-2) }}>
379
-
380
- <HHeading
381
- styles={{
382
- 'iconname': 'file-pdf',
383
- 'bgcolor': '#f2efef',
384
- 'iconsize': 16,
385
- 'iconcolor': Global.AppTheme.primary_color,
386
- 'displaytext': 'REPORTS',
387
- 'textsize': 14,
388
- 'textcolor': Global.AppTheme.primary_color,
389
- }}
390
- callBack={val => (val == undefined ? null : console.log(val))} />
391
-
392
-
393
-
394
- {isLoading ?
395
- <Loader displaytext={true} /> : null}
396
-
397
- <View style={{ flex: 1 }}>
398
- <View style={{ flexDirection: 'row', backgroundColor: '#fff', height: normalize(35), justifyContent: 'space-evenly', alignItems: 'center' }}>
399
- {[{
400
- stage: 1,
401
- iconname: 'stack-overflow',
402
- display: 'WEEKDAY',
403
- },
404
- {
405
- stage: 2,
406
- iconname: 'user-md',
407
- display: 'BOOKING',
408
- }].map((subItem, i) => {
409
- return (
410
- <TouchableOpacity key={i} style={{
411
- height: '100%', borderBottomWidth: stage == subItem.stage ? 4 : 0, borderBottomColor: Global.AppTheme.primary_color,
412
- backgroundColor: stage == subItem.stage ? '#eaedf9' : '#fff',
413
- alignItems: 'center', justifyContent: 'center', width: Dimensions.get('screen').width * 0.5, marginBottom: normalize(5),
414
- }}
415
- onPress={() => setStage(subItem.stage)}>
416
- <Icons.FontAwesome name={subItem.iconname} color={stage == subItem.stage ? Global.AppTheme.primary_color : 'black'} size={normalize(15)} />
417
- <View style={{ alignItems: 'center' }}>
418
- <Text style={{ color: stage == subItem.stage ? Global.AppTheme.primary_color : 'black', fontSize: normalize(10) }}>{subItem.display}</Text>
419
- </View>
420
- </TouchableOpacity>
421
- );
422
- })}
423
-
424
- </View>
425
-
426
- {Global.userData.hosuconsultant == 0 ?
427
- <View style={{ paddingHorizontal: normalize(8), marginBottom: normalize(4) }}>
428
- <Text style={{ fontSize: normalize(8), paddingHorizontal: 5 }}>Consultant :</Text>
429
- <SDropDownNew
430
- dropdownapi={'emr/emrcommonget/exec rndddwdropdownselect 1'}
431
- dropdowndata={ValueCheck(Global.userData.hosuconsultant) &&
432
- Global.userData.hosuconsultant > 0 ? Global.userData.username : ''}
433
- onChangeData={val =>
434
- val == undefined ? null : setConsultant(val)}
435
- editable={true}
436
- widthArr={Dimensions.get('screen').width * 0.96}
437
- iconName={'user-md'}
438
- refreshCount={val =>
439
- val == undefined ? null : console.log('Refresh')
440
- }
441
- />
442
- </View> : null}
443
-
444
- <View style={{ paddingHorizontal: normalize(8) }}>
445
- <Text style={{ fontSize: normalize(8), paddingHorizontal: 5 }}>Token Type :</Text>
446
- <SDropDownNew
447
- dropdownapi={'emr/emrcommonget/rnladropdowntokentype'}
448
- dropdowndata={'ALL'}
449
- onChangeData={val =>
450
- val == undefined ? null : setTokenType(val.datavalue)}
451
- editable={true}
452
- widthArr={Dimensions.get('screen').width * 0.96}
453
- iconName={'coins'}
454
- refreshCount={val =>
455
- val == undefined ? null : console.log()
456
- }
457
- />
458
- </View>
459
-
460
- {stage == 2 ?
461
- <CFromToDate
462
- callBack={val =>
463
- val == undefined
464
- ? null
465
- : setDate(val)
466
- } /> : null}
467
- </View>
468
-
469
- <View style={{
470
- position: 'absolute', flexDirection: 'row', borderTopColor: '#c9c7c7', borderTopWidth: 2,
471
- alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 0,
472
- bottom: 0, paddingVertical: 5, width: '100%', backgroundColor: '#fff',
473
- }}>
474
- {[
475
- {
476
- 'icongroup': 4,
477
- 'displaytext': 'Print', 'size': 10, 'iconname': 'print', 'iconcolor': Global.AppTheme.primary_color, 'fontcolor': Global.AppTheme.primary_color,
478
- 'shadowcolor': '#fff', 'selected': false, 'visibility': true, 'iconsize': 20, 'functionid': 'CB01', 'iconsize': 20, 'functionid': 'CB01', 'componentname': 'SetUpVitalSign',
479
- },
480
- {
481
- 'icongroup': 4,
482
- 'displaytext': 'Monthly',
483
- 'iconname': 'calendar-check-o',
484
- 'stage': 1,
485
- 'visibility': true,
486
- 'functionid': 'CB04',
487
- },
488
- {
489
- 'icongroup': 4,
490
- 'key': 3,
491
- 'iconname': 'stack-overflow',
492
- 'displaytext': 'Tokens',
493
- 'visibility': true,
494
- 'functionid': 'CB05',
495
- },
496
- {
497
- 'icongroup': 4,
498
- 'iconname': 'user-md',
499
- 'displaytext': 'Booking',
500
- 'stage': 1,
501
- 'visibility': true,
502
- 'functionid': 'CB03',
503
- },
504
- {
505
- 'icongroup': 4,
506
- 'iconname': 'exchange',
507
- 'displaytext': 'Postpone',
508
- 'stage': 5,
509
- 'visibility': true,
510
- 'selected': true,
511
- 'functionid': 'CB06',
512
- },
513
- // {
514
- // "icongroup": 4,
515
- // "displaytext": "Report", "size": 10, "iconname": "file-pdf-o", "iconcolor": Global.AppTheme.primary_color,
516
- // "fontcolor": Global.AppTheme.primary_color, "shadowcolor": '#fff', "selected": false, "visibility": true, "iconsize": 20, "functionid": "CB02",
517
- // }
518
- ].map((item, i) => {
519
- return (
520
- item.visibility ?
521
-
522
-
523
- // <TouchableOpacity key={i} style={{ alignItems: 'center', justifyContent: 'center' }}
524
- // onPress={() => getFooterIconsFunctions(item)}>
525
- // <Icons.FontAwesome name={item.iconname} color={item.displaytext == "Report" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black"} size={normalize(20)} />
526
- // <Text style={{ color: item.displaytext == "Report" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black", fontSize: normalize(10) }}>{item.displaytext}</Text>
527
- // </TouchableOpacity>
528
-
529
- <View>
530
- <CAwesomeButton
531
- key={i}
532
- data={{
533
- ...item,
534
- 'width': normalize(45),
535
- 'shadowcolor': '#fff',
536
- 'iconcolor': item.displaytext == 'Report' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
537
- 'fontcolor': item.displaytext == 'Report' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
538
- }}
539
- callBack={val => val == undefined ? null : getFooterIconsFunctions(item)}
540
- />
541
- </View>
542
-
543
- : null
544
- );
545
- })}
546
- </View>
547
- </View>
548
- );
549
-
550
- function getFooterIconsFunctions(val) {
551
- switch (val.functionid) {
552
- case 'CB01': ValueCheck(date) ? getReportAPI(date, tokenType) : notifyMessage('Data Not Found', 3);
553
- break;
554
- case 'CB02': props.callBack(4);
555
- break;
556
- case 'CB03': props.callBack(1);
557
- break;
558
- case 'CB04': props.callBack(0);
559
- break;
560
- case 'CB05': props.callBack(2);
561
- break;
562
- case 'CB06': props.callBack(5);
563
- break;
564
- default: console.log('Deault');
565
- break;
566
- }
567
- }
568
- };
569
- export default CReport;
@@ -1,73 +0,0 @@
1
- import React, { useRef, useState } from 'react';
2
- import { Animated, Dimensions, View, ScrollView, StyleSheet, TouchableOpacity, Image, Text } from 'react-native';
3
- import { normalize } from '../CommonStyle/componentStyle';
4
- import FontAwesome from 'react-native-vector-icons/FontAwesome';
5
- import { useNavigation } from '../Navigation/useNavigation';
6
-
7
-
8
- import { videoURL } from '../../../../../src/Common/apiConstants';
9
- const { width } = Dimensions.get('window');
10
- const itemWidth = (width / 3) * 2;
11
- const padding = (width - itemWidth) / 2;
12
- const offset = itemWidth;
13
- export default function CScrollView(props) {
14
- const [data, setData] = useState(props.data);
15
- const scrollX = useRef(new Animated.Value(0)).current;
16
- return (
17
- <ScrollView
18
- horizontal
19
- pagingEnabled
20
- decelerationRate="fast"
21
- contentContainerStyle={styles.scrollView}
22
- showsHorizontalScrollIndicator={false}
23
- snapToInterval={offset}
24
- onScroll={Animated.event(
25
- [{ nativeEvent: { contentOffset: { x: scrollX } } }],
26
- { useNativeDriver: false }
27
- )}
28
- >
29
-
30
- {data.map((item, i) => (
31
- <Item key={i} i={i} scrollX={scrollX} item={item} />
32
- ))}
33
-
34
- </ScrollView>
35
- );
36
- }
37
- function Item({ i, scrollX, item }) {
38
- const navigation = useNavigation();
39
- const scale = scrollX.interpolate({
40
- inputRange: [-offset + i * offset, i * offset, offset + i * offset],
41
- outputRange: [0.75, 1, 0.75],
42
- });
43
- return (
44
- <TouchableOpacity onPress={() => navigation.navigate('CVideoPlay',
45
- { video: item.videolink })}>
46
- <Animated.View style={[styles.item, { transform: [{ scale }] }]}>
47
- <Image
48
- source={{ uri: item.thumbnail }}
49
- style={{
50
- flex: 1, borderRadius: 10,
51
- }}
52
- resizeMode={'cover'}
53
- />
54
- <View style={{ position: 'absolute', bottom: '40%', left: '37%' }}>
55
- <FontAwesome name={'play-circle-o'} size={normalize(60)} color={'#4f4e4e'} />
56
- </View>
57
- <View style={{ position: 'absolute', paddingHorizontal: 10, bottom: normalize(10), left: normalize(10), backgroundColor: 'black', borderRadius: 5 }}>
58
- <Text style={{ fontSize: normalize(10), fontWeight: 'bold', color: '#fff' }}>{item.displaytext}</Text>
59
- </View>
60
- </Animated.View>
61
- </TouchableOpacity>
62
- );
63
- }
64
- const styles = StyleSheet.create({
65
- scrollView: { paddingHorizontal: padding, alignItems: 'flex-start', paddingTop: normalize(40) },
66
- item: {
67
- height: itemWidth,
68
- width: itemWidth,
69
- backgroundColor: 'darkblue',
70
- borderRadius: 10,
71
- elevation: 5,
72
- },
73
- });