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

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 (205) hide show
  1. package/dist/Common/ErrorBoundary.d.ts +15 -0
  2. package/dist/Common/ErrorBoundary.d.ts.map +1 -0
  3. package/dist/Common/ErrorBoundary.js +64 -0
  4. package/dist/Common/ErrorBoundary.js.map +1 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +8 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/Common/ErrorBoundary.d.ts +15 -0
  10. package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
  11. package/dist/src/Common/ErrorBoundary.js +64 -0
  12. package/dist/src/Common/ErrorBoundary.js.map +1 -0
  13. package/package.json +17 -5
  14. package/.gitattributes +0 -2
  15. package/index.d.ts +0 -66
  16. package/index.js +0 -66
  17. package/src/Alerts/AAlert.js +0 -137
  18. package/src/Alerts/AAlertIOS.js +0 -97
  19. package/src/Alerts/ABlink.js +0 -40
  20. package/src/Common/ErrorBoundary.tsx +0 -73
  21. package/src/Common/Icons.js +0 -49
  22. package/src/Common/NetworkServiceCall.js +0 -265
  23. package/src/CommonStyle/CommonTheme.js +0 -11
  24. package/src/CommonStyle/ComponentFunctions.js +0 -632
  25. package/src/CommonStyle/PopupStyle.js +0 -146
  26. package/src/CommonStyle/commonStyle.js +0 -93
  27. package/src/CommonStyle/componentStyle.js +0 -545
  28. package/src/CommonStyle/optionListStyles.js +0 -175
  29. package/src/Components/ByProductPage.js +0 -200
  30. package/src/Components/CDropDownListNew.js +0 -153
  31. package/src/Components/CSupplierList.js +0 -88
  32. package/src/Components/CVerificationCard.js +0 -2822
  33. package/src/Components/CustomButton.js +0 -67
  34. package/src/Components/CustomCard.js +0 -127
  35. package/src/Components/CustomTextInput.js +0 -47
  36. package/src/Components/EquipmentPage.js +0 -313
  37. package/src/Components/FilterInput.Copy.js +0 -723
  38. package/src/Components/FilterInput.js +0 -569
  39. package/src/Components/HSubHeading.js +0 -68
  40. package/src/Components/HeaderCard.js +0 -40
  41. package/src/Components/MoreOptionsScreen.js +0 -251
  42. package/src/Components/NonSwipableProductCard.js +0 -226
  43. package/src/Components/NonSwipableSupplierCard.js +0 -348
  44. package/src/Components/ProductCard.js +0 -1336
  45. package/src/Components/QualityProductCard.js +0 -1059
  46. package/src/Components/RateProductCard.js +0 -1452
  47. package/src/Components/RawMaterial.js +0 -261
  48. package/src/Components/SDropDownEdited.js +0 -549
  49. package/src/Components/SDropDownNew.js +0 -529
  50. package/src/Components/SHelpDescription.js +0 -147
  51. package/src/Components/STextInputNew.js +0 -510
  52. package/src/Components/SearchProductCard.js +0 -470
  53. package/src/Components/StageByProduct.js +0 -199
  54. package/src/Components/SupplierCard.js +0 -243
  55. package/src/Components/SupplierInvoiceCard.js +0 -405
  56. package/src/Components/SwipableSupplierCard.js +0 -136
  57. package/src/Components/TagTemplate.js +0 -74
  58. package/src/Components/WrappedComponent.js +0 -25
  59. package/src/Custom/CBooking.js +0 -944
  60. package/src/Custom/CBookingPostpone.js +0 -1822
  61. package/src/Custom/CCalendar.js +0 -560
  62. package/src/Custom/CCard.js +0 -880
  63. package/src/Custom/CDetailCard.js +0 -205
  64. package/src/Custom/CHelpImage.js +0 -52
  65. package/src/Custom/CReport.js +0 -569
  66. package/src/Custom/CScrollView.js +0 -73
  67. package/src/Custom/CSignature.js +0 -112
  68. package/src/Custom/CSliderMenu.js +0 -339
  69. package/src/Custom/CSupplierCard.js +0 -99
  70. package/src/Custom/CTemplateCard.js +0 -438
  71. package/src/Custom/CTokenAllocation.js +0 -1402
  72. package/src/Custom/CTokenListOverlay.js +0 -122
  73. package/src/Custom/CWardStatus.js +0 -444
  74. package/src/Custom/Charts/CBarChart.js +0 -218
  75. package/src/Custom/Charts/CDashBoardList.js +0 -133
  76. package/src/Custom/Charts/CDashBoardTable.js +0 -172
  77. package/src/Custom/Charts/CLineChart.js +0 -193
  78. package/src/Custom/Charts/CPieChart.js +0 -186
  79. package/src/Custom/Loader.js +0 -182
  80. package/src/Custom/OUserView.js +0 -1121
  81. package/src/Custom/PreviewDosage.js +0 -115
  82. package/src/Custom/SearchLoader.js +0 -32
  83. package/src/Custom/TableComponent/CActivityTable.js +0 -707
  84. package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
  85. package/src/Custom/TableComponent/CTable.js +0 -185
  86. package/src/Custom/TableComponent/CTextBody.js +0 -40
  87. package/src/Custom/TableComponent/CTextHeader.js +0 -17
  88. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
  89. package/src/Custom/TableComponent/SDropdownTable.js +0 -491
  90. package/src/Custom/TableComponent/TagTable.js +0 -1200
  91. package/src/CustomComponents/CAddColumn.js +0 -140
  92. package/src/CustomComponents/CAssessmentDelete.js +0 -307
  93. package/src/CustomComponents/CAwesomeButton.js +0 -83
  94. package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
  95. package/src/CustomComponents/CBackHandler.js +0 -273
  96. package/src/CustomComponents/CCalendar.js +0 -243
  97. package/src/CustomComponents/CCommentOverlay.js +0 -202
  98. package/src/CustomComponents/CComments.js +0 -162
  99. package/src/CustomComponents/CContainerView.js +0 -24
  100. package/src/CustomComponents/CCustomTextInput.js +0 -336
  101. package/src/CustomComponents/CDetailView.js +0 -40
  102. package/src/CustomComponents/CDropDownList.js +0 -153
  103. package/src/CustomComponents/CDropdownSelect.js +0 -555
  104. package/src/CustomComponents/CFooterView.js +0 -42
  105. package/src/CustomComponents/CImagePickerSave.js +0 -316
  106. package/src/CustomComponents/CModalOverlay.js +0 -91
  107. package/src/CustomComponents/CNetworkStatus.js +0 -327
  108. package/src/CustomComponents/CNotesInstructions.js +0 -1000
  109. package/src/CustomComponents/COverlay.js +0 -81
  110. package/src/CustomComponents/CRemarks.js +0 -176
  111. package/src/CustomComponents/CRowAdd.js +0 -143
  112. package/src/CustomComponents/CSummaryDropDown.js +0 -327
  113. package/src/CustomComponents/CText.js +0 -9
  114. package/src/CustomComponents/CVectorIcon.js +0 -34
  115. package/src/CustomComponents/HtmlContentViewer.js +0 -65
  116. package/src/CustomComponents/PdfContentViewer.js +0 -90
  117. package/src/CustomComponents/SDropDownDosage.js +0 -1087
  118. package/src/CustomComponents/SwipableProductCard.js +0 -246
  119. package/src/CustomComponents/SwipableProductImageCard.js +0 -254
  120. package/src/CustomComponents/WorkOrderDetails.js +0 -1216
  121. package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
  122. package/src/HOC/ConfirmOverlay.js +0 -192
  123. package/src/HOC/HHeading.js +0 -70
  124. package/src/HOC/HMoreButton.js +0 -88
  125. package/src/HOC/HNatureHeading.js +0 -402
  126. package/src/HOC/HOCIcons.js +0 -80
  127. package/src/HOC/HOverlayCentered.js +0 -140
  128. package/src/HOC/HShadowButton.js +0 -45
  129. package/src/HOC/HShadowCountButton.js +0 -82
  130. package/src/HOC/OptionOverlay.js +0 -48
  131. package/src/Json/Chart.json +0 -818
  132. package/src/Json/Consultation.json +0 -622
  133. package/src/Json/CreditBill.json +0 -490
  134. package/src/Json/Dropdown.json +0 -216
  135. package/src/Json/DropdownConsultation.json +0 -228
  136. package/src/Json/DynamicReports.json +0 -623
  137. package/src/Json/Footer.json +0 -79
  138. package/src/Media/AudioScreen.js +0 -342
  139. package/src/Media/BarcodeScan.js +0 -145
  140. package/src/Media/CAudioPlay.js +0 -228
  141. package/src/Media/CCaptureImageWithoutEdit.js +0 -330
  142. package/src/Media/CImageGallery.js +0 -289
  143. package/src/Media/CImageZoom.js +0 -82
  144. package/src/Media/CSingleImage.js +0 -391
  145. package/src/Media/CSketchCanvas.js +0 -76
  146. package/src/Media/CVideoPlay.js +0 -31
  147. package/src/Media/DocumentScreen.js +0 -362
  148. package/src/Media/DrawingScreen.js +0 -578
  149. package/src/Media/ImageScreen.js +0 -309
  150. package/src/Media/RecordAudio.js +0 -250
  151. package/src/Media/RecordVideo.js +0 -223
  152. package/src/Media/VideoScreen.js +0 -378
  153. package/src/Navigation/PageNavigation.js +0 -224
  154. package/src/Navigation/useFocusEffect.js +0 -2
  155. package/src/Navigation/useFocusEffect.native.js +0 -1
  156. package/src/Navigation/useFocusEffect.web.js +0 -1
  157. package/src/Navigation/useIsFocused.js +0 -1
  158. package/src/Navigation/useIsFocused.native.js +0 -1
  159. package/src/Navigation/useIsFocused.web.js +0 -1
  160. package/src/Navigation/useNavigation.js +0 -2
  161. package/src/Navigation/useNavigation.native.js +0 -1
  162. package/src/Navigation/useNavigation.web.js +0 -1
  163. package/src/Screens/CMedications.js +0 -528
  164. package/src/Screens/CWebViewGallery.js +0 -203
  165. package/src/Screens/ChartScan.js +0 -279
  166. package/src/Screens/ChartScreenNew.js +0 -1579
  167. package/src/Screens/Consultation.js +0 -1500
  168. package/src/Screens/Dashboard.js +0 -778
  169. package/src/Screens/FileExplorer.js +0 -288
  170. package/src/Screens/Footer.js +0 -340
  171. package/src/Screens/ForgotPassword.js +0 -288
  172. package/src/Screens/HeaderBlock.js +0 -353
  173. package/src/Screens/Login.js +0 -328
  174. package/src/Screens/Notification.js +0 -149
  175. package/src/Screens/OcrScreen.js +0 -20
  176. package/src/Screens/PdfPreview.js +0 -507
  177. package/src/Screens/RegistrationDetails.js +0 -467
  178. package/src/Screens/SearchScreen.js +0 -582
  179. package/src/Screens/Splash.js +0 -788
  180. package/src/Screens/SwipeLeftView.js +0 -1867
  181. package/src/StaticComponents/SAlphabet.js +0 -47
  182. package/src/StaticComponents/SCheckBox.js +0 -42
  183. package/src/StaticComponents/SDatePicker.js +0 -208
  184. package/src/StaticComponents/SDatePickerLabel.js +0 -253
  185. package/src/StaticComponents/SDatePickerNew.js +0 -258
  186. package/src/StaticComponents/SDateTimePickerNew.js +0 -381
  187. package/src/StaticComponents/SDropDownGenerate.js +0 -450
  188. package/src/StaticComponents/SDropDownHoc.js +0 -636
  189. package/src/StaticComponents/SDropDownIcon.js +0 -500
  190. package/src/StaticComponents/SMenuBox.js +0 -131
  191. package/src/StaticComponents/SOverlay.js +0 -177
  192. package/src/StaticComponents/SOverlayTextInput.js +0 -109
  193. package/src/StaticComponents/SSearch.js +0 -438
  194. package/src/StaticComponents/SSearchBar.js +0 -53
  195. package/src/StaticComponents/SSpeedDial.js +0 -303
  196. package/src/StaticComponents/STextInput.js +0 -289
  197. package/src/StaticComponents/STextInputProps.js +0 -36
  198. package/src/StaticComponents/STimePicker.js +0 -171
  199. package/src/StaticComponents/STimingDropDownNew.js +0 -1585
  200. package/src/StaticComponents/STimingSwitch.js +0 -34
  201. package/src/layout/CContainerView.js +0 -21
  202. package/src/layout/CDetailView.js +0 -81
  203. package/src/layout/HeaderBlock.js +0 -353
  204. package/src/layout/INVLoginLayout.js +0 -657
  205. package/src/layout/Loader.js +0 -176
