@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.8
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 +2 -66
- package/index.js +1 -66
- package/package.json +1 -1
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- 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,327 +0,0 @@
|
|
|
1
|
-
import React, { useState, useContext, useEffect } from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, TextInput, FlatList, Dimensions, ScrollView } from 'react-native';
|
|
3
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
4
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
import CFooterView from '../CustomComponents/CFooterView';
|
|
6
|
-
import EmrResponseComponentContext from '../Handlers/emrResponseComponentContext';
|
|
7
|
-
import { getLoading, isNU, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
8
|
-
import CAwesomeButton from '../CustomComponents/CAwesomeButton';
|
|
9
|
-
import SSearchBar from '../StaticComponents/SSearchBar';
|
|
10
|
-
import SAlphabet from '../StaticComponents/SAlphabet';
|
|
11
|
-
import { getListviewItem, getListviewItemText } from '../CommonStyle/PopupStyle';
|
|
12
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
13
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
14
|
-
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
15
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import Loader from '../Custom/Loader';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var DropDownALL = [];
|
|
22
|
-
export default function CSummaryDropDown(props) {
|
|
23
|
-
|
|
24
|
-
const { responseJSON, setResponseJSON } = useContext(EmrResponseComponentContext);
|
|
25
|
-
const hosumrclassificationnature = responseJSON.consultation[responseJSON.natureindex].hosumrclassificationnature;
|
|
26
|
-
const navigation = useNavigation();
|
|
27
|
-
const [data, setData] = useState();
|
|
28
|
-
const [routine, setRoutine] = useState();
|
|
29
|
-
const [searchData, setSearchData] = useState('');
|
|
30
|
-
const [parameterName, setParameterName] = useState('');
|
|
31
|
-
const [refresh, setRefresh] = useState(0);
|
|
32
|
-
const [stage, setStage] = useState(1);
|
|
33
|
-
const [selected, setSelected] = useState(0);
|
|
34
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
-
const [alphaFilter, setAlphaFilter] = useState(false);
|
|
36
|
-
const [filterPurpose, setFilterPurpose] = useState([]);
|
|
37
|
-
const [tempString, settempString] = useState([]);
|
|
38
|
-
const [displayData, setDisplayData] = useState([]);
|
|
39
|
-
const [selectedValue, setSelectedValue] = useState(props.value);
|
|
40
|
-
const [edituser, setEditUser] = useState();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
setAlphaFilter(false);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
FetchDropdownList();
|
|
49
|
-
}, []);
|
|
50
|
-
|
|
51
|
-
function FetchDropdownList() {
|
|
52
|
-
setSearchData('');
|
|
53
|
-
setIsLoading(true);
|
|
54
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnsummarydropdown ' + Global.userData.hosuconsultant + ',' + hosumrclassificationnature;
|
|
55
|
-
console.log('JJJJJJJMMMMMMMMMHHHHHHHHHHHHHHHHH3', buttonapi);
|
|
56
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
57
|
-
.then(function (response) {
|
|
58
|
-
if (response.data.data != null && response.data.data != undefined) {
|
|
59
|
-
DropDownALL = response.data.data;
|
|
60
|
-
setDisplayData(response.data.data);
|
|
61
|
-
setIsLoading(false);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
setDisplayData([]);
|
|
65
|
-
setIsLoading(false);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function getNavigateToSummary() {
|
|
71
|
-
navigation.navigate('SummaryTemplate', { type: 1 });
|
|
72
|
-
props.visibility(false);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function getAllTabFunctions(key) {
|
|
76
|
-
switch (key) {
|
|
77
|
-
case 'ALL01': getRetrival(1);
|
|
78
|
-
break;
|
|
79
|
-
case 'ALL02': getRetrival(2);
|
|
80
|
-
break;
|
|
81
|
-
default: break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function getRetrival(type) {
|
|
86
|
-
|
|
87
|
-
var x = tempString.toString();
|
|
88
|
-
var procedurename = 'rnhomrsummarytemplate '; // rnlatemplatesummaryretrival_01112024 rnlatemplatesummaryretrival
|
|
89
|
-
setIsLoading(true);
|
|
90
|
-
let buttonapi = APIURL + 'emr/emrcommonget/' + procedurename + type + ',' + Global.PatientDetails.hopapatient + ',' + Global.userData.hosuconsultant + ',' + hosumrclassificationnature + ',' + x + ',' + Global.ParameterInfo.homrpatientchart;
|
|
91
|
-
console.log('getRetrival buttonapi', buttonapi);
|
|
92
|
-
|
|
93
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
94
|
-
.then(function (response) {
|
|
95
|
-
if (response.data.NewData != null && response.data.NewData != undefined && responseJSON.consultationEdit.NewData != undefined) {
|
|
96
|
-
if (type == 1) {
|
|
97
|
-
|
|
98
|
-
// console.log('response.data.NewData', JSON.stringify([response.data.NewData[0]]));
|
|
99
|
-
|
|
100
|
-
const updatedResponseJSON = {
|
|
101
|
-
...responseJSON,
|
|
102
|
-
editStatus: true,
|
|
103
|
-
consultation: [...responseJSON.consultation],
|
|
104
|
-
};
|
|
105
|
-
const natureindex = updatedResponseJSON.natureindex ?? 0;
|
|
106
|
-
updatedResponseJSON.consultation[natureindex] = {
|
|
107
|
-
...updatedResponseJSON.consultation[natureindex],
|
|
108
|
-
editStatus: true,
|
|
109
|
-
NewData: [...updatedResponseJSON.consultation[natureindex].NewData],
|
|
110
|
-
};
|
|
111
|
-
updatedResponseJSON.consultation[natureindex].NewData = [response.data.NewData[0]];
|
|
112
|
-
setResponseJSON(updatedResponseJSON);
|
|
113
|
-
|
|
114
|
-
navigation.navigate('ConsultationEdit', { data: updatedResponseJSON.consultation[updatedResponseJSON.natureindex].NewData[0].editArray, parent: updatedResponseJSON.consultation[updatedResponseJSON.natureindex] });
|
|
115
|
-
|
|
116
|
-
setIsLoading(false);
|
|
117
|
-
props.visibility(false);
|
|
118
|
-
|
|
119
|
-
// responseJSON.consultationEdit.NewData = [];
|
|
120
|
-
// responseJSON.consultationEdit.editStatus = true;
|
|
121
|
-
// setTimeout(() => {
|
|
122
|
-
// responseJSON.consultationEdit.NewData.push(response.data.NewData[0]);
|
|
123
|
-
// navigation.navigate('ConsultationEdit', { data: responseJSON.consultationEdit.NewData[0].editArray, parent: responseJSON.consultationEdit });
|
|
124
|
-
// setResponseJSON({
|
|
125
|
-
// ...responseJSON,
|
|
126
|
-
// "consultationEdit": responseJSON.consultationEdit
|
|
127
|
-
// });
|
|
128
|
-
// setIsLoading(false);
|
|
129
|
-
// props.visibility(false);
|
|
130
|
-
// });
|
|
131
|
-
|
|
132
|
-
} else {
|
|
133
|
-
navigation.navigate('SummaryTemplate', { type: 2, data: response.data.NewData });
|
|
134
|
-
setIsLoading(false);
|
|
135
|
-
props.visibility(false);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
setIsLoading(false);
|
|
140
|
-
props.visibility(false);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
getLoading(v => setIsLoading(false));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function renderItem(data) {
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
data.item.displayvalue != undefined && data.item.displayvalue != '' ?
|
|
150
|
-
<TouchableOpacity
|
|
151
|
-
style={[getListviewItem(data.item.selected), { flexDirection: 'row', alignItems: 'center' }]}
|
|
152
|
-
onPress={() => onSelectItem(data.item, false)}
|
|
153
|
-
activeOpacity={0.5}
|
|
154
|
-
>
|
|
155
|
-
<Icons.FontAwesome name="dot-circle-o" color={Global.AppTheme.primary_color} size={normalize(10)}
|
|
156
|
-
style={{ paddingHorizontal: normalize(2), paddingLeft: normalize(4) }} />
|
|
157
|
-
<Text style={selectedValue != null && selectedValue != undefined ? selectedValue == item.datavalue ? getListviewItemText(true) : getListviewItemText(false) : getListviewItemText(false)}>
|
|
158
|
-
{data.item.displayvalue.toUpperCase()}
|
|
159
|
-
</Text>
|
|
160
|
-
</TouchableOpacity>
|
|
161
|
-
: null
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function onSelectItem(datavalue, multiselect) {
|
|
166
|
-
if (multiselect == true) {
|
|
167
|
-
if (tempString.includes(datavalue.datavalue)) {
|
|
168
|
-
datavalue.selected = !datavalue.selected;
|
|
169
|
-
setSelected(selected + 1);
|
|
170
|
-
var index = tempString.indexOf(datavalue.datavalue);
|
|
171
|
-
if (index > -1) {
|
|
172
|
-
tempString.splice(index, 1);
|
|
173
|
-
}
|
|
174
|
-
} else {
|
|
175
|
-
datavalue.selected = !datavalue.selected;
|
|
176
|
-
setSelected(selected + 1);
|
|
177
|
-
tempString.push(datavalue.datavalue);
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
displayData.map((sub) => sub.selected = false);
|
|
181
|
-
datavalue.selected = true;
|
|
182
|
-
tempString.splice(0, tempString.length);
|
|
183
|
-
tempString.push(datavalue.datavalue);
|
|
184
|
-
setEditUser(datavalue);
|
|
185
|
-
setSelected(selected + 1);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function getAlphabetData(alpha, index) {
|
|
190
|
-
var filter = displayData.filter(value => (value.displayvalue != undefined ? value.displayvalue : '').charAt(0) == alpha);
|
|
191
|
-
setFilterPurpose(filter);
|
|
192
|
-
index == 0 ? setSearchData('') : setSearchData(alpha);
|
|
193
|
-
index == 0 ? setAlphaFilter(false) : setAlphaFilter(true);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function GetDropdown(data) {
|
|
197
|
-
const newDropDownData = data.filter(function (item) {
|
|
198
|
-
const dataItem = item.displayvalue ? item.displayvalue.toUpperCase() : ''.toUpperCase();
|
|
199
|
-
const textData = searchData.toUpperCase();
|
|
200
|
-
return dataItem.indexOf(textData) > -1;
|
|
201
|
-
});
|
|
202
|
-
return (
|
|
203
|
-
<View style={{ flexDirection: 'row' }}>
|
|
204
|
-
<FlatList
|
|
205
|
-
data={newDropDownData}
|
|
206
|
-
renderItem={renderItem}
|
|
207
|
-
initialNumToRender={10}
|
|
208
|
-
maxToRenderPerBatch={20}
|
|
209
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
210
|
-
/>
|
|
211
|
-
|
|
212
|
-
<SAlphabet
|
|
213
|
-
callBack={val =>
|
|
214
|
-
val == undefined ? null : getAlphabetData(val.alpha, val.index)
|
|
215
|
-
} />
|
|
216
|
-
</View>
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return (
|
|
221
|
-
<View style={{ marginTop: normalize(-5) }}>
|
|
222
|
-
{isLoading ?
|
|
223
|
-
<Loader displaytext={true} />
|
|
224
|
-
: null}
|
|
225
|
-
<Text style={{ alignSelf: 'center', fontSize: normalize(12), fontWeight: 'bold', marginBottom: normalize(2), color: Global.AppTheme.primary_color }}>{ValueCheck(responseJSON) && ValueCheck(responseJSON.consultationEdit) && ValueCheck(responseJSON.consultationEdit.heading) ? responseJSON.consultationEdit.heading : 'SUMMARY'}</Text>
|
|
226
|
-
|
|
227
|
-
<View style={{
|
|
228
|
-
flexDirection: 'row', backgroundColor: '#fff', width: '100%', borderRadius: 6,
|
|
229
|
-
justifyContent: 'space-evenly', height: normalize(45), alignItems: 'center', marginRight: normalize(8),
|
|
230
|
-
}}>
|
|
231
|
-
{[{ 'iconname': 'archive', 'displayvalue': 'ALL', 'color': Global.AppTheme.primary_color, 'shadowcolor': '#fff', 'stage': 1 },
|
|
232
|
-
{ 'iconname': 'add-to-list', 'displayvalue': 'CREATE', 'color': Global.AppTheme.primary_color, 'shadowcolor': '#fff', 'stage': 2 }].map((buttons, i) => {
|
|
233
|
-
return (
|
|
234
|
-
<TouchableOpacity
|
|
235
|
-
key={i}
|
|
236
|
-
onPress={() => buttons.stage == 1 ? setStage(buttons.stage) : getNavigateToSummary()}
|
|
237
|
-
style={{
|
|
238
|
-
borderRadius: 7,
|
|
239
|
-
borderWidth: 1,
|
|
240
|
-
height: normalize(35),
|
|
241
|
-
width: normalize(50),
|
|
242
|
-
backgroundColor: stage == buttons.stage ? '#eaf2ff' : '#fff',
|
|
243
|
-
borderColor: stage == buttons.stage ? '#eaf2ff' : Global.AppTheme.primary_color,
|
|
244
|
-
alignItems: 'center',
|
|
245
|
-
justifyContent: 'center',
|
|
246
|
-
padding: 0,
|
|
247
|
-
elevation: 1,
|
|
248
|
-
shadowColor: '#000',
|
|
249
|
-
shadowOffset: { width: 0, height: 1 },
|
|
250
|
-
shadowOpacity: 0.2,
|
|
251
|
-
shadowRadius: 1,
|
|
252
|
-
}}
|
|
253
|
-
>
|
|
254
|
-
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
|
255
|
-
<Icons.Entypo name={buttons.iconname} style={{ paddingRight: 0 }}
|
|
256
|
-
color={Global.AppTheme.primary_color} size={normalize(17)} />
|
|
257
|
-
<Text style={{
|
|
258
|
-
color: Global.AppTheme.primary_color,
|
|
259
|
-
fontSize: normalize(10),
|
|
260
|
-
fontWeight: stage == buttons.stage ? 'bold' : 'normal',
|
|
261
|
-
}}>{buttons.displayvalue}</Text>
|
|
262
|
-
</View>
|
|
263
|
-
</TouchableOpacity>
|
|
264
|
-
);
|
|
265
|
-
})}
|
|
266
|
-
</View>
|
|
267
|
-
|
|
268
|
-
{stage == 1 ?
|
|
269
|
-
<View style={{ flex: 1 }}>
|
|
270
|
-
<View style={{ flexDirection: 'row', marginTop: normalize(5) }}>
|
|
271
|
-
<SSearchBar
|
|
272
|
-
onChangeText={val => setSearchData(val)}
|
|
273
|
-
/>
|
|
274
|
-
</View>
|
|
275
|
-
|
|
276
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between', flex: 1 }}>
|
|
277
|
-
<View style={{ flex: 1 }}>
|
|
278
|
-
{GetDropdown(alphaFilter ? filterPurpose : displayData)}
|
|
279
|
-
</View>
|
|
280
|
-
</View>
|
|
281
|
-
</View>
|
|
282
|
-
: null}
|
|
283
|
-
|
|
284
|
-
{stage == 1 ?
|
|
285
|
-
<CFooterView style={{ borderRadius: normalize(10), backgroundColor: '#fff' }}>
|
|
286
|
-
<View style={{ flexDirection: 'row' }}>
|
|
287
|
-
{[{
|
|
288
|
-
'displaytext': 'Select',
|
|
289
|
-
'fontcolor': Global.AppTheme.primary_color,
|
|
290
|
-
'shadowcolor': '#f1f3f6',
|
|
291
|
-
'size': 10,
|
|
292
|
-
'iconname': 'file-medical',
|
|
293
|
-
'iconcolor': Global.AppTheme.primary_color,
|
|
294
|
-
'selected': false,
|
|
295
|
-
'visibility': true,
|
|
296
|
-
'iconsize': 20,
|
|
297
|
-
'functionid': 'ALL01',
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
'displaytext': 'Edit',
|
|
301
|
-
'fontcolor': Global.AppTheme.primary_color,
|
|
302
|
-
'shadowcolor': '#f1f3f6',
|
|
303
|
-
'size': 10,
|
|
304
|
-
'iconname': 'edit',
|
|
305
|
-
'iconcolor': Global.AppTheme.primary_color,
|
|
306
|
-
'selected': false,
|
|
307
|
-
'visibility': isNU(edituser) ? true : false, // isNU(edituser) && edituser.editstatus ? true : false,
|
|
308
|
-
'iconsize': 20,
|
|
309
|
-
'functionid': 'ALL02',
|
|
310
|
-
}].map((item, i) => {
|
|
311
|
-
return (
|
|
312
|
-
item.visibility ?
|
|
313
|
-
<View key={i} style={{ borderRadius: normalize(10), paddingLeft: normalize(10) }}>
|
|
314
|
-
<CAwesomeButton
|
|
315
|
-
data={item}
|
|
316
|
-
callBack={val => val == undefined ? null : getAllTabFunctions(item.functionid)}
|
|
317
|
-
/>
|
|
318
|
-
</View>
|
|
319
|
-
: null
|
|
320
|
-
);
|
|
321
|
-
})}
|
|
322
|
-
</View>
|
|
323
|
-
</CFooterView> : null}
|
|
324
|
-
|
|
325
|
-
</View>
|
|
326
|
-
);
|
|
327
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Text, TouchableOpacity } from 'react-native';
|
|
3
|
-
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
-
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
5
|
-
import { notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
6
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
7
|
-
|
|
8
|
-
export default function CVectorIcon(props) {
|
|
9
|
-
const [data, setData] = useState(props.data);
|
|
10
|
-
return (
|
|
11
|
-
<TouchableOpacity
|
|
12
|
-
disabled={data.disabled != undefined ? data.disabled : false}
|
|
13
|
-
style={{ alignItems: 'center', width: data.width != undefined ? normalize(70) : normalize(50) }}
|
|
14
|
-
onPress={() => data.functionid != undefined ? getCallBack(data) : notifyMessage('Incorporate soon',3)}>
|
|
15
|
-
<Icons.FontAwesome5 name={data.iconname != undefined ? data.iconname : 'file'}
|
|
16
|
-
color={data.iconcolor != undefined ? data.iconcolor : 'white'}
|
|
17
|
-
size={data.iconsize != undefined ? normalize(data.iconsize) : normalize(20)} />
|
|
18
|
-
<Text
|
|
19
|
-
numberOfLines={1}
|
|
20
|
-
style={{
|
|
21
|
-
// flex:1,
|
|
22
|
-
width:normalize(50),
|
|
23
|
-
color: data.fontcolor != undefined ? data.fontcolor : '#fff',
|
|
24
|
-
textAlign: data.textAlign != undefined ? data.textAlign : 'center',
|
|
25
|
-
fontSize: data.size != undefined ? normalize(data.size) : normalize(10),
|
|
26
|
-
fontWeight: data.fontWeight != undefined ? data.fontWeight : 'normal',
|
|
27
|
-
}}>{data.displaytext != undefined ? data.displaytext : ''}</Text>
|
|
28
|
-
</TouchableOpacity>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
function getCallBack(item) {
|
|
32
|
-
props.callBack(item);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import { WebView } from 'react-native-webview';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const HtmlContentViewer = ({
|
|
7
|
-
htmlContent,
|
|
8
|
-
uri,
|
|
9
|
-
width = '100%',
|
|
10
|
-
height = 500,
|
|
11
|
-
iframeRef: externalIframeRef,
|
|
12
|
-
onLoad,
|
|
13
|
-
onMessage,
|
|
14
|
-
}) => {
|
|
15
|
-
const internalIframeRef = useRef(null);
|
|
16
|
-
const iframeRef = externalIframeRef || internalIframeRef;
|
|
17
|
-
|
|
18
|
-
// ✅ Hook is ALWAYS called
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (Platform.OS === 'web' && iframeRef.current) {
|
|
21
|
-
const iframe = iframeRef.current;
|
|
22
|
-
const doc =
|
|
23
|
-
iframe.contentDocument || iframe.contentWindow?.document;
|
|
24
|
-
|
|
25
|
-
if (doc) {
|
|
26
|
-
doc.open();
|
|
27
|
-
doc.write(htmlContent);
|
|
28
|
-
doc.close();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}, [htmlContent]);
|
|
32
|
-
|
|
33
|
-
// 🌐 Web / Electron
|
|
34
|
-
if (Platform.OS === 'web') {
|
|
35
|
-
return htmlContent ? (
|
|
36
|
-
<iframe
|
|
37
|
-
ref={iframeRef}
|
|
38
|
-
title="html-content"
|
|
39
|
-
style={{ width, height, border: 'none' }}
|
|
40
|
-
/>
|
|
41
|
-
) : (
|
|
42
|
-
<iframe
|
|
43
|
-
src={uri}
|
|
44
|
-
title="uri-content"
|
|
45
|
-
style={{ width, height, border: 'none' }}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// 📱 Android / iOS
|
|
51
|
-
return (
|
|
52
|
-
<WebView
|
|
53
|
-
androidHardwareAccelerationDisabled
|
|
54
|
-
scalesPageToFit
|
|
55
|
-
mixedContentMode="compatibility"
|
|
56
|
-
originWhitelist={['*']}
|
|
57
|
-
source={htmlContent ? { html: htmlContent } : { uri }}
|
|
58
|
-
onLoad={onLoad}
|
|
59
|
-
onMessage={onMessage}
|
|
60
|
-
style={{ width, height }}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default HtmlContentViewer;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Platform, View, ActivityIndicator, StyleSheet } from 'react-native';
|
|
3
|
-
import Pdf from 'react-native-pdf';
|
|
4
|
-
|
|
5
|
-
const PdfContentViewer = ({
|
|
6
|
-
link,
|
|
7
|
-
style,
|
|
8
|
-
onLoadComplete,
|
|
9
|
-
onError,
|
|
10
|
-
}) => {
|
|
11
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
12
|
-
const [localPdfUrl, setLocalPdfUrl] = useState(null);
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
async function preparePdf() {
|
|
16
|
-
if (!link) {return;}
|
|
17
|
-
console.log('Preparing PDF from link:', link);
|
|
18
|
-
setIsLoading(true);
|
|
19
|
-
try {
|
|
20
|
-
if (Platform.OS === 'web') {
|
|
21
|
-
const localPath = await window.electronAPI.openPdfPreview(link);
|
|
22
|
-
setLocalPdfUrl(localPath);
|
|
23
|
-
} else {
|
|
24
|
-
setLocalPdfUrl(link);
|
|
25
|
-
}
|
|
26
|
-
} catch (err) {
|
|
27
|
-
console.error('PDF prepare error', err);
|
|
28
|
-
onError?.(err);
|
|
29
|
-
} finally {
|
|
30
|
-
setIsLoading(false);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
preparePdf();
|
|
35
|
-
return () => (mounted = false);
|
|
36
|
-
}, [link]);
|
|
37
|
-
|
|
38
|
-
if (!localPdfUrl) {return null;}
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<View style={[styles.container, style]}>
|
|
42
|
-
{isLoading && (
|
|
43
|
-
<View style={styles.loader}>
|
|
44
|
-
<ActivityIndicator size="large" />
|
|
45
|
-
</View>
|
|
46
|
-
)}
|
|
47
|
-
{Platform.OS === 'web' ? (
|
|
48
|
-
<iframe
|
|
49
|
-
src={localPdfUrl}
|
|
50
|
-
style={styles.pdfView}
|
|
51
|
-
title="PDF Viewer"
|
|
52
|
-
onLoad={() => onLoadComplete?.(localPdfUrl)}
|
|
53
|
-
onError={(e) => onError?.(e)}
|
|
54
|
-
/>
|
|
55
|
-
) : (
|
|
56
|
-
<Pdf
|
|
57
|
-
onLoadProgress={n => { }}
|
|
58
|
-
trustAllCerts={false}
|
|
59
|
-
onPressLink={uri => { }}
|
|
60
|
-
onPageChanged={(page, numberOfPages) => { }}
|
|
61
|
-
source={{ uri: localPdfUrl }}
|
|
62
|
-
style={styles.pdfView}
|
|
63
|
-
onLoadComplete={(pages, path) =>
|
|
64
|
-
onLoadComplete?.(path, pages)
|
|
65
|
-
}
|
|
66
|
-
onError={onError}
|
|
67
|
-
/>
|
|
68
|
-
)}
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export default PdfContentViewer;
|
|
74
|
-
|
|
75
|
-
const styles = StyleSheet.create({
|
|
76
|
-
container: { flex: 1 },
|
|
77
|
-
pdfView: {
|
|
78
|
-
flex: 1,
|
|
79
|
-
width: '100%',
|
|
80
|
-
height: '100%',
|
|
81
|
-
borderWidth: 0,
|
|
82
|
-
},
|
|
83
|
-
loader: {
|
|
84
|
-
...StyleSheet.absoluteFillObject,
|
|
85
|
-
justifyContent: 'center',
|
|
86
|
-
alignItems: 'center',
|
|
87
|
-
zIndex: 10,
|
|
88
|
-
backgroundColor: 'rgba(255,255,255,0.6)',
|
|
89
|
-
},
|
|
90
|
-
});
|