@jescon-technologies/react-native-ui-kit 0.0.6 → 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,73 +0,0 @@
|
|
|
1
|
-
import React, { ErrorInfo, ReactNode } from 'react';
|
|
2
|
-
import { Button, StyleSheet, Text, View, Image } from 'react-native';
|
|
3
|
-
import { notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
4
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface State {
|
|
11
|
-
hasError: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
class ErrorBoundary extends React.Component<Props, State> {
|
|
15
|
-
constructor(props: Props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.state = { hasError: false };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static getDerivedStateFromError(_: Error): State {
|
|
21
|
-
// Update state so the next render will show the fallback UI.
|
|
22
|
-
return { hasError: true };
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
|
26
|
-
// You can also log the error to an error reporting service
|
|
27
|
-
// console.log('componentDidCatch ', error, ' ', errorInfo);
|
|
28
|
-
notifyMessage("ERROR : " + error + ' ' + errorInfo, 2)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
render() {
|
|
32
|
-
if (this.state.hasError) {
|
|
33
|
-
// You can render any custom fallback UI
|
|
34
|
-
return (
|
|
35
|
-
<View style={styles.container}>
|
|
36
|
-
<View style={{ width: '100%', }}>
|
|
37
|
-
<Image
|
|
38
|
-
source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }}
|
|
39
|
-
resizeMode="cover" style={{ height: normalize(200) }} />
|
|
40
|
-
</View>
|
|
41
|
-
<Text style={styles.message}>
|
|
42
|
-
Something went wrong.{'\n'} Our team has taken a note of this issue.
|
|
43
|
-
</Text>
|
|
44
|
-
{/* <Button
|
|
45
|
-
title="Try Again"
|
|
46
|
-
onPress={() => CodePush.restartApp()}
|
|
47
|
-
/> */}
|
|
48
|
-
|
|
49
|
-
</View>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return this.props.children;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default ErrorBoundary;
|
|
58
|
-
|
|
59
|
-
const styles = StyleSheet.create({
|
|
60
|
-
container: {
|
|
61
|
-
flex: 1,
|
|
62
|
-
justifyContent: 'center',
|
|
63
|
-
alignItems: 'center',
|
|
64
|
-
backgroundColor: '#fff'
|
|
65
|
-
},
|
|
66
|
-
message: {
|
|
67
|
-
fontSize: normalize(16),
|
|
68
|
-
color: 'black',
|
|
69
|
-
marginBottom: 20,
|
|
70
|
-
textAlign: 'center',
|
|
71
|
-
paddingHorizontal: 10,
|
|
72
|
-
},
|
|
73
|
-
});
|
package/src/Common/Icons.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import MaterialCommunityIconsI from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
2
|
-
import SimpleLineIconsI from 'react-native-vector-icons/SimpleLineIcons'
|
|
3
|
-
import MaterialIconsI from 'react-native-vector-icons/MaterialIcons'
|
|
4
|
-
import FontAwesomeI from 'react-native-vector-icons/FontAwesome'
|
|
5
|
-
import FoundationI from 'react-native-vector-icons/Foundation'
|
|
6
|
-
import EvilIconsI from 'react-native-vector-icons/EvilIcons'
|
|
7
|
-
import OcticonsI from 'react-native-vector-icons/Octicons'
|
|
8
|
-
import IoniconsI from 'react-native-vector-icons/Ionicons'
|
|
9
|
-
import FeatherI from 'react-native-vector-icons/Feather'
|
|
10
|
-
import EntypoI from 'react-native-vector-icons/Entypo'
|
|
11
|
-
import ZocialI from 'react-native-vector-icons/Zocial'
|
|
12
|
-
import FontAwesomeFive from 'react-native-vector-icons/FontAwesome5';
|
|
13
|
-
import AntDesignI from 'react-native-vector-icons/AntDesign';
|
|
14
|
-
import React from 'react'
|
|
15
|
-
|
|
16
|
-
export const MaterialCommunityIcons = props => (
|
|
17
|
-
<MaterialCommunityIconsI {...props} />
|
|
18
|
-
)
|
|
19
|
-
const SimpleLineIcons = props => <SimpleLineIconsI {...props} />
|
|
20
|
-
const MaterialIcons = props => <MaterialIconsI {...props} />
|
|
21
|
-
const FontAwesome = props => <FontAwesomeI {...props} />
|
|
22
|
-
const Foundation = props => <FoundationI {...props} />
|
|
23
|
-
const EvilIcons = props => <EvilIconsI {...props} />
|
|
24
|
-
const Ionicons = props => <IoniconsI {...props} />
|
|
25
|
-
const Octicons = props => <OcticonsI {...props} />
|
|
26
|
-
const Feather = props => <FeatherI {...props} />
|
|
27
|
-
const Entypo = props => <EntypoI {...props} />
|
|
28
|
-
const Zocial = props => <ZocialI {...props} />
|
|
29
|
-
const FontAwesome5 = props => <FontAwesomeFive {...props} />
|
|
30
|
-
const AntDesign = props => <AntDesignI {...props} />
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
MaterialCommunityIcons,
|
|
36
|
-
SimpleLineIcons,
|
|
37
|
-
SimpleLineIcons,
|
|
38
|
-
MaterialIcons,
|
|
39
|
-
FontAwesome,
|
|
40
|
-
Foundation,
|
|
41
|
-
EvilIcons,
|
|
42
|
-
Ionicons,
|
|
43
|
-
Octicons,
|
|
44
|
-
Feather,
|
|
45
|
-
Entypo,
|
|
46
|
-
Zocial,
|
|
47
|
-
FontAwesome5,
|
|
48
|
-
AntDesign
|
|
49
|
-
}
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import { isConnected, notifyMessage, ValueCheck } from "../CommonStyle/ComponentFunctions";
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
import { Platform } from "react-native";
|
|
5
|
-
|
|
6
|
-
export default NetworkServiceCall = (method, url, params, jwt, timeout) => {
|
|
7
|
-
let jwtString = ValueCheck(Global.JWTToken) ? Global.JWTToken : jwt
|
|
8
|
-
// console.log("----------------------------- JWT Key -----------------",jwt)
|
|
9
|
-
let dataset = {}
|
|
10
|
-
if (method.toLowerCase() === "get") {
|
|
11
|
-
return (
|
|
12
|
-
axios({
|
|
13
|
-
method: 'get',
|
|
14
|
-
url: url,
|
|
15
|
-
timeout: timeout || 60000,
|
|
16
|
-
validateStatus: false,
|
|
17
|
-
// headers: {
|
|
18
|
-
// Authorization: `Bearer ${jwtString}`,
|
|
19
|
-
// }
|
|
20
|
-
})
|
|
21
|
-
.then(function (response) {
|
|
22
|
-
// console.log("RESPPPPPPPPP GETTTTTTTTTTTTTT",JSON.stringify(response.data.httpstatus))
|
|
23
|
-
if (response.data.httpstatus == 200) {
|
|
24
|
-
dataset = {
|
|
25
|
-
data: response.data.data,
|
|
26
|
-
httpstatus: response.data.httpstatus
|
|
27
|
-
}
|
|
28
|
-
return dataset
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
dataset = {
|
|
32
|
-
httpstatus: response.data.httpstatus,
|
|
33
|
-
data: {
|
|
34
|
-
title: "ERROR",
|
|
35
|
-
subtitle: response.data.data != undefined ? response.data.data.message : "",
|
|
36
|
-
alertdata: {
|
|
37
|
-
alertCaption: "ERROR",
|
|
38
|
-
alertMessage: response.data.message,
|
|
39
|
-
alertContent: response.data.message,
|
|
40
|
-
alertHttpstatus: response.data.httpstatus,
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return dataset
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
.catch(function (error) {
|
|
48
|
-
// console.log("ERRRRROEERRRRRRR GETTTTTTTT",JSON.stringify(error))
|
|
49
|
-
dataset = {
|
|
50
|
-
httpstatus: 404,
|
|
51
|
-
data: {
|
|
52
|
-
title: "ERROR",
|
|
53
|
-
subtitle: "",
|
|
54
|
-
alertdata: {
|
|
55
|
-
alertCaption: "ERROR",
|
|
56
|
-
alertMessage: error.message,
|
|
57
|
-
alertContent: error.message,
|
|
58
|
-
alertHttpstatus: 404,
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return dataset
|
|
63
|
-
})
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
else if (method.toLowerCase() === "post" && Platform.OS !== "web") {
|
|
67
|
-
// console.log("ANROIDDDDDDDDDDDDDDDDDDDDDDDD", Platform.OS)
|
|
68
|
-
return (
|
|
69
|
-
// isConnected()
|
|
70
|
-
// .then(() =>
|
|
71
|
-
axios.post(url, params, {
|
|
72
|
-
// headers: {
|
|
73
|
-
// Authorization: `Bearer ${jwtString}`,
|
|
74
|
-
// }
|
|
75
|
-
})
|
|
76
|
-
.then(function (response) {
|
|
77
|
-
// console.log("RESPONSE>>>>>>>>>>>>>>>>>>>>>>ON NETWORK SERVICE CALL",JSON.stringify(response))
|
|
78
|
-
if (response.data.httpstatus == 200) {
|
|
79
|
-
dataset = {
|
|
80
|
-
data: response.data.data,
|
|
81
|
-
httpstatus: response.data.httpstatus
|
|
82
|
-
}
|
|
83
|
-
return dataset
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
dataset = {
|
|
87
|
-
httpstatus: response.data.httpstatus,
|
|
88
|
-
data: {
|
|
89
|
-
title: "ERROR",
|
|
90
|
-
subtitle: "",
|
|
91
|
-
alertdata: {
|
|
92
|
-
alertCaption: "ERROR",
|
|
93
|
-
alertMessage: response.data.message,
|
|
94
|
-
alertContent: response.data.message,
|
|
95
|
-
alertHttpstatus: response.data.httpstatus,
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return dataset
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
.catch(function (error) {
|
|
103
|
-
// console.log("RESPONSE>>>>>>>>>>>>>>>>>>>>>>ON NETWORK SERVICE CALL ERRORRRR",JSON.stringify(error))
|
|
104
|
-
dataset = {
|
|
105
|
-
httpstatus: 404,
|
|
106
|
-
data: {
|
|
107
|
-
title: "ERROR",
|
|
108
|
-
subtitle: "",
|
|
109
|
-
alertdata: {
|
|
110
|
-
alertCaption: "ERROR",
|
|
111
|
-
alertMessage: error.message,
|
|
112
|
-
alertContent: error.message,
|
|
113
|
-
alertHttpstatus: 404,
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return dataset
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
// )
|
|
121
|
-
// .catch(function (error) {
|
|
122
|
-
// notifyMessage("Please check your network connection and try again")
|
|
123
|
-
// dataset = {
|
|
124
|
-
// httpstatus: 344,
|
|
125
|
-
// data: {
|
|
126
|
-
// title: "ERROR",
|
|
127
|
-
// subtitle: "",
|
|
128
|
-
// alertdata: {
|
|
129
|
-
// alertCaption: "ERROR",
|
|
130
|
-
// alertMessage: "Connection Issue ",
|
|
131
|
-
// alertContent: "Check Internet Connectivity",
|
|
132
|
-
// alertHttpstatus: 344,
|
|
133
|
-
// }
|
|
134
|
-
// }
|
|
135
|
-
// }
|
|
136
|
-
// return dataset
|
|
137
|
-
// })
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
else if (method.toLowerCase() === "multiform" && !Platform.OS === "web") {
|
|
141
|
-
console.log("JWT STRING", jwtString)
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
axios({
|
|
145
|
-
url: url,
|
|
146
|
-
method: 'POST',
|
|
147
|
-
headers: {
|
|
148
|
-
'Content-Type': 'multipart/form-data',
|
|
149
|
-
// Authorization: `Bearer ${jwtString}`,
|
|
150
|
-
},
|
|
151
|
-
data: params
|
|
152
|
-
}).then(function (response) {
|
|
153
|
-
// console.log("Multi formmmmmmmmmmm retrieval........",response)
|
|
154
|
-
if (response.status == 200) {
|
|
155
|
-
dataset = {
|
|
156
|
-
data: response.data,
|
|
157
|
-
httpstatus: response.status
|
|
158
|
-
}
|
|
159
|
-
return dataset
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
dataset = {
|
|
163
|
-
httpstatus: response.status,
|
|
164
|
-
data: {
|
|
165
|
-
title: "ERROR",
|
|
166
|
-
subtitle: "",
|
|
167
|
-
alertdata: {
|
|
168
|
-
alertCaption: "ERROR",
|
|
169
|
-
alertMessage: response.data.message,
|
|
170
|
-
alertContent: response.data.message,
|
|
171
|
-
alertHttpstatus: response.data.httpstatus,
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return dataset
|
|
176
|
-
}
|
|
177
|
-
})
|
|
178
|
-
.catch((error) => {
|
|
179
|
-
dataset = {
|
|
180
|
-
httpstatus: 404,
|
|
181
|
-
data: {
|
|
182
|
-
title: "ERROR",
|
|
183
|
-
subtitle: "",
|
|
184
|
-
alertdata: {
|
|
185
|
-
alertCaption: "ERROR",
|
|
186
|
-
alertMessage: error.message,
|
|
187
|
-
alertContent: error.message,
|
|
188
|
-
alertHttpstatus: 404,
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return dataset
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
)
|
|
196
|
-
}
|
|
197
|
-
else if (method.toLowerCase() === "post" && Platform.OS === "web") {
|
|
198
|
-
// console.log("WEBBBBBBBBBBBBBBBBBBBBBBBBBBBB", Platform.OS)
|
|
199
|
-
return (
|
|
200
|
-
window.electronAPI.networkCall('post', url, params)
|
|
201
|
-
.then(function (response) {
|
|
202
|
-
// console.log("RESPONSE>>>>>>>>>>>>>>>>>>>>>>ON NETWORK SERVICE CALL",JSON.stringify(response))
|
|
203
|
-
if (response.httpstatus == 200) {
|
|
204
|
-
dataset = {
|
|
205
|
-
data: response.data,
|
|
206
|
-
httpstatus: response.httpstatus
|
|
207
|
-
}
|
|
208
|
-
return dataset
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
dataset = {
|
|
212
|
-
httpstatus: response.httpstatus,
|
|
213
|
-
data: {
|
|
214
|
-
title: "ERROR",
|
|
215
|
-
subtitle: "",
|
|
216
|
-
alertdata: {
|
|
217
|
-
alertCaption: "ERROR",
|
|
218
|
-
alertMessage: response.message,
|
|
219
|
-
alertContent: response.message,
|
|
220
|
-
alertHttpstatus: response.httpstatus,
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return dataset
|
|
225
|
-
}
|
|
226
|
-
})
|
|
227
|
-
.catch(function (error) {
|
|
228
|
-
// console.log("RESPONSE>>>>>>>>>>>>>>>>>>>>>>ON NETWORK SERVICE CALL ERRORRRR",JSON.stringify(error))
|
|
229
|
-
dataset = {
|
|
230
|
-
httpstatus: 404,
|
|
231
|
-
data: {
|
|
232
|
-
title: "ERROR",
|
|
233
|
-
subtitle: "",
|
|
234
|
-
alertdata: {
|
|
235
|
-
alertCaption: "ERROR",
|
|
236
|
-
alertMessage: error.message,
|
|
237
|
-
alertContent: error.message,
|
|
238
|
-
alertHttpstatus: 404,
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return dataset
|
|
243
|
-
})
|
|
244
|
-
|
|
245
|
-
// )
|
|
246
|
-
// .catch(function (error) {
|
|
247
|
-
// notifyMessage("Please check your network connection and try again")
|
|
248
|
-
// dataset = {
|
|
249
|
-
// httpstatus: 344,
|
|
250
|
-
// data: {
|
|
251
|
-
// title: "ERROR",
|
|
252
|
-
// subtitle: "",
|
|
253
|
-
// alertdata: {
|
|
254
|
-
// alertCaption: "ERROR",
|
|
255
|
-
// alertMessage: "Connection Issue ",
|
|
256
|
-
// alertContent: "Check Internet Connectivity",
|
|
257
|
-
// alertHttpstatus: 344,
|
|
258
|
-
// }
|
|
259
|
-
// }
|
|
260
|
-
// }
|
|
261
|
-
// return dataset
|
|
262
|
-
// })
|
|
263
|
-
)
|
|
264
|
-
}
|
|
265
|
-
}
|