@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.
Files changed (177) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +0 -4
  3. package/package.json +3 -34
  4. package/src/Alerts/AAlert.js +3 -3
  5. package/src/Alerts/AAlertIOS.js +3 -3
  6. package/src/{common → Common}/NetworkServiceCall.js +1 -1
  7. package/src/CommonStyle/CommonTheme.js +11 -0
  8. package/src/CommonStyle/ComponentFunctions.js +632 -0
  9. package/src/CommonStyle/PopupStyle.js +146 -0
  10. package/src/CommonStyle/commonStyle.js +93 -0
  11. package/src/CommonStyle/componentStyle.js +545 -0
  12. package/src/CommonStyle/optionListStyles.js +175 -0
  13. package/src/Components/ByProductPage.js +200 -0
  14. package/src/Components/CDropDownListNew.js +153 -0
  15. package/src/Components/CSupplierList.js +88 -0
  16. package/src/Components/CVerificationCard.js +2822 -0
  17. package/src/Components/CustomButton.js +67 -0
  18. package/src/Components/CustomCard.js +127 -0
  19. package/src/Components/CustomTextInput.js +47 -0
  20. package/src/Components/EquipmentPage.js +313 -0
  21. package/src/Components/FilterInput.Copy.js +723 -0
  22. package/src/Components/FilterInput.js +569 -0
  23. package/src/Components/HSubHeading.js +68 -0
  24. package/src/Components/HeaderCard.js +40 -0
  25. package/src/Components/MoreOptionsScreen.js +251 -0
  26. package/src/Components/NonSwipableProductCard.js +226 -0
  27. package/src/Components/NonSwipableSupplierCard.js +348 -0
  28. package/src/Components/ProductCard.js +1336 -0
  29. package/src/Components/QualityProductCard.js +1059 -0
  30. package/src/Components/RateProductCard.js +1452 -0
  31. package/src/Components/RawMaterial.js +261 -0
  32. package/src/Components/SDropDownEdited.js +549 -0
  33. package/src/Components/SDropDownNew.js +529 -0
  34. package/src/Components/SHelpDescription.js +147 -0
  35. package/src/Components/STextInputNew.js +510 -0
  36. package/src/Components/SearchProductCard.js +470 -0
  37. package/src/Components/StageByProduct.js +199 -0
  38. package/src/Components/SupplierCard.js +243 -0
  39. package/src/Components/SupplierInvoiceCard.js +405 -0
  40. package/src/Components/SwipableSupplierCard.js +136 -0
  41. package/src/Components/TagTemplate.js +74 -0
  42. package/src/Components/WrappedComponent.js +25 -0
  43. package/src/Custom/CBooking.js +944 -0
  44. package/src/Custom/CBookingPostpone.js +1822 -0
  45. package/src/Custom/CCalendar.js +560 -0
  46. package/src/Custom/CCard.js +880 -0
  47. package/src/Custom/CDetailCard.js +205 -0
  48. package/src/Custom/CHelpImage.js +52 -0
  49. package/src/Custom/CReport.js +569 -0
  50. package/src/Custom/CScrollView.js +73 -0
  51. package/src/Custom/CSignature.js +112 -0
  52. package/src/Custom/CSliderMenu.js +339 -0
  53. package/src/Custom/CSupplierCard.js +99 -0
  54. package/src/Custom/CTemplateCard.js +438 -0
  55. package/src/Custom/CTokenAllocation.js +1402 -0
  56. package/src/Custom/CTokenListOverlay.js +122 -0
  57. package/src/Custom/CWardStatus.js +444 -0
  58. package/src/Custom/Charts/CBarChart.js +218 -0
  59. package/src/Custom/Charts/CDashBoardList.js +133 -0
  60. package/src/Custom/Charts/CDashBoardTable.js +172 -0
  61. package/src/Custom/Charts/CLineChart.js +193 -0
  62. package/src/Custom/Charts/CPieChart.js +186 -0
  63. package/src/Custom/Loader.js +182 -0
  64. package/src/Custom/OUserView.js +1121 -0
  65. package/src/Custom/PreviewDosage.js +115 -0
  66. package/src/Custom/SearchLoader.js +32 -0
  67. package/src/Custom/TableComponent/CActivityTable.js +707 -0
  68. package/src/Custom/TableComponent/CMoreButtonTable.js +197 -0
  69. package/src/Custom/TableComponent/CTable.js +185 -0
  70. package/src/Custom/TableComponent/CTextBody.js +40 -0
  71. package/src/Custom/TableComponent/CTextHeader.js +17 -0
  72. package/src/Custom/TableComponent/PreviewPrescriptionNew.js +1011 -0
  73. package/src/Custom/TableComponent/SDropdownTable.js +491 -0
  74. package/src/Custom/TableComponent/TagTable.js +1200 -0
  75. package/src/CustomComponents/CAddColumn.js +140 -0
  76. package/src/CustomComponents/CAssessmentDelete.js +307 -0
  77. package/src/CustomComponents/CAwesomeButton.js +83 -0
  78. package/src/CustomComponents/CAwesomeMoreButton.js +54 -0
  79. package/src/CustomComponents/CBackHandler.js +273 -0
  80. package/src/CustomComponents/CCalendar.js +243 -0
  81. package/src/CustomComponents/CCommentOverlay.js +202 -0
  82. package/src/CustomComponents/CComments.js +162 -0
  83. package/src/CustomComponents/CContainerView.js +24 -0
  84. package/src/CustomComponents/CCustomTextInput.js +336 -0
  85. package/src/CustomComponents/CDetailView.js +40 -0
  86. package/src/CustomComponents/CDropDownList.js +153 -0
  87. package/src/CustomComponents/CDropdownSelect.js +555 -0
  88. package/src/CustomComponents/CFooterView.js +42 -0
  89. package/src/CustomComponents/CImagePickerSave.js +316 -0
  90. package/src/CustomComponents/CModalOverlay.js +91 -0
  91. package/src/CustomComponents/CNetworkStatus.js +327 -0
  92. package/src/CustomComponents/CNotesInstructions.js +1000 -0
  93. package/src/CustomComponents/COverlay.js +81 -0
  94. package/src/CustomComponents/CRemarks.js +176 -0
  95. package/src/CustomComponents/CRowAdd.js +143 -0
  96. package/src/CustomComponents/CSummaryDropDown.js +327 -0
  97. package/src/CustomComponents/CText.js +9 -0
  98. package/src/CustomComponents/CVectorIcon.js +34 -0
  99. package/src/CustomComponents/HtmlContentViewer.js +65 -0
  100. package/src/CustomComponents/PdfContentViewer.js +90 -0
  101. package/src/CustomComponents/SDropDownDosage.js +1087 -0
  102. package/src/CustomComponents/SwipableProductCard.js +246 -0
  103. package/src/CustomComponents/SwipableProductImageCard.js +254 -0
  104. package/src/CustomComponents/WorkOrderDetails.js +1216 -0
  105. package/src/CustomComponents/WorkOrderDetailsPage.js +1213 -0
  106. package/src/HOC/ConfirmOverlay.js +2 -2
  107. package/src/HOC/HMoreButton.js +1 -1
  108. package/src/HOC/HNatureHeading.js +1 -1
  109. package/src/HOC/HShadowButton.js +1 -1
  110. package/src/HOC/HShadowCountButton.js +1 -1
  111. package/src/Json/Chart.json +818 -0
  112. package/src/Json/Consultation.json +622 -0
  113. package/src/Json/CreditBill.json +490 -0
  114. package/src/Json/Dropdown.json +216 -0
  115. package/src/Json/DropdownConsultation.json +228 -0
  116. package/src/Json/DynamicReports.json +623 -0
  117. package/src/Json/Footer.json +79 -0
  118. package/src/Media/AudioScreen.js +2 -7
  119. package/src/Media/CCaptureImageWithoutEdit.js +1 -1
  120. package/src/Media/CImageGallery.js +2 -2
  121. package/src/Media/CSingleImage.js +2 -2
  122. package/src/Media/CVideoPlay.js +1 -1
  123. package/src/Media/DocumentScreen.js +2 -7
  124. package/src/Media/DrawingScreen.js +2 -6
  125. package/src/Media/ImageScreen.js +2 -6
  126. package/src/Media/VideoScreen.js +2 -7
  127. package/src/Navigation/PageNavigation.js +224 -0
  128. package/src/Navigation/useFocusEffect.js +2 -0
  129. package/src/Navigation/useFocusEffect.native.js +1 -0
  130. package/src/Navigation/useFocusEffect.web.js +1 -0
  131. package/src/Navigation/useIsFocused.js +1 -0
  132. package/src/Navigation/useIsFocused.native.js +1 -0
  133. package/src/Navigation/useIsFocused.web.js +1 -0
  134. package/src/Navigation/useNavigation.js +2 -0
  135. package/src/Navigation/useNavigation.native.js +1 -0
  136. package/src/Navigation/useNavigation.web.js +1 -0
  137. package/src/Screens/CMedications.js +528 -0
  138. package/src/Screens/CWebViewGallery.js +203 -0
  139. package/src/Screens/ChartScan.js +279 -0
  140. package/src/Screens/ChartScreenNew.js +1579 -0
  141. package/src/Screens/Consultation.js +1500 -0
  142. package/src/Screens/Dashboard.js +778 -0
  143. package/src/Screens/FileExplorer.js +288 -0
  144. package/src/Screens/Footer.js +340 -0
  145. package/src/Screens/ForgotPassword.js +288 -0
  146. package/src/Screens/HeaderBlock.js +353 -0
  147. package/src/Screens/Login.js +328 -0
  148. package/src/Screens/Notification.js +149 -0
  149. package/src/Screens/OcrScreen.js +20 -0
  150. package/src/Screens/PdfPreview.js +507 -0
  151. package/src/Screens/RegistrationDetails.js +467 -0
  152. package/src/Screens/SearchScreen.js +582 -0
  153. package/src/Screens/Splash.js +788 -0
  154. package/src/Screens/SwipeLeftView.js +1867 -0
  155. package/src/StaticComponents/SDatePickerLabel.js +1 -1
  156. package/src/StaticComponents/SDatePickerNew.js +1 -1
  157. package/src/StaticComponents/SDateTimePickerNew.js +2 -2
  158. package/src/StaticComponents/SDropDownGenerate.js +3 -3
  159. package/src/StaticComponents/SDropDownHoc.js +4 -4
  160. package/src/StaticComponents/SDropDownIcon.js +1 -1
  161. package/src/StaticComponents/SMenuBox.js +2 -2
  162. package/src/StaticComponents/SSearch.js +2 -2
  163. package/src/StaticComponents/STextInput.js +1 -1
  164. package/src/StaticComponents/STimePicker.js +1 -1
  165. package/src/StaticComponents/STimingDropDownNew.js +2 -6
  166. package/src/StaticComponents/STimingSwitch.js +1 -1
  167. package/src/layout/CContainerView.js +1 -1
  168. package/src/layout/CDetailView.js +3 -3
  169. package/src/layout/HeaderBlock.js +5 -5
  170. package/src/layout/INVLoginLayout.js +3 -4
  171. package/src/layout/Loader.js +2 -2
  172. package/src/HOC/HAbsolute.js +0 -56
  173. package/src/HOC/HDiscontinue.js +0 -105
  174. package/src/HOC/HOverlay.js +0 -99
  175. package/src/layout/FooterBlock.js +0 -821
  176. /package/src/{common → Common}/ErrorBoundary.tsx +0 -0
  177. /package/src/{common → Common}/Icons.js +0 -0
