@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,1200 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { View, FlatList, TouchableOpacity, StyleSheet, ScrollView, Dimensions, Text, TouchableWithoutFeedback } from 'react-native';
|
|
5
|
+
import { height, normalize } from '../../CommonStyle/componentStyle';
|
|
6
|
+
import CText from '../../CustomComponents/CText';
|
|
7
|
+
import { TextInput } from 'react-native-paper';
|
|
8
|
+
import { MenuProvider, Menu, MenuOptions, MenuOption, MenuTrigger } from 'react-native-popup-menu';
|
|
9
|
+
import HOCIcons from '../../HOC/HOCIcons';
|
|
10
|
+
import CDropDownList from '../../CustomComponents/CDropDownList';
|
|
11
|
+
import moment from 'moment';
|
|
12
|
+
import { Global } from '../../Common/Global';
|
|
13
|
+
import { APIURL } from '../../Common/apiConstants';
|
|
14
|
+
import CAwesomeButton from '../../CustomComponents/CAwesomeButtonLab';
|
|
15
|
+
import { isBNUL, isNUQ } from '../../CommonStyle/ComponentFunctions';
|
|
16
|
+
import CCustomTextInput from '../../CustomComponents/CCustomTextInput';
|
|
17
|
+
|
|
18
|
+
const TagTable = (props) => {
|
|
19
|
+
|
|
20
|
+
// console.log('TagTable data @@@@@@@@@@@@@@@@@@@@@', JSON.stringify(data));
|
|
21
|
+
// console.log('TagTable data &&&&&&&&&&&&&&&&&&&&&', JSON.stringify(editdata));
|
|
22
|
+
|
|
23
|
+
const alternatecolor = '#fefefe';
|
|
24
|
+
|
|
25
|
+
const [refresh, setRefresh] = useState(0);
|
|
26
|
+
const [dropDownItem, setDropDownItem] = useState({
|
|
27
|
+
duration: '',
|
|
28
|
+
medicationtype: '',
|
|
29
|
+
tagdatanature: '',
|
|
30
|
+
tagparameter: '',
|
|
31
|
+
tagnature: '',
|
|
32
|
+
tagdatatype: '',
|
|
33
|
+
durationname: '',
|
|
34
|
+
medicationtypename: '',
|
|
35
|
+
tagdatanaturename: '',
|
|
36
|
+
tagparametername: '',
|
|
37
|
+
tagnaturename: '',
|
|
38
|
+
tagdatatypename: '',
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const [selectedItems, setSelectedItems] = useState(props.editmode ? props.editdata : props.data);
|
|
42
|
+
|
|
43
|
+
// const selectedItems = props.editmode ? props.editdata : props.data;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const handleVariableSelect = (index) => {
|
|
48
|
+
setSelectedItems(prevItems =>
|
|
49
|
+
prevItems.map((item, i) =>
|
|
50
|
+
i === index
|
|
51
|
+
? { ...item, variableChecked: !item.variableChecked }
|
|
52
|
+
: item
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
// props.setIdList(props.idlist);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const handleCheckboxChange = (index, field) => {
|
|
59
|
+
if (!selectedItems[index].variableChecked) {return;}
|
|
60
|
+
setSelectedItems(prevItems =>
|
|
61
|
+
prevItems.map((item, i) =>
|
|
62
|
+
i === index ? { ...item, [field]: !item[field] } : item
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
// props.setIdList(props.idlist);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const handleSizeChange = (index, increment) => {
|
|
69
|
+
if (!selectedItems[index].variableChecked) {return;}
|
|
70
|
+
setSelectedItems(prevItems =>
|
|
71
|
+
prevItems.map((item, i) =>
|
|
72
|
+
i === index ? { ...item, fontsize: Math.max(1, item.fontsize + (increment ? 1 : -1)) } : item
|
|
73
|
+
)
|
|
74
|
+
);
|
|
75
|
+
// props.setIdList(props.idlist);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const handleTaborNewlineChange = (index, value) => {
|
|
79
|
+
if (!selectedItems[index].variableChecked) {return;}
|
|
80
|
+
|
|
81
|
+
setSelectedItems(prevItems =>
|
|
82
|
+
prevItems.map((item, i) =>
|
|
83
|
+
i === index ? { ...item, tabornewline: value } : item
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
// props.setIdList(props.idlist);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
const getSelectedVariableNames = () => {
|
|
91
|
+
|
|
92
|
+
return selectedItems
|
|
93
|
+
.filter(item => item.variableChecked)
|
|
94
|
+
.map(item => {
|
|
95
|
+
// generate new variabename with uniqueid
|
|
96
|
+
const uniquename = `${moment().format('YYMMDDHHMMssS')}`;
|
|
97
|
+
const newVariableName = `#${item.variablename}${uniquename}`;
|
|
98
|
+
item.variablename = newVariableName;
|
|
99
|
+
item.duration = dropDownItem.duration;
|
|
100
|
+
item.medicationtype = dropDownItem.medicationtype;
|
|
101
|
+
item.tagdatanature = dropDownItem.tagdatanature;
|
|
102
|
+
item.tagparameter = dropDownItem.tagparameter;
|
|
103
|
+
item.tagnature = dropDownItem.tagnature;
|
|
104
|
+
item.tagdatatype = dropDownItem.tagdatatype;
|
|
105
|
+
const prefix = item.prefix ? `${item.prefix} ` : '';
|
|
106
|
+
const suffix = item.suffix ? ` ${item.suffix}` : '';
|
|
107
|
+
|
|
108
|
+
const boldStyle = item.bold ? 'font-weight: bold;' : 'font-weight: normal;';
|
|
109
|
+
const italicStyle = item.italic ? 'font-style: italic;' : 'font-style: normal;';
|
|
110
|
+
const underlineStyle = item.underline ? 'text-decoration: underline;' : 'text-decoration: none;';
|
|
111
|
+
const fontSize = item.fontsize ? `${item.fontsize}px` : '12px';
|
|
112
|
+
|
|
113
|
+
// Create the formatted variable name
|
|
114
|
+
const formattedVariableName = `${prefix}${newVariableName}${suffix}`;
|
|
115
|
+
|
|
116
|
+
// Determine the newline character based on tabornewline
|
|
117
|
+
const newlineCharacter = item.tabornewline === 0 ? '' :
|
|
118
|
+
item.tabornewline === 1 ? ' ' : // Space
|
|
119
|
+
item.tabornewline === 2 ? ' ' : // Tab
|
|
120
|
+
item.tabornewline === 3 ? '<br/>' : // HTML line break for new line
|
|
121
|
+
'';
|
|
122
|
+
|
|
123
|
+
// Create the final formatted string with the appropriate styling
|
|
124
|
+
const formattedString = `
|
|
125
|
+
<span style="${boldStyle}${italicStyle}${underlineStyle}font-size: ${fontSize};">
|
|
126
|
+
${newlineCharacter}${formattedVariableName}
|
|
127
|
+
</span>
|
|
128
|
+
`;
|
|
129
|
+
return {
|
|
130
|
+
item,
|
|
131
|
+
dropDownItem,
|
|
132
|
+
formattedString,
|
|
133
|
+
tabornewline: item.tabornewline,
|
|
134
|
+
// newVariableName: item.variablename,
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const handlePrefixChange = (index, text) => {
|
|
140
|
+
setSelectedItems(prevItems =>
|
|
141
|
+
prevItems.map((item, i) =>
|
|
142
|
+
i === index ? { ...item, prefix: text } : item
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
// props.setIdList(props.idlist);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const handleSuffixChange = (index, text) => {
|
|
149
|
+
setSelectedItems(prevItems =>
|
|
150
|
+
prevItems.map((item, i) =>
|
|
151
|
+
i === index ? { ...item, suffix: text } : item
|
|
152
|
+
));
|
|
153
|
+
// props.setIdList(props.idlist);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const handleDropdownChange = (key, value) => {
|
|
157
|
+
setDropDownItem(prevState => ({ ...prevState, [key]: value }));
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const addtagarray = [
|
|
161
|
+
{
|
|
162
|
+
'tabornewline': 0,
|
|
163
|
+
'iconname': 'not-interested',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
'tabornewline': 1,
|
|
167
|
+
'iconname': 'remove-outline',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
'tabornewline': 2,
|
|
171
|
+
'iconname': 'progress-empty',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
'tabornewline': 3,
|
|
175
|
+
'iconname': 'corner-down-left',
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
function fnHandleDropDownChange(v, firstindex, secondindex) {
|
|
180
|
+
|
|
181
|
+
setSelectedItems(prevData => {
|
|
182
|
+
|
|
183
|
+
const updatedData = [...prevData];
|
|
184
|
+
|
|
185
|
+
updatedData[firstindex] = {
|
|
186
|
+
...updatedData[firstindex],
|
|
187
|
+
tagproperties: updatedData[firstindex].tagproperties,
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
updatedData[firstindex].tagproperties = [
|
|
191
|
+
...updatedData[firstindex].tagproperties,
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
updatedData[firstindex].tagproperties[secondindex] = {
|
|
195
|
+
...updatedData[firstindex].tagproperties[secondindex],
|
|
196
|
+
datavalue: v.datavalue,
|
|
197
|
+
displayvalue: v.displayvalue,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
return updatedData;
|
|
201
|
+
});
|
|
202
|
+
// props.setIdList(props.idlist);
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
const renderItem = ({ item, index }) => {
|
|
212
|
+
|
|
213
|
+
const getIcon = (value) => {
|
|
214
|
+
|
|
215
|
+
switch (value) {
|
|
216
|
+
case 0:
|
|
217
|
+
return (
|
|
218
|
+
<HOCIcons.MaterialIcons
|
|
219
|
+
name={'not-interested'}
|
|
220
|
+
size={normalize(12)}
|
|
221
|
+
color={'black'}
|
|
222
|
+
/>
|
|
223
|
+
);
|
|
224
|
+
case 1:
|
|
225
|
+
return (
|
|
226
|
+
<HOCIcons.Ionicons
|
|
227
|
+
name={'remove-outline'}
|
|
228
|
+
size={normalize(12)}
|
|
229
|
+
color={'black'}
|
|
230
|
+
/>
|
|
231
|
+
);
|
|
232
|
+
case 2:
|
|
233
|
+
return (
|
|
234
|
+
<HOCIcons.Entypo
|
|
235
|
+
name={'progress-empty'}
|
|
236
|
+
size={normalize(12)}
|
|
237
|
+
color={'black'}
|
|
238
|
+
/>
|
|
239
|
+
);
|
|
240
|
+
case 3:
|
|
241
|
+
return (
|
|
242
|
+
<HOCIcons.Feather
|
|
243
|
+
name={'corner-down-left'}
|
|
244
|
+
size={normalize(12)}
|
|
245
|
+
color={'black'}
|
|
246
|
+
/>
|
|
247
|
+
);
|
|
248
|
+
default:
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// let jsondata = [
|
|
254
|
+
// {
|
|
255
|
+
// code: 1,
|
|
256
|
+
// displayname: 'Duration',
|
|
257
|
+
// iconname: 'file',
|
|
258
|
+
// icongroup: 3,
|
|
259
|
+
// datavalue: 1,
|
|
260
|
+
// displayvalue: ''
|
|
261
|
+
// },
|
|
262
|
+
// {
|
|
263
|
+
// code: 2,
|
|
264
|
+
// datavalue: 2,
|
|
265
|
+
// iconname: 'file',
|
|
266
|
+
// icongroup: 3,
|
|
267
|
+
// displayname: 'Medication Type',
|
|
268
|
+
// displayvalue: ''
|
|
269
|
+
// },
|
|
270
|
+
// {
|
|
271
|
+
// code: 3,
|
|
272
|
+
// datavalue: 3,
|
|
273
|
+
// iconname: 'file',
|
|
274
|
+
// icongroup: 3,
|
|
275
|
+
// displayname: 'Scope',
|
|
276
|
+
// displayvalue: ''
|
|
277
|
+
// },
|
|
278
|
+
// {
|
|
279
|
+
// code: 4,
|
|
280
|
+
// datavalue: 4,
|
|
281
|
+
// iconname: 'file',
|
|
282
|
+
// icongroup: 3,
|
|
283
|
+
// displayname: 'Granularity',
|
|
284
|
+
// displayvalue: ''
|
|
285
|
+
// },
|
|
286
|
+
// {
|
|
287
|
+
// code: 5,
|
|
288
|
+
// datavalue: 5,
|
|
289
|
+
// iconname: 'file',
|
|
290
|
+
// icongroup: 3,
|
|
291
|
+
// displayname: 'Format',
|
|
292
|
+
// displayvalue: ''
|
|
293
|
+
// },
|
|
294
|
+
// {
|
|
295
|
+
// code: 6,
|
|
296
|
+
// datavalue: 6,
|
|
297
|
+
// iconname: 'file',
|
|
298
|
+
// icongroup: 3,
|
|
299
|
+
// displayname: 'Entity',
|
|
300
|
+
// displayvalue: ''
|
|
301
|
+
// },
|
|
302
|
+
// ]
|
|
303
|
+
|
|
304
|
+
return (
|
|
305
|
+
<TouchableWithoutFeedback>
|
|
306
|
+
<View style={{
|
|
307
|
+
borderWidth: item.variableChecked ? 2 : 0.5,
|
|
308
|
+
borderColor: item.variableChecked ? Global.AppTheme.primary_color : 'lightgrey',
|
|
309
|
+
borderRadius: 5,
|
|
310
|
+
padding: normalize(3),
|
|
311
|
+
margin: normalize(3),
|
|
312
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
313
|
+
}}>
|
|
314
|
+
|
|
315
|
+
<View style={{
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
padding: 1,
|
|
319
|
+
}}>
|
|
320
|
+
<View style={{ marginLeft: 2, width: '45%' }}>
|
|
321
|
+
<TouchableOpacity onPress={() =>
|
|
322
|
+
props.editmode ?
|
|
323
|
+
null :
|
|
324
|
+
handleVariableSelect(index)
|
|
325
|
+
}
|
|
326
|
+
style={{
|
|
327
|
+
borderWidth: 0,
|
|
328
|
+
}}
|
|
329
|
+
>
|
|
330
|
+
<CText style={[
|
|
331
|
+
styles.variableSelectText,
|
|
332
|
+
{ color: item.variableChecked ? 'black' : 'gray' },
|
|
333
|
+
]}>
|
|
334
|
+
{item.variableChecked ? '✓ ' : ' '}
|
|
335
|
+
<CText
|
|
336
|
+
style={{
|
|
337
|
+
fontSize: item.fontsize || normalize(12),
|
|
338
|
+
fontWeight: item.bold ? 'bold' : 'normal',
|
|
339
|
+
fontStyle: item.italic ? 'italic' : 'normal',
|
|
340
|
+
textDecorationLine: item.underline ? 'underline' : 'none',
|
|
341
|
+
color: item.variableChecked ? 'black' : 'gray',
|
|
342
|
+
marginLeft: 10,
|
|
343
|
+
}}
|
|
344
|
+
>
|
|
345
|
+
{item.prefix ? `${item.prefix} ` : ''}{item.variablename}{item.suffix ? ` ${item.suffix}` : ''}
|
|
346
|
+
</CText>
|
|
347
|
+
</CText>
|
|
348
|
+
</TouchableOpacity>
|
|
349
|
+
</View>
|
|
350
|
+
<View style={{ flexDirection: 'row', width: '55%', justifyContent: 'flex-end', borderWidth: 0 }}>
|
|
351
|
+
<TouchableOpacity
|
|
352
|
+
style={[styles.varcolumn,
|
|
353
|
+
|
|
354
|
+
item.bold && item.variableChecked && styles.activeButton]}
|
|
355
|
+
onPress={() => handleCheckboxChange(index, 'bold')}
|
|
356
|
+
>
|
|
357
|
+
<CText style={[
|
|
358
|
+
styles.textButton,
|
|
359
|
+
{
|
|
360
|
+
fontWeight: item.bold && item.variableChecked ? 'bold' : 'normal',
|
|
361
|
+
color: item.bold && item.variableChecked ? 'blue' : 'gray',
|
|
362
|
+
},
|
|
363
|
+
]}>
|
|
364
|
+
B
|
|
365
|
+
</CText>
|
|
366
|
+
</TouchableOpacity>
|
|
367
|
+
|
|
368
|
+
<TouchableOpacity
|
|
369
|
+
style={[styles.varcolumn, item.italic && item.variableChecked && styles.activeButton]}
|
|
370
|
+
onPress={() => handleCheckboxChange(index, 'italic')}
|
|
371
|
+
>
|
|
372
|
+
<CText style={[
|
|
373
|
+
styles.textButton,
|
|
374
|
+
|
|
375
|
+
{
|
|
376
|
+
fontStyle: item.italic && item.variableChecked ? 'italic' : 'normal',
|
|
377
|
+
color: item.italic && item.variableChecked ? 'blue' : 'gray',
|
|
378
|
+
},
|
|
379
|
+
]}>
|
|
380
|
+
i
|
|
381
|
+
</CText>
|
|
382
|
+
</TouchableOpacity>
|
|
383
|
+
|
|
384
|
+
<TouchableOpacity
|
|
385
|
+
style={[styles.varcolumn, item.underline && item.variableChecked && styles.activeButton]}
|
|
386
|
+
onPress={() => handleCheckboxChange(index, 'underline')}
|
|
387
|
+
>
|
|
388
|
+
<CText style={[
|
|
389
|
+
styles.textButton,
|
|
390
|
+
{
|
|
391
|
+
textDecorationLine: item.underline && item.variableChecked ? 'underline' : 'none',
|
|
392
|
+
color: item.underline && item.variableChecked ? 'blue' : 'gray',
|
|
393
|
+
},
|
|
394
|
+
]}>
|
|
395
|
+
U
|
|
396
|
+
</CText>
|
|
397
|
+
</TouchableOpacity>
|
|
398
|
+
|
|
399
|
+
<View style={styles.sizeControl}>
|
|
400
|
+
<TouchableOpacity onPress={() => item.variableChecked && handleSizeChange(index, false)}>
|
|
401
|
+
<CText style={styles.sizeButton}>-</CText>
|
|
402
|
+
</TouchableOpacity>
|
|
403
|
+
<CText style={styles.sizeValue}>{item.fontsize}</CText>
|
|
404
|
+
<TouchableOpacity onPress={() => item.variableChecked && handleSizeChange(index, true)}>
|
|
405
|
+
<CText style={styles.sizeButton}>+</CText>
|
|
406
|
+
</TouchableOpacity>
|
|
407
|
+
</View>
|
|
408
|
+
|
|
409
|
+
{/* Menu for TaborNewline */}
|
|
410
|
+
<View>
|
|
411
|
+
<View style={styles.menuGroup} disabled={!item.variableChecked}>
|
|
412
|
+
<Menu disabled={!item.variableChecked}>
|
|
413
|
+
<MenuTrigger style={{}}>
|
|
414
|
+
<CText style={styles.triggerText}>
|
|
415
|
+
{getIcon(item.tabornewline)}
|
|
416
|
+
<HOCIcons.AntDesign
|
|
417
|
+
name={'down'}
|
|
418
|
+
size={normalize(12)}
|
|
419
|
+
color={'black'}
|
|
420
|
+
/>
|
|
421
|
+
</CText>
|
|
422
|
+
</MenuTrigger>
|
|
423
|
+
<MenuOptions
|
|
424
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
425
|
+
disabled={!item.variableChecked}
|
|
426
|
+
>
|
|
427
|
+
<MenuOption onSelect={() => item.variableChecked && handleTaborNewlineChange(index, 0)}
|
|
428
|
+
style={[styles.menuOption, !item.variableChecked && styles.disabledOption]}
|
|
429
|
+
>
|
|
430
|
+
<View style={styles.optionContainer}>
|
|
431
|
+
<HOCIcons.MaterialIcons
|
|
432
|
+
name={'not-interested'}
|
|
433
|
+
size={normalize(12)}
|
|
434
|
+
color={'black'}
|
|
435
|
+
/>
|
|
436
|
+
<CText style={styles.optionText}>None</CText>
|
|
437
|
+
</View>
|
|
438
|
+
</MenuOption>
|
|
439
|
+
<MenuOption onSelect={() => handleTaborNewlineChange(index, 1)} style={styles.menuOption}>
|
|
440
|
+
<View style={styles.optionContainer}>
|
|
441
|
+
<HOCIcons.Ionicons
|
|
442
|
+
name={'remove-outline'}
|
|
443
|
+
size={normalize(12)}
|
|
444
|
+
color={'black'}
|
|
445
|
+
/>
|
|
446
|
+
<CText style={styles.optionText}>Space</CText>
|
|
447
|
+
</View>
|
|
448
|
+
</MenuOption>
|
|
449
|
+
<MenuOption onSelect={() => handleTaborNewlineChange(index, 2)} style={styles.menuOption}>
|
|
450
|
+
<View style={styles.optionContainer}>
|
|
451
|
+
<HOCIcons.Entypo
|
|
452
|
+
name={'progress-empty'}
|
|
453
|
+
size={normalize(12)}
|
|
454
|
+
color={'black'}
|
|
455
|
+
/>
|
|
456
|
+
<CText style={styles.optionText}>Tab</CText>
|
|
457
|
+
</View>
|
|
458
|
+
</MenuOption>
|
|
459
|
+
<MenuOption onSelect={() => handleTaborNewlineChange(index, 3)} style={styles.menuOption}>
|
|
460
|
+
<View style={styles.optionContainer}>
|
|
461
|
+
<HOCIcons.Feather
|
|
462
|
+
name={'corner-down-left'}
|
|
463
|
+
size={normalize(12)}
|
|
464
|
+
color={'black'}
|
|
465
|
+
/>
|
|
466
|
+
<CText style={styles.optionText}>Newline</CText>
|
|
467
|
+
</View>
|
|
468
|
+
</MenuOption>
|
|
469
|
+
</MenuOptions>
|
|
470
|
+
</Menu>
|
|
471
|
+
</View>
|
|
472
|
+
</View>
|
|
473
|
+
</View>
|
|
474
|
+
</View>
|
|
475
|
+
|
|
476
|
+
<View>
|
|
477
|
+
{item.variableChecked ?
|
|
478
|
+
<View style={{ flexDirection: 'row', marginTop: normalize(10), justifyContent: 'space-evenly', width: '100%' }}>
|
|
479
|
+
<View style={{ width: '47%' }}>
|
|
480
|
+
<CCustomTextInput
|
|
481
|
+
required={false}
|
|
482
|
+
info={'Enter Prefix.'}
|
|
483
|
+
custompositiontextviewstyle={{
|
|
484
|
+
position: 'absolute',
|
|
485
|
+
top: normalize(-5),
|
|
486
|
+
left: normalize(7),
|
|
487
|
+
flexDirection: 'row',
|
|
488
|
+
alignItems: 'center',
|
|
489
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
490
|
+
}}
|
|
491
|
+
inputstyle={{
|
|
492
|
+
flexDirection: 'row',
|
|
493
|
+
borderWidth: 0.5,
|
|
494
|
+
borderColor: 'grey',
|
|
495
|
+
borderRadius: 5,
|
|
496
|
+
alignItems: 'center',
|
|
497
|
+
height: normalize(30),
|
|
498
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
499
|
+
elevation: 0,
|
|
500
|
+
}}
|
|
501
|
+
iconstyle={{
|
|
502
|
+
icongroup: 3,
|
|
503
|
+
iconname: 'rename-box',
|
|
504
|
+
iconsize: normalize(18),
|
|
505
|
+
iconcolor: '#164c92',
|
|
506
|
+
style: {
|
|
507
|
+
paddingHorizontal: normalize(7),
|
|
508
|
+
},
|
|
509
|
+
}}
|
|
510
|
+
data={{
|
|
511
|
+
displaytext: 'Prefix',
|
|
512
|
+
type: 'default',
|
|
513
|
+
iconcolor: 'darkblue',
|
|
514
|
+
editable: true,
|
|
515
|
+
itemwidth: '100%',
|
|
516
|
+
iconname: 'id-badge',
|
|
517
|
+
value: isNUQ(item.prefix) ? item.prefix : null,
|
|
518
|
+
tfontweight: isNUQ(item.prefix) ? 'bold' : 'bold',
|
|
519
|
+
placeholder: '',
|
|
520
|
+
placeholdercolor: 'lightgrey',
|
|
521
|
+
capitalize: 'characters',
|
|
522
|
+
tfontsize: normalize(12),
|
|
523
|
+
}}
|
|
524
|
+
callBack={val => (val == undefined ? null : (
|
|
525
|
+
handlePrefixChange(index, val)
|
|
526
|
+
))}
|
|
527
|
+
/>
|
|
528
|
+
</View>
|
|
529
|
+
|
|
530
|
+
<View style={{ width: '47%' }}>
|
|
531
|
+
<CCustomTextInput
|
|
532
|
+
required={false}
|
|
533
|
+
info={'Enter Suffix.'}
|
|
534
|
+
custompositiontextviewstyle={{
|
|
535
|
+
position: 'absolute',
|
|
536
|
+
top: normalize(-5),
|
|
537
|
+
left: normalize(7),
|
|
538
|
+
flexDirection: 'row',
|
|
539
|
+
alignItems: 'center',
|
|
540
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
541
|
+
}}
|
|
542
|
+
inputstyle={{
|
|
543
|
+
flexDirection: 'row',
|
|
544
|
+
borderWidth: 0.5,
|
|
545
|
+
borderColor: 'grey',
|
|
546
|
+
borderRadius: 5,
|
|
547
|
+
alignItems: 'center',
|
|
548
|
+
height: normalize(30),
|
|
549
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
550
|
+
elevation: 0,
|
|
551
|
+
}}
|
|
552
|
+
iconstyle={{
|
|
553
|
+
icongroup: 3,
|
|
554
|
+
iconname: 'rename-box',
|
|
555
|
+
iconsize: normalize(18),
|
|
556
|
+
iconcolor: '#164c92',
|
|
557
|
+
style: {
|
|
558
|
+
paddingHorizontal: normalize(7),
|
|
559
|
+
},
|
|
560
|
+
}}
|
|
561
|
+
data={{
|
|
562
|
+
displaytext: 'Suffix',
|
|
563
|
+
type: 'default',
|
|
564
|
+
iconcolor: 'darkblue',
|
|
565
|
+
editable: true,
|
|
566
|
+
itemwidth: '100%',
|
|
567
|
+
iconname: 'id-badge',
|
|
568
|
+
value: isNUQ(item.prefix) ? item.prefix : null,
|
|
569
|
+
tfontweight: isNUQ(item.prefix) ? 'bold' : 'bold',
|
|
570
|
+
placeholder: '',
|
|
571
|
+
placeholdercolor: 'lightgrey',
|
|
572
|
+
capitalize: 'characters',
|
|
573
|
+
tfontsize: normalize(12),
|
|
574
|
+
}}
|
|
575
|
+
callBack={val => (val == undefined ? null : (
|
|
576
|
+
handleSuffixChange(index, val)
|
|
577
|
+
))}
|
|
578
|
+
/>
|
|
579
|
+
</View>
|
|
580
|
+
|
|
581
|
+
{/* <TextInput
|
|
582
|
+
value={item.prefix}
|
|
583
|
+
keyboardType={'default'}
|
|
584
|
+
onChangeText={(text) => handlePrefixChange(index, text)}
|
|
585
|
+
label="Prefix"
|
|
586
|
+
editable={item.variableChecked}
|
|
587
|
+
mode="outlined"
|
|
588
|
+
style={{
|
|
589
|
+
width: Dimensions.get('screen').width * 0.438,
|
|
590
|
+
margin: 2,
|
|
591
|
+
height: 30,
|
|
592
|
+
padding: 0,
|
|
593
|
+
}}
|
|
594
|
+
placeholder="Prefix"
|
|
595
|
+
/> */}
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
{/* <TextInput
|
|
599
|
+
value={item.suffix}
|
|
600
|
+
keyboardType={'default'}
|
|
601
|
+
onChangeText={(text) => handleSuffixChange(index, text)}
|
|
602
|
+
label="Suffix"
|
|
603
|
+
editable={item.variableChecked}
|
|
604
|
+
mode="outlined"
|
|
605
|
+
style={{
|
|
606
|
+
width: Dimensions.get('screen').width * 0.438,
|
|
607
|
+
margin: 2,
|
|
608
|
+
height: 30,
|
|
609
|
+
}}
|
|
610
|
+
placeholder="Suffix"
|
|
611
|
+
/> */}
|
|
612
|
+
</View>
|
|
613
|
+
: null}
|
|
614
|
+
</View>
|
|
615
|
+
|
|
616
|
+
{item.variableChecked && isBNUL(item.tagproperties) ?
|
|
617
|
+
<View style={{ marginTop: normalize(10) }}>
|
|
618
|
+
<FlatList
|
|
619
|
+
data={item.tagproperties}
|
|
620
|
+
numColumns={3}
|
|
621
|
+
renderItem={(val) => {
|
|
622
|
+
return (
|
|
623
|
+
<View style={{ borderWidth: 0, width: '33%' }}>
|
|
624
|
+
<View style={{ margin: normalize(5) }}>
|
|
625
|
+
<Menu>
|
|
626
|
+
<MenuTrigger>
|
|
627
|
+
<View style={{
|
|
628
|
+
flexDirection: 'row',
|
|
629
|
+
alignItems: 'center',
|
|
630
|
+
borderWidth: 1,
|
|
631
|
+
borderColor: 'lightgrey',
|
|
632
|
+
borderRadius: 5,
|
|
633
|
+
padding: normalize(4),
|
|
634
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
635
|
+
width: '100%',
|
|
636
|
+
}}>
|
|
637
|
+
<View style={{
|
|
638
|
+
position: 'absolute', top: normalize(-5), left: normalize(5),
|
|
639
|
+
backgroundColor: item.variableChecked ? alternatecolor : 'white',
|
|
640
|
+
flexDirection: 'row', alignItems: 'center',
|
|
641
|
+
}}>
|
|
642
|
+
<Text style={{ color: '#164c92', fontSize: normalize(8), textAlign: 'left', fontWeight: 'normal' }}>{' '}{isNUQ(val.item.displayname) ? val.item.displayname : null}</Text>
|
|
643
|
+
</View>
|
|
644
|
+
<HOCIcons.Icons
|
|
645
|
+
// icongroup={val.item.icongroup ? val.item.icongroup : 3}
|
|
646
|
+
// name={val.item.iconname ? val.item.iconname : 'file'}
|
|
647
|
+
icongroup={3}
|
|
648
|
+
name={'file'}
|
|
649
|
+
size={normalize(15)}
|
|
650
|
+
color={Global.AppTheme.primary_color}
|
|
651
|
+
/>
|
|
652
|
+
<CText adjustsFontSizeToFit style={{
|
|
653
|
+
marginLeft: 5,
|
|
654
|
+
fontSize: normalize(10),
|
|
655
|
+
fontWeight: 'bold',
|
|
656
|
+
color: 'black',
|
|
657
|
+
}}>
|
|
658
|
+
{isNUQ(val.item.displayvalue) ? val.item.displayvalue : ''}
|
|
659
|
+
</CText>
|
|
660
|
+
</View>
|
|
661
|
+
</MenuTrigger>
|
|
662
|
+
<MenuOptions
|
|
663
|
+
optionsContainerStyle={{ marginTop: normalize(-35) }}
|
|
664
|
+
style={{ backgroundColor: 'transparent' }}>
|
|
665
|
+
<CDropDownList
|
|
666
|
+
dropdownapi={DropdownLink(val)}
|
|
667
|
+
callback={v => {
|
|
668
|
+
if (v) {
|
|
669
|
+
fnHandleDropDownChange(v, index, val.index);
|
|
670
|
+
// val.item.datavalue = v.datavalue;
|
|
671
|
+
// val.item.displayvalue = v.displayvalue;
|
|
672
|
+
// setRefresh(refresh + 1);
|
|
673
|
+
}
|
|
674
|
+
}}
|
|
675
|
+
/>
|
|
676
|
+
</MenuOptions>
|
|
677
|
+
</Menu>
|
|
678
|
+
</View>
|
|
679
|
+
</View>
|
|
680
|
+
);
|
|
681
|
+
}}
|
|
682
|
+
/>
|
|
683
|
+
</View>
|
|
684
|
+
: null}
|
|
685
|
+
|
|
686
|
+
</View>
|
|
687
|
+
</TouchableWithoutFeedback>
|
|
688
|
+
|
|
689
|
+
);
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
function DropdownLink(val) {
|
|
693
|
+
|
|
694
|
+
switch (val.item.code) {
|
|
695
|
+
case 1:
|
|
696
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 27';
|
|
697
|
+
case 2:
|
|
698
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 28';
|
|
699
|
+
case 3:
|
|
700
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 29';
|
|
701
|
+
case 4:
|
|
702
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 30';
|
|
703
|
+
case 5:
|
|
704
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 31';
|
|
705
|
+
case 6:
|
|
706
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 32';
|
|
707
|
+
default:
|
|
708
|
+
return APIURL + 'emr/emrcommonget/rnladropdown 27';
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
const isSelectButtonEnabled = selectedItems.some(item => item.variableChecked);
|
|
714
|
+
|
|
715
|
+
return (
|
|
716
|
+
<MenuProvider>
|
|
717
|
+
<View style={{
|
|
718
|
+
flex: 1,
|
|
719
|
+
margin: 2,
|
|
720
|
+
justifyContent: 'center',
|
|
721
|
+
alignItems: 'center',
|
|
722
|
+
}}>
|
|
723
|
+
<View style={{}}>
|
|
724
|
+
<ScrollView>
|
|
725
|
+
<View style={{ flexDirection: 'column' }}>
|
|
726
|
+
<View style={{ width: '100%' }}>
|
|
727
|
+
|
|
728
|
+
{/* {data.durationstatus ? (
|
|
729
|
+
<View style={{ margin: 5 }}>
|
|
730
|
+
<Menu>
|
|
731
|
+
<MenuTrigger>
|
|
732
|
+
<View style={{
|
|
733
|
+
flexDirection: 'row',
|
|
734
|
+
alignItems: 'center',
|
|
735
|
+
borderWidth: 1,
|
|
736
|
+
borderColor: 'lightgrey',
|
|
737
|
+
borderRadius: 5,
|
|
738
|
+
padding: normalize(4),
|
|
739
|
+
backgroundColor: 'white'
|
|
740
|
+
}}>
|
|
741
|
+
<HOCIcons.Icons
|
|
742
|
+
icongroup={3}
|
|
743
|
+
name="file"
|
|
744
|
+
size={normalize(15)}
|
|
745
|
+
color="darkblue"
|
|
746
|
+
/>
|
|
747
|
+
<CText style={{
|
|
748
|
+
marginLeft: 5,
|
|
749
|
+
fontSize: normalize(14),
|
|
750
|
+
fontWeight: 'bold',
|
|
751
|
+
color: 'darkblue'
|
|
752
|
+
}}>
|
|
753
|
+
{dropDownItem.durationname ? dropDownItem.durationname : 'DURATION'}
|
|
754
|
+
</CText>
|
|
755
|
+
</View>
|
|
756
|
+
</MenuTrigger>
|
|
757
|
+
<MenuOptions
|
|
758
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
759
|
+
style={{ backgroundColor: 'transparent', }}>
|
|
760
|
+
<CDropDownList
|
|
761
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 27'}
|
|
762
|
+
dropdownarray={dropDownItem.duration}
|
|
763
|
+
callback={val => {
|
|
764
|
+
if (val) {
|
|
765
|
+
handleDropdownChange('duration', val.datavalue)
|
|
766
|
+
handleDropdownChange('durationname', val.displayvalue)
|
|
767
|
+
}
|
|
768
|
+
}}
|
|
769
|
+
/>
|
|
770
|
+
</MenuOptions>
|
|
771
|
+
</Menu>
|
|
772
|
+
</View>
|
|
773
|
+
) : null}
|
|
774
|
+
|
|
775
|
+
{data.medicationtypestatus ? (
|
|
776
|
+
<View style={{ margin: 5 }}>
|
|
777
|
+
<Menu>
|
|
778
|
+
<MenuTrigger>
|
|
779
|
+
<View style={{
|
|
780
|
+
flexDirection: 'row',
|
|
781
|
+
alignItems: 'center',
|
|
782
|
+
borderWidth: 1,
|
|
783
|
+
borderColor: 'lightgrey',
|
|
784
|
+
borderRadius: 5,
|
|
785
|
+
padding: normalize(4),
|
|
786
|
+
backgroundColor: 'white'
|
|
787
|
+
}}>
|
|
788
|
+
<HOCIcons.Icons
|
|
789
|
+
icongroup={3}
|
|
790
|
+
name="file"
|
|
791
|
+
size={normalize(15)}
|
|
792
|
+
color="darkblue"
|
|
793
|
+
/>
|
|
794
|
+
<CText style={{
|
|
795
|
+
marginLeft: 5,
|
|
796
|
+
fontSize: normalize(14),
|
|
797
|
+
fontWeight: 'bold',
|
|
798
|
+
color: 'darkblue'
|
|
799
|
+
}}>
|
|
800
|
+
{dropDownItem.medicationtypename ? dropDownItem.medicationtypename : 'MEDICATION TYPE'}
|
|
801
|
+
</CText>
|
|
802
|
+
</View>
|
|
803
|
+
</MenuTrigger>
|
|
804
|
+
<MenuOptions
|
|
805
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
806
|
+
style={{ backgroundColor: 'transparent', }}>
|
|
807
|
+
<CDropDownList
|
|
808
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 28'}
|
|
809
|
+
dropdownarray={dropDownItem.medicationtype}
|
|
810
|
+
callback={val => {
|
|
811
|
+
if (val) {
|
|
812
|
+
handleDropdownChange('medicationtype', val.datavalue)
|
|
813
|
+
handleDropdownChange('medicationtypename', val.displayvalue)
|
|
814
|
+
}
|
|
815
|
+
}}
|
|
816
|
+
/>
|
|
817
|
+
</MenuOptions>
|
|
818
|
+
</Menu>
|
|
819
|
+
</View>
|
|
820
|
+
) : null}
|
|
821
|
+
|
|
822
|
+
{data.tagdatanaturestatus ? (
|
|
823
|
+
<View style={{ margin: 5 }}>
|
|
824
|
+
<Menu>
|
|
825
|
+
<MenuTrigger>
|
|
826
|
+
<View style={{
|
|
827
|
+
flexDirection: 'row',
|
|
828
|
+
alignItems: 'center',
|
|
829
|
+
borderWidth: 1,
|
|
830
|
+
borderColor: 'lightgrey',
|
|
831
|
+
borderRadius: 5,
|
|
832
|
+
padding: normalize(4),
|
|
833
|
+
backgroundColor: 'white'
|
|
834
|
+
}}>
|
|
835
|
+
<HOCIcons.Icons
|
|
836
|
+
icongroup={3}
|
|
837
|
+
name="file"
|
|
838
|
+
size={normalize(15)}
|
|
839
|
+
color="darkblue"
|
|
840
|
+
/>
|
|
841
|
+
<CText style={{
|
|
842
|
+
marginLeft: 5,
|
|
843
|
+
fontSize: normalize(14),
|
|
844
|
+
fontWeight: 'bold',
|
|
845
|
+
color: 'darkblue'
|
|
846
|
+
}}>
|
|
847
|
+
{dropDownItem.tagdatanaturename ? dropDownItem.tagdatanaturename : 'SCOPE'}
|
|
848
|
+
</CText>
|
|
849
|
+
</View>
|
|
850
|
+
</MenuTrigger>
|
|
851
|
+
<MenuOptions
|
|
852
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
853
|
+
style={{ backgroundColor: 'transparent', }}>
|
|
854
|
+
<CDropDownList
|
|
855
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 29'}
|
|
856
|
+
dropdownarray={dropDownItem.tagdatanature}
|
|
857
|
+
callback={val => {
|
|
858
|
+
if (val) {
|
|
859
|
+
handleDropdownChange('tagdatanature', val.datavalue)
|
|
860
|
+
handleDropdownChange('tagdatanaturename', val.displayvalue)
|
|
861
|
+
}
|
|
862
|
+
}}
|
|
863
|
+
/>
|
|
864
|
+
</MenuOptions>
|
|
865
|
+
</Menu>
|
|
866
|
+
</View>
|
|
867
|
+
) : null}
|
|
868
|
+
|
|
869
|
+
{data.tagparameterstatus ? (
|
|
870
|
+
<View style={{ margin: 5 }}>
|
|
871
|
+
<Menu>
|
|
872
|
+
<MenuTrigger>
|
|
873
|
+
<View style={{
|
|
874
|
+
flexDirection: 'row',
|
|
875
|
+
alignItems: 'center',
|
|
876
|
+
borderWidth: 1,
|
|
877
|
+
borderColor: 'lightgrey',
|
|
878
|
+
borderRadius: 5,
|
|
879
|
+
padding: normalize(4),
|
|
880
|
+
backgroundColor: 'white'
|
|
881
|
+
}}>
|
|
882
|
+
<HOCIcons.Icons
|
|
883
|
+
icongroup={3}
|
|
884
|
+
name="file"
|
|
885
|
+
size={normalize(15)}
|
|
886
|
+
color="darkblue"
|
|
887
|
+
/>
|
|
888
|
+
<CText style={{
|
|
889
|
+
marginLeft: 5,
|
|
890
|
+
fontSize: normalize(14),
|
|
891
|
+
fontWeight: 'bold',
|
|
892
|
+
color: 'darkblue'
|
|
893
|
+
}}>
|
|
894
|
+
{dropDownItem.tagparametername ? dropDownItem.tagparametername : 'GRANULARITY'}
|
|
895
|
+
</CText>
|
|
896
|
+
</View>
|
|
897
|
+
</MenuTrigger>
|
|
898
|
+
<MenuOptions
|
|
899
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
900
|
+
style={{ backgroundColor: 'transparent', }}>
|
|
901
|
+
<CDropDownList
|
|
902
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 30'}
|
|
903
|
+
dropdownarray={dropDownItem.tagparameter}
|
|
904
|
+
callback={val => {
|
|
905
|
+
if (val) {
|
|
906
|
+
handleDropdownChange('tagparameter', val.datavalue)
|
|
907
|
+
handleDropdownChange('tagparametername', val.displayvalue)
|
|
908
|
+
}
|
|
909
|
+
}}
|
|
910
|
+
/>
|
|
911
|
+
</MenuOptions>
|
|
912
|
+
</Menu>
|
|
913
|
+
</View>
|
|
914
|
+
) : null}
|
|
915
|
+
|
|
916
|
+
{data.tagnaturestatus ? (
|
|
917
|
+
<View style={{ margin: 5 }}>
|
|
918
|
+
<Menu>
|
|
919
|
+
<MenuTrigger>
|
|
920
|
+
<View style={{
|
|
921
|
+
flexDirection: 'row',
|
|
922
|
+
alignItems: 'center',
|
|
923
|
+
borderWidth: 1,
|
|
924
|
+
borderColor: 'lightgrey',
|
|
925
|
+
borderRadius: 5,
|
|
926
|
+
padding: normalize(4),
|
|
927
|
+
backgroundColor: 'white'
|
|
928
|
+
}}>
|
|
929
|
+
<HOCIcons.Icons
|
|
930
|
+
icongroup={3}
|
|
931
|
+
name="file"
|
|
932
|
+
size={normalize(15)}
|
|
933
|
+
color="darkblue"
|
|
934
|
+
/>
|
|
935
|
+
<CText style={{
|
|
936
|
+
marginLeft: 5,
|
|
937
|
+
fontSize: normalize(14),
|
|
938
|
+
fontWeight: 'bold',
|
|
939
|
+
color: 'darkblue'
|
|
940
|
+
}}>
|
|
941
|
+
{dropDownItem.tagnaturename ? dropDownItem.tagnaturename : 'FORMAT'}
|
|
942
|
+
</CText>
|
|
943
|
+
</View>
|
|
944
|
+
</MenuTrigger>
|
|
945
|
+
<MenuOptions
|
|
946
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
947
|
+
style={{ backgroundColor: 'transparent', }}>
|
|
948
|
+
<CDropDownList
|
|
949
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 31'}
|
|
950
|
+
dropdownarray={dropDownItem.tagnature}
|
|
951
|
+
callback={val => {
|
|
952
|
+
if (val) {
|
|
953
|
+
handleDropdownChange('tagnature', val.datavalue)
|
|
954
|
+
handleDropdownChange('tagnaturename', val.displayvalue)
|
|
955
|
+
}
|
|
956
|
+
}}
|
|
957
|
+
/>
|
|
958
|
+
</MenuOptions>
|
|
959
|
+
</Menu>
|
|
960
|
+
</View>
|
|
961
|
+
) : null}
|
|
962
|
+
|
|
963
|
+
{data.tagdatatypestatus ? (
|
|
964
|
+
<View style={{ margin: 5 }}>
|
|
965
|
+
<Menu>
|
|
966
|
+
<MenuTrigger>
|
|
967
|
+
<View style={{
|
|
968
|
+
flexDirection: 'row',
|
|
969
|
+
alignItems: 'center',
|
|
970
|
+
borderWidth: 1,
|
|
971
|
+
borderColor: 'lightgrey',
|
|
972
|
+
borderRadius: 5,
|
|
973
|
+
padding: normalize(4),
|
|
974
|
+
backgroundColor: 'white'
|
|
975
|
+
}}>
|
|
976
|
+
<HOCIcons.Icons
|
|
977
|
+
icongroup={3}
|
|
978
|
+
name="file"
|
|
979
|
+
size={normalize(15)}
|
|
980
|
+
color="darkblue"
|
|
981
|
+
/>
|
|
982
|
+
<CText style={{
|
|
983
|
+
marginLeft: 5,
|
|
984
|
+
fontSize: normalize(14),
|
|
985
|
+
fontWeight: 'bold',
|
|
986
|
+
color: 'darkblue'
|
|
987
|
+
}}>
|
|
988
|
+
{dropDownItem.tagdatatypename ? dropDownItem.tagdatatypename : 'ENTITY'}
|
|
989
|
+
</CText>
|
|
990
|
+
</View>
|
|
991
|
+
</MenuTrigger>
|
|
992
|
+
<MenuOptions
|
|
993
|
+
optionsContainerStyle={{ marginTop: normalize(-30) }}
|
|
994
|
+
style={{ backgroundColor: 'transparent' }}>
|
|
995
|
+
<CDropDownList
|
|
996
|
+
dropdownapi={APIURL + 'emr/emrcommonget/rnladropdown 32'}
|
|
997
|
+
dropdownarray={dropDownItem.tagdatatype}
|
|
998
|
+
callback={val => {
|
|
999
|
+
if (val) {
|
|
1000
|
+
handleDropdownChange('tagdatatype', val.datavalue)
|
|
1001
|
+
handleDropdownChange('tagdatatypename', val.displayvalue)
|
|
1002
|
+
}
|
|
1003
|
+
}}
|
|
1004
|
+
/>
|
|
1005
|
+
</MenuOptions>
|
|
1006
|
+
</Menu>
|
|
1007
|
+
</View>
|
|
1008
|
+
) : null} */}
|
|
1009
|
+
|
|
1010
|
+
</View>
|
|
1011
|
+
<FlatList
|
|
1012
|
+
contentContainerStyle={{}}
|
|
1013
|
+
data={selectedItems.sort((a, b) => (b.variableChecked - a.variableChecked))}
|
|
1014
|
+
renderItem={renderItem}
|
|
1015
|
+
keyExtractor={item => item.variablename}
|
|
1016
|
+
/>
|
|
1017
|
+
</View>
|
|
1018
|
+
</ScrollView>
|
|
1019
|
+
<View>
|
|
1020
|
+
<CAwesomeButton
|
|
1021
|
+
disablepress={!isSelectButtonEnabled}
|
|
1022
|
+
callback={() => {
|
|
1023
|
+
// props.callback(getSelectedVariableNames());
|
|
1024
|
+
props.callback(selectedItems);
|
|
1025
|
+
}}
|
|
1026
|
+
buttonstyle={{
|
|
1027
|
+
'borderRadius': 10,
|
|
1028
|
+
'borderWidth': 0.5,
|
|
1029
|
+
'height': normalize(40),
|
|
1030
|
+
'width': normalize(45),
|
|
1031
|
+
'backgroundColor': '#f2f3ff',
|
|
1032
|
+
'paddingHorizontal': 0,
|
|
1033
|
+
'raiseLevel': 1,
|
|
1034
|
+
'paddingBottom': 0,
|
|
1035
|
+
'borderColor': 'lightblue',
|
|
1036
|
+
'paddingTop': 0,
|
|
1037
|
+
'style': {
|
|
1038
|
+
margin: 5,
|
|
1039
|
+
},
|
|
1040
|
+
}}
|
|
1041
|
+
viewstyle={{
|
|
1042
|
+
borderWidth: 0,
|
|
1043
|
+
borderRadius: 0,
|
|
1044
|
+
justifyContent: 'center',
|
|
1045
|
+
alignItems: 'center',
|
|
1046
|
+
}}
|
|
1047
|
+
icon={{
|
|
1048
|
+
'icongroup': 1,
|
|
1049
|
+
'name': 'select1',
|
|
1050
|
+
'color': Global.AppTheme.primary_color,
|
|
1051
|
+
'size': normalize(25),
|
|
1052
|
+
'style': {
|
|
1053
|
+
textAlign: 'center',
|
|
1054
|
+
},
|
|
1055
|
+
}}
|
|
1056
|
+
text={{
|
|
1057
|
+
fontSize: normalize(6),
|
|
1058
|
+
fontWeight: 'bold',
|
|
1059
|
+
color: Global.AppTheme.primary_color,
|
|
1060
|
+
textAlign: 'center',
|
|
1061
|
+
}}
|
|
1062
|
+
displaytext={'SELECT'}
|
|
1063
|
+
/>
|
|
1064
|
+
</View>
|
|
1065
|
+
</View>
|
|
1066
|
+
</View>
|
|
1067
|
+
</MenuProvider>
|
|
1068
|
+
);
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
const styles = StyleSheet.create({
|
|
1072
|
+
overlayContainer: {
|
|
1073
|
+
flex: 1,
|
|
1074
|
+
margin: 2,
|
|
1075
|
+
justifyContent: 'center',
|
|
1076
|
+
alignItems: 'center',
|
|
1077
|
+
},
|
|
1078
|
+
container: {
|
|
1079
|
+
flexDirection: 'column',
|
|
1080
|
+
},
|
|
1081
|
+
row: {
|
|
1082
|
+
flexDirection: 'row',
|
|
1083
|
+
alignItems: 'center',
|
|
1084
|
+
padding: 1,
|
|
1085
|
+
// backgroundColor: 'rgba(237, 232, 232,0.4)',
|
|
1086
|
+
},
|
|
1087
|
+
variableSelectText: {
|
|
1088
|
+
fontSize: normalize(13),
|
|
1089
|
+
marginLeft: 5,
|
|
1090
|
+
marginTop: 5,
|
|
1091
|
+
},
|
|
1092
|
+
varcolumn: {
|
|
1093
|
+
// backgroundColor: 'rgba(237, 232, 232,0.4)',
|
|
1094
|
+
marginHorizontal: 4,
|
|
1095
|
+
borderRadius: 4,
|
|
1096
|
+
padding: 4,
|
|
1097
|
+
width: '10%',
|
|
1098
|
+
justifyContent: 'center',
|
|
1099
|
+
},
|
|
1100
|
+
textButton: {
|
|
1101
|
+
fontSize: 16,
|
|
1102
|
+
textAlign: 'center',
|
|
1103
|
+
},
|
|
1104
|
+
activeButton: {
|
|
1105
|
+
backgroundColor: 'lightblue',
|
|
1106
|
+
},
|
|
1107
|
+
sizeControl: {
|
|
1108
|
+
// backgroundColor: 'rgba(237, 232, 232,0.4)',
|
|
1109
|
+
flexDirection: 'row',
|
|
1110
|
+
alignItems: 'center',
|
|
1111
|
+
// marginLeft: 2,
|
|
1112
|
+
width: '40%',
|
|
1113
|
+
justifyContent: 'center',
|
|
1114
|
+
},
|
|
1115
|
+
sizeButton: {
|
|
1116
|
+
fontSize: normalize(16),
|
|
1117
|
+
padding: 5,
|
|
1118
|
+
},
|
|
1119
|
+
sizeValue: {
|
|
1120
|
+
fontSize: normalize(14),
|
|
1121
|
+
marginHorizontal: 5,
|
|
1122
|
+
borderWidth: 0.5,
|
|
1123
|
+
borderColor: 'lightgrey',
|
|
1124
|
+
borderRadius: 5,
|
|
1125
|
+
// backgroundColor: 'white'
|
|
1126
|
+
},
|
|
1127
|
+
dropdownRow: {
|
|
1128
|
+
flexDirection: 'row',
|
|
1129
|
+
marginBottom: 10,
|
|
1130
|
+
},
|
|
1131
|
+
card: {
|
|
1132
|
+
padding: 5,
|
|
1133
|
+
borderWidth: 1,
|
|
1134
|
+
borderColor: 'gray',
|
|
1135
|
+
borderRadius: 5,
|
|
1136
|
+
margin: 5,
|
|
1137
|
+
width: Dimensions.get('screen').width * 0.2,
|
|
1138
|
+
},
|
|
1139
|
+
triggerText: {
|
|
1140
|
+
padding: 5,
|
|
1141
|
+
justifyContent: 'center',
|
|
1142
|
+
alignItems: 'center',
|
|
1143
|
+
textAlign: 'center',
|
|
1144
|
+
},
|
|
1145
|
+
menuGroup: {
|
|
1146
|
+
flex: 1,
|
|
1147
|
+
marginLeft: '3%',
|
|
1148
|
+
borderWidth: 0.5,
|
|
1149
|
+
borderColor: 'lightgrey',
|
|
1150
|
+
borderRadius: 5,
|
|
1151
|
+
// backgroundColor: 'white',
|
|
1152
|
+
|
|
1153
|
+
},
|
|
1154
|
+
optionContainer: {
|
|
1155
|
+
flexDirection: 'row',
|
|
1156
|
+
alignItems: 'center',
|
|
1157
|
+
},
|
|
1158
|
+
submitButton: {
|
|
1159
|
+
backgroundColor: 'lightgray',
|
|
1160
|
+
padding: 5,
|
|
1161
|
+
alignItems: 'center',
|
|
1162
|
+
borderRadius: 5,
|
|
1163
|
+
width: 70,
|
|
1164
|
+
marginVertical: 5,
|
|
1165
|
+
},
|
|
1166
|
+
disabledButton: {
|
|
1167
|
+
borderWidth: 1,
|
|
1168
|
+
borderColor: 'gray',
|
|
1169
|
+
borderRadius: 5,
|
|
1170
|
+
backgroundColor: 'white',
|
|
1171
|
+
},
|
|
1172
|
+
submitButtonText: {
|
|
1173
|
+
color: Global.AppTheme.primary_color,
|
|
1174
|
+
fontSize: normalize(12),
|
|
1175
|
+
},
|
|
1176
|
+
optionText: {
|
|
1177
|
+
marginLeft: 8,
|
|
1178
|
+
},
|
|
1179
|
+
cardvariable: {
|
|
1180
|
+
// backgroundColor: '#fff',
|
|
1181
|
+
backgroundColor: 'rgba(237, 232, 232, 0.137)',
|
|
1182
|
+
borderRadius: 10,
|
|
1183
|
+
padding: 1,
|
|
1184
|
+
marginVertical: 5,
|
|
1185
|
+
shadowColor: '#000',
|
|
1186
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1187
|
+
shadowOpacity: 0.1,
|
|
1188
|
+
shadowRadius: 4,
|
|
1189
|
+
// borderColor: 'Global.AppTheme.primary_color',
|
|
1190
|
+
// borderWidth: 1,
|
|
1191
|
+
},
|
|
1192
|
+
activeCardvariable: {
|
|
1193
|
+
// backgroundColor: 'rgba(237, 232, 232,0.4)',
|
|
1194
|
+
backgroundColor: 'rgba(177, 172, 174, 0.4)',
|
|
1195
|
+
borderColor: Global.AppTheme.primary_color,
|
|
1196
|
+
borderWidth: 2,
|
|
1197
|
+
},
|
|
1198
|
+
});
|
|
1199
|
+
|
|
1200
|
+
export default TagTable;
|