@jescon-technologies/react-native-ui-kit 0.0.4 → 0.0.6
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 +3 -7
- package/package.json +3 -2
- package/src/Alerts/AAlert.js +4 -4
- 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/RecordAudio.js +1 -1
- 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,1402 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { Text, View, FlatList, TouchableOpacity, Dimensions, ActivityIndicator, ScrollView, Switch, TextInput, TouchableHighlight } from 'react-native';
|
|
3
|
+
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
+
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
+
import { APIURL, EMRAPI } from '../../../../../src/Common/apiConstants';
|
|
6
|
+
import { ArrayCheck, getLoading, isBNUL, isNU, isPermitted, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
7
|
+
import { Global } from '../../../../../src/Common/Global';
|
|
8
|
+
import { NetworkServiceCall } from '@jescon-technologies/react-native-ui-kit';
|
|
9
|
+
import { Icons } from '@jescon-technologies/react-native-ui-kit';;
|
|
10
|
+
import CTextHeader from './TableComponent/CTextHeader';
|
|
11
|
+
import CTextBody from './TableComponent/CTextBody';
|
|
12
|
+
import HHeading from '../HOC/HHeading';
|
|
13
|
+
import STimePicker from '../StaticComponents/STimePicker';
|
|
14
|
+
import Loader from './Loader';
|
|
15
|
+
import moment from 'moment';
|
|
16
|
+
import STextInput from '../StaticComponents/STextInput';
|
|
17
|
+
import SDropDownNew from '../Components/SDropDownNew';
|
|
18
|
+
|
|
19
|
+
import SCheckBox from '../StaticComponents/SCheckBox';
|
|
20
|
+
import HOCIcons from '../HOC/HOCIcons';
|
|
21
|
+
import FastImage from 'react-native-fast-image';
|
|
22
|
+
import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
|
|
23
|
+
import CDropDownList from '../CustomComponents/CDropDownList';
|
|
24
|
+
import CText from '../CustomComponents/CText';
|
|
25
|
+
import { useNavigation } from '../Navigation/useNavigation';
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
import { fontWeight } from '../CommonStyle/commonStyle';
|
|
29
|
+
import { FlashList } from '@shopify/flash-list';
|
|
30
|
+
import CAwesomeButton from '../CustomComponents/CAwesomeButton';
|
|
31
|
+
import CCustomTextInput from '../CustomComponents/CCustomTextInput';
|
|
32
|
+
|
|
33
|
+
const CTokenAllocation = (props) => {
|
|
34
|
+
|
|
35
|
+
const navigation = useNavigation();
|
|
36
|
+
const { width, height } = Dimensions.get('screen');
|
|
37
|
+
const flatlistRef = useRef();
|
|
38
|
+
const dividedWidth = width / 7;
|
|
39
|
+
const [data, setData] = useState();
|
|
40
|
+
const [dayData, setDayData] = useState();
|
|
41
|
+
const [refresh, setRefresh] = useState(0);
|
|
42
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
43
|
+
const [footerData, setFooterData] = useState();
|
|
44
|
+
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
45
|
+
const d = new Date();
|
|
46
|
+
const [monthinno, setMonthInNo] = useState(d.getMonth());
|
|
47
|
+
const [year, setYear] = useState(d.getFullYear());
|
|
48
|
+
const [edit, setEdit] = useState(false);
|
|
49
|
+
const [tokenArr, setTokensArray] = useState();
|
|
50
|
+
const [wttime, setWttime] = useState(30);
|
|
51
|
+
const [consultant, setConsultant] = useState(Global.userData.hosuconsultant);
|
|
52
|
+
|
|
53
|
+
const dropdownarray = {
|
|
54
|
+
'success': true,
|
|
55
|
+
'httpstatus': 200,
|
|
56
|
+
'message': 'SUCCESS',
|
|
57
|
+
'data': {
|
|
58
|
+
'data': [
|
|
59
|
+
{
|
|
60
|
+
'datavalue': 'A', // "O", "W",
|
|
61
|
+
'displayvalue': 'N/A',
|
|
62
|
+
'selected': false,
|
|
63
|
+
'icon': 'credit-card-outline',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
'datavalue': 'O',
|
|
67
|
+
'displayvalue': 'OLD',
|
|
68
|
+
'selected': false,
|
|
69
|
+
'icon': 'credit-card-clock-outline',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
'datavalue': 'W',
|
|
73
|
+
'displayvalue': 'NEW',
|
|
74
|
+
'selected': false,
|
|
75
|
+
'icon': 'credit-card-fast',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (consultant > 0) {
|
|
83
|
+
getConsultation(consultant, year, monthinno);
|
|
84
|
+
}
|
|
85
|
+
}, []);
|
|
86
|
+
|
|
87
|
+
function getConsultation(consultant) {
|
|
88
|
+
|
|
89
|
+
setConsultant(consultant);
|
|
90
|
+
let buttonapi = APIURL + 'emr/emrcommonget/rnhococonsultationtokenorderweekday ' + consultant;
|
|
91
|
+
// + ',' + year + ',' + monthReal
|
|
92
|
+
console.log('Button api..........CToken..........', JSON.stringify(buttonapi));
|
|
93
|
+
setIsLoading(true);
|
|
94
|
+
NetworkServiceCall('get', buttonapi, '')
|
|
95
|
+
.then(function (response) {
|
|
96
|
+
|
|
97
|
+
if (response.httpstatus == 200 && response.data != null
|
|
98
|
+
&& response.data != undefined) {
|
|
99
|
+
setIsLoading(false);
|
|
100
|
+
setData(response.data.weekdays);
|
|
101
|
+
let obj = ArrayCheck(response.data.weekdays) ? response.data.weekdays.find(o => o.selected == true) : null;
|
|
102
|
+
setDayData(obj);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
setIsLoading(false);
|
|
106
|
+
notifyMessage('Data not available,Please try again later', 4);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
getLoading(v => setIsLoading(false));
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function fnRenderInsideFlashlist(array, item) {
|
|
114
|
+
|
|
115
|
+
let newdata = isBNUL(array) ? array.filter(function (item) { return item; }) : [];
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
isBNUL(newdata) ?
|
|
119
|
+
<FlashList
|
|
120
|
+
data={newdata}
|
|
121
|
+
horizontal={false}
|
|
122
|
+
numColumns={2}
|
|
123
|
+
contentContainerStyle={{
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
flexWrap: 'wrap',
|
|
126
|
+
justifyContent: 'space-between',
|
|
127
|
+
}}
|
|
128
|
+
renderItem={(k) => renderMrngEvngToken(k, newdata)}
|
|
129
|
+
keyExtractor={(item, index) => 'key' + index}
|
|
130
|
+
estimatedItemSize={normalize(160)}
|
|
131
|
+
/>
|
|
132
|
+
: null
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function renderFooterView({ item }) {
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<View style={{ flex: 1 }}>
|
|
141
|
+
{ArrayCheck(item.tokenArr) && ArrayCheck(item.tokenArr) ?
|
|
142
|
+
<View style={{ borderWidth: 1, width: '100%', borderRadius: 5, borderColor: 'lightgrey', backgroundColor: 'white', elevation: 5, flexDirection: 'row', justifyContent: 'space-between', padding: normalize(5) }}>
|
|
143
|
+
<View style={{ width: '100%', borderWidth: 0 }}>
|
|
144
|
+
<View style={{
|
|
145
|
+
width: '100%',
|
|
146
|
+
flexDirection: 'row',
|
|
147
|
+
alignItems: 'flex-start',
|
|
148
|
+
borderColor: 'lightgrey',
|
|
149
|
+
marginTop: normalize(5),
|
|
150
|
+
justifyContent: 'space-evenly',
|
|
151
|
+
|
|
152
|
+
}}>
|
|
153
|
+
|
|
154
|
+
<View style={{ width: '35%' }}>
|
|
155
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
156
|
+
<HOCIcons.FontAwesome5
|
|
157
|
+
name={item.iconname}
|
|
158
|
+
color={'black'}
|
|
159
|
+
size={normalize(12)}
|
|
160
|
+
style={{ marginHorizontal: normalize(5) }}
|
|
161
|
+
/>
|
|
162
|
+
<Text style={{ fontSize: normalize(15), color: 'darkblue', fontWeight: 'bold', paddingRight: normalize(5) }}>{item.tokentype}</Text>
|
|
163
|
+
</View>
|
|
164
|
+
<View style={{ flexDirection: 'row', borderWidth: 0, marginTop: normalize(5), justifyContent: 'space-between' }}>
|
|
165
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', borderWidth: 0 }}>
|
|
166
|
+
<HOCIcons.FontAwesome5
|
|
167
|
+
name={'clock'}
|
|
168
|
+
color={'black'}
|
|
169
|
+
size={normalize(10)}
|
|
170
|
+
style={{ marginHorizontal: normalize(3) }}
|
|
171
|
+
/>
|
|
172
|
+
<View>
|
|
173
|
+
<Text style={{ fontSize: normalize(7), color: 'black', fontWeight: 'normal' }}>START TIME</Text>
|
|
174
|
+
<Text style={{ fontSize: normalize(11), color: 'darkblue', fontWeight: 'bold' }}>{item.reportingtime}</Text>
|
|
175
|
+
</View>
|
|
176
|
+
</View>
|
|
177
|
+
<View style={{ borderWidth: 0, borderColor: 'black', flexDirection: 'row', alignItems: 'center' }}>
|
|
178
|
+
<HOCIcons.FontAwesome5
|
|
179
|
+
name={'clock'}
|
|
180
|
+
color={'black'}
|
|
181
|
+
size={normalize(10)}
|
|
182
|
+
style={{ marginHorizontal: normalize(5) }}
|
|
183
|
+
/>
|
|
184
|
+
<View>
|
|
185
|
+
<Text style={{ fontSize: normalize(7), color: 'black', fontWeight: 'normal' }}>END TIME</Text>
|
|
186
|
+
<Text style={{ fontSize: normalize(11), color: 'darkblue', fontWeight: 'bold' }}>{item.consultationtime}</Text>
|
|
187
|
+
</View>
|
|
188
|
+
</View>
|
|
189
|
+
</View>
|
|
190
|
+
</View>
|
|
191
|
+
|
|
192
|
+
<View style={{
|
|
193
|
+
width: '25%',
|
|
194
|
+
}}>
|
|
195
|
+
<SDropDownNew
|
|
196
|
+
heading={'Payment Type'}
|
|
197
|
+
buttonstyle={{
|
|
198
|
+
borderWidth: 1,
|
|
199
|
+
borderColor: 'lightgrey',
|
|
200
|
+
borderRadius: 5,
|
|
201
|
+
alignItems: 'center',
|
|
202
|
+
justifyContent: 'flex-start',
|
|
203
|
+
height: normalize(35),
|
|
204
|
+
flexDirection: 'row',
|
|
205
|
+
backgroundColor: 'white',
|
|
206
|
+
elevation: 2,
|
|
207
|
+
}}
|
|
208
|
+
dropdownapi={'emr/emrcommonget/rnladropdownpaymenttype'}
|
|
209
|
+
dropdowndata={item.paymenttypename}
|
|
210
|
+
onChangeData={val => val == undefined ? null : (
|
|
211
|
+
item.paymenttype = val.datavalue,
|
|
212
|
+
item.paymenttypename = val.displayvalue,
|
|
213
|
+
console.log('@@@@@@@@ sdropdown')
|
|
214
|
+
)}
|
|
215
|
+
editable={true}
|
|
216
|
+
widthArr={'100%'}
|
|
217
|
+
iconName={'info'}
|
|
218
|
+
refreshCount={val =>
|
|
219
|
+
val == undefined ? null : setRefresh(refresh + 1)
|
|
220
|
+
}
|
|
221
|
+
/>
|
|
222
|
+
<Text style={{ color: Global.AppTheme.primary_color, top: normalize(-4), position: 'absolute', fontSize: normalize(8), left: normalize(10), backgroundColor: 'white' }}>
|
|
223
|
+
Payment Type
|
|
224
|
+
</Text>
|
|
225
|
+
</View>
|
|
226
|
+
|
|
227
|
+
<View style={{ width: '20%' }}>
|
|
228
|
+
<CCustomTextInput
|
|
229
|
+
required={false}
|
|
230
|
+
info={'Enter Waiting time.'}
|
|
231
|
+
custompositiontextviewstyle={{
|
|
232
|
+
position: 'absolute',
|
|
233
|
+
top: normalize(-4),
|
|
234
|
+
left: normalize(7),
|
|
235
|
+
flexDirection: 'row',
|
|
236
|
+
alignItems: 'center',
|
|
237
|
+
backgroundColor: 'white',
|
|
238
|
+
}}
|
|
239
|
+
custompositiontextstyle={{
|
|
240
|
+
color: '#164c92',
|
|
241
|
+
fontSize: normalize(8),
|
|
242
|
+
textAlign: 'left',
|
|
243
|
+
fontWeight: 'normal',
|
|
244
|
+
}}
|
|
245
|
+
inputstyle={{
|
|
246
|
+
flexDirection: 'row',
|
|
247
|
+
borderWidth: 0.5,
|
|
248
|
+
borderColor: 'grey',
|
|
249
|
+
borderRadius: 5,
|
|
250
|
+
alignItems: 'center',
|
|
251
|
+
height: normalize(35),
|
|
252
|
+
backgroundColor: 'white',
|
|
253
|
+
elevation: 2,
|
|
254
|
+
textAlign: 'right',
|
|
255
|
+
}}
|
|
256
|
+
iconstyle={{
|
|
257
|
+
icongroup: 5,
|
|
258
|
+
iconname: 'user-graduate',
|
|
259
|
+
iconsize: normalize(10),
|
|
260
|
+
iconcolor: '#164c92',
|
|
261
|
+
style: {
|
|
262
|
+
paddingHorizontal: normalize(4),
|
|
263
|
+
},
|
|
264
|
+
}}
|
|
265
|
+
data={{
|
|
266
|
+
displaytext: 'Waiting Time',
|
|
267
|
+
type: 'numeric',
|
|
268
|
+
iconcolor: 'darkblue',
|
|
269
|
+
editable: true,
|
|
270
|
+
itemwidth: '100%',
|
|
271
|
+
iconname: 'id-badge',
|
|
272
|
+
value: ValueCheck(wttime) ? wttime : '',
|
|
273
|
+
tfontweight: 'bold',
|
|
274
|
+
placeholder: ' ',
|
|
275
|
+
placeholdercolor: 'lightgrey',
|
|
276
|
+
capitalize: 'characters',
|
|
277
|
+
tfontsize: normalize(12),
|
|
278
|
+
alignment: 'right',
|
|
279
|
+
}}
|
|
280
|
+
callBack={val => (val == undefined ? null : setWttime(val)
|
|
281
|
+
)}
|
|
282
|
+
onEndEditing={val => {
|
|
283
|
+
console.log('onEndEditing', wttime),
|
|
284
|
+
getReportingTime(item, wttime);
|
|
285
|
+
}}
|
|
286
|
+
onSubmitEditing={val => {
|
|
287
|
+
console.log('onSubmitEditing', wttime),
|
|
288
|
+
getReportingTime(item, wttime);
|
|
289
|
+
}}
|
|
290
|
+
/>
|
|
291
|
+
{/* <STextInput
|
|
292
|
+
hideicon={true}
|
|
293
|
+
data={{
|
|
294
|
+
value: ValueCheck(wttime) ? wttime : '',
|
|
295
|
+
type: 'number-pad',
|
|
296
|
+
editable: true,
|
|
297
|
+
itemwidth: Dimensions.get('screen').width * 0.22,
|
|
298
|
+
errorStatus: true
|
|
299
|
+
}}
|
|
300
|
+
normalTextInput={true}
|
|
301
|
+
callBack={val => (val == undefined ? null : setWttime(val)
|
|
302
|
+
)}
|
|
303
|
+
onEndEditing={val => {
|
|
304
|
+
console.log('onEndEditing', wttime),
|
|
305
|
+
getReportingTime(item, wttime)
|
|
306
|
+
}}
|
|
307
|
+
onSubmitEditing={val => {
|
|
308
|
+
console.log('onSubmitEditing', wttime),
|
|
309
|
+
getReportingTime(item, wttime)
|
|
310
|
+
}}
|
|
311
|
+
/> */}
|
|
312
|
+
{/* <Text style={{ color: Global.AppTheme.primary_color, top: normalize(-4), position: 'absolute', fontSize: normalize(8), left: normalize(10), backgroundColor: 'white' }}>
|
|
313
|
+
Waiting Time
|
|
314
|
+
</Text> */}
|
|
315
|
+
</View>
|
|
316
|
+
|
|
317
|
+
<View style={{ width: '15%' }}>
|
|
318
|
+
{/* <Text style={{ fontSize: normalize(8), color: Global.AppTheme.primary_color, fontWeight: 'normal' }}>Disable Tokens</Text> */}
|
|
319
|
+
<TouchableOpacity
|
|
320
|
+
onPress={() => {
|
|
321
|
+
setDisableToken(item);
|
|
322
|
+
}}
|
|
323
|
+
style={{
|
|
324
|
+
borderWidth: 0.5,
|
|
325
|
+
backgroundColor: 'white',
|
|
326
|
+
elevation: 5,
|
|
327
|
+
borderColor: 'lightgrey',
|
|
328
|
+
borderRadius: 5,
|
|
329
|
+
height: normalize(35),
|
|
330
|
+
width: '100%',
|
|
331
|
+
justifyContent: 'center',
|
|
332
|
+
alignItems: 'center',
|
|
333
|
+
}}>
|
|
334
|
+
<HOCIcons.Fontisto
|
|
335
|
+
name={item.disabledtokens ? 'toggle-on' : 'toggle-off'}
|
|
336
|
+
size={normalize(23)}
|
|
337
|
+
color={item.disabledtokens ? 'green' : '#646464'}
|
|
338
|
+
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
339
|
+
/>
|
|
340
|
+
</TouchableOpacity>
|
|
341
|
+
<Text style={{ color: Global.AppTheme.primary_color, left: normalize(3), top: normalize(-4), position: 'absolute', fontSize: normalize(8), backgroundColor: 'white' }}>
|
|
342
|
+
{'Disable'}
|
|
343
|
+
</Text>
|
|
344
|
+
</View>
|
|
345
|
+
|
|
346
|
+
</View>
|
|
347
|
+
{/* <View style={{ flexDirection: 'row', borderWidth: 0, marginTop: normalize(5) }}>
|
|
348
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', }}>
|
|
349
|
+
<HOCIcons.FontAwesome5
|
|
350
|
+
name={'clock'}
|
|
351
|
+
color={'black'}
|
|
352
|
+
size={normalize(12)}
|
|
353
|
+
style={{ marginHorizontal: normalize(5) }}
|
|
354
|
+
/>
|
|
355
|
+
<View>
|
|
356
|
+
<Text style={{ fontSize: normalize(7), color: 'black', fontWeight: 'normal' }}>START TIME</Text>
|
|
357
|
+
<Text style={{ fontSize: normalize(11), color: 'darkblue', fontWeight: 'bold' }}>{item.reportingtime}</Text>
|
|
358
|
+
</View>
|
|
359
|
+
</View>
|
|
360
|
+
<View style={{ width: 0.5, backgroundColor: 'lightgrey', marginHorizontal: normalize(7) }}>
|
|
361
|
+
</View>
|
|
362
|
+
<View style={{ borderLeftWidth: 0, borderColor: 'black', flexDirection: 'row', alignItems: 'center', }}>
|
|
363
|
+
<HOCIcons.FontAwesome5
|
|
364
|
+
name={'clock'}
|
|
365
|
+
color={'black'}
|
|
366
|
+
size={normalize(12)}
|
|
367
|
+
style={{ marginHorizontal: normalize(5) }}
|
|
368
|
+
/>
|
|
369
|
+
<View>
|
|
370
|
+
<Text style={{ fontSize: normalize(7), color: 'black', fontWeight: 'normal' }}>END TIME</Text>
|
|
371
|
+
<Text style={{ fontSize: normalize(11), color: 'darkblue', fontWeight: 'bold' }}>{item.consultationtime}</Text>
|
|
372
|
+
</View>
|
|
373
|
+
</View>
|
|
374
|
+
</View> */}
|
|
375
|
+
</View>
|
|
376
|
+
|
|
377
|
+
{/* {ArrayCheck(item.tokenArr) ?
|
|
378
|
+
<View style={{ width: '50%' }}>
|
|
379
|
+
|
|
380
|
+
<View style={{ flexDirection: 'row', borderWidth: 0, alignItems: 'flex-end' }}>
|
|
381
|
+
<View style={{ justifyContent: 'center', alignItems: 'center', borderWidth: 0 }}>
|
|
382
|
+
<View style={{ borderWidth: 0, flexDirection: 'row', alignItems: 'center' }}>
|
|
383
|
+
<View style={{ borderWidth: 0 }}>
|
|
384
|
+
<STextInput
|
|
385
|
+
hideicon={true}
|
|
386
|
+
data={{
|
|
387
|
+
value: ValueCheck(wttime) ? wttime : '',
|
|
388
|
+
type: 'number-pad',
|
|
389
|
+
editable: true,
|
|
390
|
+
itemwidth: Dimensions.get('screen').width * 0.22,
|
|
391
|
+
errorStatus: true
|
|
392
|
+
}}
|
|
393
|
+
normalTextInput={true}
|
|
394
|
+
callBack={val => (val == undefined ? null : setWttime(val)
|
|
395
|
+
)}
|
|
396
|
+
onEndEditing={val => {
|
|
397
|
+
console.log('onEndEditing', wttime),
|
|
398
|
+
getReportingTime(item, wttime)
|
|
399
|
+
}}
|
|
400
|
+
onSubmitEditing={val => {
|
|
401
|
+
console.log('onSubmitEditing', wttime),
|
|
402
|
+
getReportingTime(item, wttime)
|
|
403
|
+
}}
|
|
404
|
+
/>
|
|
405
|
+
<Text style={{ color: Global.AppTheme.primary_color, top: normalize(1), position: 'absolute', fontSize: normalize(10), left: normalize(10), backgroundColor: 'white' }}>
|
|
406
|
+
Waiting Time
|
|
407
|
+
</Text>
|
|
408
|
+
</View>
|
|
409
|
+
|
|
410
|
+
<View style={{ borderWidth: 0, justifyContent: 'center', alignItems: 'center', marginHorizontal: normalize(10) }}>
|
|
411
|
+
<Text style={{ fontSize: normalize(8), color: 'black' }}>Reset Tokens</Text>
|
|
412
|
+
<TouchableOpacity
|
|
413
|
+
onPress={() => {
|
|
414
|
+
getReportingTime(item, wttime)
|
|
415
|
+
}}
|
|
416
|
+
style={{
|
|
417
|
+
// marginHorizontal: normalize(10),
|
|
418
|
+
borderColor: 'lightgrey',
|
|
419
|
+
width: normalize(35),
|
|
420
|
+
backgroundColor: 'white',
|
|
421
|
+
height: normalize(30),
|
|
422
|
+
borderRadius: normalize(5),
|
|
423
|
+
alignItems: 'center',
|
|
424
|
+
justifyContent: 'center',
|
|
425
|
+
borderWidth: 0.5,
|
|
426
|
+
elevation: 5
|
|
427
|
+
}}>
|
|
428
|
+
<HOCIcons.Entypo
|
|
429
|
+
name={'back-in-time'}
|
|
430
|
+
size={normalize(23)}
|
|
431
|
+
color={Global.AppTheme.primary_color}
|
|
432
|
+
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
433
|
+
/>
|
|
434
|
+
</TouchableOpacity>
|
|
435
|
+
</View>
|
|
436
|
+
|
|
437
|
+
<View style={{ borderWidth: 0, justifyContent: 'center', alignItems: 'center' }}>
|
|
438
|
+
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'normal' }}>Disable Tokens</Text>
|
|
439
|
+
<TouchableOpacity
|
|
440
|
+
onPress={() => {
|
|
441
|
+
setDisableToken(item)
|
|
442
|
+
}}
|
|
443
|
+
style={{
|
|
444
|
+
borderWidth: 0.5,
|
|
445
|
+
backgroundColor: 'white',
|
|
446
|
+
elevation: 5,
|
|
447
|
+
borderColor: 'lightgrey',
|
|
448
|
+
borderRadius: 5,
|
|
449
|
+
height: normalize(30),
|
|
450
|
+
width: normalize(35),
|
|
451
|
+
justifyContent: 'center',
|
|
452
|
+
alignItems: 'center'
|
|
453
|
+
}}>
|
|
454
|
+
<HOCIcons.Fontisto
|
|
455
|
+
name={item.disabledtokens ? 'toggle-on' : 'toggle-off'}
|
|
456
|
+
size={normalize(23)}
|
|
457
|
+
color={item.disabledtokens ? 'green' : '#646464'}
|
|
458
|
+
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
459
|
+
/>
|
|
460
|
+
</TouchableOpacity>
|
|
461
|
+
</View>
|
|
462
|
+
</View>
|
|
463
|
+
</View>
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
</View>
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
</View>
|
|
470
|
+
: null} */}
|
|
471
|
+
</View>
|
|
472
|
+
: null}
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
{ArrayCheck(item.tokenArr) ?
|
|
477
|
+
<View style={{ minHeight: normalize(400), flex: 1 }}>
|
|
478
|
+
{fnRenderInsideFlashlist(item.tokenArr, item)}
|
|
479
|
+
</View>
|
|
480
|
+
: null}
|
|
481
|
+
</View>
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
function fnCategoryFunction(item, val) {
|
|
486
|
+
|
|
487
|
+
item.subcategorytype = val.datavalue;
|
|
488
|
+
item.sucategoryname = val.displayvalue;
|
|
489
|
+
setRefresh(0);
|
|
490
|
+
setTimeout(() => {
|
|
491
|
+
setRefresh(refresh + 1);
|
|
492
|
+
props.editFlag(true);
|
|
493
|
+
setEdit(true);
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function renderMrngEvngToken({ item, index }, array) {
|
|
499
|
+
|
|
500
|
+
return (
|
|
501
|
+
<View style={{
|
|
502
|
+
marginTop: normalize(5),
|
|
503
|
+
flexDirection: 'row',
|
|
504
|
+
borderWidth: 1,
|
|
505
|
+
borderTopWidth: 4,
|
|
506
|
+
borderLeftWidth: 4,
|
|
507
|
+
borderBottomWidth: 4,
|
|
508
|
+
borderColor: '#aaaaaa',
|
|
509
|
+
borderRadius: 10,
|
|
510
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
511
|
+
width: Dimensions.get('screen').width * 0.485,
|
|
512
|
+
height: Dimensions.get('screen').width * 0.45,
|
|
513
|
+
}}>
|
|
514
|
+
<View style={{ flex: 1, borderWidth: 0, justifyContent: 'space-evenly' }}>
|
|
515
|
+
<View style={{ justifyContent: 'space-around', alignItems: 'center', borderWidth: 0, width: '100%', flexDirection: 'row' }}>
|
|
516
|
+
|
|
517
|
+
<View style={{
|
|
518
|
+
borderLeftWidth: 3,
|
|
519
|
+
borderBottomWidth: 3,
|
|
520
|
+
width: Dimensions.get('screen').width * 0.12,
|
|
521
|
+
backgroundColor: item.color,
|
|
522
|
+
height: Dimensions.get('screen').width * 0.12,
|
|
523
|
+
borderRadius: normalize(1000),
|
|
524
|
+
alignItems: 'center',
|
|
525
|
+
justifyContent: 'center',
|
|
526
|
+
elevation: 5,
|
|
527
|
+
borderWidth: 0,
|
|
528
|
+
}} >
|
|
529
|
+
<Text numberOfLines={1} style={{
|
|
530
|
+
color: 'white',
|
|
531
|
+
fontSize: normalize(17),
|
|
532
|
+
fontWeight: 'bold',
|
|
533
|
+
}}>{item.tokenno}</Text>
|
|
534
|
+
</View>
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
<View style={{ alignItems: 'center', borderWidth: 1, borderRadius: 10, borderColor: 'lightgrey', padding: normalize(3), marginTop: normalize(10) }}>
|
|
539
|
+
<TouchableOpacity
|
|
540
|
+
onPress={() => {
|
|
541
|
+
item.onlinetoken = !item.onlinetoken,
|
|
542
|
+
setRefresh(0),
|
|
543
|
+
setTimeout(() => {
|
|
544
|
+
setRefresh(refresh + 1);
|
|
545
|
+
props.editFlag(true);
|
|
546
|
+
setEdit(true);
|
|
547
|
+
});
|
|
548
|
+
}}
|
|
549
|
+
>
|
|
550
|
+
<HOCIcons.Fontisto
|
|
551
|
+
name={item.onlinetoken ? 'toggle-on' : 'toggle-off'}
|
|
552
|
+
size={Dimensions.get('screen').width * 0.1}
|
|
553
|
+
color={item.onlinetoken ? 'green' : '#646464'}
|
|
554
|
+
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
555
|
+
/>
|
|
556
|
+
</TouchableOpacity>
|
|
557
|
+
<Text style={{
|
|
558
|
+
top: normalize(-4),
|
|
559
|
+
left: normalize(4),
|
|
560
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
561
|
+
position: 'absolute',
|
|
562
|
+
fontSize: normalize(9),
|
|
563
|
+
color: 'black',
|
|
564
|
+
}}>{'Online'}</Text>
|
|
565
|
+
</View>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
<View style={{ alignItems: 'center', borderWidth: 1, borderRadius: 10, borderColor: 'lightgrey', justifyContent: 'center', padding: normalize(3), marginTop: normalize(10) }}>
|
|
569
|
+
|
|
570
|
+
<TouchableOpacity
|
|
571
|
+
onPress={() => {
|
|
572
|
+
item.disabledtoken = !item.disabledtoken,
|
|
573
|
+
setRefresh(0),
|
|
574
|
+
setTimeout(() => {
|
|
575
|
+
setRefresh(refresh + 1);
|
|
576
|
+
props.editFlag(true);
|
|
577
|
+
setEdit(true);
|
|
578
|
+
});
|
|
579
|
+
}}
|
|
580
|
+
>
|
|
581
|
+
<HOCIcons.Fontisto
|
|
582
|
+
name={item.disabledtoken ? 'toggle-on' : 'toggle-off'}
|
|
583
|
+
size={Dimensions.get('screen').width * 0.1}
|
|
584
|
+
color={item.disabledtoken ? 'green' : '#646464'}
|
|
585
|
+
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
586
|
+
/>
|
|
587
|
+
</TouchableOpacity>
|
|
588
|
+
<Text style={{
|
|
589
|
+
top: normalize(-4),
|
|
590
|
+
left: normalize(4),
|
|
591
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
592
|
+
position: 'absolute',
|
|
593
|
+
fontSize: normalize(9),
|
|
594
|
+
color: 'black',
|
|
595
|
+
}}>{'Disable'}</Text>
|
|
596
|
+
</View>
|
|
597
|
+
|
|
598
|
+
</View>
|
|
599
|
+
|
|
600
|
+
<View style={{ justifyContent: 'space-around', alignItems: 'center', borderWidth: 0, width: '100%', flexDirection: 'row' }}>
|
|
601
|
+
|
|
602
|
+
<View style={{ borderWidth: 0, width: '30%', justifyContent: 'center', alignItems: 'center' }}>
|
|
603
|
+
<Text style={{ fontWeight: 'normal', color: 'black', fontSize: normalize(6) }}>Reporting Time</Text>
|
|
604
|
+
<Text style={{ fontWeight: 'bold', color: 'black', fontSize: normalize(9) }}>{isNU(item.reportingtime) ? item.reportingtime : null}</Text>
|
|
605
|
+
</View>
|
|
606
|
+
|
|
607
|
+
<View style={{ height: normalize(30), width: '65%', paddingVertical: normalize(10) }}>
|
|
608
|
+
<STimePicker
|
|
609
|
+
table={true}
|
|
610
|
+
pickerstyle={{
|
|
611
|
+
borderWidth: 1,
|
|
612
|
+
borderColor: 'lightgrey',
|
|
613
|
+
borderRadius: 10,
|
|
614
|
+
alignItems: 'center',
|
|
615
|
+
justifyContent: 'flex-start',
|
|
616
|
+
height: normalize(30),
|
|
617
|
+
flexDirection: 'row',
|
|
618
|
+
}}
|
|
619
|
+
textstyle={{
|
|
620
|
+
fontSize: normalize(12),
|
|
621
|
+
fontWeight: 'bold',
|
|
622
|
+
color: '#000000',
|
|
623
|
+
alignItems: 'center',
|
|
624
|
+
textAlign: 'center',
|
|
625
|
+
justifyContent: 'center',
|
|
626
|
+
paddingHorizontal: normalize(5),
|
|
627
|
+
}}
|
|
628
|
+
icon={{
|
|
629
|
+
'icongroup': 3,
|
|
630
|
+
'name': 'clock',
|
|
631
|
+
'size': normalize(15),
|
|
632
|
+
}}
|
|
633
|
+
iconstyle={{
|
|
634
|
+
color: item.color,
|
|
635
|
+
paddingLeft: normalize(5),
|
|
636
|
+
textAlign: 'center',
|
|
637
|
+
}}
|
|
638
|
+
bgcolor={'#ffffff00'}
|
|
639
|
+
placeholder={'Consultation Time : '}
|
|
640
|
+
height={normalize(23)}
|
|
641
|
+
width={normalize(76)}
|
|
642
|
+
starttime={'05:00 AM'}
|
|
643
|
+
endtime={'05:00 PM'}
|
|
644
|
+
timearray={array}
|
|
645
|
+
currentindextime={index}
|
|
646
|
+
value={item.consultationtime}
|
|
647
|
+
callBack={val => (val == undefined ? null : getSingleCT(item, val))}
|
|
648
|
+
// checkTimeValidation={true}
|
|
649
|
+
/>
|
|
650
|
+
<Text style={{
|
|
651
|
+
fontSize: normalize(9),
|
|
652
|
+
top: normalize(5),
|
|
653
|
+
left: normalize(7),
|
|
654
|
+
color: 'black',
|
|
655
|
+
position: 'absolute',
|
|
656
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
657
|
+
}}>Consultation Time</Text>
|
|
658
|
+
</View>
|
|
659
|
+
</View>
|
|
660
|
+
|
|
661
|
+
<View style={{ justifyContent: 'space-evenly', alignItems: 'center', borderWidth: 0, width: '100%', flexDirection: 'row', marginVertical: normalize(5), marginTop: normalize(10) }}>
|
|
662
|
+
|
|
663
|
+
<View style={{ width: '47%', borderWidth: 0 }}>
|
|
664
|
+
{/* <Text style={{ fontSize: normalize(8), paddingHorizontal: 5 }}>Token</Text> */}
|
|
665
|
+
<SDropDownNew
|
|
666
|
+
buttonstyle={{
|
|
667
|
+
borderWidth: 1,
|
|
668
|
+
borderColor: 'lightgrey',
|
|
669
|
+
borderRadius: 10,
|
|
670
|
+
alignItems: 'center',
|
|
671
|
+
justifyContent: 'flex-start',
|
|
672
|
+
height: normalize(30),
|
|
673
|
+
flexDirection: 'row',
|
|
674
|
+
}}
|
|
675
|
+
icon={{
|
|
676
|
+
'name': 'file-medical',
|
|
677
|
+
'size': normalize(15),
|
|
678
|
+
}}
|
|
679
|
+
iconstyle={{
|
|
680
|
+
color: item.color,
|
|
681
|
+
paddingLeft: normalize(5),
|
|
682
|
+
textAlign: 'center',
|
|
683
|
+
}}
|
|
684
|
+
textstyle={{
|
|
685
|
+
fontSize: normalize(9),
|
|
686
|
+
fontWeight: 'bold',
|
|
687
|
+
color: '#000000',
|
|
688
|
+
alignItems: 'center',
|
|
689
|
+
textAlign: 'center',
|
|
690
|
+
justifyContent: 'center',
|
|
691
|
+
paddingHorizontal: normalize(5),
|
|
692
|
+
}}
|
|
693
|
+
dropdownapi={'emr/emrcommonget/rnladropdowntokentype'}
|
|
694
|
+
dropdowndata={item.bookingtypename}
|
|
695
|
+
onChangeData={val =>
|
|
696
|
+
val == undefined ? null : (
|
|
697
|
+
item.bookingtypes = val.datavalue,
|
|
698
|
+
item.bookingtypename = val.displayvalue,
|
|
699
|
+
setRefresh(0),
|
|
700
|
+
setTimeout(() => {
|
|
701
|
+
setRefresh(refresh + 1);
|
|
702
|
+
props.editFlag(true);
|
|
703
|
+
setEdit(true);
|
|
704
|
+
})
|
|
705
|
+
)}
|
|
706
|
+
editable={true}
|
|
707
|
+
widthArr={Dimensions.get('screen').width * 0.32}
|
|
708
|
+
iconName={'file-medical'}
|
|
709
|
+
refreshCount={val =>
|
|
710
|
+
val == undefined ? null : null
|
|
711
|
+
}
|
|
712
|
+
/>
|
|
713
|
+
<Text style={{
|
|
714
|
+
fontSize: normalize(9),
|
|
715
|
+
top: normalize(-4),
|
|
716
|
+
left: normalize(7),
|
|
717
|
+
color: 'black',
|
|
718
|
+
position: 'absolute',
|
|
719
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
720
|
+
}}>Token</Text>
|
|
721
|
+
</View>
|
|
722
|
+
|
|
723
|
+
<View style={{ width: '47%' }}>
|
|
724
|
+
{/* <Text style={{ fontSize: normalize(9), color: 'black' }}>Category</Text> */}
|
|
725
|
+
<View
|
|
726
|
+
style={{
|
|
727
|
+
height: normalize(30),
|
|
728
|
+
width: '100%',
|
|
729
|
+
}}>
|
|
730
|
+
<Menu>
|
|
731
|
+
<MenuTrigger
|
|
732
|
+
customStyles={{
|
|
733
|
+
triggerWrapper: {
|
|
734
|
+
width: '100%',
|
|
735
|
+
},
|
|
736
|
+
}}
|
|
737
|
+
>
|
|
738
|
+
<View style={{ borderWidth: 1, borderColor: 'lightgrey', borderRadius: 10, flexDirection: 'row', padding: normalize(4), alignItems: 'center', height: normalize(30) }}>
|
|
739
|
+
<HOCIcons.Icons
|
|
740
|
+
icongroup={3}
|
|
741
|
+
name={item.subcategorytype == 'A' ? 'credit-card-outline' : item.subcategorytype == 'O' ? 'credit-card-clock-outline' : item.subcategorytype == 'W' ? 'credit-card-fast' : 'credit-card-outline'}
|
|
742
|
+
size={normalize(15)}
|
|
743
|
+
color={item.subcategorytype == 'A' ? 'black' : item.subcategorytype == 'O' ? 'darkred' : item.subcategorytype == 'W' ? 'darkgreen' : 'black'}
|
|
744
|
+
style={{ textAlign: 'center' }}
|
|
745
|
+
/>
|
|
746
|
+
<Text adjustsFontSizeToFit style={{ color: 'black', fontSize: normalize(9), fontWeight: 'bold', paddingHorizontal: normalize(3) }}>{isNU(item.sucategoryname) ? item.sucategoryname : null}</Text>
|
|
747
|
+
</View>
|
|
748
|
+
<Text style={{
|
|
749
|
+
fontSize: normalize(9),
|
|
750
|
+
top: normalize(-4),
|
|
751
|
+
left: normalize(7),
|
|
752
|
+
color: 'black',
|
|
753
|
+
position: 'absolute',
|
|
754
|
+
backgroundColor: item.disabledtoken ? '#d0d0d0' : '#ffffff',
|
|
755
|
+
}}>Category</Text>
|
|
756
|
+
</MenuTrigger>
|
|
757
|
+
<MenuOptions
|
|
758
|
+
optionsContainerStyle={{ marginTop: normalize(30) }}
|
|
759
|
+
customStyles={{
|
|
760
|
+
optionsContainer: {
|
|
761
|
+
shadowColor: '#000000ff',
|
|
762
|
+
shadowRadius: 10,
|
|
763
|
+
borderRadius: 5,
|
|
764
|
+
borderWidth: 0.5,
|
|
765
|
+
borderColor: 'lightgrey',
|
|
766
|
+
elevation: 3,
|
|
767
|
+
width: normalize(50),
|
|
768
|
+
// width: '20%'
|
|
769
|
+
},
|
|
770
|
+
optionText: {},
|
|
771
|
+
}}>
|
|
772
|
+
<CDropDownList
|
|
773
|
+
// dropdownapi={EMRAPI.getDropDown1}
|
|
774
|
+
dropdownarray={dropdownarray}
|
|
775
|
+
callback={val => val == undefined ? null : (fnCategoryFunction(item, val))}
|
|
776
|
+
/>
|
|
777
|
+
</MenuOptions>
|
|
778
|
+
</Menu>
|
|
779
|
+
</View>
|
|
780
|
+
|
|
781
|
+
{/* <Text style={{ fontSize: normalize(8), fontWeight: 'normal', color: 'black' }}>{' '}Category</Text>
|
|
782
|
+
<SDropDownNew
|
|
783
|
+
buttonstyle={{
|
|
784
|
+
borderWidth: 1,
|
|
785
|
+
borderColor: 'lightgrey',
|
|
786
|
+
borderRadius: 10,
|
|
787
|
+
alignItems: 'center',
|
|
788
|
+
justifyContent: 'flex-start',
|
|
789
|
+
height: normalize(30),
|
|
790
|
+
flexDirection: 'row'
|
|
791
|
+
// elevation: 5
|
|
792
|
+
}}
|
|
793
|
+
icon={{
|
|
794
|
+
'name': 'file-medical',
|
|
795
|
+
'size': normalize(15)
|
|
796
|
+
}}
|
|
797
|
+
iconstyle={{
|
|
798
|
+
color: item.color,
|
|
799
|
+
paddingLeft: normalize(5),
|
|
800
|
+
textAlign: 'center'
|
|
801
|
+
}}
|
|
802
|
+
textstyle={{
|
|
803
|
+
fontSize: normalize(8),
|
|
804
|
+
fontWeight: 'bold',
|
|
805
|
+
color: '#000000',
|
|
806
|
+
alignItems: 'center',
|
|
807
|
+
textAlign: 'center',
|
|
808
|
+
justifyContent: 'center',
|
|
809
|
+
paddingHorizontal: normalize(5)
|
|
810
|
+
}}
|
|
811
|
+
dropdownapi={'emr/emrcommonget/rnladropdowntokensubcategory'}
|
|
812
|
+
dropdowndata={item.sucategoryname}
|
|
813
|
+
onChangeData={val =>
|
|
814
|
+
val == undefined ? null : (item.subcategorytype = val.datavalue,
|
|
815
|
+
item.sucategoryname = val.displayvalue)}
|
|
816
|
+
editable={true}
|
|
817
|
+
widthArr={Dimensions.get('screen').width * 0.32}
|
|
818
|
+
iconName={'file-medical'}
|
|
819
|
+
refreshCount={val =>
|
|
820
|
+
val == undefined ? null : getRefresh()
|
|
821
|
+
}
|
|
822
|
+
/> */}
|
|
823
|
+
</View>
|
|
824
|
+
|
|
825
|
+
</View>
|
|
826
|
+
</View>
|
|
827
|
+
<View style={{ width: item.onlinetoken ? normalize(8) : 4, borderWidth: 0, backgroundColor: item.onlinetoken ? 'teal' : '#aaaaaa', borderTopRightRadius: 10, borderBottomRightRadius: 10, justifyContent: 'center', alignItems: 'center', height: '100%' }}>
|
|
828
|
+
|
|
829
|
+
{item.onlinetoken ?
|
|
830
|
+
|
|
831
|
+
[
|
|
832
|
+
{ 'data': 'O' },
|
|
833
|
+
{ 'data': 'N' },
|
|
834
|
+
{ 'data': 'L' },
|
|
835
|
+
{ 'data': 'I' },
|
|
836
|
+
{ 'data': 'N' },
|
|
837
|
+
{ 'data': 'E' },
|
|
838
|
+
].map((val) => {
|
|
839
|
+
return (
|
|
840
|
+
<Text style={{
|
|
841
|
+
color: 'white',
|
|
842
|
+
fontSize: normalize(8),
|
|
843
|
+
fontWeight: 'bold',
|
|
844
|
+
textShadowColor: '#000000',
|
|
845
|
+
textShadowOffset: { width: 1, height: 1 },
|
|
846
|
+
textShadowRadius: 1,
|
|
847
|
+
paddingVertical: normalize(5),
|
|
848
|
+
}}>
|
|
849
|
+
{val.data}
|
|
850
|
+
</Text>
|
|
851
|
+
);
|
|
852
|
+
})
|
|
853
|
+
|
|
854
|
+
: null}
|
|
855
|
+
|
|
856
|
+
</View>
|
|
857
|
+
|
|
858
|
+
</View>
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
function getWeekDayClick(params) {
|
|
863
|
+
data.forEach((item) => {
|
|
864
|
+
item.selected = false;
|
|
865
|
+
});
|
|
866
|
+
params.selected = true;
|
|
867
|
+
setFooterData();
|
|
868
|
+
setDayData(params);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
function RenderDays(i) {
|
|
872
|
+
|
|
873
|
+
switch (i) {
|
|
874
|
+
case 1:
|
|
875
|
+
return 'SUN';
|
|
876
|
+
case 2:
|
|
877
|
+
return 'MON';
|
|
878
|
+
case 3:
|
|
879
|
+
return 'TUE';
|
|
880
|
+
case 4:
|
|
881
|
+
return 'WED';
|
|
882
|
+
case 5:
|
|
883
|
+
return 'THU';
|
|
884
|
+
case 6:
|
|
885
|
+
return 'FRI';
|
|
886
|
+
case 7:
|
|
887
|
+
return 'SAT';
|
|
888
|
+
default:
|
|
889
|
+
return ' ';
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
function renderItem({ item }) {
|
|
894
|
+
|
|
895
|
+
let day = RenderDays(item.displaytext);
|
|
896
|
+
|
|
897
|
+
return (
|
|
898
|
+
<TouchableOpacity
|
|
899
|
+
disabled={ValueCheck(item.data) && ArrayCheck(item.data) ? false : true}
|
|
900
|
+
onPress={() => getWeekDayClick(item)}
|
|
901
|
+
style={{
|
|
902
|
+
flexDirection: 'row',
|
|
903
|
+
backgroundColor: '#fff',
|
|
904
|
+
borderRadius: 0,
|
|
905
|
+
borderWidth: 0,
|
|
906
|
+
justifyContent: 'center',
|
|
907
|
+
alignItems: 'center',
|
|
908
|
+
elevation: 5,
|
|
909
|
+
}}>
|
|
910
|
+
<View style={{
|
|
911
|
+
justifyContent: 'center',
|
|
912
|
+
alignItems: 'center',
|
|
913
|
+
}}>
|
|
914
|
+
<View style={{
|
|
915
|
+
// elevation: 5,
|
|
916
|
+
backgroundColor: item.selected ? '#abddff' : '#fff',
|
|
917
|
+
margin: normalize(3),
|
|
918
|
+
borderWidth: 2,
|
|
919
|
+
borderLeftWidth: 2,
|
|
920
|
+
borderBottomWidth: 2,
|
|
921
|
+
borderTopWidth: 6,
|
|
922
|
+
borderTopLeftRadius: 5,
|
|
923
|
+
borderTopRightRadius: 5,
|
|
924
|
+
borderBottomLeftRadius: 0,
|
|
925
|
+
borderBottomRightRadius: 0,
|
|
926
|
+
borderColor: '#b8d8ffff',
|
|
927
|
+
height: Dimensions.get('screen').height * 0.06,
|
|
928
|
+
width: Dimensions.get('screen').width * 0.131,
|
|
929
|
+
}}>
|
|
930
|
+
{/* <HOCIcons.Icons
|
|
931
|
+
icongroup={8}
|
|
932
|
+
name={'calendar'}
|
|
933
|
+
size={dividedWidth - 2}
|
|
934
|
+
color={'#164c8eff'}
|
|
935
|
+
style={{ textAlign: 'center' }}
|
|
936
|
+
/> */}
|
|
937
|
+
</View>
|
|
938
|
+
<Text style={{
|
|
939
|
+
opacity: ValueCheck(item.data) && ArrayCheck(item.data) ? 1 : 1,
|
|
940
|
+
position: 'absolute',
|
|
941
|
+
borderWidth: 0,
|
|
942
|
+
alignSelf: 'center',
|
|
943
|
+
textAlign: 'center',
|
|
944
|
+
fontSize: Dimensions.get('screen').width * 0.05,
|
|
945
|
+
fontWeight: 'bold',
|
|
946
|
+
// top: normalize(20),
|
|
947
|
+
color: ValueCheck(item.data) && ArrayCheck(item.data) ? '#164d8e' : 'red',
|
|
948
|
+
}}>{day}</Text>
|
|
949
|
+
</View>
|
|
950
|
+
</TouchableOpacity>
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
function getRefresh() {
|
|
955
|
+
setFooterData();
|
|
956
|
+
setTimeout(() => {
|
|
957
|
+
props.editFlag(true);
|
|
958
|
+
setEdit(true);
|
|
959
|
+
setFooterData(footerData);
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
function getApiPatientData(data, subArray) {
|
|
964
|
+
|
|
965
|
+
console.log('.............> Sub Array <......................', JSON.stringify(subArray.tokentypecode));
|
|
966
|
+
setIsLoading(true);
|
|
967
|
+
let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientconsultationtokensweekday ' + consultant + ',' + data.displaytext + ',' + subArray.tokentypecode;
|
|
968
|
+
console.log('Butttonnnnnnnn apiiiiiiiiiiiiiiiiii', JSON.stringify(buttonapi));
|
|
969
|
+
NetworkServiceCall('get', buttonapi, '')
|
|
970
|
+
.then(function (response) {
|
|
971
|
+
if (response.httpstatus == 200) {
|
|
972
|
+
data.daywisedata = response.data;
|
|
973
|
+
setTokensArray(response.data);
|
|
974
|
+
setIsLoading(false);
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
setIsLoading(false);
|
|
978
|
+
notifyMessage('Data not available. Please try again later', 4);
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
getLoading(v => setIsLoading(false));
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
function getTimeDiffernece(params) {
|
|
985
|
+
var startTime = moment(params.reportingtime, 'HH:mm:ss a');
|
|
986
|
+
var endTime = moment(params.consultationtime, 'HH:mm:ss a');
|
|
987
|
+
var duration = moment.duration(endTime.diff(startTime));
|
|
988
|
+
var hours = parseInt(duration.asHours());
|
|
989
|
+
var minutes = parseInt(duration.asMinutes());
|
|
990
|
+
// console.log(hours + ' hr and ' + minutes + ' min');
|
|
991
|
+
params.waitingtime = minutes;
|
|
992
|
+
return minutes;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
function setDisableToken(item) {
|
|
996
|
+
item.disabledtokens = !item.disabledtokens;
|
|
997
|
+
var tokensDes = ArrayCheck(item.tokenArr) ? item.tokenArr.map((timings) => ({ ...timings, 'disabledtoken': item.disabledtokens })) : null;
|
|
998
|
+
item.tokenArr = tokensDes;
|
|
999
|
+
setRefresh(0);
|
|
1000
|
+
setTimeout(() => {
|
|
1001
|
+
setRefresh(refresh + 1);
|
|
1002
|
+
props.editFlag(true);
|
|
1003
|
+
setEdit(true);
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
function getSingleRT(item, val) {
|
|
1008
|
+
item.reportingtime = moment(val, 'HH:mm:ss a').format('hh:mm A');
|
|
1009
|
+
getRefresh();
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
function getSingleCT(item, val) {
|
|
1013
|
+
|
|
1014
|
+
item.consultationtime = moment(val, 'HH:mm:ss a').format('hh:mm A');
|
|
1015
|
+
setRefresh(0);
|
|
1016
|
+
setTimeout(() => {
|
|
1017
|
+
setRefresh(refresh + 1);
|
|
1018
|
+
props.editFlag(true);
|
|
1019
|
+
setEdit(true);
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
function addMinutes(time, minutes) {
|
|
1024
|
+
return moment(time, 'hh:mm A').add(minutes, 'minutes').format('hh:mm A');
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
function getReportingTime(item, val) {
|
|
1028
|
+
|
|
1029
|
+
setIsLoading(true);
|
|
1030
|
+
|
|
1031
|
+
let currentTime = item.reportingtime;
|
|
1032
|
+
let TokenArray = JSON.parse(JSON.stringify(item.tokenArr));
|
|
1033
|
+
let CheckIfExceeded = false;
|
|
1034
|
+
|
|
1035
|
+
TokenArray.filter((token, index) => {
|
|
1036
|
+
token.consultationtime = currentTime;
|
|
1037
|
+
token.reportingtime = addMinutes(currentTime, -val);
|
|
1038
|
+
currentTime = addMinutes(currentTime, val);
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
setTimeout(() => {
|
|
1042
|
+
item.tokenArr = TokenArray;
|
|
1043
|
+
getRefresh();
|
|
1044
|
+
setIsLoading(false);
|
|
1045
|
+
});
|
|
1046
|
+
|
|
1047
|
+
if (CheckIfExceeded) {
|
|
1048
|
+
notifyMessage('Token Time exceeded End time');
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
function getConsultingTime(item, val) {
|
|
1053
|
+
item.consultationtime = val;
|
|
1054
|
+
getRefresh();
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
function fnMapStatus(i, array) {
|
|
1058
|
+
isBNUL(array) ? array.map((val, k) => { k != i ? (val.selected = false) : null; }) : null;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
function getDateData(params, subArray, i) {
|
|
1062
|
+
|
|
1063
|
+
setEdit(false);
|
|
1064
|
+
setWttime(30);
|
|
1065
|
+
data.forEach((item) => {
|
|
1066
|
+
item.selected = false;
|
|
1067
|
+
});
|
|
1068
|
+
subArray.selected = true;
|
|
1069
|
+
(isNU(params) && isBNUL(params.data) ? fnMapStatus(i, params.data) : null);
|
|
1070
|
+
setTimeout(() => {
|
|
1071
|
+
params.selected = true;
|
|
1072
|
+
params.daywisedata = [];
|
|
1073
|
+
getApiPatientData(params, subArray);
|
|
1074
|
+
setRefresh(refresh + 1);
|
|
1075
|
+
setFooterData(params);
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function getSave() {
|
|
1081
|
+
setIsLoading(true);
|
|
1082
|
+
var output = {
|
|
1083
|
+
'groups': {
|
|
1084
|
+
'procedurename': 'rnhosudoctorconsultationorderdetail1',
|
|
1085
|
+
'suuser': Global.userData.suuser,
|
|
1086
|
+
'hosuconsultant': consultant,
|
|
1087
|
+
'dataArray': footerData.daywisedata.tokensArray,
|
|
1088
|
+
},
|
|
1089
|
+
};
|
|
1090
|
+
let buttonapi = APIURL + 'commontemplatesave/RnCommonTemplateSave';
|
|
1091
|
+
console.log('Buttonnnnnnnnnn apiiiiiiiiiiiiiiiiiiiiii', JSON.stringify(buttonapi));
|
|
1092
|
+
console.log('output CBooking apiiiiiiiiiiiiiiiiiiiiii', JSON.stringify(output));
|
|
1093
|
+
|
|
1094
|
+
NetworkServiceCall('post', buttonapi, output).then(function (response) {
|
|
1095
|
+
console.log('output CBooking apiiiiiiiiiiiiiiiiiiiiii', JSON.stringify(response));
|
|
1096
|
+
if (response.httpstatus == 200 && response.data != undefined && response.data != null && response.data.code != undefined && response.data.code > 0) {
|
|
1097
|
+
notifyMessage('Data Saved', 1);
|
|
1098
|
+
setFooterData();
|
|
1099
|
+
setDayData();
|
|
1100
|
+
setData();
|
|
1101
|
+
setEdit(false);
|
|
1102
|
+
setIsLoading(false);
|
|
1103
|
+
getConsultation(consultant);
|
|
1104
|
+
} else {
|
|
1105
|
+
setIsLoading(false);
|
|
1106
|
+
notifyMessage('Data Not Saved!!!!!', 2);
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
// getLoading(v => setIsLoading(false))
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
function getFooterIconsFunctions(val) {
|
|
1113
|
+
switch (val.functionid) {
|
|
1114
|
+
case 'CB01':
|
|
1115
|
+
ValueCheck(footerData) && ValueCheck(footerData.daywisedata) && ArrayCheck(footerData.daywisedata.tokensArray) ? getSave() : console.log('Disabled');
|
|
1116
|
+
break;
|
|
1117
|
+
case 'CB02': props.callBack(4);
|
|
1118
|
+
break;
|
|
1119
|
+
case 'CB03': props.callBack(1);
|
|
1120
|
+
break;
|
|
1121
|
+
case 'CB04': props.callBack(0);
|
|
1122
|
+
break;
|
|
1123
|
+
case 'CB05': props.callBack(2);
|
|
1124
|
+
break;
|
|
1125
|
+
case 'CB06': props.callBack(5);
|
|
1126
|
+
break;
|
|
1127
|
+
default: console.log('Deault');
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
function renderFlashList(array) {
|
|
1133
|
+
|
|
1134
|
+
return (
|
|
1135
|
+
<View style={{ minHeight: 2, flex: 1 }}>
|
|
1136
|
+
<FlatList
|
|
1137
|
+
nestedScrollEnabled={true}
|
|
1138
|
+
data={array}
|
|
1139
|
+
renderItem={(k) => renderFooterView(k)}
|
|
1140
|
+
keyExtractor={(item, index) => 'key' + index}
|
|
1141
|
+
listKey={(item, index) => 'key' + index}
|
|
1142
|
+
/>
|
|
1143
|
+
</View>
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
return (
|
|
1148
|
+
<View style={{ flex: 1, marginTop: normalize(-2) }}>
|
|
1149
|
+
<View
|
|
1150
|
+
style={{
|
|
1151
|
+
backgroundColor: '#f2efef',
|
|
1152
|
+
paddingVertical: 3,
|
|
1153
|
+
paddingHorizontal: 6,
|
|
1154
|
+
marginTop: 3,
|
|
1155
|
+
marginBottom: 2,
|
|
1156
|
+
display: 'flex',
|
|
1157
|
+
flexDirection: 'row',
|
|
1158
|
+
alignItems: 'center',
|
|
1159
|
+
justifyContent: 'center',
|
|
1160
|
+
borderTopLeftRadius: 20,
|
|
1161
|
+
borderTopRightRadius: 20,
|
|
1162
|
+
}}>
|
|
1163
|
+
<TouchableOpacity onPress={() => { }}
|
|
1164
|
+
disabled={true}
|
|
1165
|
+
style={{
|
|
1166
|
+
width: normalize(30),
|
|
1167
|
+
alignItems: 'center',
|
|
1168
|
+
marginRight: 5,
|
|
1169
|
+
}}>
|
|
1170
|
+
<FontAwesome5 name={'stack-overflow'} color={Global.AppTheme.primary_color}
|
|
1171
|
+
size={normalize(16)}
|
|
1172
|
+
/>
|
|
1173
|
+
</TouchableOpacity>
|
|
1174
|
+
<CText
|
|
1175
|
+
style={{
|
|
1176
|
+
textShadowRadius: 2,
|
|
1177
|
+
fontSize: normalize(14),
|
|
1178
|
+
fontWeight: 'bold',
|
|
1179
|
+
color: Global.AppTheme.primary_color,
|
|
1180
|
+
flex: 1,
|
|
1181
|
+
}}>
|
|
1182
|
+
{'TOKEN'}
|
|
1183
|
+
</CText>
|
|
1184
|
+
<TouchableOpacity
|
|
1185
|
+
onPress={() => {
|
|
1186
|
+
navigation.navigate('PdfPreview', { 'link': APIURL + 'jremr/jrcommonreport/jrhosuconsultanttokenreport(0,' + Global.userData.hosuconsultant + ')/0/consulttoken' });
|
|
1187
|
+
}}
|
|
1188
|
+
style={{
|
|
1189
|
+
borderWidth: 0,
|
|
1190
|
+
justifyContent: 'center',
|
|
1191
|
+
alignItems: 'center',
|
|
1192
|
+
}}>
|
|
1193
|
+
<HOCIcons.MaterialCommunityIcons
|
|
1194
|
+
name={'grid'}
|
|
1195
|
+
color={Global.AppTheme.primary_color}
|
|
1196
|
+
size={normalize(25)}
|
|
1197
|
+
/>
|
|
1198
|
+
<Text style={{
|
|
1199
|
+
color: Global.AppTheme.primary_color,
|
|
1200
|
+
fontSize: normalize(7),
|
|
1201
|
+
fontWeight: 'bold',
|
|
1202
|
+
textAlign: 'center',
|
|
1203
|
+
}}>
|
|
1204
|
+
{'Token Summary'}
|
|
1205
|
+
</Text>
|
|
1206
|
+
</TouchableOpacity>
|
|
1207
|
+
</View>
|
|
1208
|
+
|
|
1209
|
+
{isLoading ?
|
|
1210
|
+
<Loader displaytext={true} />
|
|
1211
|
+
: null}
|
|
1212
|
+
|
|
1213
|
+
<View style={{ flexDirection: 'column' }}>
|
|
1214
|
+
{Global.userData.hosuconsultant == 0 ?
|
|
1215
|
+
<View style={{ paddingHorizontal: normalize(8), marginBottom: normalize(4) }}>
|
|
1216
|
+
<Text style={{ fontSize: normalize(8), paddingHorizontal: 5 }}>Consultant :</Text>
|
|
1217
|
+
<SDropDownNew
|
|
1218
|
+
dropdownapi={'emr/emrcommonget/exec rndddwdropdownselect 1'}
|
|
1219
|
+
dropdowndata={ValueCheck(Global.userData.hosuconsultant) && Global.userData.hosuconsultant > 0 ? Global.userData.username : ''}
|
|
1220
|
+
onChangeData={val => val == undefined ? null : getConsultation(val.datavalue)}
|
|
1221
|
+
editable={true}
|
|
1222
|
+
widthArr={Dimensions.get('screen').width * 0.96}
|
|
1223
|
+
iconName={'user-md'}
|
|
1224
|
+
refreshCount={val => val == undefined ? null : console.log('Refresh')}
|
|
1225
|
+
/>
|
|
1226
|
+
</View>
|
|
1227
|
+
: null}
|
|
1228
|
+
<View style={{ borderWidth: 0, marginVertical: normalize(5) }}>
|
|
1229
|
+
<FlatList
|
|
1230
|
+
data={data}
|
|
1231
|
+
style={{ backgroundColor: '#fff' }}
|
|
1232
|
+
horizontal
|
|
1233
|
+
renderItem={(k) => renderItem(k)}
|
|
1234
|
+
keyExtractor={(item, index) => 'key' + index}
|
|
1235
|
+
/>
|
|
1236
|
+
</View>
|
|
1237
|
+
<View>
|
|
1238
|
+
{ValueCheck(dayData) && ArrayCheck(dayData.data) ?
|
|
1239
|
+
<View style={{
|
|
1240
|
+
borderWidth: 0,
|
|
1241
|
+
borderTopWidth: 0,
|
|
1242
|
+
borderRadius: 5,
|
|
1243
|
+
borderColor: 'grey',
|
|
1244
|
+
backgroundColor: '#ffffff',
|
|
1245
|
+
paddingHorizontal: normalize(5),
|
|
1246
|
+
}}>
|
|
1247
|
+
<View style={{ flexDirection: 'row', flexWrap: 'wrap', paddingVertical: normalize(5) }}>
|
|
1248
|
+
{dayData.data.map((item, i) => {
|
|
1249
|
+
return (
|
|
1250
|
+
<TouchableOpacity
|
|
1251
|
+
key={i}
|
|
1252
|
+
disabled={false}
|
|
1253
|
+
onPress={() => getDateData(dayData, item, i)}
|
|
1254
|
+
style={{
|
|
1255
|
+
minWidth: Dimensions.get('screen').width * 0.18,
|
|
1256
|
+
minHeight: Dimensions.get('screen').width * 0.1,
|
|
1257
|
+
borderRadius: 10,
|
|
1258
|
+
marginBottom: normalize(3),
|
|
1259
|
+
marginLeft: normalize(3),
|
|
1260
|
+
paddingVertical: normalize(3),
|
|
1261
|
+
alignItems: 'flex-start',
|
|
1262
|
+
backgroundColor: item.selected ? '#97d6ff' : 'white',
|
|
1263
|
+
borderWidth: 0.5,
|
|
1264
|
+
borderColor: item.color ? item.color : 'grey',
|
|
1265
|
+
paddingHorizontal: normalize(3),
|
|
1266
|
+
borderBottomWidth: 3,
|
|
1267
|
+
borderLeftWidth: 3,
|
|
1268
|
+
opacity: 0.8,
|
|
1269
|
+
flexDirection: 'column',
|
|
1270
|
+
justifyContent: 'space-between',
|
|
1271
|
+
}}>
|
|
1272
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
1273
|
+
<Icons.FontAwesome5 name={ValueCheck(item.iconname) ? item.iconname : 'coins'} color={item.color} size={normalize(20)} />
|
|
1274
|
+
<Text style={{ fontWeight: 'bold', fontSize: normalize(18), color: 'black', paddingLeft: normalize(10), textAlign: 'center' }}>
|
|
1275
|
+
{item.value}
|
|
1276
|
+
</Text>
|
|
1277
|
+
</View>
|
|
1278
|
+
<Text numberOfLines={1} style={{
|
|
1279
|
+
alignSelf: 'center',
|
|
1280
|
+
fontSize: normalize(10),
|
|
1281
|
+
fontWeight: '700',
|
|
1282
|
+
color: 'black',
|
|
1283
|
+
}}>
|
|
1284
|
+
{item.key}
|
|
1285
|
+
</Text>
|
|
1286
|
+
</TouchableOpacity>
|
|
1287
|
+
);
|
|
1288
|
+
})}
|
|
1289
|
+
</View>
|
|
1290
|
+
</View>
|
|
1291
|
+
: null}
|
|
1292
|
+
</View>
|
|
1293
|
+
</View>
|
|
1294
|
+
<View style={{ flex: 1, borderWidth: 0 }}>
|
|
1295
|
+
{ValueCheck(footerData) && ValueCheck(footerData.data) && ValueCheck(footerData.daywisedata) && ArrayCheck(footerData.daywisedata.tokensArray) ?
|
|
1296
|
+
<View style={{ flex: 1, minHeight: 2, borderWidth: 0 }}>
|
|
1297
|
+
{isNU(footerData) && isNU(footerData.daywisedata) && isBNUL(footerData.daywisedata.tokensArray) ?
|
|
1298
|
+
renderFlashList(footerData.daywisedata.tokensArray)
|
|
1299
|
+
: null}
|
|
1300
|
+
</View>
|
|
1301
|
+
: null}
|
|
1302
|
+
</View>
|
|
1303
|
+
|
|
1304
|
+
<View style={{
|
|
1305
|
+
// position: 'absolute',
|
|
1306
|
+
flexDirection: 'row',
|
|
1307
|
+
borderTopColor: '#c9c7c7',
|
|
1308
|
+
borderTopWidth: 2,
|
|
1309
|
+
alignItems: 'center',
|
|
1310
|
+
justifyContent: 'space-between',
|
|
1311
|
+
paddingHorizontal: 1,
|
|
1312
|
+
bottom: 0,
|
|
1313
|
+
paddingVertical: 5,
|
|
1314
|
+
width: '100%',
|
|
1315
|
+
backgroundColor: '#fff',
|
|
1316
|
+
}}>
|
|
1317
|
+
{[{
|
|
1318
|
+
'displaytext': 'Save',
|
|
1319
|
+
'size': 10,
|
|
1320
|
+
'iconname': 'save',
|
|
1321
|
+
'iconcolor': Global.AppTheme.primary_color,
|
|
1322
|
+
'fontcolor': Global.AppTheme.primary_color,
|
|
1323
|
+
'shadowcolor': '#fff',
|
|
1324
|
+
'selected': false,
|
|
1325
|
+
'visibility': edit ? true : false,
|
|
1326
|
+
'iconsize': 20,
|
|
1327
|
+
'functionid': 'CB01',
|
|
1328
|
+
'iconsize': 20,
|
|
1329
|
+
'functionid': 'CB01',
|
|
1330
|
+
'componentname': 'SetUpVitalSign',
|
|
1331
|
+
'icongroup': 4,
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
'displaytext': 'Monthly',
|
|
1335
|
+
'iconname': 'calendar-check-o',
|
|
1336
|
+
'stage': 1,
|
|
1337
|
+
'visibility': true,
|
|
1338
|
+
'functionid': 'CB04',
|
|
1339
|
+
'icongroup': 4,
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
'key': 3,
|
|
1343
|
+
'iconname': 'stack-overflow',
|
|
1344
|
+
'displaytext': 'Tokens',
|
|
1345
|
+
'visibility': true,
|
|
1346
|
+
'functionid': 'CB05',
|
|
1347
|
+
'icongroup': 4,
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
'iconname': 'user-md',
|
|
1351
|
+
'displaytext': 'Booking',
|
|
1352
|
+
'stage': 1,
|
|
1353
|
+
'visibility': true,
|
|
1354
|
+
'functionid': 'CB03',
|
|
1355
|
+
'icongroup': 4,
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
'iconname': 'exchange',
|
|
1359
|
+
'displaytext': 'Postpone',
|
|
1360
|
+
'stage': 5,
|
|
1361
|
+
'visibility': true,
|
|
1362
|
+
'selected': true,
|
|
1363
|
+
'functionid': 'CB06',
|
|
1364
|
+
'icongroup': 4,
|
|
1365
|
+
},
|
|
1366
|
+
// {
|
|
1367
|
+
// "icongroup": 4,
|
|
1368
|
+
// "displaytext": "Report", "size": 10, "iconname": "file-pdf-o", "iconcolor": Global.AppTheme.primary_color,
|
|
1369
|
+
// "fontcolor": Global.AppTheme.primary_color, "shadowcolor": '#fff', "selected": false, "visibility": true, "iconsize": 20, "functionid": "CB02",
|
|
1370
|
+
// }
|
|
1371
|
+
].map((item, i) => {
|
|
1372
|
+
return (
|
|
1373
|
+
item.visibility ?
|
|
1374
|
+
|
|
1375
|
+
<View>
|
|
1376
|
+
<CAwesomeButton
|
|
1377
|
+
key={i}
|
|
1378
|
+
data={{
|
|
1379
|
+
...item,
|
|
1380
|
+
'width': normalize(45),
|
|
1381
|
+
'shadowcolor': '#fff',
|
|
1382
|
+
'iconcolor': item.displaytext == 'Tokens' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
|
|
1383
|
+
'fontcolor': item.displaytext == 'Tokens' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
|
|
1384
|
+
}}
|
|
1385
|
+
callBack={val => val == undefined ? null : getFooterIconsFunctions(item)}
|
|
1386
|
+
/>
|
|
1387
|
+
</View>
|
|
1388
|
+
|
|
1389
|
+
// <TouchableOpacity key={i} style={{ alignItems: 'center', justifyContent: 'center' }}
|
|
1390
|
+
// onPress={() => getFooterIconsFunctions(item)}>
|
|
1391
|
+
// <Icons.FontAwesome name={item.iconname} color={item.displaytext == "Tokens" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black"} size={normalize(20)} />
|
|
1392
|
+
// <Text style={{ color: item.displaytext == "Tokens" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black", fontSize: normalize(10) }}>{item.displaytext}</Text>
|
|
1393
|
+
// </TouchableOpacity>
|
|
1394
|
+
|
|
1395
|
+
: null
|
|
1396
|
+
);
|
|
1397
|
+
})}
|
|
1398
|
+
</View>
|
|
1399
|
+
</View>
|
|
1400
|
+
);
|
|
1401
|
+
};
|
|
1402
|
+
export default CTokenAllocation;
|