@@ -0,0 +1,200 @@
1
+ import { View, Text, ScrollView, Dimensions } 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 ContextBio from '../ContextAPI/ContextBio';
9
+ import { APIURL } from '../../../../../src/Common/apiConstants';
10
+
11
+ const ByProductPage = props => {
12
+ const { argument } = props;
13
+ const [isLoading, setIsLoading] = useState(false);
14
+ // const [data, setData] = useState(null);
15
+ const { invoiceData, setInvoiceData } = useContext(ContextBio);
16
+
17
+ const data = invoiceData?.workOrder[argument.workOrderIndex]?.details[argument.detailIndex]?.workorderbyproduct;
18
+
19
+ // useEffect for API call
20
+ // useEffect(() => {
21
+ // getData();
22
+ // }, []);
23
+
24
+ // Function for fetch data from API
25
+ function getData() {
26
+ setIsLoading(true);
27
+ let buttonapi = `${APIURL}invget/invcommonget/rninsuworkorderbyproduct ${argument.argument}`;
28
+ console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', buttonapi);
29
+ NetworkServiceCall('get', buttonapi).then(function (response) {
30
+ if (response.httpstatus == 200) {
31
+ // setData(response.data.data);
32
+ setInvoiceData(prevData => {
33
+ const updatedWorkOrder = prevData.workOrder.map((item, index) => {
34
+ if (index === argument.workOrderIndex) {
35
+ const updatedDetails = item.details.map((detail, detailIndex) => {
36
+ if (detailIndex === argument.detailIndex) {
37
+ return {...detail, byProduct: response.data.data};
38
+ }
39
+ return detail;
40
+ });
41
+
42
+ return {...item, details: updatedDetails};
43
+ }
44
+ return item;
45
+ });
46
+
47
+ return {
48
+ ...prevData,
49
+ workOrder: updatedWorkOrder,
50
+ EditStatus: true,
51
+ };
52
+ });
53
+ setIsLoading(false);
54
+ console.log(
55
+ 'RESPONSEEEEEEEEEEE FROM CONSULTATTION22222222',
56
+ JSON.stringify(response.data.data),
57
+ );
58
+ } else {
59
+ notifyMessage('Data Not Found.....');
60
+ setIsLoading(false);
61
+ }
62
+ });
63
+ // getLoading(v => setIsLoading(false));
64
+ }
65
+
66
+ return (
67
+ <View style={{ width: Dimensions.get('screen').width * 0.95 }}>
68
+ {/* Container for the page title */}
69
+ <View
70
+ style={{
71
+ borderWidth: 0,
72
+ justifyContent: 'center',
73
+ alignItems: 'center',
74
+ marginTop: normalize(5),
75
+ marginVertical: normalize(5),
76
+ alignSelf: 'center',
77
+ }}>
78
+ <Text
79
+ style={{
80
+ fontSize: normalize(14),
81
+ fontWeight: 'bold',
82
+ color: '#094485',
83
+ }}>
84
+ By-product
85
+ </Text>
86
+ </View>
87
+ {isLoading ? (
88
+ <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
89
+ <Loader />
90
+ </View>
91
+ ) : (<ScrollView horizontal={true} style={{ marginVertical: normalize(3) }}>
92
+ <View>
93
+ {
94
+ // Table header section
95
+ data != undefined && data != null ?
96
+ < View style={{ flexDirection: 'row' }}>
97
+ <CTextHeader
98
+ text={'Product'}
99
+ fontSize={10}
100
+ widthArr={Dimensions.get('screen').width * 0.35}
101
+ bgColor={'rgba(184, 184, 191,0.3)'} color={'#094485'} borderColor={'lightgrey'} marginHorizontal={normalize(2)} borderRadius={5} elevation={0}
102
+ />
103
+ <CTextHeader
104
+ text={'Quantity'}
105
+ fontSize={10}
106
+ widthArr={Dimensions.get('screen').width * 0.25}
107
+ bgColor={'rgba(184, 184, 191,0.3)'} color={'#094485'} borderColor={'lightgrey'} marginHorizontal={normalize(2)} borderRadius={5} elevation={0}
108
+ />
109
+ <CTextHeader
110
+ text={'Unit'}
111
+ fontSize={10}
112
+ widthArr={Dimensions.get('screen').width * 0.25}
113
+ bgColor={'rgba(184, 184, 191,0.3)'} color={'#094485'} borderColor={'lightgrey'} marginHorizontal={normalize(2)} borderRadius={5} elevation={0}
114
+ />
115
+
116
+ </View>
117
+ : null
118
+ }
119
+ {data != undefined && data != null ? (
120
+ data.map((item, i) => (
121
+ <View
122
+ key={i}
123
+ style={{
124
+ flexDirection: 'row',
125
+ }}
126
+ >
127
+ {/* Product */}
128
+ <View style={{
129
+ borderWidth: 1,
130
+ borderColor: 'lightgrey',
131
+ elevation: 0,
132
+ borderRadius: 5,
133
+ width: Dimensions.get('screen').width * 0.355,
134
+ paddingTop: 5,
135
+ paddingBottom: 5,
136
+ height: Dimensions.get('screen').height * 0.056,
137
+ alignItems: 'flex-start',
138
+ justifyContent: 'center',
139
+ paddingHorizontal: normalize(10),
140
+ }}>
141
+ <Text style={{
142
+ fontWeight: 'bold',
143
+ color: 'black',
144
+ fontSize: normalize(10),
145
+ }}
146
+ >{item.productname}</Text>
147
+ </View>
148
+ {/* Quantity */}
149
+ <View style={{
150
+ borderWidth: 1,
151
+ borderColor: 'lightgrey',
152
+ elevation: 0,
153
+ borderRadius: 5,
154
+ width: Dimensions.get('screen').width * 0.255,
155
+ paddingTop: 5,
156
+ paddingBottom: 5,
157
+ height: Dimensions.get('screen').height * 0.056,
158
+ alignItems: 'flex-start',
159
+ justifyContent: 'center',
160
+ paddingHorizontal: normalize(10),
161
+ }}>
162
+ <Text style={{
163
+ fontWeight: 'bold',
164
+ color: 'black',
165
+ fontSize: normalize(10),
166
+ }}
167
+ >{item.quantity}</Text>
168
+ </View>
169
+ {/* Unit */}
170
+ <View style={{
171
+ borderWidth: 1,
172
+ borderColor: 'lightgrey',
173
+ elevation: 0,
174
+ borderRadius: 5,
175
+ width: Dimensions.get('screen').width * 0.25,
176
+ paddingTop: 5,
177
+ paddingBottom: 5,
178
+ height: Dimensions.get('screen').height * 0.056,
179
+ alignItems: 'flex-start',
180
+ justifyContent: 'center',
181
+ paddingHorizontal: normalize(10),
182
+ }}>
183
+ <Text style={{
184
+ fontWeight: 'bold',
185
+ color: 'black',
186
+ fontSize: normalize(10),
187
+ }}
188
+ >{item.unitname}</Text>
189
+ </View>
190
+ </View>
191
+ ))
192
+ ) : null}
193
+ </View>
194
+ </ScrollView>)
195
+ }
196
+ </View>
197
+ );
198
+ };
199
+
200
+ export default ByProductPage;
@@ -0,0 +1,153 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import { View, Text, FlatList } from 'react-native';
3
+ import { notifyMessage, Loader, isBNUL, isNU } from '../CommonStyle/ComponentFunctions';
4
+ import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
5
+ import HOCIcons from '../HOC/HOCIcons';
6
+ import {
7
+ MenuOption,
8
+ } from 'react-native-popup-menu';
9
+ import { normalize } from '../CommonStyle/componentStyle';
10
+
11
+ export default function CDropDownListNew(props) {
12
+
13
+ useEffect(() => {
14
+ FetchDropdownList();
15
+ }, []);
16
+
17
+ const [loading, setLoading] = useState(false);
18
+ const [displayData, setDisplayData] = useState([]);
19
+ const [refresh, setRefresh] = useState(0);
20
+ const [searchData, setSearchData] = useState('');
21
+
22
+ function FetchDropdownList() {
23
+ setDisplayData([]);
24
+ setLoading(true);
25
+ props.dropdownapi && props.dropdownapi != null && props.dropdownapi != undefined ?
26
+ (console.log('CDropDownListNew props.dropdownapi', props.dropdownapi),
27
+ NetworkServiceCall('get', props.dropdownapi, '').then(
28
+ function (response) {
29
+ // console.log('CDropDownListNew response', JSON.stringify(response))
30
+ if (
31
+ response.httpstatus &&
32
+ response.httpstatus != null &&
33
+ response.httpstatus != undefined &&
34
+ response.httpstatus == 200
35
+ ) {
36
+ setDisplayData(response.data.data);
37
+ setLoading(false);
38
+ } else {
39
+ notifyMessage('Data Not Found');
40
+ setLoading(false);
41
+ }
42
+ },
43
+ ))
44
+ : props.dropdownarray && props.dropdownarray != null && props.dropdownarray != undefined ?
45
+ (setDisplayData(props.dropdownarray), // Changed props.dropdownarray.data.data to props.dropdownarray
46
+ setLoading(false))
47
+ :
48
+ setLoading(false);
49
+ }
50
+
51
+ function renderItem(data) {
52
+
53
+ return (
54
+ <MenuOption
55
+ onSelect={() => {
56
+ data.item.selected = true,
57
+ setRefresh(refresh + 1),
58
+ props.callback(data.item);
59
+ }}
60
+ disabled={false}
61
+ style={{
62
+ paddingVertical: normalize(5),
63
+ borderWidth: 0.5,
64
+ borderColor: 'lightgrey',
65
+ flexDirection: 'row',
66
+ alignItems: 'center',
67
+ }}
68
+ >
69
+ {data.item.hideicon ?
70
+ null
71
+ :
72
+ <HOCIcons.Icons
73
+ icongroup={isNU(data.item.icongroup) ? data.item.icongroup : 3}
74
+ name={data.item.icon ? data.item.icon : data.item.selected ? 'radiobox-marked' : 'circle-double'}//radiobox-marked
75
+ color={'black'}
76
+ size={normalize(10)}
77
+ style={{
78
+ marginRight: normalize(4),
79
+ borderWidth: 0,
80
+ textAlign: 'center',
81
+ }}
82
+ />
83
+ }
84
+ {data.item.badgenumber != null && data.item.badgenumber != undefined ?
85
+ <View style={{ borderWidth: 0, borderRadius: 100, height: normalize(14), width: normalize(14), position: 'absolute', backgroundColor: '#912c2c', right: 0, top: 0, justifyContent: 'center', alignItems: 'center' }}>
86
+ <Text style={{ fontSize: normalize(10), textAlign: 'center', color: 'white' }}>{data.item.badgenumber}</Text>
87
+ </View>
88
+ : null}
89
+
90
+ <Text
91
+ style={{
92
+ borderWidth: 0,
93
+ fontWeight: data.item.selected ? 'bold' : 'normal',
94
+ fontSize: props?.fontSize != undefined ? normalize(props?.fontSize) : normalize(12),
95
+ color: 'black',
96
+ }}
97
+ >
98
+ {data.item.columnname != null && data.item.columnname != undefined ? data.item.columnname.toUpperCase() : null}
99
+ </Text>
100
+ </MenuOption>
101
+ );
102
+ }
103
+
104
+ function GetDropdown(data) {
105
+ const newDropDownData = data != undefined
106
+ ? data.filter(function (item) {
107
+ const dataItem = item.columnname
108
+ ? item.columnname.toUpperCase()
109
+ : ''.toUpperCase();
110
+ const textData = searchData.toUpperCase();
111
+ return dataItem.indexOf(textData) > -1;
112
+ })
113
+ : null;
114
+
115
+ return (
116
+ <FlatList
117
+ keyboardShouldPersistTaps={'handled'}
118
+ data={newDropDownData}
119
+ renderItem={renderItem}
120
+ ListFooterComponent={() => {
121
+ return (
122
+ <>
123
+ {isNU(props.info) ?
124
+ <View style={{ marginTop: normalize(3), borderRadius: 5, borderWidth: 0, width: '100%', borderColor: 'lightgrey', flexDirection: 'row', alignItems: 'center', backgroundColor: 'white' }}>
125
+ <HOCIcons.Entypo
126
+ icongroup={5}
127
+ name={'info-with-circle'}
128
+ size={normalize(12)}
129
+ color={'grey'}
130
+ style={{ textAlign: 'center', padding: normalize(3), paddingLeft: normalize(8) }}
131
+ />
132
+ <Text adjustsFontSizeToFit style={{ width: '90%', color: 'grey', fontStyle: 'italic', fontSize: normalize(11), textAlign: 'left' }}>
133
+ {' '}{isNU(props.info) ? props.info : null}
134
+ </Text>
135
+ </View>
136
+ : null}
137
+ </>
138
+ );
139
+ }}
140
+ // estimatedItemSize={normalize(25)}
141
+ />
142
+ );
143
+ }
144
+
145
+ return (
146
+ <View style={{ borderWidth: 0.5, borderRadius: 5, borderColor: 'lightgrey', backgroundColor: 'white' }}>
147
+ {loading ? <Loader /> : null}
148
+ {isBNUL(displayData) ?
149
+ GetDropdown(displayData)
150
+ : null}
151
+ </View>
152
+ );
153
+ }
@@ -0,0 +1,88 @@
1
+ import { View, Text, ScrollView } from 'react-native';
2
+ import React, { useEffect, useState } from 'react';
3
+ import CContainerView from '../CustomComponents/CContainerView';
4
+ import CDetailView from '../CustomComponents/CDetailView';
5
+ import HeaderBlock from '../Screens/HeaderBlock';
6
+ import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
7
+ import { isNUQ, Loader, notifyMessage } from '../CommonStyle/ComponentFunctions';
8
+ import { APIURL } from '../../../../../src/Common/apiConstants';
9
+ import HHeading from '../HOC/HHeading';
10
+ import { Global } from '../../../../../src/Common/Global';
11
+ import { normalize } from '../CommonStyle/componentStyle';
12
+ import NonSwipableSupplierCard from './NonSwipableSupplierCard';
13
+ import NonSwipableProductCard from './NonSwipableProductCard';
14
+
15
+ const CSupplierList = ({ route }) => {
16
+ const [data, setData] = useState([]);
17
+ const [isLoading, setIsLoading] = useState(false);
18
+ const productCode = route.params.productCode;
19
+ const supplierCode = route.params.supplierCode;
20
+
21
+ useEffect(() => {
22
+ getData();
23
+ }, []);
24
+
25
+ function getData() {
26
+ setIsLoading(true);
27
+ let buttonapi = isNUQ(productCode) ? `${APIURL}invget/invcommonget/rninsuproductsupplier ${productCode}` : `${APIURL}invget/invcommonget/rninsusupplierproduct ${supplierCode}`;
28
+ console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', buttonapi);
29
+
30
+ NetworkServiceCall('get', buttonapi).then(function (response) {
31
+ if (response.httpstatus == 200) {
32
+ setData(response?.data?.data || []);
33
+ setIsLoading(false);
34
+ console.log(
35
+ 'dataaaaaaaaaaaaaaaaaaaaaa',
36
+ JSON.stringify(response?.data?.data),
37
+ );
38
+ } else {
39
+ notifyMessage('Data Not Found...');
40
+ setIsLoading(false);
41
+ }
42
+ });
43
+ // getLoading(v => setIsLoading(false));
44
+ }
45
+
46
+ return (
47
+ <CContainerView>
48
+ <HeaderBlock />
49
+ <CDetailView>
50
+ {
51
+ isLoading ?
52
+ <View
53
+ style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
54
+ <Loader />
55
+ </View> : <View>
56
+ <ScrollView>
57
+ {/* Container for the page title */}
58
+ <View style={{ marginBottom: normalize(5) }}>
59
+ <HHeading
60
+ styles={{
61
+ iconname: 'file-invoice',
62
+ bgcolor: '#f2efef',
63
+ iconsize: 14,
64
+ iconcolor: Global.AppTheme.primary_color,
65
+ displaytext: isNUQ(data[0]?.productname) && data[0]?.productname,
66
+ textsize: 13,
67
+ textcolor: Global.AppTheme.primary_color,
68
+ }}
69
+ callBack={val =>
70
+ val == undefined ? null : console.log(val)
71
+ } />
72
+ </View>
73
+ {data != undefined
74
+ ? data?.map((supplier, i) => (
75
+ <View key={i}>
76
+ {isNUQ(productCode) ? <NonSwipableSupplierCard supplierDetails={supplier} type={'S'} /> : <NonSwipableProductCard data={supplier}/>}
77
+ </View>
78
+ ))
79
+ : null}
80
+ </ScrollView>
81
+ </View>
82
+ }
83
+ </CDetailView>
84
+ </CContainerView>
85
+ );
86
+ };
87
+
88
+ export default CSupplierList;