@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.
- package/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -1,1059 +0,0 @@
|
|
|
1
|
-
import { View, Text, Dimensions, StyleSheet, TouchableOpacity, Image, ScrollView, Platform } from 'react-native';
|
|
2
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
3
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
4
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
5
|
-
//import { useNavigation } from '../Navigation/useNavigation';
|
|
6
|
-
|
|
7
|
-
import SOverlay from '../StaticComponents/SOverlay';
|
|
8
|
-
import CTextHeader from '../Custom/TableComponent/CTextHeader';
|
|
9
|
-
import SDropDownNew from '../Components/SDropDownNew';
|
|
10
|
-
|
|
11
|
-
import ContextBio from '../ContextAPI/ContextBio';
|
|
12
|
-
import SCheckBox from '../StaticComponents/SCheckBox';
|
|
13
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
14
|
-
import STextInputNew from './STextInputNew';
|
|
15
|
-
import { CButtonShadow, isNUQ } from '../CommonStyle/ComponentFunctions';
|
|
16
|
-
import HOCIcons from '../HOC/HOCIcons';
|
|
17
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
18
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
19
|
-
|
|
20
|
-
import { SwipeRow } from 'react-native-swipe-list-view';//mmmmmmmmmmmmmmmmmmmm
|
|
21
|
-
|
|
22
|
-
const QualityProductCard = ({
|
|
23
|
-
sectionIndex,
|
|
24
|
-
productIndex,
|
|
25
|
-
selectall,
|
|
26
|
-
setSelectAll,
|
|
27
|
-
}) => {
|
|
28
|
-
const {
|
|
29
|
-
responseJSON,
|
|
30
|
-
setResponseJSON,
|
|
31
|
-
verifyData,
|
|
32
|
-
invoiceData,
|
|
33
|
-
setInvoiceData,
|
|
34
|
-
} = useContext(ContextBio);
|
|
35
|
-
const [refresh, setRefresh] = useState(0);
|
|
36
|
-
const [verify, setVerify] = useState(0);
|
|
37
|
-
const navigation = useNavigation();
|
|
38
|
-
const [FilesData, setFilesData] = useState({
|
|
39
|
-
savedaudio: [],
|
|
40
|
-
saveddoc: [],
|
|
41
|
-
savedimages: [],
|
|
42
|
-
savedvideo: [],
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const item = invoiceData.data[sectionIndex].productdetail[productIndex];
|
|
46
|
-
|
|
47
|
-
function groupExpand(item) {
|
|
48
|
-
item.groupexpand = !item.groupexpand;
|
|
49
|
-
setVerify(verify + 1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (selectall != null || selectall != undefined) {
|
|
54
|
-
console.log('Applying select all: true to index', productIndex);
|
|
55
|
-
handleGlobalFieldUpdate('productqualityverify', selectall);
|
|
56
|
-
}
|
|
57
|
-
}, [selectall]);
|
|
58
|
-
|
|
59
|
-
function calculateTotalProductFreeLength(data) {
|
|
60
|
-
if (!data?.batchdetail || !Array.isArray(data.batchdetail)) {
|
|
61
|
-
return 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const totalLength = data.batchdetail.reduce((sum, batch) => {
|
|
65
|
-
const productFreeArray = batch?.productfree;
|
|
66
|
-
const productFreeLength = Array.isArray(productFreeArray)
|
|
67
|
-
? productFreeArray.length
|
|
68
|
-
: 0;
|
|
69
|
-
return sum + productFreeLength;
|
|
70
|
-
}, 0);
|
|
71
|
-
|
|
72
|
-
return totalLength;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function navigationTo(
|
|
76
|
-
flag,
|
|
77
|
-
batchname,
|
|
78
|
-
productname,
|
|
79
|
-
batchcode,
|
|
80
|
-
quality,
|
|
81
|
-
batchIndex,
|
|
82
|
-
) {
|
|
83
|
-
let freeproductdetails = {
|
|
84
|
-
componentname: 'CFreeProductTable',
|
|
85
|
-
productname: productname,
|
|
86
|
-
batchname: batchname,
|
|
87
|
-
qualityentry: true,
|
|
88
|
-
qualityverification: false,
|
|
89
|
-
flag: flag,
|
|
90
|
-
batchcode: batchcode,
|
|
91
|
-
quality: quality,
|
|
92
|
-
productIndex: productIndex,
|
|
93
|
-
batchIndex: batchIndex,
|
|
94
|
-
};
|
|
95
|
-
setResponseJSON({
|
|
96
|
-
...responseJSON,
|
|
97
|
-
freeproductdetails: freeproductdetails,
|
|
98
|
-
});
|
|
99
|
-
navigation.navigate('BiodataEdit', {
|
|
100
|
-
data: freeproductdetails,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function getLength(params) {
|
|
105
|
-
const arraylength =
|
|
106
|
-
params != undefined && params != null && params != '' ? params.length : 0;
|
|
107
|
-
return arraylength;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function handleGlobalFieldUpdate(fieldName, val) {
|
|
111
|
-
const updatedData = JSON.parse(JSON.stringify(invoiceData.data));
|
|
112
|
-
|
|
113
|
-
updatedData.forEach(section => {
|
|
114
|
-
section.productdetail = section.productdetail.map(product => {
|
|
115
|
-
product[fieldName] = val;
|
|
116
|
-
|
|
117
|
-
let batchField = '';
|
|
118
|
-
if (fieldName === 'productverify') {
|
|
119
|
-
batchField = 'batchverify';
|
|
120
|
-
} else if (fieldName === 'productqualityverify') {
|
|
121
|
-
batchField = 'batchqualityverify';
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (batchField && Array.isArray(product.batchdetail)) {
|
|
125
|
-
product.batchdetail = product.batchdetail.map(batch => ({
|
|
126
|
-
...batch,
|
|
127
|
-
[batchField]: val,
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return product;
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
setInvoiceData(prevState => ({
|
|
136
|
-
...prevState,
|
|
137
|
-
data: updatedData,
|
|
138
|
-
EditStatus: true,
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function handleProductUpdate(sectionIndex, productIndex, val, field) {
|
|
143
|
-
const updatedData = JSON.parse(JSON.stringify(invoiceData.data));
|
|
144
|
-
const section = updatedData[sectionIndex];
|
|
145
|
-
let product = section.productdetail[productIndex];
|
|
146
|
-
|
|
147
|
-
product[field] = val;
|
|
148
|
-
|
|
149
|
-
if (
|
|
150
|
-
field === 'productqualityverify' &&
|
|
151
|
-
Array.isArray(product.batchdetail)
|
|
152
|
-
) {
|
|
153
|
-
product.batchdetail = product.batchdetail.map(batch => ({
|
|
154
|
-
...batch,
|
|
155
|
-
batchqualityverify: val,
|
|
156
|
-
}));
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
section.productdetail[productIndex] = product;
|
|
160
|
-
|
|
161
|
-
setInvoiceData(prevState => ({
|
|
162
|
-
...prevState,
|
|
163
|
-
data: updatedData,
|
|
164
|
-
EditStatus: true,
|
|
165
|
-
}));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function handleBatchQualityNatureUpdate(
|
|
169
|
-
sectionIndex,
|
|
170
|
-
productIndex,
|
|
171
|
-
batchIndex,
|
|
172
|
-
val,
|
|
173
|
-
) {
|
|
174
|
-
const updatedData = JSON.parse(JSON.stringify(invoiceData.data));
|
|
175
|
-
const section = updatedData[sectionIndex];
|
|
176
|
-
const product = section.productdetail[productIndex];
|
|
177
|
-
const batch = product.batchdetail[batchIndex];
|
|
178
|
-
|
|
179
|
-
product.batchdetail[batchIndex] = {
|
|
180
|
-
...batch,
|
|
181
|
-
qualitynature: val.datavalue,
|
|
182
|
-
qualitynaturename: val.displayvalue,
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
setInvoiceData(prevState => ({
|
|
186
|
-
...prevState,
|
|
187
|
-
data: updatedData,
|
|
188
|
-
EditStatus: true,
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function handleBatchFieldUpdate(
|
|
193
|
-
sectionIndex,
|
|
194
|
-
productIndex,
|
|
195
|
-
batchIndex,
|
|
196
|
-
val,
|
|
197
|
-
fieldName,
|
|
198
|
-
) {
|
|
199
|
-
const updatedData = JSON.parse(JSON.stringify(invoiceData.data));
|
|
200
|
-
const section = updatedData[sectionIndex];
|
|
201
|
-
const product = section.productdetail[productIndex];
|
|
202
|
-
const batch = product.batchdetail[batchIndex];
|
|
203
|
-
|
|
204
|
-
product.batchdetail[batchIndex] = {
|
|
205
|
-
...batch,
|
|
206
|
-
[fieldName]: val,
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
setInvoiceData(prevState => ({
|
|
210
|
-
...prevState,
|
|
211
|
-
data: updatedData,
|
|
212
|
-
EditStatus: true,
|
|
213
|
-
}));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function handleUpdateMedia(sectionIndex, productIndex, batchIndex, val) {
|
|
217
|
-
const updatedData = [...invoiceData.data];
|
|
218
|
-
const section = updatedData[sectionIndex];
|
|
219
|
-
const product = section.productdetail[productIndex];
|
|
220
|
-
const currentBatch = product.batchdetail[batchIndex];
|
|
221
|
-
|
|
222
|
-
section.productdetail[productIndex].batchdetail[batchIndex] = {
|
|
223
|
-
...currentBatch,
|
|
224
|
-
media: [val],
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
setInvoiceData(prevState => ({
|
|
228
|
-
...prevState,
|
|
229
|
-
data: updatedData,
|
|
230
|
-
EditStatus: true,
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function handleUpdateMediaProduct(
|
|
235
|
-
sectionIndex,
|
|
236
|
-
productIndex,
|
|
237
|
-
batchIndex,
|
|
238
|
-
val,
|
|
239
|
-
) {
|
|
240
|
-
console.log('##############################', val);
|
|
241
|
-
const updatedData = [...invoiceData.data];
|
|
242
|
-
const section = updatedData[sectionIndex];
|
|
243
|
-
const product = section.productdetail[productIndex];
|
|
244
|
-
const currentBatch = product.batchdetail[batchIndex];
|
|
245
|
-
|
|
246
|
-
section.productdetail[productIndex].batchdetail[batchIndex] = {
|
|
247
|
-
...currentBatch,
|
|
248
|
-
productimage: val.savedimages,
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
section.productdetail[productIndex] = {
|
|
252
|
-
...product,
|
|
253
|
-
productimage: val.savedimages,
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
setInvoiceData(prevState => ({
|
|
257
|
-
...prevState,
|
|
258
|
-
data: updatedData,
|
|
259
|
-
EditStatus: true,
|
|
260
|
-
}));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
useEffect(() => {
|
|
264
|
-
console.log(
|
|
265
|
-
'invoice data from quality entry screen product card',
|
|
266
|
-
JSON.stringify(invoiceData),
|
|
267
|
-
);
|
|
268
|
-
}, [invoiceData]);
|
|
269
|
-
|
|
270
|
-
const renderLeftActions = () => (
|
|
271
|
-
<View style={styles.leftActionsContainer}>
|
|
272
|
-
<TouchableOpacity
|
|
273
|
-
style={styles.actionButton}
|
|
274
|
-
onPress={() => {
|
|
275
|
-
navigation.navigate('CPurchaseDetails', {
|
|
276
|
-
productCode:
|
|
277
|
-
invoiceData?.data[sectionIndex]?.productdetail[productIndex]
|
|
278
|
-
?.insuproduct,
|
|
279
|
-
});
|
|
280
|
-
}}>
|
|
281
|
-
<View style={[styles.actionIconContainer, styles.detailsButton]}>
|
|
282
|
-
<HOCIcons.Entypo
|
|
283
|
-
name={'info-with-circle'}
|
|
284
|
-
size={normalize(20)}
|
|
285
|
-
color={Global.AppTheme.primary_color}
|
|
286
|
-
/>
|
|
287
|
-
<Text numberOfLines={1} style={styles.actionText}>
|
|
288
|
-
Details
|
|
289
|
-
</Text>
|
|
290
|
-
</View>
|
|
291
|
-
</TouchableOpacity>
|
|
292
|
-
<TouchableOpacity
|
|
293
|
-
style={styles.actionButton}
|
|
294
|
-
onPress={() => {
|
|
295
|
-
navigation.navigate('CSupplierList', {
|
|
296
|
-
productCode: item?.insuproduct,
|
|
297
|
-
});
|
|
298
|
-
}}>
|
|
299
|
-
<View style={[styles.actionIconContainer, styles.supplierButton]}>
|
|
300
|
-
<HOCIcons.MaterialCommunityIcons
|
|
301
|
-
name={'human-dolly'}
|
|
302
|
-
size={normalize(20)}
|
|
303
|
-
color={Global.AppTheme.primary_color}
|
|
304
|
-
/>
|
|
305
|
-
<Text numberOfLines={1} style={styles.actionText}>
|
|
306
|
-
Supplier
|
|
307
|
-
</Text>
|
|
308
|
-
</View>
|
|
309
|
-
</TouchableOpacity>
|
|
310
|
-
</View>
|
|
311
|
-
);
|
|
312
|
-
|
|
313
|
-
const renderRightActions = () => (
|
|
314
|
-
<View style={styles.rightActionsContainer}>
|
|
315
|
-
<TouchableOpacity
|
|
316
|
-
style={styles.actionButton}
|
|
317
|
-
onPress={() => { }} />
|
|
318
|
-
</View>
|
|
319
|
-
);
|
|
320
|
-
|
|
321
|
-
async function Media_Upload(image) {
|
|
322
|
-
console.log('imageeeeeeeeeee upload', JSON.stringify(image));
|
|
323
|
-
let date = new Date().getDate();
|
|
324
|
-
let month = new Date().getMonth() + 1;
|
|
325
|
-
let year = new Date().getFullYear();
|
|
326
|
-
let hours = new Date().getHours();
|
|
327
|
-
let min = new Date().getMinutes();
|
|
328
|
-
let sec = new Date().getSeconds();
|
|
329
|
-
let millisec = new Date().getMilliseconds();
|
|
330
|
-
let uniquename = '.jpg';
|
|
331
|
-
let fileid_autogenerate = data != null && data.length > 0 ? data.length : 0;
|
|
332
|
-
let dataset2 = {
|
|
333
|
-
fileid: fileid_autogenerate + 1,
|
|
334
|
-
filename: uniquename,
|
|
335
|
-
filetype: image.filetype,
|
|
336
|
-
uri: image.uri,
|
|
337
|
-
uritype: false,
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
if (!dataset2.uritype) {
|
|
341
|
-
if (dataset2.uri) {
|
|
342
|
-
var formData = new FormData();
|
|
343
|
-
formData.append('file', {
|
|
344
|
-
uri: dataset2.uri,
|
|
345
|
-
type: 'image/jpeg',
|
|
346
|
-
name: dataset2.filename,
|
|
347
|
-
});
|
|
348
|
-
console.log('formData>>>>>>>>>>>>>', JSON.stringify(formData));
|
|
349
|
-
console.log(
|
|
350
|
-
'formData>>>>>>>>>>>>>',
|
|
351
|
-
JSON.stringify(APIURL + 'invfile/fileupload/emr/image'),
|
|
352
|
-
);
|
|
353
|
-
NetworkServiceCall(
|
|
354
|
-
'multiform',
|
|
355
|
-
APIURL + 'invfile/fileupload/emr/image',
|
|
356
|
-
formData,
|
|
357
|
-
)
|
|
358
|
-
.then(function (responsedata) {
|
|
359
|
-
console.log(
|
|
360
|
-
'responsedata>>>>>>>>>>>>>>>',
|
|
361
|
-
JSON.stringify(responsedata),
|
|
362
|
-
);
|
|
363
|
-
if (responsedata.httpstatus == 200) {
|
|
364
|
-
console.log(
|
|
365
|
-
'INSIDE IMAGE SCREENNENENENENNENENENENENENNEN',
|
|
366
|
-
JSON.stringify(responsedata),
|
|
367
|
-
);
|
|
368
|
-
dataset2.filename = responsedata.data.fileuri;
|
|
369
|
-
setData(
|
|
370
|
-
data != null
|
|
371
|
-
? prevData => [...prevData, dataset2.filename]
|
|
372
|
-
: [dataset2.filename],
|
|
373
|
-
);
|
|
374
|
-
responseJSON.consultationEdit.editStatus = true;
|
|
375
|
-
setrefreshCount(refreshCount + 1);
|
|
376
|
-
props.editStatus(1);
|
|
377
|
-
props.data.usertype =
|
|
378
|
-
Global.PatientDetails != undefined &&
|
|
379
|
-
Global.PatientDetails.usertype != undefined &&
|
|
380
|
-
Global.PatientDetails.usertype != null
|
|
381
|
-
? Global.PatientDetails.usertype
|
|
382
|
-
: 'Z';
|
|
383
|
-
props.data.suuser =
|
|
384
|
-
Global.userData != undefined &&
|
|
385
|
-
Global.userData.suuser != undefined &&
|
|
386
|
-
Global.userData.suuser != null
|
|
387
|
-
? Global.userData.suuser
|
|
388
|
-
: 0;
|
|
389
|
-
setLoading(false);
|
|
390
|
-
setOpen(false);
|
|
391
|
-
} else {
|
|
392
|
-
setLoading(false);
|
|
393
|
-
setOpen(false);
|
|
394
|
-
}
|
|
395
|
-
})
|
|
396
|
-
.catch(error => {
|
|
397
|
-
console.log('errorrrrrrrrrr', JSON.stringify(error));
|
|
398
|
-
setLoading(false);
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
function CaptureImageWithoutEdit() {
|
|
405
|
-
navigation.navigate('CCaptureImageWithoutEdit', { onSelect: Media_Upload });
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return (
|
|
409
|
-
<View>
|
|
410
|
-
<SwipeRow
|
|
411
|
-
leftOpenValue={190}
|
|
412
|
-
rightOpenValue={-190}
|
|
413
|
-
disableLeftSwipe={false}
|
|
414
|
-
disableRightSwipe={false}
|
|
415
|
-
friction={10}
|
|
416
|
-
tension={40}
|
|
417
|
-
preview={false}
|
|
418
|
-
key={`product-${sectionIndex}-${productIndex}`}
|
|
419
|
-
>
|
|
420
|
-
{renderLeftActions()}
|
|
421
|
-
<TouchableOpacity
|
|
422
|
-
onPress={() => groupExpand(item)}
|
|
423
|
-
style={[
|
|
424
|
-
styles.productCard,
|
|
425
|
-
{
|
|
426
|
-
borderLeftColor: isNUQ(item?.color) ? item?.color : '#870808',
|
|
427
|
-
},
|
|
428
|
-
]}>
|
|
429
|
-
<View>
|
|
430
|
-
<View style={[
|
|
431
|
-
styles.productHeader,
|
|
432
|
-
{ justifyContent: verifyData == true ? 'space-between' : 'flex-start' },
|
|
433
|
-
]}>
|
|
434
|
-
<Icons.FontAwesome5
|
|
435
|
-
name={'box-open'}
|
|
436
|
-
size={normalize(19)}
|
|
437
|
-
color={'#094485'}
|
|
438
|
-
/>
|
|
439
|
-
<Text
|
|
440
|
-
adjustsFontSizeToFit
|
|
441
|
-
numberOfLines={2}
|
|
442
|
-
style={styles.productName}>
|
|
443
|
-
{item.purchaseproduct}
|
|
444
|
-
</Text>
|
|
445
|
-
|
|
446
|
-
{verifyData == true ? (
|
|
447
|
-
<SCheckBox
|
|
448
|
-
data={{ value: item.productqualityverify, size: 20 }}
|
|
449
|
-
callBack={val => {
|
|
450
|
-
handleProductUpdate(
|
|
451
|
-
sectionIndex,
|
|
452
|
-
productIndex,
|
|
453
|
-
val,
|
|
454
|
-
'productqualityverify',
|
|
455
|
-
);
|
|
456
|
-
}}
|
|
457
|
-
/>
|
|
458
|
-
) : null}
|
|
459
|
-
</View>
|
|
460
|
-
|
|
461
|
-
<View style={styles.productInfoRow}>
|
|
462
|
-
<Text style={styles.infoText}>
|
|
463
|
-
TOTAL NO.OF BATCHS :{' '}
|
|
464
|
-
<Text style={styles.infoValue}>
|
|
465
|
-
{item?.batchdetail?.length}
|
|
466
|
-
</Text>{' '}
|
|
467
|
-
</Text>
|
|
468
|
-
<Text style={styles.infoText}>
|
|
469
|
-
FREE PRODUCTS :{' '}
|
|
470
|
-
<Text style={styles.infoValue}>
|
|
471
|
-
{calculateTotalProductFreeLength(item)}
|
|
472
|
-
</Text>{' '}
|
|
473
|
-
</Text>
|
|
474
|
-
</View>
|
|
475
|
-
</View>
|
|
476
|
-
</TouchableOpacity>
|
|
477
|
-
{renderRightActions()}
|
|
478
|
-
</SwipeRow>
|
|
479
|
-
|
|
480
|
-
{item.groupexpand != true ? (
|
|
481
|
-
<View style={styles.expandedContent}>
|
|
482
|
-
<View style={styles.notesContainer}>
|
|
483
|
-
{verifyData != true ? (
|
|
484
|
-
<TouchableOpacity
|
|
485
|
-
style={styles.notesButton}
|
|
486
|
-
onPress={() => { }}>
|
|
487
|
-
<SOverlay
|
|
488
|
-
iconcolor={'#094485'}
|
|
489
|
-
value={item.notes}
|
|
490
|
-
size={16}
|
|
491
|
-
onChangeText={val => {
|
|
492
|
-
handleProductUpdate(
|
|
493
|
-
sectionIndex,
|
|
494
|
-
productIndex,
|
|
495
|
-
val,
|
|
496
|
-
'notes',
|
|
497
|
-
);
|
|
498
|
-
}}
|
|
499
|
-
/>
|
|
500
|
-
</TouchableOpacity>
|
|
501
|
-
) : null}
|
|
502
|
-
</View>
|
|
503
|
-
|
|
504
|
-
<ScrollView
|
|
505
|
-
horizontal={true}
|
|
506
|
-
showsHorizontalScrollIndicator={true}
|
|
507
|
-
keyboardShouldPersistTaps="handled"
|
|
508
|
-
style={styles.scrollView}>
|
|
509
|
-
<View style={styles.tableContainer}>
|
|
510
|
-
<View style={styles.tableHeader} />
|
|
511
|
-
|
|
512
|
-
{item?.batchdetail?.map((batchdata, i) => {
|
|
513
|
-
batchdata.batchcode = i + 1;
|
|
514
|
-
return (
|
|
515
|
-
<View key={i} style={styles.tableRow}>
|
|
516
|
-
<View>
|
|
517
|
-
<CTextHeader
|
|
518
|
-
text={'BATCH'}
|
|
519
|
-
widthArr={Dimensions.get('screen').width * 0.25}
|
|
520
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
521
|
-
color={'#094485'}
|
|
522
|
-
borderColor={'lightgrey'}
|
|
523
|
-
marginHorizontal={normalize(2)}
|
|
524
|
-
borderRadius={5}
|
|
525
|
-
elevation={0}
|
|
526
|
-
/>
|
|
527
|
-
<STextInputNew
|
|
528
|
-
data={{
|
|
529
|
-
borderWidth: 1,
|
|
530
|
-
borderColor: 'lightgrey',
|
|
531
|
-
elevation: 0,
|
|
532
|
-
borderRadius: 5,
|
|
533
|
-
fontWeight: 'bold',
|
|
534
|
-
color: 'black',
|
|
535
|
-
itemwidth: Dimensions.get('screen').width * 0.25,
|
|
536
|
-
paddingTop: 5,
|
|
537
|
-
paddingBottom: 5,
|
|
538
|
-
height: Dimensions.get('screen').height * 0.052,
|
|
539
|
-
textAlign: 'center',
|
|
540
|
-
marginTop: normalize(2),
|
|
541
|
-
marginHorizontal: normalize(2),
|
|
542
|
-
value: batchdata.batch,
|
|
543
|
-
editable: false,
|
|
544
|
-
}}
|
|
545
|
-
/>
|
|
546
|
-
</View>
|
|
547
|
-
|
|
548
|
-
<View>
|
|
549
|
-
<CTextHeader
|
|
550
|
-
text={'QUALITY'}
|
|
551
|
-
widthArr={Dimensions.get('screen').width * 0.4}
|
|
552
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
553
|
-
color={'#094485'}
|
|
554
|
-
borderColor={'lightgrey'}
|
|
555
|
-
marginHorizontal={normalize(2)}
|
|
556
|
-
borderRadius={5}
|
|
557
|
-
elevation={0}
|
|
558
|
-
/>
|
|
559
|
-
<View style={styles.qualityDropdownContainer}>
|
|
560
|
-
<SDropDownNew
|
|
561
|
-
fontSize={normalize(11)}
|
|
562
|
-
fontWeight={'bold'}
|
|
563
|
-
dropdownapi={
|
|
564
|
-
'invget/invcommonget/rndddwdropdownselect 14,0,0,0,0,0,0'
|
|
565
|
-
}
|
|
566
|
-
iconName={'award'}
|
|
567
|
-
widthArr={Dimensions.get('screen').width * 0.4}
|
|
568
|
-
heightArr={Dimensions.get('screen').height * 0.052}
|
|
569
|
-
dropdowndata={batchdata.qualitynaturename}
|
|
570
|
-
onChangeData={val => {
|
|
571
|
-
handleBatchQualityNatureUpdate(
|
|
572
|
-
sectionIndex,
|
|
573
|
-
productIndex,
|
|
574
|
-
i,
|
|
575
|
-
val,
|
|
576
|
-
);
|
|
577
|
-
}}
|
|
578
|
-
disabled={verifyData == true ? true : false}
|
|
579
|
-
editable={true}
|
|
580
|
-
refreshCount={val =>
|
|
581
|
-
val == undefined ? setRefresh(refresh + 1) : null
|
|
582
|
-
}
|
|
583
|
-
/>
|
|
584
|
-
</View>
|
|
585
|
-
</View>
|
|
586
|
-
|
|
587
|
-
<View>
|
|
588
|
-
<CTextHeader
|
|
589
|
-
text={'IMAGE'}
|
|
590
|
-
widthArr={Dimensions.get('screen').width * 0.25}
|
|
591
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
592
|
-
color={'#094485'}
|
|
593
|
-
borderColor={'lightgrey'}
|
|
594
|
-
marginHorizontal={normalize(2)}
|
|
595
|
-
borderRadius={5}
|
|
596
|
-
elevation={0}
|
|
597
|
-
/>
|
|
598
|
-
<View style={styles.imageContainer}>
|
|
599
|
-
{verifyData != true ? (
|
|
600
|
-
<TouchableOpacity
|
|
601
|
-
style={styles.imageButton}
|
|
602
|
-
onPress={() => {
|
|
603
|
-
if (Platform.OS != 'web') {
|
|
604
|
-
navigation.navigate('FileExplorer', {
|
|
605
|
-
visibility: 1,
|
|
606
|
-
data: invoiceData.data[
|
|
607
|
-
sectionIndex
|
|
608
|
-
].productdetail[productIndex].batchdetail[
|
|
609
|
-
i
|
|
610
|
-
].media.map(item => ({
|
|
611
|
-
...item,
|
|
612
|
-
savedimages: item?.savedimages
|
|
613
|
-
? item?.savedimages?.split(',')
|
|
614
|
-
: [],
|
|
615
|
-
savedvideo: item.savedvideo
|
|
616
|
-
? item?.savedvideo?.split(',')
|
|
617
|
-
: [],
|
|
618
|
-
savedaudio: item.savedaudio
|
|
619
|
-
? item.savedaudio.split(',')
|
|
620
|
-
: [],
|
|
621
|
-
savedpdf: item.savedpdf
|
|
622
|
-
? item.savedpdf.split(',')
|
|
623
|
-
: [],
|
|
624
|
-
})),
|
|
625
|
-
callBack: val => {
|
|
626
|
-
setFilesData(val);
|
|
627
|
-
handleUpdateMediaProduct(
|
|
628
|
-
sectionIndex,
|
|
629
|
-
productIndex,
|
|
630
|
-
i,
|
|
631
|
-
val,
|
|
632
|
-
);
|
|
633
|
-
},
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
}}>
|
|
637
|
-
{isNUQ(batchdata?.productimage) ? (
|
|
638
|
-
<Image
|
|
639
|
-
resizeMode="cover"
|
|
640
|
-
style={styles.productImage}
|
|
641
|
-
source={{
|
|
642
|
-
uri: `${APIURL}invfile/getFile/image/${batchdata?.productimage}`,
|
|
643
|
-
}}
|
|
644
|
-
/>
|
|
645
|
-
) : (
|
|
646
|
-
<Icons.FontAwesome5
|
|
647
|
-
name="camera"
|
|
648
|
-
color="#094485"
|
|
649
|
-
size={normalize(15)}
|
|
650
|
-
/>
|
|
651
|
-
)}
|
|
652
|
-
</TouchableOpacity>
|
|
653
|
-
) : (
|
|
654
|
-
<Image
|
|
655
|
-
resizeMode="cover"
|
|
656
|
-
style={styles.productImage}
|
|
657
|
-
source={{
|
|
658
|
-
uri: `${APIURL}invfile/getFile/image/${batchdata?.productimage}`,
|
|
659
|
-
}}
|
|
660
|
-
/>
|
|
661
|
-
)}
|
|
662
|
-
</View>
|
|
663
|
-
</View>
|
|
664
|
-
|
|
665
|
-
{verifyData != true ? (
|
|
666
|
-
<View>
|
|
667
|
-
<CTextHeader
|
|
668
|
-
text={'REMARKS'}
|
|
669
|
-
widthArr={Dimensions.get('screen').width * 0.25}
|
|
670
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
671
|
-
color={'#094485'}
|
|
672
|
-
borderColor={'lightgrey'}
|
|
673
|
-
marginHorizontal={normalize(2)}
|
|
674
|
-
borderRadius={5}
|
|
675
|
-
elevation={0}
|
|
676
|
-
/>
|
|
677
|
-
<STextInputNew
|
|
678
|
-
data={{
|
|
679
|
-
borderWidth: 1,
|
|
680
|
-
borderColor: 'lightgrey',
|
|
681
|
-
elevation: 0,
|
|
682
|
-
borderRadius: 5,
|
|
683
|
-
fontWeight: 'bold',
|
|
684
|
-
color: 'black',
|
|
685
|
-
itemwidth: Dimensions.get('screen').width * 0.25,
|
|
686
|
-
paddingTop: 5,
|
|
687
|
-
paddingBottom: 5,
|
|
688
|
-
height: Dimensions.get('screen').height * 0.05,
|
|
689
|
-
textAlign: 'center',
|
|
690
|
-
marginTop: normalize(2),
|
|
691
|
-
marginHorizontal: normalize(2),
|
|
692
|
-
value: batchdata.remarks,
|
|
693
|
-
}}
|
|
694
|
-
callBack={val => {
|
|
695
|
-
handleBatchFieldUpdate(
|
|
696
|
-
sectionIndex,
|
|
697
|
-
productIndex,
|
|
698
|
-
i,
|
|
699
|
-
val,
|
|
700
|
-
'remarks',
|
|
701
|
-
);
|
|
702
|
-
}}
|
|
703
|
-
/>
|
|
704
|
-
</View>
|
|
705
|
-
) : null}
|
|
706
|
-
|
|
707
|
-
<View>
|
|
708
|
-
<CTextHeader
|
|
709
|
-
text={'MEDIA'}
|
|
710
|
-
fontSize={10}
|
|
711
|
-
widthArr={Dimensions.get('screen').width * 0.26}
|
|
712
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
713
|
-
color={'#094485'}
|
|
714
|
-
borderColor={'lightgrey'}
|
|
715
|
-
marginHorizontal={normalize(2)}
|
|
716
|
-
borderRadius={5}
|
|
717
|
-
elevation={0}
|
|
718
|
-
/>
|
|
719
|
-
<View style={styles.mediaContainer}>
|
|
720
|
-
<TouchableOpacity
|
|
721
|
-
style={styles.mediaButton}
|
|
722
|
-
onPress={() => {
|
|
723
|
-
if (Platform.OS != 'web') {
|
|
724
|
-
navigation.navigate('FileExplorer', {
|
|
725
|
-
visibility: 0,
|
|
726
|
-
data: invoiceData.data[
|
|
727
|
-
sectionIndex
|
|
728
|
-
].productdetail[productIndex].batchdetail[
|
|
729
|
-
i
|
|
730
|
-
].media.map(item => ({
|
|
731
|
-
...item,
|
|
732
|
-
savedimages: item?.savedimages
|
|
733
|
-
? item.savedimages.split(',')
|
|
734
|
-
: [],
|
|
735
|
-
savedvideo: item?.savedvideo
|
|
736
|
-
? item?.savedvideo?.split(',')
|
|
737
|
-
: [],
|
|
738
|
-
savedaudio: item?.savedaudio
|
|
739
|
-
? item.savedaudio.split(',')
|
|
740
|
-
: [],
|
|
741
|
-
savedpdf: item?.savedpdf
|
|
742
|
-
? item.savedpdf.split(',')
|
|
743
|
-
: [],
|
|
744
|
-
})),
|
|
745
|
-
callBack: val => {
|
|
746
|
-
console.log(
|
|
747
|
-
'********************************',
|
|
748
|
-
val,
|
|
749
|
-
);
|
|
750
|
-
setFilesData(val);
|
|
751
|
-
handleUpdateMedia(
|
|
752
|
-
sectionIndex,
|
|
753
|
-
productIndex,
|
|
754
|
-
i,
|
|
755
|
-
val,
|
|
756
|
-
);
|
|
757
|
-
},
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
}}>
|
|
761
|
-
<Icons.FontAwesome5
|
|
762
|
-
name="play"
|
|
763
|
-
color="#094485"
|
|
764
|
-
size={normalize(15)}
|
|
765
|
-
/>
|
|
766
|
-
</TouchableOpacity>
|
|
767
|
-
</View>
|
|
768
|
-
</View>
|
|
769
|
-
|
|
770
|
-
{verifyData == true ? (
|
|
771
|
-
<View>
|
|
772
|
-
<CTextHeader
|
|
773
|
-
text={'VERIFY'}
|
|
774
|
-
widthArr={Dimensions.get('screen').width * 0.15}
|
|
775
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
776
|
-
color={'#094485'}
|
|
777
|
-
borderColor={'lightgrey'}
|
|
778
|
-
marginHorizontal={normalize(2)}
|
|
779
|
-
borderRadius={5}
|
|
780
|
-
elevation={0}
|
|
781
|
-
/>
|
|
782
|
-
<View style={styles.verifyContainer}>
|
|
783
|
-
<SCheckBox
|
|
784
|
-
data={{
|
|
785
|
-
value: batchdata.batchqualityverify,
|
|
786
|
-
size: 20,
|
|
787
|
-
}}
|
|
788
|
-
callBack={val => {
|
|
789
|
-
handleBatchFieldUpdate(
|
|
790
|
-
sectionIndex,
|
|
791
|
-
productIndex,
|
|
792
|
-
i,
|
|
793
|
-
val,
|
|
794
|
-
'batchqualityverify',
|
|
795
|
-
);
|
|
796
|
-
}}
|
|
797
|
-
/>
|
|
798
|
-
</View>
|
|
799
|
-
</View>
|
|
800
|
-
) : null}
|
|
801
|
-
|
|
802
|
-
<View>
|
|
803
|
-
<CTextHeader
|
|
804
|
-
text={''}
|
|
805
|
-
widthArr={Dimensions.get('screen').width * 0.3}
|
|
806
|
-
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
807
|
-
color={'#094485'}
|
|
808
|
-
borderColor={'lightgrey'}
|
|
809
|
-
marginHorizontal={normalize(2)}
|
|
810
|
-
borderRadius={5}
|
|
811
|
-
elevation={0}
|
|
812
|
-
/>
|
|
813
|
-
<View style={styles.freeContainer}>
|
|
814
|
-
<TouchableOpacity
|
|
815
|
-
style={styles.freeButton}
|
|
816
|
-
onPress={() => {
|
|
817
|
-
navigationTo(
|
|
818
|
-
false,
|
|
819
|
-
batchdata.batch,
|
|
820
|
-
item.purchaseproduct,
|
|
821
|
-
batchdata.batchcode,
|
|
822
|
-
true,
|
|
823
|
-
i,
|
|
824
|
-
);
|
|
825
|
-
}}>
|
|
826
|
-
<View style={styles.freeBadge}>
|
|
827
|
-
<Text style={styles.freeBadgeText}>
|
|
828
|
-
{getLength(batchdata.productfree)}
|
|
829
|
-
</Text>
|
|
830
|
-
</View>
|
|
831
|
-
<Icons.FontAwesome5
|
|
832
|
-
name="cart-arrow-down"
|
|
833
|
-
color="#094485"
|
|
834
|
-
size={normalize(15)}
|
|
835
|
-
/>
|
|
836
|
-
</TouchableOpacity>
|
|
837
|
-
</View>
|
|
838
|
-
</View>
|
|
839
|
-
</View>
|
|
840
|
-
);
|
|
841
|
-
})}
|
|
842
|
-
</View>
|
|
843
|
-
</ScrollView>
|
|
844
|
-
</View>
|
|
845
|
-
) : null}
|
|
846
|
-
</View>
|
|
847
|
-
);
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
const styles = StyleSheet.create({
|
|
851
|
-
// Left Actions Styles
|
|
852
|
-
leftActionsContainer: {
|
|
853
|
-
// justifyContent: 'flex-start',
|
|
854
|
-
// alignItems: 'center',
|
|
855
|
-
// borderTopLeftRadius: 10,
|
|
856
|
-
// borderBottomLeftRadius: 10,
|
|
857
|
-
// flexDirection: 'row',
|
|
858
|
-
// paddingHorizontal: normalize(10),
|
|
859
|
-
// marginBottom: normalize(7),
|
|
860
|
-
flexDirection: 'row',
|
|
861
|
-
marginTop: normalize(10),
|
|
862
|
-
paddingHorizontal: normalize(10),
|
|
863
|
-
},
|
|
864
|
-
actionButton: {
|
|
865
|
-
marginLeft: normalize(5),
|
|
866
|
-
},
|
|
867
|
-
actionIconContainer: {
|
|
868
|
-
justifyContent: 'center',
|
|
869
|
-
alignItems: 'center',
|
|
870
|
-
...CButtonShadow(),
|
|
871
|
-
borderRadius: normalize(5),
|
|
872
|
-
paddingHorizontal: normalize(3),
|
|
873
|
-
paddingVertical: normalize(5),
|
|
874
|
-
height: normalize(30),
|
|
875
|
-
width: normalize(30),
|
|
876
|
-
},
|
|
877
|
-
detailsButton: {
|
|
878
|
-
backgroundColor: '#f4f5ae',
|
|
879
|
-
},
|
|
880
|
-
supplierButton: {
|
|
881
|
-
backgroundColor: '#aef5b4',
|
|
882
|
-
},
|
|
883
|
-
actionText: {
|
|
884
|
-
fontSize: normalize(8),
|
|
885
|
-
fontWeight: 'bold',
|
|
886
|
-
color: Global.AppTheme.primary_color,
|
|
887
|
-
},
|
|
888
|
-
|
|
889
|
-
// Right Actions Styles
|
|
890
|
-
rightActionsContainer: {
|
|
891
|
-
justifyContent: 'flex-start',
|
|
892
|
-
alignItems: 'center',
|
|
893
|
-
borderTopLeftRadius: 10,
|
|
894
|
-
borderBottomLeftRadius: 10,
|
|
895
|
-
flexDirection: 'row',
|
|
896
|
-
paddingHorizontal: normalize(10),
|
|
897
|
-
marginBottom: normalize(7),
|
|
898
|
-
},
|
|
899
|
-
|
|
900
|
-
// Product Card Styles
|
|
901
|
-
productCard: {
|
|
902
|
-
padding: normalize(5),
|
|
903
|
-
marginVertical: 5,
|
|
904
|
-
borderLeftWidth: normalize(10),
|
|
905
|
-
backgroundColor: '#faeeeb',
|
|
906
|
-
marginHorizontal: normalize(10),
|
|
907
|
-
marginBottom: normalize(10),
|
|
908
|
-
borderRadius: normalize(5),
|
|
909
|
-
shadowColor: Global.AppTheme.primary_color,
|
|
910
|
-
shadowOffset: { width: 4, height: 4 },
|
|
911
|
-
shadowOpacity: 0.6,
|
|
912
|
-
shadowRadius: 10,
|
|
913
|
-
elevation: 8,
|
|
914
|
-
...CButtonShadow(),
|
|
915
|
-
},
|
|
916
|
-
productHeader: {
|
|
917
|
-
alignItems: 'center',
|
|
918
|
-
flexDirection: 'row',
|
|
919
|
-
padding: normalize(2),
|
|
920
|
-
},
|
|
921
|
-
productName: {
|
|
922
|
-
fontWeight: 'bold',
|
|
923
|
-
marginLeft: normalize(20),
|
|
924
|
-
fontSize: normalize(13),
|
|
925
|
-
color: '#094485',
|
|
926
|
-
marginHorizontal: normalize(5),
|
|
927
|
-
width: '60%',
|
|
928
|
-
},
|
|
929
|
-
productInfoRow: {
|
|
930
|
-
justifyContent: 'space-between',
|
|
931
|
-
flexDirection: 'row',
|
|
932
|
-
},
|
|
933
|
-
infoText: {
|
|
934
|
-
color: '#094485',
|
|
935
|
-
fontWeight: '500',
|
|
936
|
-
fontSize: normalize(10),
|
|
937
|
-
},
|
|
938
|
-
infoValue: {
|
|
939
|
-
fontSize: normalize(10),
|
|
940
|
-
fontWeight: 'bold',
|
|
941
|
-
},
|
|
942
|
-
|
|
943
|
-
// Expanded Content Styles
|
|
944
|
-
expandedContent: {
|
|
945
|
-
paddingHorizontal: normalize(5),
|
|
946
|
-
marginHorizontal: normalize(10),
|
|
947
|
-
marginBottom: normalize(10),
|
|
948
|
-
},
|
|
949
|
-
notesContainer: {
|
|
950
|
-
paddingHorizontal: normalize(5),
|
|
951
|
-
marginHorizontal: normalize(10),
|
|
952
|
-
justifyContent: 'flex-end',
|
|
953
|
-
alignItems: 'center',
|
|
954
|
-
flexDirection: 'row',
|
|
955
|
-
},
|
|
956
|
-
notesButton: {
|
|
957
|
-
marginVertical: normalize(5),
|
|
958
|
-
},
|
|
959
|
-
scrollView: {
|
|
960
|
-
marginVertical: normalize(3),
|
|
961
|
-
},
|
|
962
|
-
tableContainer: {
|
|
963
|
-
flex: 1,
|
|
964
|
-
marginTop: 0,
|
|
965
|
-
marginVertical: normalize(3),
|
|
966
|
-
alignSelf: 'center',
|
|
967
|
-
},
|
|
968
|
-
tableHeader: {
|
|
969
|
-
flexDirection: 'row',
|
|
970
|
-
},
|
|
971
|
-
tableRow: {
|
|
972
|
-
flexDirection: 'row',
|
|
973
|
-
marginTop: normalize(1),
|
|
974
|
-
backgroundColor: 'white',
|
|
975
|
-
},
|
|
976
|
-
|
|
977
|
-
// Quality Dropdown Styles
|
|
978
|
-
qualityDropdownContainer: {
|
|
979
|
-
justifyContent: 'center',
|
|
980
|
-
borderWidth: 0,
|
|
981
|
-
},
|
|
982
|
-
|
|
983
|
-
// Image Styles
|
|
984
|
-
imageContainer: {
|
|
985
|
-
width: Dimensions.get('screen').width * 0.26,
|
|
986
|
-
height: Dimensions.get('screen').height * 0.052,
|
|
987
|
-
justifyContent: 'center',
|
|
988
|
-
alignItems: 'center',
|
|
989
|
-
borderWidth: 1,
|
|
990
|
-
borderRadius: 5,
|
|
991
|
-
borderColor: 'lightgrey',
|
|
992
|
-
},
|
|
993
|
-
imageButton: {
|
|
994
|
-
marginHorizontal: normalize(5),
|
|
995
|
-
},
|
|
996
|
-
productImage: {
|
|
997
|
-
width: normalize(65),
|
|
998
|
-
padding: normalize(25),
|
|
999
|
-
alignSelf: 'center',
|
|
1000
|
-
paddingTop: normalize(5),
|
|
1001
|
-
},
|
|
1002
|
-
|
|
1003
|
-
// Media Styles
|
|
1004
|
-
mediaContainer: {
|
|
1005
|
-
width: Dimensions.get('screen').width * 0.26,
|
|
1006
|
-
height: Dimensions.get('screen').height * 0.052,
|
|
1007
|
-
justifyContent: 'center',
|
|
1008
|
-
alignItems: 'center',
|
|
1009
|
-
borderWidth: 1,
|
|
1010
|
-
borderRadius: 5,
|
|
1011
|
-
borderColor: 'lightgrey',
|
|
1012
|
-
},
|
|
1013
|
-
mediaButton: {
|
|
1014
|
-
marginHorizontal: normalize(5),
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
// Verify Styles
|
|
1018
|
-
verifyContainer: {
|
|
1019
|
-
borderWidth: 1,
|
|
1020
|
-
borderColor: 'lightgrey',
|
|
1021
|
-
elevation: 0,
|
|
1022
|
-
borderRadius: 5,
|
|
1023
|
-
width: Dimensions.get('screen').width * 0.15,
|
|
1024
|
-
paddingTop: 5,
|
|
1025
|
-
paddingBottom: 5,
|
|
1026
|
-
height: Dimensions.get('screen').height * 0.052,
|
|
1027
|
-
alignItems: 'center',
|
|
1028
|
-
justifyContent: 'center',
|
|
1029
|
-
},
|
|
1030
|
-
|
|
1031
|
-
// Free Product Styles
|
|
1032
|
-
freeContainer: {
|
|
1033
|
-
borderWidth: 0,
|
|
1034
|
-
alignItems: 'flex-start',
|
|
1035
|
-
justifyContent: 'center',
|
|
1036
|
-
height: Dimensions.get('screen').height * 0.056,
|
|
1037
|
-
},
|
|
1038
|
-
freeButton: {
|
|
1039
|
-
marginHorizontal: normalize(5),
|
|
1040
|
-
},
|
|
1041
|
-
freeBadge: {
|
|
1042
|
-
position: 'absolute',
|
|
1043
|
-
right: normalize(-5),
|
|
1044
|
-
top: normalize(-10),
|
|
1045
|
-
backgroundColor: 'white',
|
|
1046
|
-
alignItems: 'center',
|
|
1047
|
-
borderRadius: 20,
|
|
1048
|
-
width: normalize(15),
|
|
1049
|
-
borderWidth: 0.5,
|
|
1050
|
-
zIndex: 10,
|
|
1051
|
-
},
|
|
1052
|
-
freeBadgeText: {
|
|
1053
|
-
color: 'black',
|
|
1054
|
-
fontSize: normalize(11),
|
|
1055
|
-
fontWeight: 'bold',
|
|
1056
|
-
},
|
|
1057
|
-
});
|
|
1058
|
-
|
|
1059
|
-
export default QualityProductCard;
|