@@ -1,2822 +0,0 @@
1
- import {
2
- View,
3
- Text,
4
- Dimensions,
5
- TouchableOpacity,
6
- ScrollView,
7
- } from 'react-native';
8
- import React, { useContext, useEffect, useState } from 'react';
9
- import {
10
- CButtonShadow,
11
- isNU,
12
- isNUL,
13
- isNUQ,
14
- } from '../CommonStyle/ComponentFunctions';
15
- import CTextHeader from '../Custom/TableComponent/CTextHeader';
16
- import { normalize } from '../CommonStyle/componentStyle';
17
- import { Global } from '../../../../../src/Common/Global';
18
- import { Icons } from '@jescon-technologies/react-native-ui-kit';;
19
- import moment from 'moment';
20
- import SCheckBox from '../StaticComponents/SCheckBox';
21
- import ContextBio from '../ContextAPI/ContextBio';
22
- import HHeading from '../HOC/HHeading';
23
- import STextInputNew from './STextInputNew';
24
- import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
25
- import CDropDownList from '../CustomComponents/CDropDownList';
26
- import SDatePicker from '../StaticComponents/SDatePicker';
27
- import { useNavigation } from '../Navigation/useNavigation';
28
-
29
- import { SwipeRow } from 'react-native-swipe-list-view';
30
- import HOCIcons from '../HOC/HOCIcons';
31
- import HSubHeading from './HSubHeading';
32
- import SOverlay from '../StaticComponents/SOverlay';
33
- import { APIURL } from '../../../../../src/Common/apiConstants';
34
-
35
- const CVerificationCard = ({ data, index, type, bgColor, sideColor, selectall, setSelectAll }) => {
36
- const { invoiceData, setInvoiceData } = useContext(ContextBio);
37
- const [leftAction, setLeftAction] = useState(false);
38
- const [secondAction, setSecondAction] = useState(false);
39
- const [rightAction, setRightAction] = useState(false);
40
-
41
- const navigation = useNavigation();
42
- useEffect(() => {
43
- // Apply selectAll only when it's TRUE
44
- if (selectall != undefined || selectall != null) {
45
- console.log('Applying select all:', selectall);
46
- console.log('Applying select all: true to index', index);
47
- handleDataChange(index, Number(selectall), 'verification');
48
- }
49
- // When selectall === false, we do NOT touch this box.
50
- // The user will handle it manually.
51
- }, [selectall]);
52
- // run only when selectall changes
53
-
54
- const handleChange = (val) => {
55
- handleDataChange(index, Number(val), 'verification');
56
-
57
- // If user unselects any one manually, disable global selectAll
58
- if (!val && typeof setSelectAll === 'function') {
59
- setSelectAll(false);
60
- }
61
- };
62
-
63
-
64
- /**
65
- * Toggles the expand state of a specific section in the invoice data.
66
- *
67
- * - Clones the verification data.
68
- * - Flips the 'expand' property for the given index.
69
- * - Updates the state with the modified data.
70
- *
71
- * @param {number} index - Index of the section to toggle.
72
- */
73
- function handleToggleExpand(index) {
74
- // Clone the data and update the specific index
75
- const updatedData = [...invoiceData.verification];
76
-
77
- // Toggle the 'expand' property of the specific section (index)
78
- updatedData[index] = {
79
- ...updatedData[index],
80
- expand: !updatedData[index].expand,
81
- };
82
-
83
- // Update the state with the modified data
84
- setInvoiceData(prevState => ({
85
- ...prevState,
86
- verification: updatedData,
87
- }));
88
- }
89
-
90
- /**
91
- * Updates a specific field in the invoice verification data.
92
- *
93
- * - Clones the current verification data.
94
- * - Modifies the specified field at the given index.
95
- * - Updates the state with the changed data and sets EditStatus to true.
96
- *
97
- * @param {number} sectionIndex - Index of the section to update.
98
- * @param {*} val - New value for the specified field.
99
- * @param {string} field - Field name to update.
100
- */
101
- // FIXME: Original working version without hrsustatus update
102
- // function handleDataChange(sectionIndex, val, field) {
103
- // // Clone the data and update the specific index
104
- // const updatedData = [...invoiceData.verification];
105
-
106
- // const statusField = type === 'Y' ? 'flag' : 'editStatus';
107
-
108
- // // Update the object at the specific index
109
- // updatedData[sectionIndex] = {
110
- // ...updatedData[sectionIndex],
111
- // [field]: val,
112
- // [statusField]: 1,
113
- // };
114
-
115
- // console.log('updateddata%%%%%%%%%%%%%%%%%%%',updatedData)
116
-
117
- // // Update the state with the modified data
118
- // setInvoiceData(prevState => ({
119
- // ...prevState,
120
- // verification: updatedData,
121
- // EditStatus: true,
122
- // }));
123
- // }
124
-
125
- // FIXME: Added hrsustatus update
126
- function handleDataChange(sectionIndex, val, field) {
127
- setInvoiceData(prevState => {
128
- const updatedData = [...prevState.verification];
129
-
130
- const statusField = type === 'Y' ? 'flag' : 'editStatus';
131
-
132
- let updatedSection = {
133
- ...updatedData[sectionIndex],
134
- [field]: val,
135
- [statusField]: 1,
136
- };
137
-
138
- // Handle 'B' type case
139
- if (type === 'B' && Array.isArray(updatedSection.details)) {
140
- updatedSection.details = updatedSection.details.map(detail =>
141
- detail.suoptiondetail === 22708
142
- ? { ...detail, hrsustatus: 3 }
143
- : detail
144
- );
145
- }
146
-
147
- updatedData[sectionIndex] = updatedSection;
148
-
149
- return {
150
- ...prevState,
151
- verification: updatedData,
152
- EditStatus: true,
153
- };
154
- });
155
- }
156
-
157
-
158
- function handleDetailDataChange(sectionIndex, detailIndex, val, field) {
159
- // Clone the data and update the specific section and detail
160
- const updatedData = [...invoiceData.verification];
161
-
162
- // Update the specific detail within the section
163
- updatedData[sectionIndex].details[detailIndex] = {
164
- ...updatedData[sectionIndex].details[detailIndex],
165
- [field]: val,
166
- };
167
-
168
- // Update the state with the modified data
169
- setInvoiceData(prevState => ({
170
- ...prevState,
171
- verification: updatedData,
172
- EditStatus: true,
173
- }));
174
- }
175
-
176
- function updateRequestNature(sectionIndex, val) {
177
- const updatedData = [...invoiceData.verification];
178
-
179
- // Update the requestnature and requestnaturename for the given section
180
- updatedData[sectionIndex] = {
181
- ...updatedData[sectionIndex],
182
- requestnature: val.datavalue,
183
- // requestnaturename: val.displayvalue,
184
- editStatus: 1,
185
- };
186
-
187
- // Set the updated data back to state
188
- setInvoiceData(prevState => ({
189
- ...prevState,
190
- verification: updatedData,
191
- EditStatus: true,
192
- }));
193
- }
194
-
195
- function updateQualityNature(sectionIndex, detailIndex, val) {
196
- const updatedData = [...invoiceData.verification];
197
-
198
- updatedData[sectionIndex].details[detailIndex] = {
199
- ...updatedData[sectionIndex].details[detailIndex],
200
- qualitynature: val.datavalue,
201
- editStatus: 1,
202
- };
203
-
204
- // Set the updated data back to state
205
- setInvoiceData(prevState => ({
206
- ...prevState,
207
- verification: updatedData,
208
- EditStatus: true,
209
- }));
210
- }
211
-
212
- function updateProductNature(sectionIndex, detailIndex, rawIndex, val) {
213
- const updatedData = [...invoiceData.verification];
214
-
215
- updatedData[sectionIndex].details[detailIndex].WorkorderProductDetail[
216
- rawIndex
217
- ] = {
218
- ...updatedData[sectionIndex].details[detailIndex].WorkorderProductDetail[
219
- rawIndex
220
- ],
221
- qualitynature: val.datavalue,
222
- editStatus: 1,
223
- };
224
-
225
- // Set the updated data back to state
226
- setInvoiceData(prevState => ({
227
- ...prevState,
228
- verification: updatedData,
229
- EditStatus: true,
230
- }));
231
- }
232
-
233
- function updateByProductNature(sectionIndex, detailIndex, rawIndex, val) {
234
- const updatedData = [...invoiceData.verification];
235
-
236
- updatedData[sectionIndex].details[detailIndex].WorkorderByProductDetail[
237
- rawIndex
238
- ] = {
239
- ...updatedData[sectionIndex].details[detailIndex]
240
- .WorkorderByProductDetail[rawIndex],
241
- // productnature: val.datavalue,
242
- qualitynature: val.datavalue,
243
- editStatus: 1,
244
- };
245
-
246
- // Set the updated data back to state
247
- setInvoiceData(prevState => ({
248
- ...prevState,
249
- verification: updatedData,
250
- EditStatus: true,
251
- }));
252
- }
253
-
254
- function updateProductReason(
255
- sectionIndex,
256
- detailIndex,
257
- rawIndex,
258
- val,
259
- field,
260
- ) {
261
- const updatedData = [...invoiceData.verification];
262
-
263
- updatedData[sectionIndex].details[detailIndex].WorkorderProductDetail[
264
- rawIndex
265
- ] = {
266
- ...updatedData[sectionIndex].details[detailIndex].WorkorderProductDetail[
267
- rawIndex
268
- ],
269
- [field]: val,
270
- editStatus: 1,
271
- };
272
-
273
- // Set the updated data back to state
274
- setInvoiceData(prevState => ({
275
- ...prevState,
276
- verification: updatedData,
277
- EditStatus: true,
278
- }));
279
- }
280
-
281
- function updateByProductReason(
282
- sectionIndex,
283
- detailIndex,
284
- rawIndex,
285
- val,
286
- field,
287
- ) {
288
- const updatedData = [...invoiceData.verification];
289
-
290
- updatedData[sectionIndex].details[detailIndex].WorkorderByProductDetail[
291
- rawIndex
292
- ] = {
293
- ...updatedData[sectionIndex].details[detailIndex]
294
- .WorkorderByProductDetail[rawIndex],
295
- [field]: val,
296
- editStatus: 1,
297
- };
298
-
299
- // Set the updated data back to state
300
- setInvoiceData(prevState => ({
301
- ...prevState,
302
- verification: updatedData,
303
- EditStatus: true,
304
- }));
305
- }
306
-
307
- function handleToggleExpandField(index, detailsIndex, field) {
308
- // Clone the data and update the specific section of verification
309
- const updatedData = [...invoiceData.verification];
310
-
311
- // Check if detailsData exists and update the 'expand' property of the specific details section (detailsIndex)
312
- const updatedDetailsData = [...updatedData[index].details];
313
-
314
- if (updatedDetailsData && updatedDetailsData[detailsIndex] !== undefined) {
315
- updatedDetailsData[detailsIndex] = {
316
- ...updatedDetailsData[detailsIndex],
317
- [field]: !updatedDetailsData[detailsIndex][field],
318
- };
319
- }
320
-
321
- // Set the updated detailsData back into the verification data
322
- updatedData[index] = {
323
- ...updatedData[index],
324
- details: updatedDetailsData,
325
- };
326
-
327
- // Update the state with the modified data
328
- setInvoiceData(prevState => ({
329
- ...prevState,
330
- verification: updatedData,
331
- }));
332
- }
333
-
334
- useEffect(() => {
335
- console.log('verification card', JSON.stringify(invoiceData.verification));
336
- }, [invoiceData]);
337
-
338
- const renderLeftActions = () => (
339
- <View
340
- style={{
341
- // flex: 1,
342
- // width: normalize(100),
343
- // backgroundColor: '#4caf50',
344
- justifyContent: 'flex-start',
345
- alignItems: 'flex-start',
346
- borderTopLeftRadius: 10,
347
- borderBottomLeftRadius: 10,
348
- flexDirection: 'row',
349
- paddingHorizontal: normalize(10),
350
- }}>
351
- {/* Marketing division */}
352
- {/* <TouchableOpacity
353
- style={{
354
- // // flex: 1,
355
- // width: normalize(100),
356
- // // backgroundColor: '#4caf50',
357
- // justifyContent: 'flex-start',
358
- // alignItems: 'center',
359
- // borderTopLeftRadius: 10,
360
- // borderBottomLeftRadius: 10,
361
- marginLeft: normalize(5)
362
- }}
363
- onPress={() => setLeftAction(prev => !prev)}
364
- >
365
- {!leftAction && <View style={{
366
- backgroundColor: '#f4f5ae',
367
- justifyContent: 'center',
368
- alignItems: 'center',
369
- ...CButtonShadow(),
370
- borderRadius: normalize(5),
371
- paddingHorizontal: normalize(3),
372
- paddingVertical: normalize(5),
373
- height: type == 'S' ? normalize(55) : normalize(38),
374
- width: type == 'S' ? normalize(55) : normalize(38)
375
- }}>
376
- <HOCIcons.MaterialCommunityIcons
377
- name={'office-building'}
378
- size={type == 'S' ? normalize(24) : normalize(20)}
379
- color={Global.AppTheme.primary_color}
380
- />
381
- <Text numberOfLines={1} style={{ fontSize: type == 'S' ? normalize(9) : normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>Division</Text>
382
- </View>
383
- }
384
- {leftAction &&
385
- <View style={{
386
- backgroundColor: '#f4f5ae',
387
- justifyContent: 'center',
388
- alignItems: 'center',
389
- ...CButtonShadow(),
390
- borderRadius: normalize(5),
391
- paddingHorizontal: normalize(3),
392
- paddingVertical: normalize(5),
393
- height: type == 'S' ? normalize(55) : normalize(38),
394
- width: type == 'S' ? normalize(55) : normalize(38)
395
- }}>
396
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.marketingdivisionname}</Text>
397
- </View>
398
- }
399
- </TouchableOpacity> */}
400
- {/* Info */}
401
- <TouchableOpacity
402
- style={{
403
- // // flex: 1,
404
- // width: normalize(100),
405
- // // backgroundColor: '#4caf50',
406
- // justifyContent: 'flex-start',
407
- // alignItems: 'center',
408
- // borderTopLeftRadius: 10,
409
- // borderBottomLeftRadius: 10,
410
- marginLeft: normalize(35),
411
- }}
412
- onPress={() => {
413
- navigation.navigate('CPurchaseDetails', {
414
- productCode: data?.insuproduct || 0,
415
- });
416
- // setLeftAction(prev => !prev)
417
- }}>
418
- {!leftAction && (
419
- <View
420
- style={{
421
- backgroundColor: '#f4f5ae',
422
- justifyContent: 'center',
423
- alignItems: 'center',
424
- ...CButtonShadow(),
425
- borderRadius: normalize(5),
426
- paddingHorizontal: normalize(3),
427
- paddingVertical: normalize(5),
428
- height: normalize(38),
429
- width: normalize(38),
430
- }}>
431
- <HOCIcons.Entypo
432
- name={'info-with-circle'}
433
- size={normalize(20)}
434
- color={Global.AppTheme.primary_color}
435
- />
436
- <Text
437
- numberOfLines={1}
438
- style={{
439
- fontSize: normalize(8),
440
- fontWeight: 'bold',
441
- color: Global.AppTheme.primary_color,
442
- }}>
443
- Info
444
- </Text>
445
- </View>
446
- )}
447
- {leftAction && (
448
- <View
449
- style={{
450
- backgroundColor: '#f4f5ae',
451
- justifyContent: 'center',
452
- alignItems: 'center',
453
- ...CButtonShadow(),
454
- borderRadius: normalize(5),
455
- paddingHorizontal: normalize(3),
456
- paddingVertical: normalize(5),
457
- height: normalize(38),
458
- width: normalize(38),
459
- }}>
460
- <Text
461
- style={{
462
- fontSize: normalize(9),
463
- fontWeight: 'bold',
464
- color: Global.AppTheme.primary_color,
465
- }}>
466
- {data?.marketingdivisionname}
467
- </Text>
468
- </View>
469
- )}
470
- </TouchableOpacity>
471
- {/* Report */}
472
- <TouchableOpacity
473
- style={{
474
- // // flex: 1,
475
- // width: normalize(100),
476
- // // backgroundColor: '#4caf50',
477
- // justifyContent: 'flex-start',
478
- // alignItems: 'center',
479
- // borderTopLeftRadius: 10,
480
- // borderBottomLeftRadius: 10,
481
- marginLeft: normalize(5),
482
- }}
483
- onPress={() => {
484
- console.log('summary');
485
- const pdfUrl = `${APIURL}fljrcommonbill/jrcommonbreport/AMAGDBI01.dbo.rnjrinsuproductdetail(${data?.insuproduct},${Global.userData.suuser})/0/ProductDetail`;
486
-
487
- console.log('FeedBack Detail Report Loading....');
488
- console.log('pdfurl', pdfUrl);
489
- navigation.navigate('PDFScreen', {
490
- pdfSource: pdfUrl,
491
- });
492
- }}>
493
- {!secondAction && (
494
- <View
495
- style={{
496
- backgroundColor: '#f5bfae',
497
- justifyContent: 'center',
498
- alignItems: 'center',
499
- ...CButtonShadow(),
500
- borderRadius: normalize(5),
501
- paddingHorizontal: normalize(3),
502
- paddingVertical: normalize(5),
503
- height: normalize(38),
504
- width: normalize(38),
505
- }}>
506
- <HOCIcons.MaterialCommunityIcons
507
- name={'file-table-outline'}
508
- size={normalize(20)}
509
- color={Global.AppTheme.primary_color}
510
- />
511
- <Text
512
- numberOfLines={1}
513
- style={{
514
- fontSize: normalize(8),
515
- fontWeight: 'bold',
516
- color: Global.AppTheme.primary_color,
517
- }}>
518
- Report
519
- </Text>
520
- </View>
521
- )}
522
- {secondAction && (
523
- <View
524
- style={{
525
- backgroundColor: '#f5bfae',
526
- justifyContent: 'center',
527
- alignItems: 'center',
528
- ...CButtonShadow(),
529
- borderRadius: normalize(5),
530
- paddingHorizontal: normalize(3),
531
- paddingVertical: normalize(5),
532
- height: normalize(38),
533
- width: normalize(38),
534
- }}>
535
- <Text
536
- style={{
537
- fontSize: normalize(9),
538
- fontWeight: 'bold',
539
- color: Global.AppTheme.primary_color,
540
- }}>
541
- {data?.taxname}
542
- </Text>
543
- </View>
544
- )}
545
- </TouchableOpacity>
546
- {/* Tax name */}
547
- {/* <TouchableOpacity
548
- style={{
549
- // // flex: 1,
550
- // width: normalize(100),
551
- // // backgroundColor: '#4caf50',
552
- // justifyContent: 'flex-start',
553
- // alignItems: 'center',
554
- // borderTopLeftRadius: 10,
555
- // borderBottomLeftRadius: 10,
556
- marginLeft: normalize(5)
557
- }}
558
- onPress={() => setSecondAction(prev => !prev)}
559
- >
560
- {!secondAction && <View style={{
561
- backgroundColor: '#f5bfae',
562
- justifyContent: 'center',
563
- alignItems: 'center',
564
- ...CButtonShadow(),
565
- borderRadius: normalize(5),
566
- paddingHorizontal: normalize(3),
567
- paddingVertical: normalize(5),
568
- height: type == 'S' ? normalize(55) : normalize(38),
569
- width: type == 'S' ? normalize(55) : normalize(38)
570
- }}>
571
- <HOCIcons.MaterialCommunityIcons
572
- name={'brightness-percent'}
573
- size={type == 'S' ? normalize(24) : normalize(20)}
574
- color={Global.AppTheme.primary_color}
575
- />
576
- <Text numberOfLines={1} style={{ fontSize: type == 'S' ? normalize(9) : normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>Tax Name</Text>
577
- </View>
578
- }
579
- {secondAction &&
580
- <View style={{
581
- backgroundColor: '#f5bfae',
582
- justifyContent: 'center',
583
- alignItems: 'center',
584
- ...CButtonShadow(),
585
- borderRadius: normalize(5),
586
- paddingHorizontal: normalize(3),
587
- paddingVertical: normalize(5),
588
- height: type == 'S' ? normalize(55) : normalize(38),
589
- width: type == 'S' ? normalize(55) : normalize(38)
590
- }}>
591
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.taxname}</Text>
592
- </View>
593
- }
594
- </TouchableOpacity> */}
595
- </View>
596
- );
597
-
598
- const renderRightActions = () => (
599
- <View
600
- style={{
601
- // flex: 1,
602
- // width: normalize(100),
603
- // backgroundColor: '#4caf50',
604
- justifyContent: 'flex-start',
605
- alignItems: 'flex-start',
606
- borderTopLeftRadius: 10,
607
- borderBottomLeftRadius: 10,
608
- flexDirection: 'row',
609
- paddingHorizontal: normalize(10),
610
- }}>
611
- {/* Report */}
612
- {data.flag === 'F' || data.flag === 'U' || data.flag === 'E' ? (
613
- <TouchableOpacity
614
- style={{
615
- // // flex: 1,
616
- // width: normalize(100),
617
- // // backgroundColor: '#4caf50',
618
- // justifyContent: 'flex-start',
619
- // alignItems: 'center',
620
- // borderTopLeftRadius: 10,
621
- // borderBottomLeftRadius: 10,
622
- marginLeft: normalize(5),
623
- }}
624
- onPress={() => {
625
- console.log('summary', JSON.stringify(data.flag));
626
- const link =
627
- data.flag === 'F'
628
- ? 'jremr/jrcommonreport/rnjrintrtrslip(' +
629
- data.intrtr +
630
- ',' +
631
- Global.userData.suuser +
632
- ')/0/TransferSlip'
633
- : data.flag === 'U'
634
- ? 'jremr/jrcommonreport/rnjrintrisslip(' +
635
- data.intris +
636
- ',' +
637
- Global.userData.suuser +
638
- ')/0/IssueSlip'
639
- : data.flag === 'E'
640
- ? 'jremr/jrcommonreport/rnjrintrisslip(' +
641
- data.intris +
642
- ',' +
643
- Global.userData.suuser +
644
- ')/0/IssueSlip'
645
- : null;
646
- navigation.navigate('PdfPreview', {
647
- headerblockstyle: { marginBottom: normalize(35) },
648
- link: APIURL + link,
649
- });
650
- }}>
651
- {!rightAction && (
652
- <View
653
- style={{
654
- backgroundColor: '#a9e7f0',
655
- justifyContent: 'center',
656
- alignItems: 'center',
657
- ...CButtonShadow(),
658
- borderRadius: normalize(5),
659
- paddingHorizontal: normalize(3),
660
- paddingVertical: normalize(5),
661
- height: type == 'S' ? normalize(55) : normalize(38),
662
- width: type == 'S' ? normalize(55) : normalize(38),
663
- }}>
664
- <HOCIcons.MaterialCommunityIcons
665
- name={'file-document-outline'}
666
- size={type == 'S' ? normalize(24) : normalize(20)}
667
- color={Global.AppTheme.primary_color}
668
- />
669
- <Text
670
- numberOfLines={1}
671
- style={{
672
- fontSize: type == 'S' ? normalize(9) : normalize(8),
673
- fontWeight: 'bold',
674
- color: Global.AppTheme.primary_color,
675
- }}>
676
- Report
677
- </Text>
678
- </View>
679
- )}
680
- {/* {rightAction &&
681
- <View style={{
682
- backgroundColor: '#aef5b4',
683
- justifyContent: 'center',
684
- alignItems: 'center',
685
- ...CButtonShadow(),
686
- borderRadius: normalize(5),
687
- paddingHorizontal: normalize(3),
688
- paddingVertical: normalize(5),
689
- height: normalize(38),
690
- width: normalize(38)
691
- }}>
692
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.marketingdivisionname}</Text>
693
- </View>
694
- } */}
695
- </TouchableOpacity>
696
- ) : null}
697
- {/* Supplier */}
698
- <TouchableOpacity
699
- style={{
700
- // // flex: 1,
701
- // width: normalize(100),
702
- // // backgroundColor: '#4caf50',
703
- // justifyContent: 'flex-start',
704
- // alignItems: 'center',
705
- // borderTopLeftRadius: 10,
706
- // borderBottomLeftRadius: 10,
707
- marginLeft: normalize(20),
708
- }}
709
- onPress={() => {
710
- navigation.navigate('CSupplierList', {
711
- productCode: data?.insuproduct,
712
- });
713
- }}>
714
- {!rightAction && (
715
- <View
716
- style={{
717
- backgroundColor: '#aef5b4',
718
- justifyContent: 'center',
719
- alignItems: 'center',
720
- ...CButtonShadow(),
721
- borderRadius: normalize(5),
722
- paddingHorizontal: normalize(3),
723
- paddingVertical: normalize(5),
724
- height: type == 'S' ? normalize(55) : normalize(38),
725
- width: type == 'S' ? normalize(55) : normalize(38),
726
- }}>
727
- <HOCIcons.MaterialCommunityIcons
728
- name={'human-dolly'}
729
- size={type == 'S' ? normalize(24) : normalize(20)}
730
- color={Global.AppTheme.primary_color}
731
- />
732
- <Text
733
- numberOfLines={1}
734
- style={{
735
- fontSize: type == 'S' ? normalize(9) : normalize(8),
736
- fontWeight: 'bold',
737
- color: Global.AppTheme.primary_color,
738
- }}>
739
- Supplier
740
- </Text>
741
- </View>
742
- )}
743
- {/* {rightAction &&
744
- <View style={{
745
- backgroundColor: '#aef5b4',
746
- justifyContent: 'center',
747
- alignItems: 'center',
748
- ...CButtonShadow(),
749
- borderRadius: normalize(5),
750
- paddingHorizontal: normalize(3),
751
- paddingVertical: normalize(5),
752
- height: normalize(38),
753
- width: normalize(38)
754
- }}>
755
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.marketingdivisionname}</Text>
756
- </View>
757
- } */}
758
- </TouchableOpacity>
759
- {/* Tax name */}
760
- {/* <TouchableOpacity
761
- style={{
762
- // // flex: 1,
763
- // width: normalize(100),
764
- // // backgroundColor: '#4caf50',
765
- // justifyContent: 'flex-start',
766
- // alignItems: 'center',
767
- // borderTopLeftRadius: 10,
768
- // borderBottomLeftRadius: 10,
769
- marginLeft: normalize(5)
770
- }}
771
- onPress={() => setSecondAction(prev => !prev)}
772
- >
773
- {!secondAction && <View style={{
774
- backgroundColor: '#f5bfae',
775
- justifyContent: 'center',
776
- alignItems: 'center',
777
- ...CButtonShadow(),
778
- borderRadius: normalize(5),
779
- paddingHorizontal: normalize(3),
780
- paddingVertical: normalize(5),
781
- height: normalize(38),
782
- width: normalize(38)
783
- }}>
784
- <HOCIcons.MaterialCommunityIcons
785
- name={'brightness-percent'}
786
- size={normalize(20)}
787
- color={Global.AppTheme.primary_color}
788
- />
789
- <Text numberOfLines={1} style={{ fontSize: normalize(8), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>Tax Name</Text>
790
- </View>
791
- }
792
- {secondAction &&
793
- <View style={{
794
- backgroundColor: '#f5bfae',
795
- justifyContent: 'center',
796
- alignItems: 'center',
797
- ...CButtonShadow(),
798
- borderRadius: normalize(5),
799
- paddingHorizontal: normalize(3),
800
- paddingVertical: normalize(5),
801
- height: normalize(38),
802
- width: normalize(38)
803
- }}>
804
- <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: Global.AppTheme.primary_color }}>{data?.taxname}</Text>
805
- </View>
806
- }
807
- </TouchableOpacity> */}
808
- </View>
809
- );
810
-
811
- return (
812
- <View>
813
- <SwipeRow
814
- disableLeftSwipe={false}
815
- disableRightSwipe={false}
816
- leftOpenValue={190}
817
- rightOpenValue={-190}
818
- swipeToClosePercent={10}
819
- swipeToOpenPercent={10}
820
- >
821
- {/* Hidden Row (Swipe Actions) */}
822
- <View style={{ borderWidth: 0, flexDirection: 'row', justifyContent: 'space-between', minHeight: normalize(70) }}>
823
- <View style={{ flex: 1, alignItems: 'flex-start' }}>
824
- {renderLeftActions && renderLeftActions()}
825
- </View>
826
- <View style={{ flex: 1, alignItems: 'flex-end' }}>
827
- {renderRightActions && renderRightActions()}
828
- </View>
829
- </View>
830
-
831
- {/* Top card */}
832
- <View
833
- style={{
834
- backgroundColor: bgColor ? bgColor : '#faeeeb',
835
- marginHorizontal: normalize(10),
836
- marginBottom: normalize(10),
837
- borderRadius: normalize(5),
838
- shadowColor: Global.AppTheme.primary_color,
839
- shadowOffset: { width: 4, height: 4 },
840
- shadowOpacity: 0.6,
841
- shadowRadius: 10,
842
- elevation: 8,
843
- ...CButtonShadow(),
844
- }}>
845
- <View style={{ flexDirection: 'row', minHeight: normalize(40) }}>
846
- <View
847
- style={{
848
- backgroundColor: isNUQ(data.color) ? data.color : '#870808',
849
- width: normalize(10),
850
- height: '100%',
851
- borderStartStartRadius: normalize(5),
852
- borderStartEndRadius: normalize(5),
853
- }} />
854
- <View style={{ padding: normalize(3) }}>
855
- {/* Product name */}
856
- {type != 'B' && isNUQ(data.productname) ? (
857
- <Text
858
- numberOfLines={1}
859
- style={{
860
- fontSize: type == 'S' ? normalize(11) : normalize(12),
861
- paddingLeft: normalize(5),
862
- fontWeight: 'bold',
863
- color: Global.AppTheme.primary_color,
864
- }}>
865
- {data.productname}{' '}
866
- <Text>
867
- {data?.classificationname && `(${data.classificationname})`}
868
- </Text>
869
- </Text>
870
- ) : null}
871
-
872
- {/* Product name, Quantity, Unit, Amount */}
873
- {type == 'B' && isNUQ(data.productname) ? (
874
- <Text
875
- numberOfLines={1}
876
- style={{
877
- fontSize: normalize(12),
878
- paddingLeft: normalize(5),
879
- fontWeight: 'bold',
880
- color: Global.AppTheme.primary_color,
881
- }}>
882
- {data.productname}{' '}
883
- <Text
884
- style={{
885
- fontSize: normalize(11),
886
- fontWeight: 'normal',
887
- }}>{` (Quantiy: ${data.quantity} Unit: ${data.unitname} Amount: ${data.amount})`}</Text>
888
- </Text>
889
- ) : null}
890
-
891
- {/* Activity name */}
892
- {(type == 'S' || type == 'B') && isNUQ(data.hrsuactivityname) ? (
893
- <Text
894
- numberOfLines={1}
895
- style={{
896
- fontSize: type == 'S' ? normalize(9) : normalize(10),
897
- paddingLeft: normalize(5),
898
- fontWeight: 'normal',
899
- color: Global.AppTheme.primary_color,
900
- }}>
901
- {data.hrsuactivityname}
902
- </Text>
903
- ) : null}
904
-
905
- {/* Procurement status detail name */}
906
- {type == 'S' && isNUQ(data.procurementstatusdetailname) ? (
907
- <Text
908
- numberOfLines={1}
909
- style={{
910
- fontSize: type == 'S' ? normalize(9) : normalize(10),
911
- paddingLeft: normalize(5),
912
- fontWeight: 'normal',
913
- color: Global.AppTheme.primary_color,
914
- }}>
915
- {data.procurementstatusdetailname}
916
- </Text>
917
- ) : null}
918
-
919
- {/* Supplier name */}
920
- {isNUQ(data.suppliername) ? (
921
- <Text
922
- numberOfLines={1}
923
- style={{
924
- fontSize: normalize(10),
925
- paddingLeft: normalize(5),
926
- fontWeight: 'bold',
927
- color: Global.AppTheme.primary_color,
928
- }}>
929
- {data.suppliername}
930
- </Text>
931
- ) : null}
932
-
933
- {/* Transfer */}
934
- {type == 'F' &&
935
- isNUQ(data.susectiondetailstorename) &&
936
- isNUQ(data.susectiondetailname) ? (
937
- <Text
938
- numberOfLines={1}
939
- style={{
940
- fontSize: normalize(9),
941
- paddingLeft: normalize(5),
942
- fontWeight: 'bold',
943
- color: Global.AppTheme.primary_color,
944
- }}>
945
- <Text
946
- style={{
947
- fontWeight: 'bold',
948
- fontSize: normalize(11),
949
- }}>
950
- FROM:{' '}
951
- </Text>
952
- {' ' + data.susectiondetailstorename + ' '}
953
- <Text
954
- style={{
955
- fontWeight: 'bold',
956
- fontSize: normalize(11),
957
- }}>
958
- TO:{' '}
959
- </Text>
960
- {' ' + data.susectiondetailname}
961
- </Text>
962
- ) : null}
963
-
964
- {/* Supplier name */}
965
- {type == 'Y' && isNUQ(data.sectiondetailname) ? (
966
- <Text
967
- numberOfLines={1}
968
- style={{
969
- fontSize: normalize(10),
970
- paddingLeft: normalize(5),
971
- fontWeight: 'bold',
972
- color: Global.AppTheme.primary_color,
973
- }}>
974
- {data.sectiondetailname}
975
- </Text>
976
- ) : null}
977
-
978
- {/* Section */}
979
- <View
980
- style={{
981
- flexDirection: 'row',
982
- width: Dimensions.get('screen').width * 0.95,
983
- justifyContent: 'space-between',
984
- }}>
985
- {/* Section */}
986
- <View style={{ maxWidth: '75%' }}>
987
- <View style={{ flexDirection: 'row' }}>
988
- {/* Indent no */}
989
- {isNUQ(
990
- type == 'R'
991
- ? data.requestno
992
- : type == 'P'
993
- ? data.procurementno
994
- : type == 'Q'
995
- ? data.quotationno
996
- : type == 'O'
997
- ? data.purchaseorderno
998
- : type == 'F'
999
- ? data.transferno
1000
- : type == 'W'
1001
- ? data.requestno
1002
- : type == 'V'
1003
- ? data.workorderno
1004
- : type == 'S'
1005
- ? data.workorderno
1006
- : type == 'B'
1007
- ? data.workorderno
1008
- : type == 'U'
1009
- ? data.issueno
1010
- : type == 'E'
1011
- ? data.issueno
1012
- : data.indentno,
1013
- ) ? (
1014
- <View
1015
- style={{
1016
- flexDirection: 'row',
1017
- alignItems: 'center',
1018
- paddingLeft: normalize(5),
1019
- }}>
1020
- <Icons.FontAwesome5
1021
- name={'file-invoice'}
1022
- size={normalize(11)}
1023
- color={'#094485'}
1024
- />
1025
- <Text
1026
- style={{
1027
- fontSize: 10,
1028
- color: '#555',
1029
- marginLeft: normalize(5),
1030
- }}>
1031
- {type == 'R'
1032
- ? data.requestno
1033
- : type == 'P'
1034
- ? data.procurementno
1035
- : type == 'Q'
1036
- ? data.quotationno
1037
- : type == 'O'
1038
- ? data.purchaseorderno
1039
- : type == 'F'
1040
- ? data.transferno
1041
- : type == 'W'
1042
- ? data.requestno
1043
- : type == 'V'
1044
- ? data.workorderno
1045
- : type == 'S'
1046
- ? data.workorderno
1047
- : type == 'B'
1048
- ? data.workorderno
1049
- : type == 'U'
1050
- ? data.issueno
1051
- : type == 'E'
1052
- ? data.issueno
1053
- : data.indentno}
1054
- </Text>
1055
- </View>
1056
- ) : null}
1057
-
1058
- {/* User */}
1059
- {isNUQ(data.username) ? (
1060
- <View
1061
- style={{
1062
- flexDirection: 'row',
1063
- alignItems: 'center',
1064
- paddingLeft: normalize(5),
1065
- }}>
1066
- <Icons.FontAwesome5
1067
- name={'user-alt'}
1068
- size={normalize(11)}
1069
- color={'#094485'}
1070
- />
1071
- <Text
1072
- numberOfLines={1}
1073
- style={{
1074
- fontSize: 10,
1075
- color: '#555',
1076
- marginLeft: normalize(5),
1077
- }}>
1078
- {data.username}
1079
- </Text>
1080
- </View>
1081
- ) : null}
1082
- </View>
1083
-
1084
- <View style={{ flexDirection: 'row' }}>
1085
- {/* Date */}
1086
- {isNUQ(data.entrydate) ? (
1087
- <View
1088
- style={{
1089
- flexDirection: 'row',
1090
- alignItems: 'center',
1091
- paddingLeft: normalize(5),
1092
- }}>
1093
- <Icons.FontAwesome5
1094
- name={'calendar-alt'}
1095
- size={normalize(11)}
1096
- color={'#094485'}
1097
- />
1098
- <Text
1099
- style={{
1100
- fontSize: 10,
1101
- color: '#555',
1102
- marginLeft: normalize(5),
1103
- }}>
1104
- {moment(data.entrydate).format('DD-MM-YYYY')}
1105
- </Text>
1106
- </View>
1107
- ) : null}
1108
-
1109
- {/* Location */}
1110
- {isNUQ(
1111
- type == 'I'
1112
- ? data.locationname
1113
- : type == 'W'
1114
- ? data.locationname
1115
- : type == 'V'
1116
- ? data.locationname
1117
- : type == 'S'
1118
- ? data.locationname
1119
- : type == 'B'
1120
- ? data.locationname
1121
- : data.susectiondetailname,
1122
- ) ? (
1123
- <View
1124
- style={{
1125
- flexDirection: 'row',
1126
- alignItems: 'center',
1127
- paddingLeft: normalize(5),
1128
- width: '60%',
1129
- // backgroundColor:'green'
1130
- }}>
1131
- <Icons.FontAwesome5
1132
- name={'map-marker-alt'}
1133
- size={normalize(11)}
1134
- color={'#094485'}
1135
- />
1136
- <Text
1137
- numberOfLines={1}
1138
- style={{
1139
- fontSize: 10,
1140
- color: '#555',
1141
- marginLeft: normalize(5),
1142
- }}>
1143
- {type == 'I'
1144
- ? data.locationname
1145
- : type == 'W'
1146
- ? data.locationname
1147
- : type == 'V'
1148
- ? data.locationname
1149
- : type == 'S'
1150
- ? data.locationname
1151
- : type == 'B'
1152
- ? data.locationname
1153
- : data.susectiondetailname}
1154
- </Text>
1155
- </View>
1156
- ) : null}
1157
- </View>
1158
- </View>
1159
- {/* Section */}
1160
-
1161
- {/* Check box and expand button bbbbbbbbbbbbbbbbbbbbddddddddddddddddd */}
1162
- <View
1163
- style={{
1164
- width: Dimensions.get('screen').width * 0.205,
1165
- justifyContent: 'flex-end',
1166
- alignItems: 'center',
1167
- // borderWidth: 1,
1168
- borderRadius: 5,
1169
- borderColor: 'lightgrey',
1170
- height: Dimensions.get('screen').height * 0.03,
1171
- // backgroundColor: "red",
1172
- flexDirection: 'row',
1173
- position: 'relative',
1174
- }}>
1175
- {/* Product info */}
1176
- {/* <TouchableOpacity onPress={() => {
1177
- navigation.navigate('CPurchaseDetails', {
1178
- supplierCode: supplierdata?.insusupplier,
1179
- productCode: invoiceData?.data[sectionIndex]?.productdetail[productIndex]?.insuproduct
1180
- });
1181
- }}>
1182
- <Icons.Entypo
1183
- name={'info-with-circle'}
1184
- size={normalize(19)}
1185
- color={'#094485'}
1186
- />
1187
- </TouchableOpacity> */}
1188
- {/* Expand button ddddddddddddddddddddddddd*/}
1189
-
1190
- <View
1191
- style={{
1192
- position: 'absolute',
1193
- right: 0,
1194
- bottom: 0,
1195
- flexDirection: 'row',
1196
- justifyContent: 'flex-end',
1197
- alignItems: 'flex-end',
1198
- paddingRight: normalize(10),
1199
- paddingBottom: normalize(10),
1200
- }}>
1201
- <TouchableOpacity
1202
- style={{
1203
- justifyContent: 'center',
1204
- alignItems: 'center',
1205
- padding: normalize(3),
1206
- }}
1207
- onPress={() => {
1208
- console.log('toggle');
1209
- handleToggleExpand(index);
1210
- }}>
1211
- <View
1212
- style={{
1213
- width: 25,
1214
- height: 25,
1215
- justifyContent: 'center',
1216
- alignItems: 'center',
1217
- }}>
1218
- <Icons.FontAwesome5
1219
- name={
1220
- data.expand == false
1221
- ? 'chevron-circle-up'
1222
- : 'chevron-circle-down'
1223
- }
1224
- size={normalize(18)}
1225
- color={'#094485'}
1226
- />
1227
- </View>
1228
- </TouchableOpacity>
1229
- {console.log('data.verification', data.verification)}
1230
- {/* Check box */}
1231
- <SCheckBox
1232
- data={{
1233
- value: data.verification ? true : false,
1234
- size: 20,
1235
- }}
1236
- callBack={val => {
1237
- console.log(val);
1238
- handleDataChange(index, Number(val), 'verification');
1239
- // handleChange(val)
1240
- }}
1241
- />
1242
- </View>
1243
- </View>
1244
- </View>
1245
- </View>
1246
- </View>
1247
- </View>
1248
- </SwipeRow>
1249
- {/* Expanded section */}
1250
- {data.expand == false ? (
1251
- <View
1252
- style={{
1253
- backgroundColor: '#fff',
1254
- marginHorizontal: normalize(10),
1255
- marginBottom: normalize(10),
1256
- borderRadius: normalize(5),
1257
- shadowColor: Global.AppTheme.primary_color,
1258
- shadowOffset: { width: 4, height: 4 },
1259
- shadowOpacity: 0.6,
1260
- shadowRadius: 10,
1261
- elevation: 8,
1262
- }}>
1263
- {data.details != undefined
1264
- ? data.details.map((detailsdata, i) => (
1265
- <View
1266
- key={i}
1267
- style={{
1268
- padding: normalize(5),
1269
- }}>
1270
- {/* Procurementstatus */}
1271
- {type != 'S' &&
1272
- type != 'B' &&
1273
- isNUQ(detailsdata.procurementstatusdetailname) ? (
1274
- <View
1275
- style={{
1276
- flexDirection: 'row',
1277
- alignItems: 'center',
1278
- justifyContent: 'flex-start',
1279
- }}>
1280
- <HSubHeading
1281
- styles={{
1282
- iconname: 'file-invoice',
1283
- bgcolor: '#f2efef',
1284
- iconsize: 11,
1285
- iconcolor: Global.AppTheme.primary_color,
1286
- displaytext: detailsdata.procurementstatusdetailname,
1287
- textsize: 10,
1288
- textcolor: Global.AppTheme.primary_color,
1289
- }}
1290
- callBack={val =>
1291
- val == undefined ? null : console.log(val)
1292
- } />
1293
- {/* Emergency status */}
1294
- <View
1295
- style={{
1296
- marginLeft: normalize(5),
1297
- }}>
1298
- <HOCIcons.Octicons
1299
- name={'alert'}
1300
- size={normalize(14)}
1301
- color={
1302
- detailsdata?.emergencystatus == 1
1303
- ? '#ce2029'
1304
- : '#088a06'
1305
- }
1306
- />
1307
- </View>
1308
- {/* Remarks */}
1309
- <View
1310
- style={{
1311
- marginLeft: normalize(5),
1312
- }}>
1313
- <SOverlay
1314
- size={14}
1315
- iconcolor={'#094485'}
1316
- value={''}
1317
- onChangeText={val => {
1318
- type != 'B'
1319
- ? handleDataChange(index, val, 'reason')
1320
- : console.log('reason', val);
1321
- }}
1322
- />
1323
- </View>
1324
- </View>
1325
- ) : null}
1326
-
1327
- {/* Status,Activity,Product */}
1328
- {(type == 'S' || type == 'B') &&
1329
- isNUQ(detailsdata.hrsustatusname) &&
1330
- isNUQ(detailsdata.hrsuactivitydetailname) &&
1331
- isNUQ(detailsdata.stageproductname) ? (
1332
- <View
1333
- style={{
1334
- flexDirection: 'row',
1335
- alignItems: 'center',
1336
- justifyContent: 'flex-start',
1337
- }}>
1338
- <HSubHeading
1339
- styles={{
1340
- iconname: 'file-invoice',
1341
- bgcolor: '#f2efef',
1342
- iconsize: 11,
1343
- iconcolor: Global.AppTheme.primary_color,
1344
- displaytext: `${detailsdata.hrsustatusname} | ${detailsdata.hrsuactivitydetailname} | ${detailsdata.stageproductname}`,
1345
- textsize: 10,
1346
- textcolor: Global.AppTheme.primary_color,
1347
- }}
1348
- callBack={val =>
1349
- val == undefined ? null : console.log(val)
1350
- } />
1351
- {/* Remarks */}
1352
- {type == 'S' ||
1353
- (type == 'B' && (
1354
- <View
1355
- style={{
1356
- marginLeft: normalize(5),
1357
- }}>
1358
- <SOverlay
1359
- size={14}
1360
- iconcolor={'#094485'}
1361
- value={''}
1362
- onChangeText={val => {
1363
- type != 'B'
1364
- ? handleDataChange(index, val, 'reason')
1365
- : handleDataChange(index, val, `reason${i}`);
1366
- }}
1367
- />
1368
- </View>
1369
- ))}
1370
- </View>
1371
- ) : null}
1372
-
1373
- {type == 'B' && detailsdata.suoptiondetail == 22708 ? (
1374
- <View
1375
- style={{
1376
- marginHorizontal: normalize(10),
1377
- position: 'absolute',
1378
- right: normalize(0),
1379
- top: normalize(26),
1380
- }}>
1381
- <Text
1382
- style={{
1383
- fontSize: normalize(8),
1384
- fontWeight: 'bold',
1385
- color: 'green',
1386
- }}>
1387
- COMPLETED
1388
- </Text>
1389
- </View>
1390
- ) : null}
1391
-
1392
- {type == 'X' ? (
1393
- <View
1394
- style={{
1395
- flexDirection: 'row',
1396
- paddingVertical: normalize(2),
1397
- alignItems: 'center',
1398
- }}>
1399
- {/* Dropdown */}
1400
- <View
1401
- style={{
1402
- alignItems: 'center',
1403
- width: 115,
1404
- flexDirection: 'row',
1405
- justifyContent: 'space-between',
1406
- marginRight: normalize(10),
1407
- }}>
1408
- {/* Make Text clickable to open the dropdown */}
1409
- <Menu>
1410
- <MenuTrigger
1411
- customStyles={{
1412
- triggerWrapper: {
1413
- borderWidth: 0,
1414
- // width: normalize(25),
1415
- justifyContent: 'center',
1416
- alignItems: 'center',
1417
- },
1418
- }}>
1419
- {/* Text that when clicked opens the dropdown */}
1420
- <View
1421
- style={{
1422
- justifyContent: 'space-between',
1423
- alignItems: 'center',
1424
- flexDirection: 'row',
1425
- borderWidth: 1,
1426
- borderColor: '#gray',
1427
- borderRadius: 5,
1428
- paddingHorizontal: normalize(10),
1429
- paddingVertical: normalize(5),
1430
- marginBottom: normalize(5),
1431
- minWidth: normalize(100),
1432
- }}>
1433
- <Text
1434
- style={{
1435
- color: 'gray',
1436
- fontSize: normalize(13),
1437
- fontWeight: 'bold',
1438
- marginRight: normalize(10),
1439
- }}>
1440
- {data.requestnature == 'D'
1441
- ? 'DIRECT'
1442
- : 'REORDER'}
1443
- </Text>
1444
- <Icons.FontAwesome5
1445
- name="chevron-down"
1446
- size={13}
1447
- color="gray"
1448
- />
1449
- </View>
1450
- </MenuTrigger>
1451
- <MenuOptions>
1452
- <CDropDownList
1453
- dropdownarray={data.dropdowndata}
1454
- callback={val => {
1455
- updateRequestNature(index, val);
1456
- }}
1457
- />
1458
- </MenuOptions>
1459
- </Menu>
1460
- </View>
1461
- {/* Date */}
1462
- <View
1463
- style={{
1464
- marginLeft: normalize(10),
1465
- alignItems: 'center',
1466
- }}>
1467
- <SDatePicker
1468
- table={true}
1469
- data={{
1470
- itemwidth: Dimensions.get('screen').width * 0.38,
1471
- displaytext: '',
1472
- justifyContent: 'flex-start',
1473
- elevation: 3,
1474
- borderWidth: 1,
1475
- //backgroundColor: 'rgba(161, 188, 196,0.2)',
1476
- height: Dimensions.get('screen').height * 0.035,
1477
- iconcolor: '#094485',
1478
- padding: normalize(10),
1479
- }}
1480
- fontWeight={'bold'}
1481
- passingDate={
1482
- detailsdata.deliverabledate != undefined &&
1483
- detailsdata.deliverabledate != null &&
1484
- detailsdata.deliverabledate != ''
1485
- ? detailsdata.deliverabledate
1486
- : new Date()
1487
- }
1488
- onChangeData={val => {
1489
- console.log(
1490
- 'dateeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
1491
- val,
1492
- );
1493
- handleDetailDataChange(
1494
- index,
1495
- i,
1496
- val,
1497
- 'deliverabledate',
1498
- );
1499
- }}
1500
- />
1501
- </View>
1502
- </View>
1503
- ) : null}
1504
-
1505
- {
1506
- // Dropdown
1507
- type == 'B' ? (
1508
- <View
1509
- style={{
1510
- alignItems: 'center',
1511
- width: 115,
1512
- flexDirection: 'row',
1513
- justifyContent: 'space-between',
1514
- marginRight: normalize(10),
1515
- marginTop: normalize(3),
1516
- }}>
1517
- {/* Make Text clickable to open the dropdown */}
1518
- <Menu>
1519
- <MenuTrigger
1520
- customStyles={{
1521
- triggerWrapper: {
1522
- borderWidth: 0,
1523
- // width: normalize(25),
1524
- justifyContent: 'center',
1525
- alignItems: 'center',
1526
- },
1527
- }}>
1528
- {/* Text that when clicked opens the dropdown */}
1529
- <View
1530
- style={{
1531
- justifyContent: 'space-between',
1532
- alignItems: 'center',
1533
- flexDirection: 'row',
1534
- borderWidth: 1,
1535
- borderColor: '#gray',
1536
- borderRadius: 5,
1537
- paddingHorizontal: normalize(10),
1538
- paddingVertical: normalize(5),
1539
- marginBottom: normalize(5),
1540
- minWidth: normalize(100),
1541
- }}>
1542
- <Text
1543
- style={{
1544
- color: 'gray',
1545
- fontSize: normalize(13),
1546
- fontWeight: 'bold',
1547
- marginRight: normalize(10),
1548
- }}>
1549
- {detailsdata.qualitynature == 'G'
1550
- ? 'GOOD'
1551
- : detailsdata.qualitynature == 'B'
1552
- ? 'BAD'
1553
- : 'NOT BAD'}
1554
- </Text>
1555
- <Icons.FontAwesome5
1556
- name="chevron-down"
1557
- size={13}
1558
- color="gray"
1559
- />
1560
- </View>
1561
- </MenuTrigger>
1562
- <MenuOptions>
1563
- <CDropDownList
1564
- dropdownarray={detailsdata.dropdown}
1565
- callback={val => {
1566
- updateQualityNature(index, i, val);
1567
- }}
1568
- />
1569
- </MenuOptions>
1570
- </Menu>
1571
- </View>
1572
- ) : null
1573
- }
1574
-
1575
- <ScrollView horizontal={true}>
1576
- <View style={{ flexDirection: 'row' }}>
1577
- {/* Quantity */}
1578
- {isNU(detailsdata.quantity) ? (
1579
- <View>
1580
- <CTextHeader
1581
- text={'Quantity'}
1582
- widthArr={Dimensions.get('screen').width * 0.2}
1583
- bgColor={'rgba(184, 184, 191,0.3)'}
1584
- color={'#094485'}
1585
- borderColor={'#f5f5f5'}
1586
- marginHorizontal={normalize(2)}
1587
- borderRadius={5}
1588
- elevation={0}
1589
- fontSize={normalize(10)}
1590
- />
1591
- <View
1592
- style={{
1593
- width: Dimensions.get('screen').width * 0.2,
1594
- justifyContent: 'center',
1595
- alignItems: 'center',
1596
- borderWidth: 1,
1597
- borderRadius: 5,
1598
- borderColor: 'lightgrey',
1599
- height: Dimensions.get('screen').height * 0.03,
1600
- }}>
1601
- <Text
1602
- numberOfLines={1}
1603
- style={{ fontSize: normalize(11) }}>
1604
- {detailsdata.quantity}
1605
- </Text>
1606
- </View>
1607
- </View>
1608
- ) : null}
1609
-
1610
- {/* Changed Quantity */}
1611
- {type == 'Y' && isNU(detailsdata.adjustqty) ? (
1612
- <View>
1613
- <CTextHeader
1614
- text={'Quantity'}
1615
- widthArr={Dimensions.get('screen').width * 0.2}
1616
- bgColor={'rgba(184, 184, 191,0.3)'}
1617
- color={'#094485'}
1618
- borderColor={'#f5f5f5'}
1619
- marginHorizontal={normalize(2)}
1620
- borderRadius={5}
1621
- elevation={0}
1622
- fontSize={normalize(10)}
1623
- />
1624
- <View
1625
- style={{
1626
- width: Dimensions.get('screen').width * 0.2,
1627
- justifyContent: 'center',
1628
- alignItems: 'center',
1629
- borderWidth: 1,
1630
- borderRadius: 5,
1631
- borderColor: 'lightgrey',
1632
- height: Dimensions.get('screen').height * 0.03,
1633
- }}>
1634
- <Text
1635
- numberOfLines={1}
1636
- style={{ fontSize: normalize(11) }}>
1637
- {detailsdata.adjustqty}
1638
- </Text>
1639
- </View>
1640
- </View>
1641
- ) : null}
1642
-
1643
- {/* Changed Selling Price */}
1644
- {type == 'Y' && isNU(detailsdata.sellingprice) ? (
1645
- <View>
1646
- <CTextHeader
1647
- text={'Selling Price'}
1648
- widthArr={Dimensions.get('screen').width * 0.2}
1649
- bgColor={'rgba(184, 184, 191,0.3)'}
1650
- color={'#094485'}
1651
- borderColor={'#f5f5f5'}
1652
- marginHorizontal={normalize(2)}
1653
- borderRadius={5}
1654
- elevation={0}
1655
- fontSize={normalize(10)}
1656
- />
1657
- <View
1658
- style={{
1659
- width: Dimensions.get('screen').width * 0.2,
1660
- justifyContent: 'center',
1661
- alignItems: 'center',
1662
- borderWidth: 1,
1663
- borderRadius: 5,
1664
- borderColor: 'lightgrey',
1665
- height: Dimensions.get('screen').height * 0.03,
1666
- }}>
1667
- <Text
1668
- numberOfLines={1}
1669
- style={{ fontSize: normalize(11) }}>
1670
- {detailsdata.sellingprice}
1671
- </Text>
1672
- </View>
1673
- </View>
1674
- ) : null}
1675
-
1676
- {/* Changed MRP */}
1677
- {type == 'Y' && isNU(detailsdata.mrp) ? (
1678
- <View>
1679
- <CTextHeader
1680
- text={'MRP'}
1681
- widthArr={Dimensions.get('screen').width * 0.2}
1682
- bgColor={'rgba(184, 184, 191,0.3)'}
1683
- color={'#094485'}
1684
- borderColor={'#f5f5f5'}
1685
- marginHorizontal={normalize(2)}
1686
- borderRadius={5}
1687
- elevation={0}
1688
- fontSize={normalize(10)}
1689
- />
1690
- <View
1691
- style={{
1692
- width: Dimensions.get('screen').width * 0.2,
1693
- justifyContent: 'center',
1694
- alignItems: 'center',
1695
- borderWidth: 1,
1696
- borderRadius: 5,
1697
- borderColor: 'lightgrey',
1698
- height: Dimensions.get('screen').height * 0.03,
1699
- }}>
1700
- <Text
1701
- numberOfLines={1}
1702
- style={{ fontSize: normalize(11) }}>
1703
- {detailsdata.mrp}
1704
- </Text>
1705
- </View>
1706
- </View>
1707
- ) : null}
1708
-
1709
- {/* Current stock */}
1710
- {isNU(detailsdata.currentstock) ? (
1711
- <View>
1712
- <CTextHeader
1713
- text={'Current Stock'}
1714
- widthArr={Dimensions.get('screen').width * 0.2}
1715
- bgColor={'rgba(184, 184, 191,0.3)'}
1716
- color={'#094485'}
1717
- borderColor={'#f5f5f5'}
1718
- marginHorizontal={normalize(2)}
1719
- borderRadius={5}
1720
- elevation={0}
1721
- fontSize={normalize(10)}
1722
- />
1723
- <View
1724
- style={{
1725
- width: Dimensions.get('screen').width * 0.2,
1726
- justifyContent: 'center',
1727
- alignItems: 'center',
1728
- borderWidth: 1,
1729
- borderRadius: 5,
1730
- borderColor: 'lightgrey',
1731
- height: Dimensions.get('screen').height * 0.03,
1732
- }}>
1733
- <Text
1734
- numberOfLines={1}
1735
- style={{ fontSize: normalize(11) }}>
1736
- {detailsdata.currentstock}
1737
- </Text>
1738
- </View>
1739
- </View>
1740
- ) : null}
1741
-
1742
- {/* Emergency statys */}
1743
- {/* {isNU(detailsdata.emergencystatus) ? (
1744
- <View>
1745
- <CTextHeader
1746
- text={'Emargency Status'}
1747
- widthArr={Dimensions.get('screen').width * 0.25}
1748
- bgColor={'rgba(184, 184, 191,0.3)'}
1749
- color={'#094485'}
1750
- borderColor={'#f5f5f5'}
1751
- marginHorizontal={normalize(2)}
1752
- borderRadius={5}
1753
- elevation={0}
1754
- fontSize={normalize(10)}
1755
- />
1756
- <View
1757
- style={{
1758
- width: Dimensions.get('screen').width * 0.25,
1759
- justifyContent: 'center',
1760
- alignItems: 'center',
1761
- borderWidth: 1,
1762
- borderRadius: 5,
1763
- borderColor: 'lightgrey',
1764
- height: Dimensions.get('screen').height * 0.03,
1765
- }}>
1766
- {detailsdata.emergencystatus == 1 ? (
1767
- <Icons.MaterialCommunityIcons
1768
- name={'check'}
1769
- size={normalize(16)}
1770
- color={'#094485'}
1771
- />
1772
- ) : (
1773
- <Icons.MaterialCommunityIcons
1774
- name={'window-close'}
1775
- size={normalize(16)}
1776
- color={'#094485'}
1777
- />
1778
- )}
1779
- </View>
1780
- </View>
1781
- ) : null} */}
1782
-
1783
- {/* Brand name */}
1784
- {isNU(detailsdata.brandname) ? (
1785
- <View>
1786
- <CTextHeader
1787
- text={'Brand Name'}
1788
- widthArr={Dimensions.get('screen').width * 0.21}
1789
- bgColor={'rgba(184, 184, 191,0.3)'}
1790
- color={'#094485'}
1791
- borderColor={'#f5f5f5'}
1792
- marginHorizontal={normalize(2)}
1793
- borderRadius={5}
1794
- elevation={0}
1795
- fontSize={normalize(10)}
1796
- />
1797
- <View
1798
- style={{
1799
- width: Dimensions.get('screen').width * 0.21,
1800
- justifyContent: 'center',
1801
- alignItems: 'center',
1802
- borderWidth: 1,
1803
- borderRadius: 5,
1804
- borderColor: 'lightgrey',
1805
- height: Dimensions.get('screen').height * 0.03,
1806
- }}>
1807
- <Text
1808
- numberOfLines={1}
1809
- style={{
1810
- fontSize: normalize(11),
1811
- }}>
1812
- {detailsdata.brandname}
1813
- </Text>
1814
- </View>
1815
- </View>
1816
- ) : null}
1817
-
1818
- {/* Unit name */}
1819
- {isNUQ(detailsdata.unitname) ? (
1820
- <View>
1821
- <CTextHeader
1822
- text={'Unit Name'}
1823
- widthArr={Dimensions.get('screen').width * 0.205}
1824
- bgColor={'rgba(184, 184, 191,0.3)'}
1825
- color={'#094485'}
1826
- borderColor={'#f5f5f5'}
1827
- marginHorizontal={normalize(2)}
1828
- borderRadius={5}
1829
- elevation={0}
1830
- fontSize={normalize(10)}
1831
- />
1832
- <View
1833
- style={{
1834
- width: Dimensions.get('screen').width * 0.205,
1835
- justifyContent: 'center',
1836
- alignItems: 'center',
1837
- borderWidth: 1,
1838
- borderRadius: 5,
1839
- borderColor: 'lightgrey',
1840
- height: Dimensions.get('screen').height * 0.03,
1841
- }}>
1842
- <Text
1843
- numberOfLines={1}
1844
- style={{ fontSize: normalize(11) }}>
1845
- {detailsdata.unitname}
1846
- </Text>
1847
- </View>
1848
- </View>
1849
- ) : null}
1850
-
1851
- {/* Packing name */}
1852
- {type != 'X' && isNUQ(detailsdata.packingname) ? (
1853
- <View>
1854
- <CTextHeader
1855
- text={'Packing Name'}
1856
- widthArr={Dimensions.get('screen').width * 0.205}
1857
- bgColor={'rgba(184, 184, 191,0.3)'}
1858
- color={'#094485'}
1859
- borderColor={'#f5f5f5'}
1860
- marginHorizontal={normalize(2)}
1861
- borderRadius={5}
1862
- elevation={0}
1863
- fontSize={normalize(10)}
1864
- />
1865
- <View
1866
- style={{
1867
- width: Dimensions.get('screen').width * 0.205,
1868
- justifyContent: 'center',
1869
- alignItems: 'center',
1870
- borderWidth: 1,
1871
- borderRadius: 5,
1872
- borderColor: 'lightgrey',
1873
- height: Dimensions.get('screen').height * 0.03,
1874
- }}>
1875
- <Text
1876
- numberOfLines={1}
1877
- style={{ fontSize: normalize(11) }}>
1878
- {detailsdata.packingname}
1879
- </Text>
1880
- </View>
1881
- </View>
1882
- ) : null}
1883
-
1884
- {/* Packing name */}
1885
- {type == 'X' && isNUQ(detailsdata.packingqty) ? (
1886
- <View>
1887
- <CTextHeader
1888
- text={'Packing Quantity'}
1889
- widthArr={Dimensions.get('screen').width * 0.205}
1890
- bgColor={'rgba(184, 184, 191,0.3)'}
1891
- color={'#094485'}
1892
- borderColor={'#f5f5f5'}
1893
- marginHorizontal={normalize(2)}
1894
- borderRadius={5}
1895
- elevation={0}
1896
- fontSize={normalize(10)}
1897
- />
1898
- <View
1899
- style={{
1900
- width: Dimensions.get('screen').width * 0.205,
1901
- justifyContent: 'center',
1902
- alignItems: 'center',
1903
- borderWidth: 1,
1904
- borderRadius: 5,
1905
- borderColor: 'lightgrey',
1906
- height: Dimensions.get('screen').height * 0.03,
1907
- }}>
1908
- <Text
1909
- numberOfLines={1}
1910
- style={{ fontSize: normalize(11) }}>
1911
- {detailsdata.packingqty}
1912
- </Text>
1913
- </View>
1914
- </View>
1915
- ) : null}
1916
-
1917
- {/* Packing no */}
1918
- {isNUQ(detailsdata.packingno) && data.flag != 'F' ? (
1919
- <View>
1920
- <CTextHeader
1921
- text={'Packing No'}
1922
- widthArr={Dimensions.get('screen').width * 0.205}
1923
- bgColor={'rgba(184, 184, 191,0.3)'}
1924
- color={'#094485'}
1925
- borderColor={'#f5f5f5'}
1926
- marginHorizontal={normalize(2)}
1927
- borderRadius={5}
1928
- elevation={0}
1929
- fontSize={normalize(10)}
1930
- />
1931
- <View
1932
- style={{
1933
- width: Dimensions.get('screen').width * 0.205,
1934
- justifyContent: 'center',
1935
- alignItems: 'center',
1936
- borderWidth: 1,
1937
- borderRadius: 5,
1938
- borderColor: 'lightgrey',
1939
- height: Dimensions.get('screen').height * 0.03,
1940
- }}>
1941
- <Text
1942
- numberOfLines={1}
1943
- style={{ fontSize: normalize(11) }}>
1944
- {detailsdata.packingno}
1945
- </Text>
1946
- </View>
1947
- </View>
1948
- ) : null}
1949
-
1950
- {/* Rate */}
1951
- {isNUQ(detailsdata.rate) ? (
1952
- <View>
1953
- <CTextHeader
1954
- text={'Rate'}
1955
- widthArr={Dimensions.get('screen').width * 0.205}
1956
- bgColor={'rgba(184, 184, 191,0.3)'}
1957
- color={'#094485'}
1958
- borderColor={'#f5f5f5'}
1959
- marginHorizontal={normalize(2)}
1960
- borderRadius={5}
1961
- elevation={0}
1962
- fontSize={normalize(10)}
1963
- />
1964
- <View
1965
- style={{
1966
- width: Dimensions.get('screen').width * 0.205,
1967
- justifyContent: 'center',
1968
- alignItems: 'center',
1969
- borderWidth: 1,
1970
- borderRadius: 5,
1971
- borderColor: 'lightgrey',
1972
- height: Dimensions.get('screen').height * 0.03,
1973
- }}>
1974
- <Text
1975
- numberOfLines={1}
1976
- style={{ fontSize: normalize(11) }}>
1977
- {detailsdata.rate}
1978
- </Text>
1979
- </View>
1980
- </View>
1981
- ) : null}
1982
-
1983
- {/* Amount */}
1984
- {isNUQ(detailsdata.amount) ? (
1985
- <View>
1986
- <CTextHeader
1987
- text={'Amount'}
1988
- widthArr={Dimensions.get('screen').width * 0.205}
1989
- bgColor={'rgba(184, 184, 191,0.3)'}
1990
- color={'#094485'}
1991
- borderColor={'#f5f5f5'}
1992
- marginHorizontal={normalize(2)}
1993
- borderRadius={5}
1994
- elevation={0}
1995
- fontSize={normalize(10)}
1996
- />
1997
- <View
1998
- style={{
1999
- width: Dimensions.get('screen').width * 0.205,
2000
- justifyContent: 'center',
2001
- alignItems: 'center',
2002
- borderWidth: 1,
2003
- borderRadius: 5,
2004
- borderColor: 'lightgrey',
2005
- height: Dimensions.get('screen').height * 0.03,
2006
- }}>
2007
- <Text
2008
- numberOfLines={1}
2009
- style={{ fontSize: normalize(11) }}>
2010
- {detailsdata.amount}
2011
- </Text>
2012
- </View>
2013
- </View>
2014
- ) : null}
2015
- </View>
2016
- </ScrollView>
2017
-
2018
- {/* Requirement */}
2019
- {isNUQ(detailsdata.requirement) ? (
2020
- <View>
2021
- <Text
2022
- style={{
2023
- textDecorationLine: 'underline',
2024
- fontSize: normalize(10),
2025
- fontStyle: 'italic',
2026
- color: '#555',
2027
- }}>
2028
- Requirement
2029
- </Text>
2030
- <Text
2031
- style={{
2032
- fontSize: normalize(10),
2033
- fontStyle: 'italic',
2034
- color: '#555',
2035
- }}>
2036
- {detailsdata.requirement}
2037
- </Text>
2038
- </View>
2039
- ) : null}
2040
-
2041
- {/* Remarks */}
2042
- {isNUQ(detailsdata.remarks) ? (
2043
- <View>
2044
- <Text
2045
- style={{
2046
- textDecorationLine: 'underline',
2047
- fontSize: normalize(10),
2048
- fontStyle: 'italic',
2049
- color: '#555',
2050
- }}>
2051
- Remarks
2052
- </Text>
2053
- <Text
2054
- style={{
2055
- fontSize: normalize(10),
2056
- fontStyle: 'italic',
2057
- color: '#555',
2058
- }}>
2059
- {detailsdata.remarks}
2060
- </Text>
2061
- </View>
2062
- ) : null}
2063
-
2064
- {/* Description */}
2065
- {isNUQ(detailsdata.quotationdescription) ? (
2066
- <View>
2067
- <Text
2068
- style={{
2069
- textDecorationLine: 'underline',
2070
- fontSize: normalize(10),
2071
- fontStyle: 'italic',
2072
- color: '#555',
2073
- }}>
2074
- Description
2075
- </Text>
2076
- <Text
2077
- style={{
2078
- fontSize: normalize(10),
2079
- fontStyle: 'italic',
2080
- color: '#555',
2081
- }}>
2082
- {detailsdata.quotationdescription}
2083
- </Text>
2084
- </View>
2085
- ) : null}
2086
-
2087
- {/* Description */}
2088
- {isNUQ(data.productdescription) ? (
2089
- <View>
2090
- <Text
2091
- style={{
2092
- textDecorationLine: 'underline',
2093
- fontSize: normalize(10),
2094
- fontStyle: 'italic',
2095
- color: '#555',
2096
- }}>
2097
- Description
2098
- </Text>
2099
- <Text
2100
- style={{
2101
- fontSize: normalize(10),
2102
- fontStyle: 'italic',
2103
- color: '#555',
2104
- }}>
2105
- {data.productdescription}
2106
- </Text>
2107
- </View>
2108
- ) : null}
2109
-
2110
- {/* Description */}
2111
- {isNUQ(data.indentdescription) ? (
2112
- <View>
2113
- <Text
2114
- style={{
2115
- textDecorationLine: 'underline',
2116
- fontSize: normalize(10),
2117
- fontStyle: 'italic',
2118
- color: '#555',
2119
- }}>
2120
- Description
2121
- </Text>
2122
- <Text
2123
- style={{
2124
- fontSize: normalize(10),
2125
- fontStyle: 'italic',
2126
- color: '#555',
2127
- }}>
2128
- {data.indentdescription}
2129
- </Text>
2130
- </View>
2131
- ) : null}
2132
-
2133
- {/* Description */}
2134
- {isNUQ(data.quotationdescription) ? (
2135
- <View>
2136
- <Text
2137
- style={{
2138
- textDecorationLine: 'underline',
2139
- fontSize: normalize(10),
2140
- fontStyle: 'italic',
2141
- color: '#555',
2142
- }}>
2143
- Description
2144
- </Text>
2145
- <Text
2146
- style={{
2147
- fontSize: normalize(10),
2148
- fontStyle: 'italic',
2149
- color: '#555',
2150
- }}>
2151
- {data.quotationdescription}
2152
- </Text>
2153
- </View>
2154
- ) : null}
2155
-
2156
- {/* Reason type B */}
2157
- {/* {type == 'B' ? (
2158
- <View style={{ paddingVertical: normalize(5) }}>
2159
- <CTextHeader
2160
- text={type != 'X' ? 'Reason' : 'Remarks'}
2161
- widthArr={Dimensions.get('screen').width * 0.9}
2162
- bgColor={'rgba(184, 184, 191,0.3)'}
2163
- color={'#094485'}
2164
- borderColor={'white'}
2165
- marginHorizontal={normalize(2)}
2166
- borderRadius={5}
2167
- elevation={0}
2168
- fontSize={normalize(10)}
2169
- />
2170
- <STextInputNew
2171
- data={{
2172
- borderWidth: 1,
2173
- value: data.reason || '',
2174
- borderColor: 'lightgrey',
2175
- elevation: 0,
2176
- borderRadius: 5,
2177
- fontWeight: 'normal',
2178
- color: 'black',
2179
- itemwidth: Dimensions.get('screen').width * 0.9,
2180
- paddingTop: 5,
2181
- paddingBottom: 5,
2182
- height: Dimensions.get('screen').height * 0.034,
2183
- textAlign: 'center',
2184
- marginTop: normalize(2),
2185
- marginHorizontal: normalize(2),
2186
- fontSize: normalize(10),
2187
- placeholder:
2188
- type != 'X'
2189
- ? 'Reason for verification...'
2190
- : 'Please enter your remarks here...',
2191
- }}
2192
- callBack={val => {
2193
- handleDataChange(index, val, `reason${i}`);
2194
- }}
2195
- />
2196
- </View>
2197
- ) : null} */}
2198
-
2199
- {/* Raw material card */}
2200
- {type == 'B' ? (
2201
- <View>
2202
- {isNUL(detailsdata?.WorkorderProductDetail) ? (
2203
- <View style={{ marginBottom: normalize(5) }}>
2204
- <HHeading
2205
- styles={{
2206
- iconname: 'box-open',
2207
- bgcolor: '#f2efef',
2208
- iconsize: 14,
2209
- iconcolor: Global.AppTheme.primary_color,
2210
- displaytext: 'RAW MATERIAL',
2211
- textsize: 13,
2212
- textcolor: Global.AppTheme.primary_color,
2213
- }}
2214
- callBack={val => {
2215
- handleToggleExpandField(
2216
- index,
2217
- i,
2218
- 'wrkorprodetail',
2219
- );
2220
- // val == undefined ? null : console.log(val)
2221
- }} />
2222
- </View>
2223
- ) : null}
2224
- {!detailsdata?.wrkorprodetail &&
2225
- detailsdata?.WorkorderProductDetail.map(
2226
- (rawMaterial, rawIndex) => (
2227
- <View key={rawIndex}>
2228
- <View
2229
- style={{
2230
- backgroundColor: '#ebf1fa',
2231
- marginHorizontal: normalize(10),
2232
- marginBottom: normalize(10),
2233
- borderRadius: normalize(5),
2234
- shadowColor: Global.AppTheme.primary_color,
2235
- shadowOffset: { width: 4, height: 4 },
2236
- shadowOpacity: 0.6,
2237
- shadowRadius: 10,
2238
- elevation: 8,
2239
- }}>
2240
- <View style={{ flexDirection: 'row' }}>
2241
- <View
2242
- style={{
2243
- backgroundColor: '#083787',
2244
- width: normalize(10),
2245
- height: '100%',
2246
- borderStartStartRadius: normalize(5),
2247
- borderStartEndRadius: normalize(5),
2248
- }} />
2249
- <View style={{ padding: normalize(3) }}>
2250
- {/* Product name */}
2251
- {isNUQ(rawMaterial.productname) ? (
2252
- <Text
2253
- numberOfLines={1}
2254
- style={{
2255
- fontSize: normalize(12),
2256
- paddingLeft: normalize(5),
2257
- fontWeight: 'bold',
2258
- color: Global.AppTheme.primary_color,
2259
- }}>
2260
- {rawMaterial.productname}
2261
- </Text>
2262
- ) : null}
2263
-
2264
- {/* Section */}
2265
- <View
2266
- style={{
2267
- flexDirection: 'row',
2268
- width: '95%',
2269
- justifyContent: 'space-between',
2270
- }}>
2271
- {/* Section */}
2272
- <View
2273
- style={{
2274
- flexDirection: 'row',
2275
- justifyContent: 'space-between',
2276
- alignItems: 'flex-start',
2277
- }}>
2278
- <View
2279
- style={{
2280
- flexDirection: 'row',
2281
- marginRight: normalize(15),
2282
- }}>
2283
- {/* Quantity */}
2284
- {isNUQ(rawMaterial.quantity) ? (
2285
- <View
2286
- style={{
2287
- flexDirection: 'row',
2288
- alignItems: 'center',
2289
- paddingLeft: normalize(5),
2290
- }}>
2291
- <Text
2292
- style={{
2293
- fontSize: 10,
2294
- color: '#555',
2295
- marginLeft: normalize(5),
2296
- }}>
2297
- Quantity :{' '}
2298
- {rawMaterial.quantity}
2299
- </Text>
2300
- </View>
2301
- ) : null}
2302
-
2303
- {/* Amount */}
2304
- {isNUQ(rawMaterial.amount) ? (
2305
- <View
2306
- style={{
2307
- flexDirection: 'row',
2308
- alignItems: 'center',
2309
- paddingLeft: normalize(5),
2310
- }}>
2311
- <Text
2312
- style={{
2313
- fontSize: 10,
2314
- color: '#555',
2315
- marginLeft: normalize(5),
2316
- }}>
2317
- Amount : {rawMaterial.amount}
2318
- </Text>
2319
- </View>
2320
- ) : null}
2321
-
2322
- {/* Unit name */}
2323
- {isNUQ(rawMaterial.unitname) ? (
2324
- <View
2325
- style={{
2326
- flexDirection: 'row',
2327
- alignItems: 'center',
2328
- paddingLeft: normalize(5),
2329
- }}>
2330
- <Text
2331
- style={{
2332
- fontSize: 10,
2333
- color: '#555',
2334
- marginLeft: normalize(5),
2335
- }}>
2336
- Unit : {rawMaterial.unitname}
2337
- </Text>
2338
- </View>
2339
- ) : null}
2340
- </View>
2341
- </View>
2342
- </View>
2343
- <View
2344
- style={{
2345
- paddingVertical: normalize(5),
2346
- flexDirection: 'row',
2347
- alignItems: 'flex-start',
2348
- }}>
2349
- {/* Reason */}
2350
- <View style={{ marginRight: normalize(5) }}>
2351
- {/* <CTextHeader
2352
- text={type != 'X' ? 'Reason' : 'Remarks'}
2353
- widthArr={
2354
- Dimensions.get('screen').width * 0.9
2355
- }
2356
- bgColor={'rgba(184, 184, 191,0.3)'}
2357
- color={'#094485'}
2358
- borderColor={'white'}
2359
- marginHorizontal={normalize(2)}
2360
- borderRadius={5}
2361
- elevation={0}
2362
- fontSize={normalize(10)}
2363
- /> */}
2364
- <STextInputNew
2365
- data={{
2366
- borderWidth: 1,
2367
- value: rawIndex.usedreason || '',
2368
- borderColor: 'lightgrey',
2369
- elevation: 0,
2370
- borderRadius: 5,
2371
- fontWeight: 'normal',
2372
- color: 'black',
2373
- itemwidth:
2374
- Dimensions.get('screen').width *
2375
- 0.58,
2376
- paddingTop: 5,
2377
- paddingBottom: 5,
2378
- height:
2379
- Dimensions.get('screen').height *
2380
- 0.034,
2381
- textAlign: 'center',
2382
- marginTop: normalize(2),
2383
- marginHorizontal: normalize(2),
2384
- fontSize: normalize(10),
2385
- placeholder:
2386
- type != 'X'
2387
- ? 'Reason for verification...'
2388
- : 'Please enter your remarks here...',
2389
- }}
2390
- callBack={val => {
2391
- updateProductReason(
2392
- index,
2393
- i,
2394
- rawIndex,
2395
- val,
2396
- 'usedreason',
2397
- );
2398
- }}
2399
- />
2400
- </View>
2401
-
2402
- {/* Dropdown */}
2403
- <View
2404
- style={{
2405
- alignItems: 'center',
2406
- width: 70,
2407
- flexDirection: 'row',
2408
- justifyContent: 'space-between',
2409
- }}>
2410
- {/* Make Text clickable to open the dropdown */}
2411
- <Menu>
2412
- <MenuTrigger
2413
- customStyles={{
2414
- triggerWrapper: {
2415
- borderWidth: 0,
2416
- // width: normalize(25),
2417
- justifyContent: 'center',
2418
- alignItems: 'center',
2419
- },
2420
- }}>
2421
- {/* Text that when clicked opens the dropdown */}
2422
- <View
2423
- style={{
2424
- justifyContent: 'space-between',
2425
- alignItems: 'center',
2426
- flexDirection: 'row',
2427
- borderWidth: 1,
2428
- borderColor: '#gray',
2429
- borderRadius: 5,
2430
- paddingHorizontal:
2431
- normalize(10),
2432
- paddingVertical: normalize(5),
2433
- marginBottom: normalize(5),
2434
- minWidth: normalize(70),
2435
- }}>
2436
- <Text
2437
- style={{
2438
- color: 'gray',
2439
- fontSize: normalize(11),
2440
- fontWeight: 'bold',
2441
- marginRight: normalize(10),
2442
- }}>
2443
- {rawMaterial.qualitynature ==
2444
- 'G'
2445
- ? 'GOOD'
2446
- : rawMaterial.qualitynature ==
2447
- 'B'
2448
- ? 'BAD'
2449
- : 'NOT BAD'}
2450
- </Text>
2451
- <Icons.FontAwesome5
2452
- name="chevron-down"
2453
- size={13}
2454
- color="gray"
2455
- />
2456
- </View>
2457
- </MenuTrigger>
2458
- <MenuOptions>
2459
- <CDropDownList
2460
- dropdownarray={
2461
- rawMaterial.dropdown
2462
- }
2463
- callback={val => {
2464
- updateProductNature(
2465
- index,
2466
- i,
2467
- rawIndex,
2468
- val,
2469
- );
2470
- }}
2471
- />
2472
- </MenuOptions>
2473
- </Menu>
2474
- </View>
2475
- </View>
2476
- </View>
2477
- </View>
2478
- </View>
2479
- </View>
2480
- ),
2481
- )}
2482
- </View>
2483
- ) : null}
2484
-
2485
- {/* By Product card */}
2486
- {type == 'B' ? (
2487
- <View>
2488
- {isNUL(detailsdata?.WorkorderByProductDetail) ? (
2489
- <View style={{ marginBottom: normalize(5) }}>
2490
- <HHeading
2491
- styles={{
2492
- iconname: 'box-open',
2493
- bgcolor: '#f2efef',
2494
- iconsize: 14,
2495
- iconcolor: Global.AppTheme.primary_color,
2496
- displaytext: 'BY PRODUCT',
2497
- textsize: 13,
2498
- textcolor: Global.AppTheme.primary_color,
2499
- }}
2500
- callBack={val => {
2501
- handleToggleExpandField(
2502
- index,
2503
- i,
2504
- 'wrkorbyprodetail',
2505
- );
2506
- // val == undefined ? null : console.log(val)
2507
- }} />
2508
- </View>
2509
- ) : null}
2510
- {!detailsdata.wrkorbyprodetail &&
2511
- detailsdata?.WorkorderByProductDetail.map(
2512
- (rawMaterial, rawIndex) => (
2513
- <View key={rawIndex}>
2514
- <View
2515
- style={{
2516
- backgroundColor: '#faeeeb',
2517
- marginHorizontal: normalize(10),
2518
- marginBottom: normalize(10),
2519
- borderRadius: normalize(5),
2520
- shadowColor: Global.AppTheme.primary_color,
2521
- shadowOffset: { width: 4, height: 4 },
2522
- shadowOpacity: 0.6,
2523
- shadowRadius: 10,
2524
- elevation: 8,
2525
- }}>
2526
- <View style={{ flexDirection: 'row' }}>
2527
- <View
2528
- style={{
2529
- backgroundColor: '#870808',
2530
- width: normalize(10),
2531
- height: '100%',
2532
- borderStartStartRadius: normalize(5),
2533
- borderStartEndRadius: normalize(5),
2534
- }} />
2535
- <View style={{ padding: normalize(3) }}>
2536
- {/* Product name */}
2537
- {isNUQ(rawMaterial.productname) ? (
2538
- <Text
2539
- numberOfLines={1}
2540
- style={{
2541
- fontSize: normalize(12),
2542
- paddingLeft: normalize(5),
2543
- fontWeight: 'bold',
2544
- color: Global.AppTheme.primary_color,
2545
- }}>
2546
- {rawMaterial.productname}
2547
- </Text>
2548
- ) : null}
2549
-
2550
- {/* Section */}
2551
- <View
2552
- style={{
2553
- flexDirection: 'row',
2554
- width: '95%',
2555
- justifyContent: 'space-between',
2556
- }}>
2557
- {/* Section */}
2558
- <View
2559
- style={{
2560
- flexDirection: 'row',
2561
- justifyContent: 'space-between',
2562
- alignItems: 'flex-start',
2563
- }}>
2564
- <View
2565
- style={{
2566
- flexDirection: 'row',
2567
- marginRight: normalize(15),
2568
- }}>
2569
- {/* Quantity */}
2570
- {isNUQ(rawMaterial.quantity) ? (
2571
- <View
2572
- style={{
2573
- flexDirection: 'row',
2574
- alignItems: 'center',
2575
- paddingLeft: normalize(5),
2576
- }}>
2577
- <Text
2578
- style={{
2579
- fontSize: 10,
2580
- color: '#555',
2581
- marginLeft: normalize(5),
2582
- }}>
2583
- Quantity :{' '}
2584
- {rawMaterial.quantity}
2585
- </Text>
2586
- </View>
2587
- ) : null}
2588
-
2589
- {/* Amount */}
2590
- {isNUQ(rawMaterial.amount) ? (
2591
- <View
2592
- style={{
2593
- flexDirection: 'row',
2594
- alignItems: 'center',
2595
- paddingLeft: normalize(5),
2596
- }}>
2597
- <Text
2598
- style={{
2599
- fontSize: 10,
2600
- color: '#555',
2601
- marginLeft: normalize(5),
2602
- }}>
2603
- Amount : {rawMaterial.amount}
2604
- </Text>
2605
- </View>
2606
- ) : null}
2607
-
2608
- {/* Unit name */}
2609
- {isNUQ(rawMaterial.unitname) ? (
2610
- <View
2611
- style={{
2612
- flexDirection: 'row',
2613
- alignItems: 'center',
2614
- paddingLeft: normalize(5),
2615
- }}>
2616
- <Text
2617
- style={{
2618
- fontSize: 10,
2619
- color: '#555',
2620
- marginLeft: normalize(5),
2621
- }}>
2622
- Unit : {rawMaterial.unitname}
2623
- </Text>
2624
- </View>
2625
- ) : null}
2626
- </View>
2627
- </View>
2628
- </View>
2629
- <View
2630
- style={{
2631
- paddingVertical: normalize(5),
2632
- flexDirection: 'row',
2633
- alignItems: 'flex-start',
2634
- }}>
2635
- {/* Reason */}
2636
- <View style={{ marginRight: normalize(5) }}>
2637
- {/* <CTextHeader
2638
- text={type != 'X' ? 'Reason' : 'Remarks'}
2639
- widthArr={
2640
- Dimensions.get('screen').width * 0.9
2641
- }
2642
- bgColor={'rgba(184, 184, 191,0.3)'}
2643
- color={'#094485'}
2644
- borderColor={'white'}
2645
- marginHorizontal={normalize(2)}
2646
- borderRadius={5}
2647
- elevation={0}
2648
- fontSize={normalize(10)}
2649
- /> */}
2650
- <STextInputNew
2651
- data={{
2652
- borderWidth: 1,
2653
- value: rawIndex.usedreason || '',
2654
- borderColor: 'lightgrey',
2655
- elevation: 0,
2656
- borderRadius: 5,
2657
- fontWeight: 'normal',
2658
- color: 'black',
2659
- itemwidth:
2660
- Dimensions.get('screen').width *
2661
- 0.58,
2662
- paddingTop: 5,
2663
- paddingBottom: 5,
2664
- height:
2665
- Dimensions.get('screen').height *
2666
- 0.034,
2667
- textAlign: 'center',
2668
- marginTop: normalize(2),
2669
- marginHorizontal: normalize(2),
2670
- fontSize: normalize(10),
2671
- placeholder:
2672
- type != 'X'
2673
- ? 'Reason for verification...'
2674
- : 'Please enter your remarks here...',
2675
- }}
2676
- callBack={val => {
2677
- updateByProductReason(
2678
- index,
2679
- i,
2680
- rawIndex,
2681
- val,
2682
- 'usedreason',
2683
- );
2684
- }}
2685
- />
2686
- </View>
2687
-
2688
- {/* Dropdown */}
2689
- <View
2690
- style={{
2691
- alignItems: 'center',
2692
- width: 70,
2693
- flexDirection: 'row',
2694
- justifyContent: 'space-between',
2695
- }}>
2696
- {/* Make Text clickable to open the dropdown */}
2697
- <Menu>
2698
- <MenuTrigger
2699
- customStyles={{
2700
- triggerWrapper: {
2701
- borderWidth: 0,
2702
- // width: normalize(25),
2703
- justifyContent: 'center',
2704
- alignItems: 'center',
2705
- },
2706
- }}>
2707
- {/* Text that when clicked opens the dropdown */}
2708
- <View
2709
- style={{
2710
- justifyContent: 'space-between',
2711
- alignItems: 'center',
2712
- flexDirection: 'row',
2713
- borderWidth: 1,
2714
- borderColor: '#gray',
2715
- borderRadius: 5,
2716
- paddingHorizontal:
2717
- normalize(10),
2718
- paddingVertical: normalize(5),
2719
- marginBottom: normalize(5),
2720
- minWidth: normalize(70),
2721
- }}>
2722
- <Text
2723
- style={{
2724
- color: 'gray',
2725
- fontSize: normalize(11),
2726
- fontWeight: 'bold',
2727
- marginRight: normalize(10),
2728
- }}>
2729
- {rawMaterial.qualitynature ==
2730
- 'G'
2731
- ? 'GOOD'
2732
- : rawMaterial.qualitynature ==
2733
- 'B'
2734
- ? 'BAD'
2735
- : 'NOT BAD'}
2736
- </Text>
2737
- <Icons.FontAwesome5
2738
- name="chevron-down"
2739
- size={13}
2740
- color="gray"
2741
- />
2742
- </View>
2743
- </MenuTrigger>
2744
- <MenuOptions>
2745
- <CDropDownList
2746
- dropdownarray={
2747
- rawMaterial.dropdown
2748
- }
2749
- callback={val => {
2750
- updateByProductNature(
2751
- index,
2752
- i,
2753
- rawIndex,
2754
- val,
2755
- );
2756
- }}
2757
- />
2758
- </MenuOptions>
2759
- </Menu>
2760
- </View>
2761
- </View>
2762
- </View>
2763
- </View>
2764
- </View>
2765
- </View>
2766
- ),
2767
- )}
2768
- </View>
2769
- ) : null}
2770
- </View>
2771
- ))
2772
- : null}
2773
-
2774
- {/* Reason */}
2775
- {/* {type != 'B' ? (
2776
- <View style={{ padding: normalize(5) }}>
2777
- <CTextHeader
2778
- text={type != 'X' ? 'Reason' : 'Remarks'}
2779
- widthArr={Dimensions.get('screen').width * 0.9}
2780
- bgColor={'rgba(184, 184, 191,0.3)'}
2781
- color={'#094485'}
2782
- borderColor={'white'}
2783
- marginHorizontal={normalize(2)}
2784
- borderRadius={5}
2785
- elevation={0}
2786
- fontSize={normalize(10)}
2787
- />
2788
- <STextInputNew
2789
- data={{
2790
- borderWidth: 1,
2791
- value: data.reason || '',
2792
- borderColor: 'lightgrey',
2793
- elevation: 0,
2794
- borderRadius: 5,
2795
- fontWeight: 'normal',
2796
- color: 'black',
2797
- itemwidth: Dimensions.get('screen').width * 0.9,
2798
- paddingTop: 5,
2799
- paddingBottom: 5,
2800
- height: Dimensions.get('screen').height * 0.034,
2801
- textAlign: 'center',
2802
- marginTop: normalize(2),
2803
- marginHorizontal: normalize(2),
2804
- fontSize: normalize(10),
2805
- placeholder:
2806
- type != 'X'
2807
- ? 'Reason for verification...'
2808
- : 'Please enter your remarks here...',
2809
- }}
2810
- callBack={val => {
2811
- handleDataChange(index, val, 'reason');
2812
- }}
2813
- />
2814
- </View>
2815
- ) : null} */}
2816
- </View>
2817
- ) : null}
2818
- </View>
2819
- );
2820
- };
2821
-
2822
- export default CVerificationCard;