@jescon-technologies/react-native-ui-kit 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +66 -0
- package/index.js +0 -4
- package/package.json +3 -34
- package/src/Alerts/AAlert.js +3 -3
- package/src/Alerts/AAlertIOS.js +3 -3
- package/src/{common → Common}/NetworkServiceCall.js +1 -1
- package/src/CommonStyle/CommonTheme.js +11 -0
- package/src/CommonStyle/ComponentFunctions.js +632 -0
- package/src/CommonStyle/PopupStyle.js +146 -0
- package/src/CommonStyle/commonStyle.js +93 -0
- package/src/CommonStyle/componentStyle.js +545 -0
- package/src/CommonStyle/optionListStyles.js +175 -0
- package/src/Components/ByProductPage.js +200 -0
- package/src/Components/CDropDownListNew.js +153 -0
- package/src/Components/CSupplierList.js +88 -0
- package/src/Components/CVerificationCard.js +2822 -0
- package/src/Components/CustomButton.js +67 -0
- package/src/Components/CustomCard.js +127 -0
- package/src/Components/CustomTextInput.js +47 -0
- package/src/Components/EquipmentPage.js +313 -0
- package/src/Components/FilterInput.Copy.js +723 -0
- package/src/Components/FilterInput.js +569 -0
- package/src/Components/HSubHeading.js +68 -0
- package/src/Components/HeaderCard.js +40 -0
- package/src/Components/MoreOptionsScreen.js +251 -0
- package/src/Components/NonSwipableProductCard.js +226 -0
- package/src/Components/NonSwipableSupplierCard.js +348 -0
- package/src/Components/ProductCard.js +1336 -0
- package/src/Components/QualityProductCard.js +1059 -0
- package/src/Components/RateProductCard.js +1452 -0
- package/src/Components/RawMaterial.js +261 -0
- package/src/Components/SDropDownEdited.js +549 -0
- package/src/Components/SDropDownNew.js +529 -0
- package/src/Components/SHelpDescription.js +147 -0
- package/src/Components/STextInputNew.js +510 -0
- package/src/Components/SearchProductCard.js +470 -0
- package/src/Components/StageByProduct.js +199 -0
- package/src/Components/SupplierCard.js +243 -0
- package/src/Components/SupplierInvoiceCard.js +405 -0
- package/src/Components/SwipableSupplierCard.js +136 -0
- package/src/Components/TagTemplate.js +74 -0
- package/src/Components/WrappedComponent.js +25 -0
- package/src/Custom/CBooking.js +944 -0
- package/src/Custom/CBookingPostpone.js +1822 -0
- package/src/Custom/CCalendar.js +560 -0
- package/src/Custom/CCard.js +880 -0
- package/src/Custom/CDetailCard.js +205 -0
- package/src/Custom/CHelpImage.js +52 -0
- package/src/Custom/CReport.js +569 -0
- package/src/Custom/CScrollView.js +73 -0
- package/src/Custom/CSignature.js +112 -0
- package/src/Custom/CSliderMenu.js +339 -0
- package/src/Custom/CSupplierCard.js +99 -0
- package/src/Custom/CTemplateCard.js +438 -0
- package/src/Custom/CTokenAllocation.js +1402 -0
- package/src/Custom/CTokenListOverlay.js +122 -0
- package/src/Custom/CWardStatus.js +444 -0
- package/src/Custom/Charts/CBarChart.js +218 -0
- package/src/Custom/Charts/CDashBoardList.js +133 -0
- package/src/Custom/Charts/CDashBoardTable.js +172 -0
- package/src/Custom/Charts/CLineChart.js +193 -0
- package/src/Custom/Charts/CPieChart.js +186 -0
- package/src/Custom/Loader.js +182 -0
- package/src/Custom/OUserView.js +1121 -0
- package/src/Custom/PreviewDosage.js +115 -0
- package/src/Custom/SearchLoader.js +32 -0
- package/src/Custom/TableComponent/CActivityTable.js +707 -0
- package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
- package/src/Custom/TableComponent/CTable.js +185 -0
- package/src/Custom/TableComponent/CTextBody.js +40 -0
- package/src/Custom/TableComponent/CTextHeader.js +17 -0
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
- package/src/Custom/TableComponent/SDropdownTable.js +491 -0
- package/src/Custom/TableComponent/TagTable.js +1200 -0
- package/src/CustomComponents/CAddColumn.js +140 -0
- package/src/CustomComponents/CAssessmentDelete.js +307 -0
- package/src/CustomComponents/CAwesomeButton.js +83 -0
- package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
- package/src/CustomComponents/CBackHandler.js +273 -0
- package/src/CustomComponents/CCalendar.js +243 -0
- package/src/CustomComponents/CCommentOverlay.js +202 -0
- package/src/CustomComponents/CComments.js +162 -0
- package/src/CustomComponents/CContainerView.js +24 -0
- package/src/CustomComponents/CCustomTextInput.js +336 -0
- package/src/CustomComponents/CDetailView.js +40 -0
- package/src/CustomComponents/CDropDownList.js +153 -0
- package/src/CustomComponents/CDropdownSelect.js +555 -0
- package/src/CustomComponents/CFooterView.js +42 -0
- package/src/CustomComponents/CImagePickerSave.js +316 -0
- package/src/CustomComponents/CModalOverlay.js +91 -0
- package/src/CustomComponents/CNetworkStatus.js +327 -0
- package/src/CustomComponents/CNotesInstructions.js +1000 -0
- package/src/CustomComponents/COverlay.js +81 -0
- package/src/CustomComponents/CRemarks.js +176 -0
- package/src/CustomComponents/CRowAdd.js +143 -0
- package/src/CustomComponents/CSummaryDropDown.js +327 -0
- package/src/CustomComponents/CText.js +9 -0
- package/src/CustomComponents/CVectorIcon.js +34 -0
- package/src/CustomComponents/HtmlContentViewer.js +65 -0
- package/src/CustomComponents/PdfContentViewer.js +90 -0
- package/src/CustomComponents/SDropDownDosage.js +1087 -0
- package/src/CustomComponents/SwipableProductCard.js +246 -0
- package/src/CustomComponents/SwipableProductImageCard.js +254 -0
- package/src/CustomComponents/WorkOrderDetails.js +1216 -0
- package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
- package/src/HOC/ConfirmOverlay.js +2 -2
- package/src/HOC/HMoreButton.js +1 -1
- package/src/HOC/HNatureHeading.js +1 -1
- package/src/HOC/HShadowButton.js +1 -1
- package/src/HOC/HShadowCountButton.js +1 -1
- package/src/Json/Chart.json +818 -0
- package/src/Json/Consultation.json +622 -0
- package/src/Json/CreditBill.json +490 -0
- package/src/Json/Dropdown.json +216 -0
- package/src/Json/DropdownConsultation.json +228 -0
- package/src/Json/DynamicReports.json +623 -0
- package/src/Json/Footer.json +79 -0
- package/src/Media/AudioScreen.js +2 -7
- package/src/Media/CCaptureImageWithoutEdit.js +1 -1
- package/src/Media/CImageGallery.js +2 -2
- package/src/Media/CSingleImage.js +2 -2
- package/src/Media/CVideoPlay.js +1 -1
- package/src/Media/DocumentScreen.js +2 -7
- package/src/Media/DrawingScreen.js +2 -6
- package/src/Media/ImageScreen.js +2 -6
- package/src/Media/VideoScreen.js +2 -7
- package/src/Navigation/PageNavigation.js +224 -0
- package/src/Navigation/useFocusEffect.js +2 -0
- package/src/Navigation/useFocusEffect.native.js +1 -0
- package/src/Navigation/useFocusEffect.web.js +1 -0
- package/src/Navigation/useIsFocused.js +1 -0
- package/src/Navigation/useIsFocused.native.js +1 -0
- package/src/Navigation/useIsFocused.web.js +1 -0
- package/src/Navigation/useNavigation.js +2 -0
- package/src/Navigation/useNavigation.native.js +1 -0
- package/src/Navigation/useNavigation.web.js +1 -0
- package/src/Screens/CMedications.js +528 -0
- package/src/Screens/CWebViewGallery.js +203 -0
- package/src/Screens/ChartScan.js +279 -0
- package/src/Screens/ChartScreenNew.js +1579 -0
- package/src/Screens/Consultation.js +1500 -0
- package/src/Screens/Dashboard.js +778 -0
- package/src/Screens/FileExplorer.js +288 -0
- package/src/Screens/Footer.js +340 -0
- package/src/Screens/ForgotPassword.js +288 -0
- package/src/Screens/HeaderBlock.js +353 -0
- package/src/Screens/Login.js +328 -0
- package/src/Screens/Notification.js +149 -0
- package/src/Screens/OcrScreen.js +20 -0
- package/src/Screens/PdfPreview.js +507 -0
- package/src/Screens/RegistrationDetails.js +467 -0
- package/src/Screens/SearchScreen.js +582 -0
- package/src/Screens/Splash.js +788 -0
- package/src/Screens/SwipeLeftView.js +1867 -0
- package/src/StaticComponents/SDatePickerLabel.js +1 -1
- package/src/StaticComponents/SDatePickerNew.js +1 -1
- package/src/StaticComponents/SDateTimePickerNew.js +2 -2
- package/src/StaticComponents/SDropDownGenerate.js +3 -3
- package/src/StaticComponents/SDropDownHoc.js +4 -4
- package/src/StaticComponents/SDropDownIcon.js +1 -1
- package/src/StaticComponents/SMenuBox.js +2 -2
- package/src/StaticComponents/SSearch.js +2 -2
- package/src/StaticComponents/STextInput.js +1 -1
- package/src/StaticComponents/STimePicker.js +1 -1
- package/src/StaticComponents/STimingDropDownNew.js +2 -6
- package/src/StaticComponents/STimingSwitch.js +1 -1
- package/src/layout/CContainerView.js +1 -1
- package/src/layout/CDetailView.js +3 -3
- package/src/layout/HeaderBlock.js +5 -5
- package/src/layout/INVLoginLayout.js +3 -4
- package/src/layout/Loader.js +2 -2
- package/src/HOC/HAbsolute.js +0 -56
- package/src/HOC/HDiscontinue.js +0 -105
- package/src/HOC/HOverlay.js +0 -99
- package/src/layout/FooterBlock.js +0 -821
- /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
- /package/src/{common → Common}/Icons.js +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import {View, Text, Dimensions, ScrollView} from 'react-native';
|
|
2
|
+
import React, {useContext, useEffect, useState} from 'react';
|
|
3
|
+
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
4
|
+
import {notifyMessage} from '../CommonStyle/ComponentFunctions';
|
|
5
|
+
import {normalize} from '../CommonStyle/componentStyle';
|
|
6
|
+
import Loader from '../Custom/Loader';
|
|
7
|
+
import CTextHeader from '../Custom/TableComponent/CTextHeader';
|
|
8
|
+
import STextInput from '../StaticComponents/STextInput';
|
|
9
|
+
import ContextBio from '../ContextAPI/ContextBio';
|
|
10
|
+
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
11
|
+
|
|
12
|
+
const RawMaterial = props => {
|
|
13
|
+
const {argument} = props;
|
|
14
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
15
|
+
// const [data, setData] = useState(null);
|
|
16
|
+
const { invoiceData, setInvoiceData } = useContext(ContextBio);
|
|
17
|
+
|
|
18
|
+
const data = invoiceData?.workOrder[argument.workOrderIndex]?.details[argument.detailIndex]?.workorderstageproductdetail;
|
|
19
|
+
|
|
20
|
+
// console.log('invoicedataaaaaaaaaaaaa',JSON.stringify(invoiceData.workOrder[argument.workOrderIndex].details[argument.detailIndex].rawMaterial))
|
|
21
|
+
|
|
22
|
+
// useEffect for API call
|
|
23
|
+
// useEffect(() => {
|
|
24
|
+
// getData();
|
|
25
|
+
// }, []);
|
|
26
|
+
|
|
27
|
+
// Function for fetch data from API
|
|
28
|
+
function getData() {
|
|
29
|
+
setIsLoading(true);
|
|
30
|
+
let buttonapi = `${APIURL}invget/invcommonget/rninsuworkorderproductdetail ${argument.argument}`;
|
|
31
|
+
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', buttonapi);
|
|
32
|
+
NetworkServiceCall('get', buttonapi).then(function (response) {
|
|
33
|
+
if (response.httpstatus == 200) {
|
|
34
|
+
// setData(response.data.data);
|
|
35
|
+
setInvoiceData(prevData => {
|
|
36
|
+
const updatedWorkOrder = prevData.workOrder.map((item, index) => {
|
|
37
|
+
if (index === argument.workOrderIndex) {
|
|
38
|
+
const updatedDetails = item.details.map((detail, detailIndex) => {
|
|
39
|
+
if (detailIndex === argument.detailIndex) {
|
|
40
|
+
return {...detail, rawMaterial: response.data.data};
|
|
41
|
+
}
|
|
42
|
+
return detail;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return {...item, details: updatedDetails};
|
|
46
|
+
}
|
|
47
|
+
return item;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
...prevData,
|
|
52
|
+
workOrder: updatedWorkOrder,
|
|
53
|
+
EditStatus: true,
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
setIsLoading(false);
|
|
57
|
+
console.log(
|
|
58
|
+
'RESPONSEEEEEEEEEEE FROM CONSULTATTION22222222',
|
|
59
|
+
JSON.stringify(response.data.data),
|
|
60
|
+
);
|
|
61
|
+
} else {
|
|
62
|
+
notifyMessage('Data Not Found.....');
|
|
63
|
+
setIsLoading(false);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
// getLoading(v => setIsLoading(false));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<View style={{width: Dimensions.get('screen').width * 0.95}}>
|
|
71
|
+
{/* Container for the page title */}
|
|
72
|
+
<View
|
|
73
|
+
style={{
|
|
74
|
+
borderWidth: 0,
|
|
75
|
+
justifyContent: 'center',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
marginTop: normalize(5),
|
|
78
|
+
marginVertical: normalize(5),
|
|
79
|
+
alignSelf: 'center',
|
|
80
|
+
}}>
|
|
81
|
+
<Text
|
|
82
|
+
style={{
|
|
83
|
+
fontSize: normalize(14),
|
|
84
|
+
fontWeight: 'bold',
|
|
85
|
+
color: '#094485',
|
|
86
|
+
}}>
|
|
87
|
+
Raw Material
|
|
88
|
+
</Text>
|
|
89
|
+
</View>
|
|
90
|
+
{isLoading ? (
|
|
91
|
+
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
|
|
92
|
+
<Loader />
|
|
93
|
+
</View>
|
|
94
|
+
) : (
|
|
95
|
+
<ScrollView horizontal={true} style={{marginVertical: normalize(3)}}>
|
|
96
|
+
<View>
|
|
97
|
+
{
|
|
98
|
+
// Table header section
|
|
99
|
+
data != undefined && data != null ? (
|
|
100
|
+
<View style={{flexDirection: 'row'}}>
|
|
101
|
+
<CTextHeader
|
|
102
|
+
text={'Product'}
|
|
103
|
+
fontSize={10}
|
|
104
|
+
widthArr={Dimensions.get('screen').width * 0.35}
|
|
105
|
+
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
106
|
+
color={'#094485'}
|
|
107
|
+
borderColor={'lightgrey'}
|
|
108
|
+
marginHorizontal={normalize(2)}
|
|
109
|
+
borderRadius={5}
|
|
110
|
+
elevation={0}
|
|
111
|
+
/>
|
|
112
|
+
<CTextHeader
|
|
113
|
+
text={'Batch'}
|
|
114
|
+
fontSize={10}
|
|
115
|
+
widthArr={Dimensions.get('screen').width * 0.19}
|
|
116
|
+
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
117
|
+
color={'#094485'}
|
|
118
|
+
borderColor={'lightgrey'}
|
|
119
|
+
marginHorizontal={normalize(2)}
|
|
120
|
+
borderRadius={5}
|
|
121
|
+
elevation={0}
|
|
122
|
+
/>
|
|
123
|
+
<CTextHeader
|
|
124
|
+
text={'Quantity'}
|
|
125
|
+
fontSize={10}
|
|
126
|
+
widthArr={Dimensions.get('screen').width * 0.19}
|
|
127
|
+
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
128
|
+
color={'#094485'}
|
|
129
|
+
borderColor={'lightgrey'}
|
|
130
|
+
marginHorizontal={normalize(2)}
|
|
131
|
+
borderRadius={5}
|
|
132
|
+
elevation={0}
|
|
133
|
+
/>
|
|
134
|
+
<CTextHeader
|
|
135
|
+
text={'Unit'}
|
|
136
|
+
fontSize={10}
|
|
137
|
+
widthArr={Dimensions.get('screen').width * 0.2}
|
|
138
|
+
bgColor={'rgba(184, 184, 191,0.3)'}
|
|
139
|
+
color={'#094485'}
|
|
140
|
+
borderColor={'lightgrey'}
|
|
141
|
+
marginHorizontal={normalize(2)}
|
|
142
|
+
borderRadius={5}
|
|
143
|
+
elevation={0}
|
|
144
|
+
/>
|
|
145
|
+
</View>
|
|
146
|
+
) : null
|
|
147
|
+
}
|
|
148
|
+
{data != undefined && data != null
|
|
149
|
+
? data.map((item, i) => (
|
|
150
|
+
<View
|
|
151
|
+
key={i}
|
|
152
|
+
style={{
|
|
153
|
+
flexDirection: 'row',
|
|
154
|
+
}}>
|
|
155
|
+
{/* Product */}
|
|
156
|
+
<View
|
|
157
|
+
style={{
|
|
158
|
+
borderWidth: 1,
|
|
159
|
+
borderColor: 'lightgrey',
|
|
160
|
+
elevation: 0,
|
|
161
|
+
borderRadius: 5,
|
|
162
|
+
width: Dimensions.get('screen').width * 0.35,
|
|
163
|
+
paddingTop: 5,
|
|
164
|
+
paddingBottom: 5,
|
|
165
|
+
height: Dimensions.get('screen').height * 0.056,
|
|
166
|
+
alignItems: 'flex-start',
|
|
167
|
+
justifyContent: 'center',
|
|
168
|
+
paddingHorizontal: normalize(10),
|
|
169
|
+
}}>
|
|
170
|
+
<Text
|
|
171
|
+
style={{
|
|
172
|
+
fontWeight: 'bold',
|
|
173
|
+
color: 'black',
|
|
174
|
+
fontSize: normalize(10),
|
|
175
|
+
}}>
|
|
176
|
+
{item.productname}
|
|
177
|
+
</Text>
|
|
178
|
+
</View>
|
|
179
|
+
{/* Batch */}
|
|
180
|
+
<View
|
|
181
|
+
style={{
|
|
182
|
+
borderWidth: 1,
|
|
183
|
+
borderColor: 'lightgrey',
|
|
184
|
+
elevation: 0,
|
|
185
|
+
borderRadius: 5,
|
|
186
|
+
width: Dimensions.get('screen').width * 0.2,
|
|
187
|
+
paddingTop: 5,
|
|
188
|
+
paddingBottom: 5,
|
|
189
|
+
height: Dimensions.get('screen').height * 0.056,
|
|
190
|
+
alignItems: 'flex-start',
|
|
191
|
+
justifyContent: 'center',
|
|
192
|
+
paddingHorizontal: normalize(10),
|
|
193
|
+
}}>
|
|
194
|
+
<Text
|
|
195
|
+
style={{
|
|
196
|
+
fontWeight: 'bold',
|
|
197
|
+
color: 'black',
|
|
198
|
+
fontSize: normalize(10),
|
|
199
|
+
}}>
|
|
200
|
+
{item.batch}
|
|
201
|
+
</Text>
|
|
202
|
+
</View>
|
|
203
|
+
{/* Quantity */}
|
|
204
|
+
<View
|
|
205
|
+
style={{
|
|
206
|
+
borderWidth: 1,
|
|
207
|
+
borderColor: 'lightgrey',
|
|
208
|
+
elevation: 0,
|
|
209
|
+
borderRadius: 5,
|
|
210
|
+
width: Dimensions.get('screen').width * 0.195,
|
|
211
|
+
paddingTop: 5,
|
|
212
|
+
paddingBottom: 5,
|
|
213
|
+
height: Dimensions.get('screen').height * 0.056,
|
|
214
|
+
alignItems: 'flex-start',
|
|
215
|
+
justifyContent: 'center',
|
|
216
|
+
paddingHorizontal: normalize(10),
|
|
217
|
+
}}>
|
|
218
|
+
<Text
|
|
219
|
+
style={{
|
|
220
|
+
fontWeight: 'bold',
|
|
221
|
+
color: 'black',
|
|
222
|
+
fontSize: normalize(10),
|
|
223
|
+
}}>
|
|
224
|
+
{item.quantityto}
|
|
225
|
+
</Text>
|
|
226
|
+
</View>
|
|
227
|
+
{/* Unit */}
|
|
228
|
+
<View
|
|
229
|
+
style={{
|
|
230
|
+
borderWidth: 1,
|
|
231
|
+
borderColor: 'lightgrey',
|
|
232
|
+
elevation: 0,
|
|
233
|
+
borderRadius: 5,
|
|
234
|
+
width: Dimensions.get('screen').width * 0.2,
|
|
235
|
+
paddingTop: 5,
|
|
236
|
+
paddingBottom: 5,
|
|
237
|
+
height: Dimensions.get('screen').height * 0.056,
|
|
238
|
+
alignItems: 'flex-start',
|
|
239
|
+
justifyContent: 'center',
|
|
240
|
+
paddingHorizontal: normalize(10),
|
|
241
|
+
}}>
|
|
242
|
+
<Text
|
|
243
|
+
style={{
|
|
244
|
+
fontWeight: 'bold',
|
|
245
|
+
color: 'black',
|
|
246
|
+
fontSize: normalize(10),
|
|
247
|
+
}}>
|
|
248
|
+
{item.unitname}
|
|
249
|
+
</Text>
|
|
250
|
+
</View>
|
|
251
|
+
</View>
|
|
252
|
+
))
|
|
253
|
+
: null}
|
|
254
|
+
</View>
|
|
255
|
+
</ScrollView>
|
|
256
|
+
)}
|
|
257
|
+
</View>
|
|
258
|
+
);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export default RawMaterial;
|