@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -1,1822 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { Text, View, FlatList, TouchableOpacity, Dimensions, ActivityIndicator, ScrollView, Switch, TextInput, RefreshControl } from 'react-native';
|
|
3
|
-
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
|
4
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
5
|
-
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
6
|
-
import { ArrayCheck, getLoading, isBNUL, isNU, isNUQ, isNUQZ, 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 SDropDownNew from '../Components/SDropDownNew';
|
|
17
|
-
|
|
18
|
-
import HOCIcons from '../HOC/HOCIcons';
|
|
19
|
-
import SDatePickerNew from '../StaticComponents/SDatePickerNew';
|
|
20
|
-
import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
|
|
21
|
-
import CCommentOverlay from '../CustomComponents/CCommentOverlay';
|
|
22
|
-
import CTokenListOverlay from './CTokenListOverlay';
|
|
23
|
-
import CText from '../CustomComponents/CText';
|
|
24
|
-
import { useNavigation } from '../Navigation/useNavigation';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
import CAwesomeButton from '../CustomComponents/CAwesomeButton';
|
|
28
|
-
|
|
29
|
-
const CBookingPostpone = (props) => {
|
|
30
|
-
|
|
31
|
-
const navigation = useNavigation();
|
|
32
|
-
|
|
33
|
-
const { width, height } = Dimensions.get('screen');
|
|
34
|
-
const flatlistRef = useRef();
|
|
35
|
-
const dividedWidth = width / 7;
|
|
36
|
-
const [data, setData] = useState();
|
|
37
|
-
const [refresh, setRefresh] = useState(0);
|
|
38
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
39
|
-
const [footerData, setFooterData] = useState();
|
|
40
|
-
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
41
|
-
const d = new Date();
|
|
42
|
-
const [monthinno, setMonthInNo] = useState(d.getMonth());
|
|
43
|
-
const [postponedate, setPostponeDate] = useState();
|
|
44
|
-
// console.log('postponedate',postponedate)
|
|
45
|
-
let monthName = months[monthinno];
|
|
46
|
-
const [year, setYear] = useState(d.getFullYear());
|
|
47
|
-
const [edit, setEdit] = useState(false);
|
|
48
|
-
const [consultant, setConsultant] = useState(Global.userData.hosuconsultant);
|
|
49
|
-
const [pulltorefresh] = useState(false);
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (consultant > 0) {
|
|
53
|
-
getConsultation(consultant, year, monthinno);
|
|
54
|
-
}
|
|
55
|
-
}, []);
|
|
56
|
-
|
|
57
|
-
function getFooterIconsFunctions(val) {
|
|
58
|
-
|
|
59
|
-
switch (val.functionid) {
|
|
60
|
-
case 'CB01':
|
|
61
|
-
ValueCheck(footerData) && ValueCheck(footerData.daywisedata) && ArrayCheck(footerData.daywisedata.tokensArray) ? getSave() : console.log('Disabled');
|
|
62
|
-
break;
|
|
63
|
-
case 'CB02': props.callBack(4);
|
|
64
|
-
break;
|
|
65
|
-
case 'CB03': props.callBack(2);
|
|
66
|
-
break;
|
|
67
|
-
case 'CB04': props.callBack(0);
|
|
68
|
-
break;
|
|
69
|
-
case 'CB05': props.callBack(1);
|
|
70
|
-
break;
|
|
71
|
-
default: console.log('Deault');
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function getSave() {
|
|
77
|
-
|
|
78
|
-
var output = {
|
|
79
|
-
'groups': {
|
|
80
|
-
'procedurename': 'hocobookingtokenpostpone1',
|
|
81
|
-
'suuser': Global.userData.suuser,
|
|
82
|
-
'hosuconsultant': consultant,
|
|
83
|
-
'dataArray': isBNUL(footerData.daywisedata.tokensArray[0].tokenArr) ? footerData.daywisedata.tokensArray[0].tokenArr : footerData.daywisedata.tokensArray[1].tokenArr,
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
let buttonapi = APIURL + 'commontemplatesave/RnCommonTemplateSave';
|
|
87
|
-
console.log('Button apiiiiiiiiii', JSON.stringify(buttonapi));
|
|
88
|
-
console.log('output CBooking apiiiiiiiiii', JSON.stringify(output));
|
|
89
|
-
|
|
90
|
-
setIsLoading(true);
|
|
91
|
-
NetworkServiceCall('post', buttonapi, output).then(function (response) {
|
|
92
|
-
console.log('output CBooking apiiiiiiiiiiiiiiiiiiiiii', JSON.stringify(response));
|
|
93
|
-
if (response.httpstatus == 200
|
|
94
|
-
&& response.data != undefined && response.data != null
|
|
95
|
-
&& response.data.code != undefined && response.data.code > 0) {
|
|
96
|
-
notifyMessage('Data Saved!!!!!', 1);
|
|
97
|
-
setFooterData();
|
|
98
|
-
setPostponeDate();
|
|
99
|
-
setEdit(false);
|
|
100
|
-
setIsLoading(false);
|
|
101
|
-
getConsultation(consultant, year, monthinno);
|
|
102
|
-
} else {
|
|
103
|
-
// getDateData(footerData)
|
|
104
|
-
setIsLoading(false);
|
|
105
|
-
notifyMessage('Data Not Saved!!!!!', 2);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
getLoading(v => setIsLoading(false));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function ShowDatePicker(array) {
|
|
112
|
-
|
|
113
|
-
let prevcodearray = array.filter((i, k) => { return i.selected ? { ...i } : undefined; });
|
|
114
|
-
let prevcode = isBNUL(prevcodearray) ? true : false;
|
|
115
|
-
return prevcode;
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function GetSelectedTokenType(array) {
|
|
120
|
-
|
|
121
|
-
let prevcodearray = array.filter((i, k) => { return i.selected ? { ...i } : undefined; });
|
|
122
|
-
let prevcode = isBNUL(prevcodearray) && prevcodearray.length == 1 ? prevcodearray[0].bookingtype : false;
|
|
123
|
-
return prevcode;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function footerComponent() {
|
|
127
|
-
|
|
128
|
-
return (
|
|
129
|
-
<View style={{ marginTop: normalize(5) }}>
|
|
130
|
-
<View style={{ flexDirection: 'row', alignItems: 'flex-start', justifyContent: 'space-between', width: '100%' }}>
|
|
131
|
-
<View style={{ width: '50%', borderWidth: 0 }}>
|
|
132
|
-
{ValueCheck(footerData) && ArrayCheck(footerData.data) ?
|
|
133
|
-
<View style={{ marginTop: normalize(12) }}>
|
|
134
|
-
<View style={{ paddingHorizontal: normalize(5), flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
135
|
-
{footerData.data.map((display, p) => {
|
|
136
|
-
|
|
137
|
-
return (
|
|
138
|
-
display != null && display != undefined ?
|
|
139
|
-
// <View key={p} style={{ flexDirection: 'row', alignItems: 'center', paddingVertical: normalize(4), paddingLeft: normalize(5) }}>
|
|
140
|
-
// <View style={{
|
|
141
|
-
// width: normalize(20),
|
|
142
|
-
// height: normalize(15),
|
|
143
|
-
// backgroundColor: display.color,
|
|
144
|
-
// borderRadius: 5,
|
|
145
|
-
// alignItems: 'center',
|
|
146
|
-
// justifyContent: 'center',
|
|
147
|
-
// marginRight: 5
|
|
148
|
-
// }}>
|
|
149
|
-
// <Text style={{ fontSize: normalize(9), fontWeight: 'bold', color: 'white' }}>{display.value}</Text>
|
|
150
|
-
// </View>
|
|
151
|
-
// <Text style={{ fontSize: normalize(12) }}>{display.key}</Text>
|
|
152
|
-
// </View>
|
|
153
|
-
|
|
154
|
-
<TouchableOpacity
|
|
155
|
-
key={p}
|
|
156
|
-
disabled={display.key == 'TOTAL' ? true : false}
|
|
157
|
-
onPress={() => {
|
|
158
|
-
footerData.daywisedata = [];
|
|
159
|
-
footerData.data.forEach((item) => {
|
|
160
|
-
item.selected = false;
|
|
161
|
-
});
|
|
162
|
-
display.selected = true;
|
|
163
|
-
setRefresh(refresh + 1);
|
|
164
|
-
// setRefresh(refresh+1);
|
|
165
|
-
getApiPatientData2(footerData, postponedate, display.bookingtype);
|
|
166
|
-
}}
|
|
167
|
-
style={{
|
|
168
|
-
minWidth: normalize(50),
|
|
169
|
-
borderRadius: 10,
|
|
170
|
-
marginBottom: normalize(3),
|
|
171
|
-
marginLeft: normalize(3),
|
|
172
|
-
paddingVertical: normalize(3),
|
|
173
|
-
alignItems: 'flex-start',
|
|
174
|
-
backgroundColor: display.selected ? '#acbeff' : 'white',
|
|
175
|
-
borderWidth: 0.5,
|
|
176
|
-
borderColor: display.color,
|
|
177
|
-
paddingHorizontal: normalize(3),
|
|
178
|
-
borderBottomWidth: 3,
|
|
179
|
-
borderLeftWidth: 3,
|
|
180
|
-
opacity: 0.8,
|
|
181
|
-
flexDirection: 'column',
|
|
182
|
-
justifyContent: 'space-between',
|
|
183
|
-
}}>
|
|
184
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
185
|
-
<Icons.FontAwesome5
|
|
186
|
-
name={ValueCheck(display.iconname) ? display.iconname : 'coins'}
|
|
187
|
-
color={display.color}
|
|
188
|
-
size={normalize(10)}
|
|
189
|
-
/>
|
|
190
|
-
<Text style={{ fontWeight: 'bold', fontSize: normalize(15), color: 'black', paddingLeft: normalize(10), textAlign: 'center' }}>
|
|
191
|
-
{display.value}
|
|
192
|
-
</Text>
|
|
193
|
-
</View>
|
|
194
|
-
<Text numberOfLines={1} style={{
|
|
195
|
-
alignSelf: 'center',
|
|
196
|
-
fontSize: normalize(8),
|
|
197
|
-
fontWeight: '700',
|
|
198
|
-
color: 'black',
|
|
199
|
-
}}>
|
|
200
|
-
{display.key}
|
|
201
|
-
</Text>
|
|
202
|
-
</TouchableOpacity>
|
|
203
|
-
: null);
|
|
204
|
-
})}
|
|
205
|
-
</View>
|
|
206
|
-
</View>
|
|
207
|
-
: null}
|
|
208
|
-
</View>
|
|
209
|
-
<View style={{ borderWidth: 0 }}>
|
|
210
|
-
{isNU(footerData) && isBNUL(footerData.data) && ShowDatePicker(footerData.data) && isNU(postponedate) ?
|
|
211
|
-
<View style={{ justifyContent: 'flex-end', alignItems: 'flex-end' }}>
|
|
212
|
-
<View style={{ width: Dimensions.get('screen').width * 0.3 }}>
|
|
213
|
-
<Text style={{ fontSize: normalize(10) }}>Postponed Date</Text>
|
|
214
|
-
<SDatePickerNew
|
|
215
|
-
icon={{
|
|
216
|
-
'icongroup': 5,
|
|
217
|
-
'name': 'calendar-alt',
|
|
218
|
-
'size': normalize(15),
|
|
219
|
-
}}
|
|
220
|
-
iconstyle={{
|
|
221
|
-
color: Global.AppTheme.primary_color,
|
|
222
|
-
paddingHorizontal: normalize(5),
|
|
223
|
-
textAlign: 'center',
|
|
224
|
-
}}
|
|
225
|
-
pickerstyle={{
|
|
226
|
-
flexDirection: 'row',
|
|
227
|
-
backgroundColor: '#fff',
|
|
228
|
-
width: '100%',
|
|
229
|
-
borderColor: 'lightgrey',
|
|
230
|
-
borderWidth: 1,
|
|
231
|
-
borderRadius: 5,
|
|
232
|
-
alignItems: 'center',
|
|
233
|
-
height: normalize(30),
|
|
234
|
-
elevation: 5,
|
|
235
|
-
justifyContent: 'flex-start',
|
|
236
|
-
marginVertical: normalize(3),
|
|
237
|
-
}}
|
|
238
|
-
textstyle={{
|
|
239
|
-
fontSize: normalize(14),
|
|
240
|
-
color: 'black',
|
|
241
|
-
fontWeight: 'bold',
|
|
242
|
-
}}
|
|
243
|
-
table={false}
|
|
244
|
-
data={{
|
|
245
|
-
itemwidth: '100%',
|
|
246
|
-
displaytext: 'Consultation Date',
|
|
247
|
-
}}
|
|
248
|
-
minimumdate={moment().format('YYYY-MM-DD')}
|
|
249
|
-
passingDate={postponedate}
|
|
250
|
-
onChangeData={val => val == undefined ? null : (
|
|
251
|
-
setPostponeDate(moment(val).format('YYYY-MM-DD')),
|
|
252
|
-
footerData.daywisedata = [],
|
|
253
|
-
(isNU(GetSelectedTokenType(footerData.data)) ? getApiPatientData2(footerData, moment(val).format('YYYY-MM-DD'), GetSelectedTokenType(footerData.data)) : null),
|
|
254
|
-
console.log('SDatePickerNew', JSON.stringify(footerData.data)),
|
|
255
|
-
console.log(moment(val).format('YYYY-MM-DD')),
|
|
256
|
-
console.log(moment().format('LT'))
|
|
257
|
-
)}
|
|
258
|
-
refreshCount={val => val == undefined ? null : setRefresh(refresh + val)}
|
|
259
|
-
/>
|
|
260
|
-
</View>
|
|
261
|
-
</View>
|
|
262
|
-
: null}
|
|
263
|
-
</View>
|
|
264
|
-
</View>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{/* {footerData != undefined && footerData.data != undefined ?
|
|
269
|
-
<View
|
|
270
|
-
style={{ backgroundColor: '#fff', height: normalize(25), alignItems: 'center', justifyContent: 'space-evenly', flexDirection: 'row' }}>
|
|
271
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', width: '50%', justifyContent: 'center' }}>
|
|
272
|
-
<Icons.FontAwesome5 name={"calendar-day"} color={"black"} size={normalize(15)} />
|
|
273
|
-
<Text style={{ fontWeight: 'bold', fontSize: normalize(15), color: 'black', paddingLeft: normalize(10) }}>
|
|
274
|
-
{footerData.displaytext + "/" + monthName + "/" + year}
|
|
275
|
-
</Text>
|
|
276
|
-
</View>
|
|
277
|
-
</View> : null} */}
|
|
278
|
-
|
|
279
|
-
{footerData != undefined && ValueCheck(footerData.daywisedata) && ArrayCheck(footerData.daywisedata.tokensArray) ?
|
|
280
|
-
<FlatList
|
|
281
|
-
nestedScrollEnabled={true}
|
|
282
|
-
data={footerData.daywisedata.tokensArray}
|
|
283
|
-
style={{ width: width }}
|
|
284
|
-
renderItem={(k) => renderFooterView(k)}
|
|
285
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
286
|
-
listKey={(item, index) => 'key' + index}
|
|
287
|
-
/>
|
|
288
|
-
: null}
|
|
289
|
-
</View>
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function getExpand(params) {
|
|
294
|
-
// params.expand = !params.expand
|
|
295
|
-
// setRefresh(refresh + 1)
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
function getTimeDiffernece(params) {
|
|
299
|
-
var startTime = moment(params.reportingtime, 'HH:mm:ss a');
|
|
300
|
-
var endTime = moment(params.reportingto, 'HH:mm:ss a');
|
|
301
|
-
var duration = moment.duration(endTime.diff(startTime));
|
|
302
|
-
var hours = parseInt(duration.asHours());
|
|
303
|
-
var minutes = parseInt(duration.asMinutes());
|
|
304
|
-
// console.log(hours + ' hr and ' + minutes + ' min');
|
|
305
|
-
params.waitingtime = minutes;
|
|
306
|
-
return minutes;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function getSingleRT(item, val) {
|
|
310
|
-
item.reportingtime = val;
|
|
311
|
-
item.EditFlag = 2;
|
|
312
|
-
item.reportingto = moment(moment(item.reportingtime, 'HH:mm:ss a')).add(30, 'minutes').format('hh:mm A');
|
|
313
|
-
getEditFlag();
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function getSingleCT(item, val) {
|
|
317
|
-
item.reportingto = val;
|
|
318
|
-
item.EditFlag = 2;
|
|
319
|
-
// item.reportingtime = moment(moment(item.reportingto, 'HH:mm:ss a')).subtract(30, 'minutes').format('hh:mm A')
|
|
320
|
-
getEditFlag();
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
function renderFooterView({ item }) {
|
|
324
|
-
|
|
325
|
-
// console.log('renderFooterView', JSON.stringify(item.tokenArr))
|
|
326
|
-
|
|
327
|
-
return (
|
|
328
|
-
ArrayCheck(item.tokenArr) ?
|
|
329
|
-
<View style={{ flex: 1 }}>
|
|
330
|
-
{/* <HHeading
|
|
331
|
-
styles={{
|
|
332
|
-
"iconname": item.iconname,
|
|
333
|
-
"bgcolor": "#f4f4f4",
|
|
334
|
-
"iconsize": 16,
|
|
335
|
-
"iconcolor": Global.AppTheme.primary_color,
|
|
336
|
-
"displaytext": item.tokentype,
|
|
337
|
-
"textsize": 14,
|
|
338
|
-
"textcolor": Global.AppTheme.primary_color
|
|
339
|
-
}}
|
|
340
|
-
callBack={val => (val == undefined ? null : getExpand(item))}
|
|
341
|
-
Expand={val => (val == undefined ? null : getExpand(item))}>
|
|
342
|
-
</HHeading> */}
|
|
343
|
-
{ArrayCheck(item.tokenArr) ?
|
|
344
|
-
<View>
|
|
345
|
-
<View style={{ flexDirection: 'row', width: '100%' }}>
|
|
346
|
-
<View style={{ width: '35%' }}>
|
|
347
|
-
<View style={{ borderWidth: 0.5, borderColor: 'grey', backgroundColor: '#f0f0f0', height: normalize(20), justifyContent: 'center', alignItems: 'center' }}>
|
|
348
|
-
<Text adjustsFontSizeToFit style={{ textAlign: 'center', color: 'black', fontSize: normalize(10), paddingHorizontal: normalize(2) }}>{'TOKEN'}</Text>
|
|
349
|
-
</View>
|
|
350
|
-
|
|
351
|
-
{/* <CTextHeader
|
|
352
|
-
text={'TOKEN'}
|
|
353
|
-
widthArr={'100%'}
|
|
354
|
-
bgColor={"lightgrey"}
|
|
355
|
-
color={Global.AppTheme.primary_color}
|
|
356
|
-
borderColor={'lightgrey'}
|
|
357
|
-
marginHorizontal={normalize(2)}
|
|
358
|
-
borderRadius={5}
|
|
359
|
-
elevation={3}
|
|
360
|
-
/> */}
|
|
361
|
-
</View>
|
|
362
|
-
<View style={{ width: '20%' }}>
|
|
363
|
-
<View style={{ borderWidth: 0.5, borderColor: 'grey', backgroundColor: '#f0f0f0', height: normalize(20), justifyContent: 'center', alignItems: 'center' }}>
|
|
364
|
-
<Text adjustsFontSizeToFit style={{ textAlign: 'center', color: 'black', fontSize: normalize(10), paddingHorizontal: normalize(2) }}>{'POSTPONED DATE'}</Text>
|
|
365
|
-
</View>
|
|
366
|
-
{/* <CTextHeader
|
|
367
|
-
text={'POSTPONED DATE'}
|
|
368
|
-
widthArr={'100%'}
|
|
369
|
-
bgColor={"lightgrey"}
|
|
370
|
-
color={Global.AppTheme.primary_color}
|
|
371
|
-
borderColor={'lightgrey'}
|
|
372
|
-
marginHorizontal={normalize(2)}
|
|
373
|
-
borderRadius={5}
|
|
374
|
-
elevation={3}
|
|
375
|
-
/> */}
|
|
376
|
-
</View>
|
|
377
|
-
<View style={{ width: '35%' }}>
|
|
378
|
-
<View style={{ borderWidth: 0.5, borderColor: 'grey', backgroundColor: '#f0f0f0', height: normalize(20), justifyContent: 'center', alignItems: 'center' }}>
|
|
379
|
-
<Text adjustsFontSizeToFit style={{ textAlign: 'center', color: 'black', fontSize: normalize(10), paddingHorizontal: normalize(2) }}>{'POSTPONED TOKEN'}</Text>
|
|
380
|
-
</View>
|
|
381
|
-
{/* <CTextHeader
|
|
382
|
-
text={'POSTPONED TOKEN'}
|
|
383
|
-
widthArr={'100%'}
|
|
384
|
-
bgColor={"lightgrey"}
|
|
385
|
-
color={Global.AppTheme.primary_color}
|
|
386
|
-
borderColor={'lightgrey'}
|
|
387
|
-
marginHorizontal={normalize(2)}
|
|
388
|
-
borderRadius={5}
|
|
389
|
-
elevation={3}
|
|
390
|
-
/> */}
|
|
391
|
-
</View>
|
|
392
|
-
<View style={{ width: '10%' }}>
|
|
393
|
-
<View style={{ borderWidth: 0.5, borderColor: 'grey', backgroundColor: '#f0f0f0', height: normalize(20), justifyContent: 'center', alignItems: 'center' }}>
|
|
394
|
-
<Text adjustsFontSizeToFit style={{ textAlign: 'center', color: 'black', fontSize: normalize(10), paddingHorizontal: normalize(2) }}>{'ENABLED'}</Text>
|
|
395
|
-
</View>
|
|
396
|
-
{/* <CTextHeader
|
|
397
|
-
text={'ENABLED'}
|
|
398
|
-
widthArr={'100%'}
|
|
399
|
-
bgColor={"lightgrey"}
|
|
400
|
-
color={Global.AppTheme.primary_color}
|
|
401
|
-
borderColor={'lightgrey'}
|
|
402
|
-
marginHorizontal={normalize(2)}
|
|
403
|
-
borderRadius={5}
|
|
404
|
-
elevation={3}
|
|
405
|
-
/> */}
|
|
406
|
-
</View>
|
|
407
|
-
</View>
|
|
408
|
-
<FlatList
|
|
409
|
-
data={item.tokenArr}
|
|
410
|
-
// data={[{
|
|
411
|
-
// "patientname": "REJUL RAPHAEL",
|
|
412
|
-
// "patientid": "12473567",
|
|
413
|
-
// "mobilenumber": "7994378855",
|
|
414
|
-
// "address": "HOUSE NAME, THRISSUR",
|
|
415
|
-
// "tokenno": "100",
|
|
416
|
-
// "ctokendate": "10-09-2024 08:00 AM",
|
|
417
|
-
// "ctokentype": "C",
|
|
418
|
-
// "postponedate": "12-09-2024",
|
|
419
|
-
// "ptokenno": "200",
|
|
420
|
-
// "ptokendate": "12-09-2024 09:00 PM",
|
|
421
|
-
// "editstatus": true,
|
|
422
|
-
// "remarks": "",
|
|
423
|
-
// "color": 'blue'
|
|
424
|
-
// }]}
|
|
425
|
-
style={{ backgroundColor: '#fff' }}
|
|
426
|
-
initialNumToRender={10}
|
|
427
|
-
maxToRenderPerBatch={10}
|
|
428
|
-
renderItem={(k) => renderMrngEvngToken(k)}
|
|
429
|
-
keyExtractor={(item, index) => 'key' + index}
|
|
430
|
-
listKey={(item, index) => 'key' + index}
|
|
431
|
-
/>
|
|
432
|
-
</View>
|
|
433
|
-
: null}
|
|
434
|
-
</View> : null
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
function reverse(s) {
|
|
439
|
-
return s != undefined ? s.split('-').reverse().join('-') : '';
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
function callData() {
|
|
443
|
-
|
|
444
|
-
let jsonadata = [];
|
|
445
|
-
|
|
446
|
-
setIsLoading(true);
|
|
447
|
-
setTimeout(() => {
|
|
448
|
-
|
|
449
|
-
jsonadata = [
|
|
450
|
-
{
|
|
451
|
-
'ptokenno': '201',
|
|
452
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
453
|
-
'color': 'blue',
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
'ptokenno': '202',
|
|
457
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
458
|
-
'color': 'blue',
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
'ptokenno': '203',
|
|
462
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
463
|
-
'color': 'blue',
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
'ptokenno': '204',
|
|
467
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
468
|
-
'color': 'blue',
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
'ptokenno': '205',
|
|
472
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
473
|
-
'color': 'blue',
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
'ptokenno': '206',
|
|
477
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
478
|
-
'color': 'blue',
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
'ptokenno': '207',
|
|
482
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
483
|
-
'color': 'blue',
|
|
484
|
-
},
|
|
485
|
-
];
|
|
486
|
-
setIsLoading(false);
|
|
487
|
-
});
|
|
488
|
-
|
|
489
|
-
return jsonadata;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
function fnReturnData() {
|
|
493
|
-
|
|
494
|
-
let datajson = callData();
|
|
495
|
-
|
|
496
|
-
return (
|
|
497
|
-
<View>
|
|
498
|
-
<FlatList
|
|
499
|
-
data={[
|
|
500
|
-
{
|
|
501
|
-
'ptokenno': '201',
|
|
502
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
503
|
-
'color': 'blue',
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
'ptokenno': '202',
|
|
507
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
508
|
-
'color': 'blue',
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
'ptokenno': '203',
|
|
512
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
513
|
-
'color': 'blue',
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
'ptokenno': '204',
|
|
517
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
518
|
-
'color': 'blue',
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
'ptokenno': '205',
|
|
522
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
523
|
-
'color': 'blue',
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
'ptokenno': '206',
|
|
527
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
528
|
-
'color': 'blue',
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
'ptokenno': '207',
|
|
532
|
-
'ptokendate': '12-09-2024 09:00 PM',
|
|
533
|
-
'color': 'blue',
|
|
534
|
-
},
|
|
535
|
-
]}
|
|
536
|
-
horizontal={true}
|
|
537
|
-
renderItem={(val) => {
|
|
538
|
-
return (
|
|
539
|
-
<TouchableOpacity style={{ margin: normalize(5), elevation: 5, flexDirection: 'row', alignItems: 'center', backgroundColor: 'white', borderTopWidth: 0.5, borderRightWidth: 0.5, borderLeftWidth: 2, borderBottomWidth: 2, borderRadius: 5, height: normalize(35), borderColor: val.item.color }}>
|
|
540
|
-
<View style={{ backgroundColor: val.item.color, borderRadius: 5, padding: 5, width: normalize(25), height: normalize(20), justifyContent: 'center', alignItems: 'center', margin: 5 }} >
|
|
541
|
-
<Text style={{ color: 'white', fontSize: normalize(10), fontWeight: 'bold' }}>{val.item.ptokenno}</Text>
|
|
542
|
-
</View>
|
|
543
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
544
|
-
<HOCIcons.FontAwesome5
|
|
545
|
-
name={'calendar-alt'}
|
|
546
|
-
size={normalize(8)}
|
|
547
|
-
color={val.item.color}
|
|
548
|
-
style={{
|
|
549
|
-
paddingHorizontal: normalize(3),
|
|
550
|
-
}}
|
|
551
|
-
/>
|
|
552
|
-
<Text style={{ paddingRight: normalize(5), fontSize: normalize(9), color: 'black', fontWeight: 'bold' }}>{val.item.ptokendate}</Text>
|
|
553
|
-
</View>
|
|
554
|
-
</TouchableOpacity>
|
|
555
|
-
);
|
|
556
|
-
}}
|
|
557
|
-
/>
|
|
558
|
-
</View>
|
|
559
|
-
);
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
function renderMrngEvngToken({ item }) {
|
|
568
|
-
|
|
569
|
-
// console.log('renderMrngEvngToken', moment(item.postponedate).format('YYYY-MM-DD'))
|
|
570
|
-
|
|
571
|
-
return (
|
|
572
|
-
<View style={{
|
|
573
|
-
alignSelf: 'center',
|
|
574
|
-
backgroundColor: item.editstatus ? 'white' : '#f0f0f0',
|
|
575
|
-
width: '100%',
|
|
576
|
-
flexDirection: 'row',
|
|
577
|
-
// opacity: item.editstatus ? 1 : 0.6,
|
|
578
|
-
}}>
|
|
579
|
-
|
|
580
|
-
<View style={{ width: '35%', borderWidth: 0.5, borderColor: 'grey', flexDirection: 'column' }}>
|
|
581
|
-
<View style={{ flexDirection: 'row' }}>
|
|
582
|
-
<View style={{ backgroundColor: item.color, borderRadius: 5, width: normalize(20), height: normalize(20), justifyContent: 'center', alignItems: 'center', margin: normalize(3) }} >
|
|
583
|
-
<Text adjustsFontSizeToFit style={{ color: '#fff', fontSize: normalize(10), fontWeight: 'bold' }}>{item.tokenno}</Text>
|
|
584
|
-
</View>
|
|
585
|
-
<View>
|
|
586
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
587
|
-
<HOCIcons.FontAwesome5
|
|
588
|
-
name={'user-alt'}
|
|
589
|
-
size={normalize(8)}
|
|
590
|
-
color={item.color}
|
|
591
|
-
style={{
|
|
592
|
-
paddingHorizontal: normalize(3),
|
|
593
|
-
}}
|
|
594
|
-
/>
|
|
595
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(9), color: 'black', fontWeight: 'bold' }}>{item.patientname}</Text>
|
|
596
|
-
</View>
|
|
597
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
598
|
-
<HOCIcons.MaterialCommunityIcons
|
|
599
|
-
name={'card-account-details-outline'}
|
|
600
|
-
size={normalize(8)}
|
|
601
|
-
color={item.color}
|
|
602
|
-
style={{
|
|
603
|
-
paddingHorizontal: normalize(3),
|
|
604
|
-
}}
|
|
605
|
-
/>
|
|
606
|
-
<View>
|
|
607
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(9), color: 'black', fontWeight: 'bold' }}>{item.patientid}</Text>
|
|
608
|
-
</View>
|
|
609
|
-
</View>
|
|
610
|
-
|
|
611
|
-
</View>
|
|
612
|
-
</View>
|
|
613
|
-
<View>
|
|
614
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
615
|
-
<HOCIcons.FontAwesome5
|
|
616
|
-
name={'calendar-alt'}
|
|
617
|
-
size={normalize(8)}
|
|
618
|
-
color={item.color}
|
|
619
|
-
style={{
|
|
620
|
-
paddingHorizontal: normalize(3),
|
|
621
|
-
}}
|
|
622
|
-
/>
|
|
623
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(9), color: 'black', fontWeight: 'bold' }}>{isNU(item.bookingdate) ? moment(item.bookingdate).format('DD-MM-YYYY') : null}{' '}{isNU(item.reportingto) ? item.reportingto : null}</Text>
|
|
624
|
-
</View>
|
|
625
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
626
|
-
<HOCIcons.FontAwesome5
|
|
627
|
-
name={'phone-alt'}
|
|
628
|
-
size={normalize(8)}
|
|
629
|
-
color={item.color}
|
|
630
|
-
style={{
|
|
631
|
-
paddingHorizontal: normalize(3),
|
|
632
|
-
}}
|
|
633
|
-
/>
|
|
634
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>{item.mobilenumber}</Text>
|
|
635
|
-
</View>
|
|
636
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
637
|
-
<HOCIcons.FontAwesome5
|
|
638
|
-
name={'house-user'}
|
|
639
|
-
size={normalize(8)}
|
|
640
|
-
color={item.color}
|
|
641
|
-
style={{
|
|
642
|
-
paddingHorizontal: normalize(3),
|
|
643
|
-
}}
|
|
644
|
-
/>
|
|
645
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>{item.patientaddress}</Text>
|
|
646
|
-
</View>
|
|
647
|
-
|
|
648
|
-
</View>
|
|
649
|
-
</View>
|
|
650
|
-
<View style={{
|
|
651
|
-
width: '20%',
|
|
652
|
-
borderWidth: 0.5,
|
|
653
|
-
borderColor: 'grey',
|
|
654
|
-
justifyContent: 'center',
|
|
655
|
-
alignItems: 'center',
|
|
656
|
-
}}>
|
|
657
|
-
<SDatePickerNew
|
|
658
|
-
icon={{
|
|
659
|
-
'icongroup': 5,
|
|
660
|
-
'name': 'calendar-alt',
|
|
661
|
-
'size': normalize(10),
|
|
662
|
-
}}
|
|
663
|
-
iconstyle={{
|
|
664
|
-
color: item.color,
|
|
665
|
-
paddingHorizontal: normalize(3),
|
|
666
|
-
textAlign: 'center',
|
|
667
|
-
}}
|
|
668
|
-
pickerstyle={{
|
|
669
|
-
flexDirection: 'row',
|
|
670
|
-
// backgroundColor: '#fff',
|
|
671
|
-
width: '100%',
|
|
672
|
-
borderColor: 'lightgrey',
|
|
673
|
-
borderWidth: 0,
|
|
674
|
-
borderRadius: 5,
|
|
675
|
-
alignItems: 'center',
|
|
676
|
-
// height: normalize(25),
|
|
677
|
-
elevation: 0,
|
|
678
|
-
justifyContent: 'flex-start',
|
|
679
|
-
}}
|
|
680
|
-
textstyle={{
|
|
681
|
-
fontSize: normalize(10), color: 'black', fontWeight: 'bold',
|
|
682
|
-
}}
|
|
683
|
-
table={false}
|
|
684
|
-
data={{ itemwidth: '100%', displaytext: 'Consultation Date' }}
|
|
685
|
-
minimumdate={moment().format('YYYY-MM-DD')}
|
|
686
|
-
passingDate={isNU(item.postponedate) ? item.postponedate : null}
|
|
687
|
-
checkifdatematches={item.bookingdate}
|
|
688
|
-
onChangeData={val => val == undefined ? null : (
|
|
689
|
-
// console.log('onChangeData', val),
|
|
690
|
-
item.postponedate = moment(val).format('YYYY-MM-DD'),
|
|
691
|
-
getTokenList(footerData, moment(val).format('YYYY-MM-DD'), item)
|
|
692
|
-
// getApiPatientData2(footerData, moment(val).format('YYYY-MM-DD'))
|
|
693
|
-
)}
|
|
694
|
-
refreshCount={val => val == undefined ? null : setRefresh(refresh + val)}
|
|
695
|
-
/>
|
|
696
|
-
</View>
|
|
697
|
-
<View style={{ width: '35%', borderWidth: 0.5, borderColor: 'grey', justifyContent: 'center', alignItems: 'center' }}>
|
|
698
|
-
{item.postponetoken ?
|
|
699
|
-
<View style={{ width: '100%' }}>
|
|
700
|
-
<Menu>
|
|
701
|
-
<MenuTrigger
|
|
702
|
-
// onPress={()=>{
|
|
703
|
-
// getTokenList2(footerData, moment(item.postponedate).format('YYYY-MM-DD'),item)
|
|
704
|
-
// }}
|
|
705
|
-
customStyles={{
|
|
706
|
-
triggerWrapper: {
|
|
707
|
-
borderWidth: 0,
|
|
708
|
-
justifyContent: 'flex-start',
|
|
709
|
-
alignItems: 'flex-start',
|
|
710
|
-
},
|
|
711
|
-
}}
|
|
712
|
-
>
|
|
713
|
-
<View style={{ flexDirection: 'row', justifyContent: 'flex-start' }}>
|
|
714
|
-
<View style={{ backgroundColor: item.color, borderRadius: 5, width: normalize(20), height: normalize(20), justifyContent: 'center', alignItems: 'center', margin: normalize(3) }} >
|
|
715
|
-
<Text adjustsFontSizeToFit style={{ color: '#fff', fontSize: normalize(10), fontWeight: 'bold' }}>{item.postponetoken}</Text>
|
|
716
|
-
</View>
|
|
717
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
718
|
-
<HOCIcons.FontAwesome5
|
|
719
|
-
name={'calendar-alt'}
|
|
720
|
-
size={normalize(8)}
|
|
721
|
-
color={item.color}
|
|
722
|
-
style={{
|
|
723
|
-
paddingHorizontal: normalize(3),
|
|
724
|
-
}}
|
|
725
|
-
/>
|
|
726
|
-
<Text style={{ fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>{isNU(item.postponedate) ? moment(item.postponedate).format('DD-MM-YYYY') : null}{' '}{isNU(item.postponeconsultationtime) ? item.postponeconsultationtime : null}</Text>
|
|
727
|
-
</View>
|
|
728
|
-
</View>
|
|
729
|
-
</MenuTrigger>
|
|
730
|
-
<MenuOptions
|
|
731
|
-
optionsContainerStyle={{ marginTop: normalize(50), backgroundColor: '#ffffff00' }}
|
|
732
|
-
customStyles={{
|
|
733
|
-
optionsContainer: {
|
|
734
|
-
shadowColor: '#000000d8',
|
|
735
|
-
shadowRadius: 0,
|
|
736
|
-
borderRadius: 5,
|
|
737
|
-
borderWidth: 0.5,
|
|
738
|
-
padding: normalize(5),
|
|
739
|
-
borderColor: 'lightgrey',
|
|
740
|
-
elevation: 3,
|
|
741
|
-
width: Dimensions.get('screen').width,
|
|
742
|
-
backgroundColor: 'white',
|
|
743
|
-
},
|
|
744
|
-
optionText: {},
|
|
745
|
-
}}>
|
|
746
|
-
<CTokenListOverlay
|
|
747
|
-
footerData={footerData}
|
|
748
|
-
postponedate={moment(item.postponedate).format('YYYY-MM-DD')}
|
|
749
|
-
item={item}
|
|
750
|
-
consultant={consultant}
|
|
751
|
-
callback={(val) => {
|
|
752
|
-
item.postponetoken = val.tokenno;
|
|
753
|
-
item.postponeconsultationtime = val.postponeconsultationtime;
|
|
754
|
-
setRefresh(refresh + 1);
|
|
755
|
-
}}
|
|
756
|
-
/>
|
|
757
|
-
</MenuOptions>
|
|
758
|
-
</Menu>
|
|
759
|
-
|
|
760
|
-
<View style={{
|
|
761
|
-
width: '100%',
|
|
762
|
-
marginTop: normalize(5),
|
|
763
|
-
justifyContent: 'center',
|
|
764
|
-
alignItems: 'center',
|
|
765
|
-
}}>
|
|
766
|
-
<TouchableOpacity
|
|
767
|
-
onPress={() => {
|
|
768
|
-
item.remarksoverlay = !item.remarksoverlay;
|
|
769
|
-
setRefresh(refresh + 1);
|
|
770
|
-
console.log('remarksoverlay', item.remarksoverlay);
|
|
771
|
-
}}
|
|
772
|
-
style={{ backgroundColor: 'white', elevation: 0, height: normalize(20), borderWidth: 1, borderRadius: 1, borderColor: 'lightgrey', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '95%' }}>
|
|
773
|
-
<HOCIcons.MaterialCommunityIcons
|
|
774
|
-
name={'comment'}
|
|
775
|
-
size={normalize(10)}
|
|
776
|
-
color={item.color}
|
|
777
|
-
style={{
|
|
778
|
-
paddingHorizontal: normalize(3),
|
|
779
|
-
}}
|
|
780
|
-
/>
|
|
781
|
-
<Text adjustsFontSizeToFit numberOfLines={1} style={{ paddingRight: normalize(3), fontSize: normalize(8), color: 'black', fontWeight: 'bold' }}>{isNU(item.remarks) ? item.remarks : null}</Text>
|
|
782
|
-
</TouchableOpacity>
|
|
783
|
-
{item.remarksoverlay ?
|
|
784
|
-
|
|
785
|
-
<CCommentOverlay
|
|
786
|
-
disabled={false}
|
|
787
|
-
icon={{
|
|
788
|
-
'name': 'badge-account',
|
|
789
|
-
'icongroup': 3,
|
|
790
|
-
'size': normalize(15),
|
|
791
|
-
'style': {
|
|
792
|
-
marginHorizontal: normalize(10),
|
|
793
|
-
},
|
|
794
|
-
}}
|
|
795
|
-
footericon={{
|
|
796
|
-
'name': 'select1',
|
|
797
|
-
'icongroup': 1,
|
|
798
|
-
'color': Global.AppTheme.primary_color,
|
|
799
|
-
'size': normalize(25),
|
|
800
|
-
'style': {
|
|
801
|
-
marginHorizontal: normalize(10),
|
|
802
|
-
},
|
|
803
|
-
}}
|
|
804
|
-
footerbuttontext={'Select'}
|
|
805
|
-
heading={'REMARKS'}
|
|
806
|
-
overlaystyle={{
|
|
807
|
-
borderRadius: 10,
|
|
808
|
-
height: Dimensions.get('window').height * 0.38,
|
|
809
|
-
borderWidth: 0,
|
|
810
|
-
borderColor: 'darkblue',
|
|
811
|
-
alignSelf: 'center',
|
|
812
|
-
width: Dimensions.get('screen').width * 1,
|
|
813
|
-
alignItems: 'center',
|
|
814
|
-
justifyContent: 'flex-start',
|
|
815
|
-
padding: 0,
|
|
816
|
-
backgroundColor: 'transparent',
|
|
817
|
-
position: 'absolute',
|
|
818
|
-
bottom: 0,
|
|
819
|
-
|
|
820
|
-
// position: 'absolute',
|
|
821
|
-
// bottom: 0,
|
|
822
|
-
// top: Dimensions.get('screen').height * 0.5,
|
|
823
|
-
// width: Dimensions.get('screen').width,
|
|
824
|
-
// borderRadius: 20,
|
|
825
|
-
// borderWidth: 2,
|
|
826
|
-
// borderColor: '#e0e0e0',
|
|
827
|
-
// paddingHorizontal: normalize(5),
|
|
828
|
-
}}
|
|
829
|
-
data={isNU(item.remarks) ? item.remarks : null}
|
|
830
|
-
callback={val => {
|
|
831
|
-
// console.log('callback from overlay');
|
|
832
|
-
}}
|
|
833
|
-
onsavecallback={val => {
|
|
834
|
-
console.log('onsavecallback', val);
|
|
835
|
-
item.remarks = val;
|
|
836
|
-
item.remarksoverlay = false;
|
|
837
|
-
setRefresh(refresh + 1);
|
|
838
|
-
// setCommentOverlay(false);
|
|
839
|
-
}}
|
|
840
|
-
OverlayClose={val => {
|
|
841
|
-
console.log('callback from OverlayClose');
|
|
842
|
-
item.remarksoverlay = false;
|
|
843
|
-
setRefresh(refresh + 1);
|
|
844
|
-
// setCommentOverlay(false);
|
|
845
|
-
}}
|
|
846
|
-
/>
|
|
847
|
-
: null}
|
|
848
|
-
</View>
|
|
849
|
-
</View>
|
|
850
|
-
:
|
|
851
|
-
|
|
852
|
-
<Menu>
|
|
853
|
-
<MenuTrigger
|
|
854
|
-
// onPress={()=>{
|
|
855
|
-
// getTokenList2(footerData, moment(item.postponedate).format('YYYY-MM-DD'),item)
|
|
856
|
-
// }}
|
|
857
|
-
customStyles={{
|
|
858
|
-
triggerWrapper: {
|
|
859
|
-
borderWidth: 0,
|
|
860
|
-
justifyContent: 'flex-start',
|
|
861
|
-
alignItems: 'flex-start',
|
|
862
|
-
},
|
|
863
|
-
}}
|
|
864
|
-
>
|
|
865
|
-
<View
|
|
866
|
-
// onPress={() => {
|
|
867
|
-
// // getApiPatientData2(footerData, item.postponedate)
|
|
868
|
-
// }}
|
|
869
|
-
style={{
|
|
870
|
-
borderRadius: 5,
|
|
871
|
-
borderWidth: 0.5,
|
|
872
|
-
borderColor: 'grey',
|
|
873
|
-
backgroundColor: 'white',
|
|
874
|
-
justifyContent: 'center',
|
|
875
|
-
alignItems: 'center',
|
|
876
|
-
}}>
|
|
877
|
-
<Text style={{ fontSize: normalize(10), fontWeight: 'bold', fontStyle: 'italic', color: 'black', padding: normalize(10), paddingHorizontal: normalize(15) }}>Select token</Text>
|
|
878
|
-
</View>
|
|
879
|
-
</MenuTrigger>
|
|
880
|
-
<MenuOptions
|
|
881
|
-
optionsContainerStyle={{ marginTop: normalize(50), backgroundColor: '#ffffff00' }}
|
|
882
|
-
customStyles={{
|
|
883
|
-
optionsContainer: {
|
|
884
|
-
shadowColor: '#000000d8',
|
|
885
|
-
shadowRadius: 0,
|
|
886
|
-
borderRadius: 5,
|
|
887
|
-
borderWidth: 0.5,
|
|
888
|
-
padding: normalize(5),
|
|
889
|
-
borderColor: 'lightgrey',
|
|
890
|
-
elevation: 3,
|
|
891
|
-
width: Dimensions.get('screen').width,
|
|
892
|
-
backgroundColor: 'white',
|
|
893
|
-
},
|
|
894
|
-
optionText: {},
|
|
895
|
-
}}>
|
|
896
|
-
|
|
897
|
-
<CTokenListOverlay
|
|
898
|
-
footerData={footerData}
|
|
899
|
-
postponedate={moment(item.postponedate).format('YYYY-MM-DD')}
|
|
900
|
-
item={item}
|
|
901
|
-
consultant={consultant}
|
|
902
|
-
callback={(val) => {
|
|
903
|
-
console.log('CTokenListOverlay ', JSON.stringify(val));
|
|
904
|
-
item.postponetoken = val.tokenno;
|
|
905
|
-
item.postponedate = val.postponedate;
|
|
906
|
-
item.postponeconsultationtime = val.postponeconsultationtime;
|
|
907
|
-
setRefresh(refresh + 1);
|
|
908
|
-
}}
|
|
909
|
-
/>
|
|
910
|
-
</MenuOptions>
|
|
911
|
-
</Menu>
|
|
912
|
-
}
|
|
913
|
-
</View>
|
|
914
|
-
<View style={{ width: '10%', borderWidth: 0.5, borderColor: 'grey', justifyContent: 'center', alignItems: 'center' }}>
|
|
915
|
-
<TouchableOpacity
|
|
916
|
-
onPress={() => {
|
|
917
|
-
if (item.editstatus == 'N') {
|
|
918
|
-
item.editstatus = 'Y';
|
|
919
|
-
getEditFlag();
|
|
920
|
-
}
|
|
921
|
-
else if (item.editstatus == 'Y') {
|
|
922
|
-
item.editstatus = 'N';
|
|
923
|
-
}
|
|
924
|
-
// item.editstatus = !item.editstatus;
|
|
925
|
-
setRefresh(refresh + 1);
|
|
926
|
-
}}
|
|
927
|
-
style={{}}>
|
|
928
|
-
|
|
929
|
-
<HOCIcons.Fontisto
|
|
930
|
-
name={item.editstatus == 'Y' ? 'toggle-on' : 'toggle-off'}
|
|
931
|
-
size={normalize(23)}
|
|
932
|
-
color={item.editstatus == 'Y' ? 'green' : '#646464'}
|
|
933
|
-
style={{ textAlign: 'center', borderWidth: 0 }}
|
|
934
|
-
/>
|
|
935
|
-
</TouchableOpacity>
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
</View>
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
{/* <View style={{ flexDirection: 'row', borderWidth: 0, backgroundColor: 'lightgrey', paddingHorizontal: normalize(5), borderTopLeftRadius: 5, borderTopRightRadius: 5, width: '100%' }}>
|
|
943
|
-
|
|
944
|
-
<Icons.FontAwesome5 name="user" color={"black"} size={normalize(12)} style={{ paddingHorizontal: normalize(5) }} />
|
|
945
|
-
<Text numberOfLines={1} style={{ fontSize: normalize(12), fontWeight: 'bold', color: 'black' }}>
|
|
946
|
-
{item.patientname}{', '}{item.mobilenumber}
|
|
947
|
-
</Text>
|
|
948
|
-
</View> */}
|
|
949
|
-
{/* <View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', width: '100%' }}>
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
<View style={{ flexDirection: 'row', width: '50%', borderWidth: 1 }}>
|
|
955
|
-
<View style={{ borderWidth: 0, justifyContent: 'flex-start', alignItems: 'center' }}>
|
|
956
|
-
<View style={{ width: normalize(30), backgroundColor: item.color, height: normalize(30), borderRadius: normalize(1000), alignItems: 'center', justifyContent: 'center', elevation: 5 }} >
|
|
957
|
-
<Text numberOfLines={1} style={{ color: getTimeDiffernece(item) > 30 && getTimeDiffernece(item) > 0 ? "red" : "#fff", fontSize: normalize(17), fontWeight: 'bold' }}>{item.tokenno}</Text>
|
|
958
|
-
</View>
|
|
959
|
-
|
|
960
|
-
<View style={{ borderWidth: 0, padding: normalize(4), justifyContent: 'center', alignItems: 'center' }}>
|
|
961
|
-
<Text style={{ fontWeight: 'normal', color: 'black', fontSize: normalize(6) }}>Reporting Time</Text>
|
|
962
|
-
<Text style={{ fontWeight: 'bold', color: 'black', fontSize: normalize(9) }}>{isNU(item.waitingtime) ? '08:00 AM ' : null}</Text>
|
|
963
|
-
</View>
|
|
964
|
-
</View>
|
|
965
|
-
|
|
966
|
-
<View style={{ borderWidth: 0, paddingHorizontal: normalize(5) }}>
|
|
967
|
-
|
|
968
|
-
<View style={{ borderWidth: 0 }}>
|
|
969
|
-
<SDatePickerNew
|
|
970
|
-
icon={{
|
|
971
|
-
'icongroup': 5,
|
|
972
|
-
'name': 'calendar-alt',
|
|
973
|
-
'size': normalize(15)
|
|
974
|
-
}}
|
|
975
|
-
iconstyle={{
|
|
976
|
-
color: item.color,
|
|
977
|
-
paddingHorizontal: normalize(5),
|
|
978
|
-
textAlign: 'center'
|
|
979
|
-
}}
|
|
980
|
-
textstyle={
|
|
981
|
-
{ fontSize: normalize(12), color: "black", fontWeight: 'bold' }
|
|
982
|
-
}
|
|
983
|
-
table={false}
|
|
984
|
-
data={{ itemwidth: Dimensions.get('screen').width * 0.27, displaytext: 'Consultation Date' }}
|
|
985
|
-
passingDate={null}
|
|
986
|
-
onChangeData={val =>
|
|
987
|
-
val == undefined
|
|
988
|
-
? null
|
|
989
|
-
: (console.log(moment(val).format('YYYY-MM-DD')), console.log(moment().format('LT')))}
|
|
990
|
-
refreshCount={val =>
|
|
991
|
-
val == undefined
|
|
992
|
-
? null
|
|
993
|
-
: setRefresh(refresh + val)
|
|
994
|
-
}
|
|
995
|
-
/>
|
|
996
|
-
</View>
|
|
997
|
-
<View style={{ width: Dimensions.get('screen').width * 0.27, justifyContent: 'center', alignItems: 'center', borderWidth: 0, marginTop: normalize(5) }}>
|
|
998
|
-
<STimePicker
|
|
999
|
-
pickerstyle={{
|
|
1000
|
-
borderWidth: 1,
|
|
1001
|
-
borderColor: 'lightgrey',
|
|
1002
|
-
borderRadius: 5,
|
|
1003
|
-
alignItems: 'center',
|
|
1004
|
-
justifyContent: 'flex-start',
|
|
1005
|
-
height: normalize(30),
|
|
1006
|
-
flexDirection: 'row',
|
|
1007
|
-
elevation: 3,
|
|
1008
|
-
backgroundColor: 'white',
|
|
1009
|
-
width: Dimensions.get('screen').width * 0.27
|
|
1010
|
-
}}
|
|
1011
|
-
icon={{
|
|
1012
|
-
'icongroup': 3,
|
|
1013
|
-
'name': 'clock',
|
|
1014
|
-
'size': normalize(15)
|
|
1015
|
-
}}
|
|
1016
|
-
iconstyle={{
|
|
1017
|
-
color: item.color,
|
|
1018
|
-
paddingHorizontal: normalize(5),
|
|
1019
|
-
textAlign: 'center'
|
|
1020
|
-
}}
|
|
1021
|
-
textstyle={{
|
|
1022
|
-
fontSize: normalize(12),
|
|
1023
|
-
fontWeight: 'bold',
|
|
1024
|
-
color: '#000000',
|
|
1025
|
-
alignItems: 'center',
|
|
1026
|
-
textAlign: 'center',
|
|
1027
|
-
justifyContent: 'center',
|
|
1028
|
-
}}
|
|
1029
|
-
bgcolor={'#fff'}
|
|
1030
|
-
placeholder={"Consultation Time"}
|
|
1031
|
-
height={normalize(23)}
|
|
1032
|
-
width={normalize(76)}
|
|
1033
|
-
value={item.reportingto}
|
|
1034
|
-
callBack={val => (val == undefined ? null : getSingleCT(item, val))}
|
|
1035
|
-
/>
|
|
1036
|
-
</View>
|
|
1037
|
-
</View>
|
|
1038
|
-
</View>
|
|
1039
|
-
|
|
1040
|
-
<View style={{}}>
|
|
1041
|
-
<HOCIcons.Icons
|
|
1042
|
-
icongroup={2}
|
|
1043
|
-
name={'double-arrow'}
|
|
1044
|
-
size={normalize(25)}
|
|
1045
|
-
color={'darkblue'}
|
|
1046
|
-
/>
|
|
1047
|
-
</View>
|
|
1048
|
-
|
|
1049
|
-
<TouchableOpacity style={{ width: '50%', borderWidth: 1 }}>
|
|
1050
|
-
<View style={{ borderWidth: 0, justifyContent: 'flex-start', alignItems: 'center' }}>
|
|
1051
|
-
<View style={{ width: normalize(30), backgroundColor: item.color, height: normalize(30), borderRadius: normalize(1000), alignItems: 'center', justifyContent: 'center', elevation: 5 }} >
|
|
1052
|
-
<Text numberOfLines={1} style={{ color: getTimeDiffernece(item) > 30 && getTimeDiffernece(item) > 0 ? "red" : "#fff", fontSize: normalize(17), fontWeight: 'bold' }}>{item.tokenno}</Text>
|
|
1053
|
-
</View>
|
|
1054
|
-
|
|
1055
|
-
<View style={{ borderWidth: 0, padding: normalize(4), justifyContent: 'center', alignItems: 'center' }}>
|
|
1056
|
-
<Text style={{ fontWeight: 'normal', color: 'black', fontSize: normalize(6) }}>Reporting Time</Text>
|
|
1057
|
-
<Text style={{ fontWeight: 'bold', color: 'black', fontSize: normalize(9) }}>{isNU(item.waitingtime) ? '08:00 AM ' : null}</Text>
|
|
1058
|
-
</View>
|
|
1059
|
-
</View>
|
|
1060
|
-
|
|
1061
|
-
<View style={{ borderWidth: 0, paddingHorizontal: normalize(5) }}>
|
|
1062
|
-
|
|
1063
|
-
<View style={{ borderWidth: 0 }}>
|
|
1064
|
-
<SDatePickerNew
|
|
1065
|
-
pickerstyle={{
|
|
1066
|
-
flexDirection: 'row',
|
|
1067
|
-
backgroundColor: '#fff',
|
|
1068
|
-
// width: ,
|
|
1069
|
-
borderColor: 'lightgrey',
|
|
1070
|
-
borderWidth: 1,
|
|
1071
|
-
borderRadius: 5,
|
|
1072
|
-
alignItems: 'center',
|
|
1073
|
-
height: normalize(30),
|
|
1074
|
-
elevation: 0,
|
|
1075
|
-
justifyContent: 'flex-start'
|
|
1076
|
-
}}
|
|
1077
|
-
disabled={true}
|
|
1078
|
-
icon={{
|
|
1079
|
-
'icongroup': 5,
|
|
1080
|
-
'name': 'calendar-alt',
|
|
1081
|
-
'size': normalize(15)
|
|
1082
|
-
}}
|
|
1083
|
-
iconstyle={{
|
|
1084
|
-
color: item.color,
|
|
1085
|
-
paddingHorizontal: normalize(5),
|
|
1086
|
-
textAlign: 'center'
|
|
1087
|
-
}}
|
|
1088
|
-
textstyle={{
|
|
1089
|
-
fontSize: normalize(12),
|
|
1090
|
-
color: "black",
|
|
1091
|
-
fontWeight: 'bold'
|
|
1092
|
-
}}
|
|
1093
|
-
table={false}
|
|
1094
|
-
data={{ itemwidth: Dimensions.get('screen').width * 0.27, displaytext: 'Consultation Date' }}
|
|
1095
|
-
passingDate={null}
|
|
1096
|
-
onChangeData={val =>
|
|
1097
|
-
val == undefined
|
|
1098
|
-
? null
|
|
1099
|
-
: (console.log(moment(val).format('YYYY-MM-DD')), console.log(moment().format('LT')))}
|
|
1100
|
-
refreshCount={val =>
|
|
1101
|
-
val == undefined
|
|
1102
|
-
? null
|
|
1103
|
-
: setRefresh(refresh + val)
|
|
1104
|
-
}
|
|
1105
|
-
/>
|
|
1106
|
-
</View>
|
|
1107
|
-
<View style={{ width: Dimensions.get('screen').width * 0.27, justifyContent: 'center', alignItems: 'center', borderWidth: 0, marginTop: normalize(5) }}>
|
|
1108
|
-
<STimePicker
|
|
1109
|
-
disabled={true}
|
|
1110
|
-
pickerstyle={{
|
|
1111
|
-
borderWidth: 1,
|
|
1112
|
-
borderColor: 'lightgrey',
|
|
1113
|
-
borderRadius: 5,
|
|
1114
|
-
alignItems: 'center',
|
|
1115
|
-
justifyContent: 'flex-start',
|
|
1116
|
-
height: normalize(30),
|
|
1117
|
-
flexDirection: 'row',
|
|
1118
|
-
// elevation: 3,
|
|
1119
|
-
backgroundColor: 'white',
|
|
1120
|
-
width: Dimensions.get('screen').width * 0.27
|
|
1121
|
-
}}
|
|
1122
|
-
icon={{
|
|
1123
|
-
'icongroup': 3,
|
|
1124
|
-
'name': 'clock',
|
|
1125
|
-
'size': normalize(15)
|
|
1126
|
-
}}
|
|
1127
|
-
iconstyle={{
|
|
1128
|
-
color: item.color,
|
|
1129
|
-
paddingHorizontal: normalize(5),
|
|
1130
|
-
textAlign: 'center'
|
|
1131
|
-
}}
|
|
1132
|
-
textstyle={{
|
|
1133
|
-
fontSize: normalize(12),
|
|
1134
|
-
fontWeight: 'bold',
|
|
1135
|
-
color: '#000000',
|
|
1136
|
-
alignItems: 'center',
|
|
1137
|
-
textAlign: 'center',
|
|
1138
|
-
justifyContent: 'center',
|
|
1139
|
-
}}
|
|
1140
|
-
bgcolor={'#fff'}
|
|
1141
|
-
placeholder={"Consultation Time"}
|
|
1142
|
-
height={normalize(23)}
|
|
1143
|
-
width={normalize(76)}
|
|
1144
|
-
value={item.reportingto}
|
|
1145
|
-
callBack={val => (val == undefined ? null : getSingleCT(item, val))}
|
|
1146
|
-
/>
|
|
1147
|
-
</View>
|
|
1148
|
-
</View>
|
|
1149
|
-
</TouchableOpacity>
|
|
1150
|
-
|
|
1151
|
-
</View> */}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
{/* <TextInput
|
|
1155
|
-
style={{
|
|
1156
|
-
borderWidth: 1,
|
|
1157
|
-
backgroundColor: 'white',
|
|
1158
|
-
borderColor: 'lightgrey',
|
|
1159
|
-
elevation: 3,
|
|
1160
|
-
borderRadius: 5,
|
|
1161
|
-
fontWeight: 'bold',
|
|
1162
|
-
color: 'black',
|
|
1163
|
-
width: Dimensions.get('screen').width * 0.4,
|
|
1164
|
-
paddingTop: 5,
|
|
1165
|
-
paddingBottom: 5,
|
|
1166
|
-
height: Dimensions.get('screen').height * 0.035,
|
|
1167
|
-
textAlign: 'center',
|
|
1168
|
-
marginTop: normalize(5),
|
|
1169
|
-
marginHorizontal: normalize(2)
|
|
1170
|
-
}}
|
|
1171
|
-
keyboardType={'default'}
|
|
1172
|
-
placeholder='Remarks'
|
|
1173
|
-
onChangeText={val => { item.remarks = val, item.EditFlag = 2 }}>
|
|
1174
|
-
{item.remarks}
|
|
1175
|
-
</TextInput> */}
|
|
1176
|
-
</View>
|
|
1177
|
-
);
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
function getDateData(params) {
|
|
1181
|
-
|
|
1182
|
-
setEdit(false);
|
|
1183
|
-
props.editFlag(false);
|
|
1184
|
-
data.forEach((item) => {
|
|
1185
|
-
item.selected = false;
|
|
1186
|
-
});
|
|
1187
|
-
params.selected = true;
|
|
1188
|
-
params.daywisedata = [];
|
|
1189
|
-
// getApiPatientData(params)
|
|
1190
|
-
|
|
1191
|
-
setRefresh(refresh + 1);
|
|
1192
|
-
setFooterData(params);
|
|
1193
|
-
let samplepostponedate = params.date + 'T09:00:00.000Z';
|
|
1194
|
-
let convertedpostponedate = moment(samplepostponedate).add(1, 'days');
|
|
1195
|
-
let samplepostponedateformat = moment(convertedpostponedate).format('YYYY-MM-DD');
|
|
1196
|
-
console.log('samplepostponedateformat', params.date, samplepostponedateformat);
|
|
1197
|
-
setPostponeDate(samplepostponedateformat);
|
|
1198
|
-
// setPostponeDate(params.date)
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
function getEditFlag() {
|
|
1202
|
-
props.editFlag(true);
|
|
1203
|
-
setEdit(true);
|
|
1204
|
-
setRefresh(refresh + 1);
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
function renderItem({ item }) {
|
|
1208
|
-
|
|
1209
|
-
return (
|
|
1210
|
-
<TouchableOpacity style={{
|
|
1211
|
-
width: dividedWidth,
|
|
1212
|
-
alignItems: 'center',
|
|
1213
|
-
paddingTop: 5,
|
|
1214
|
-
borderWidth: 0.5,
|
|
1215
|
-
backgroundColor: item.selected ? '#acbeff' : isBNUL(item.data) ? '#f4fcf7' : '#fff',
|
|
1216
|
-
}}
|
|
1217
|
-
disabled={false}
|
|
1218
|
-
onPress={() => item.data != undefined && item.data.length > 0 ? getDateData(item) : notifyMessage('No data found', 3)}
|
|
1219
|
-
>
|
|
1220
|
-
<View style={{
|
|
1221
|
-
alignItems: 'center', justifyContent: 'center',
|
|
1222
|
-
}}>
|
|
1223
|
-
<Text style={{
|
|
1224
|
-
color: item.data != undefined && item.data.length > 0 ? 'green' : '#b6b5b7', fontSize: normalize(20), fontWeight: 'bold', textShadowColor: '#b6b5b7',
|
|
1225
|
-
textShadowOffset: { width: -1, height: 1 },
|
|
1226
|
-
textShadowRadius: 3,
|
|
1227
|
-
}}>{item.displaytext == 0 ? '' : item.displaytext}</Text>
|
|
1228
|
-
</View>
|
|
1229
|
-
|
|
1230
|
-
<View style={{
|
|
1231
|
-
flexDirection: 'row',
|
|
1232
|
-
width: '100%',
|
|
1233
|
-
flex: 1,
|
|
1234
|
-
alignItems: 'center',
|
|
1235
|
-
justifyContent: 'space-between',
|
|
1236
|
-
flexWrap: 'wrap',
|
|
1237
|
-
paddingHorizontal: 1,
|
|
1238
|
-
paddingTop: normalize(2),
|
|
1239
|
-
paddingBottom: normalize(5),
|
|
1240
|
-
}}>
|
|
1241
|
-
{item.data != undefined ? item.data.map((subArray, h) => {
|
|
1242
|
-
return (
|
|
1243
|
-
<View
|
|
1244
|
-
key={h}
|
|
1245
|
-
style={{
|
|
1246
|
-
width: normalize(22),
|
|
1247
|
-
borderRadius: 5,
|
|
1248
|
-
justifyContent: 'center',
|
|
1249
|
-
alignItems: 'center',
|
|
1250
|
-
marginBottom: 1,
|
|
1251
|
-
marginTop: normalize(5),
|
|
1252
|
-
backgroundColor: '#fff',
|
|
1253
|
-
borderWidth: 0.7,
|
|
1254
|
-
borderColor: subArray.color,
|
|
1255
|
-
}}
|
|
1256
|
-
>
|
|
1257
|
-
<Text adjustsFontSizeToFit style={{ fontSize: normalize(12), color: subArray.color }}>{subArray.value}</Text>
|
|
1258
|
-
</View>
|
|
1259
|
-
);
|
|
1260
|
-
}) : null}
|
|
1261
|
-
</View>
|
|
1262
|
-
|
|
1263
|
-
</TouchableOpacity>
|
|
1264
|
-
);
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
function getConsultation(consultant, year, month) {
|
|
1268
|
-
|
|
1269
|
-
setConsultant(consultant);
|
|
1270
|
-
var monthReal = month + 1;
|
|
1271
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhococonsultationtokendate ' + consultant + ',' + year + ',' + monthReal;
|
|
1272
|
-
console.log('getConsultation', JSON.stringify(buttonapi));
|
|
1273
|
-
// let buttonapi = "http://111.92.109.30:8090/emr/emrcommonget/rnhococonsultationhistoryemr 7,2023,10"
|
|
1274
|
-
setIsLoading(true);
|
|
1275
|
-
setData();
|
|
1276
|
-
setFooterData();
|
|
1277
|
-
setPostponeDate();
|
|
1278
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
1279
|
-
.then(function (response) {
|
|
1280
|
-
if (response.httpstatus == 200 && response.data != null && response.data != undefined) {
|
|
1281
|
-
setIsLoading(false);
|
|
1282
|
-
setData(response.data.monthdata);
|
|
1283
|
-
}
|
|
1284
|
-
else {
|
|
1285
|
-
setIsLoading(false);
|
|
1286
|
-
notifyMessage('Booking not available,Please try again later', 2);
|
|
1287
|
-
}
|
|
1288
|
-
});
|
|
1289
|
-
|
|
1290
|
-
// getLoading(v => setIsLoading(false))
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
function getApiPatientData2(footerdata, pdate, bookingtype) {
|
|
1294
|
-
|
|
1295
|
-
setIsLoading(true);
|
|
1296
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientbookingpostponedetails ' + consultant + ',' + JSON.stringify(footerdata.date) + ',' + '"' + pdate + '"' + ',' + bookingtype + ',' + '0';
|
|
1297
|
-
console.log('getApiPatientData2', buttonapi);
|
|
1298
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
1299
|
-
.then(function (response) {
|
|
1300
|
-
if (response.httpstatus == 200) {
|
|
1301
|
-
footerdata.daywisedata = response.data;
|
|
1302
|
-
flatlistRef.current.scrollToEnd({ animating: true });
|
|
1303
|
-
setIsLoading(false);
|
|
1304
|
-
}
|
|
1305
|
-
else {
|
|
1306
|
-
setIsLoading(false);
|
|
1307
|
-
notifyMessage('Day wise data not available.', 4);
|
|
1308
|
-
}
|
|
1309
|
-
});
|
|
1310
|
-
getLoading(v => setIsLoading(false));
|
|
1311
|
-
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
function getTokenList(footerdata, pdate, item) {
|
|
1315
|
-
|
|
1316
|
-
console.log('getTokenList itemmmmm', item);
|
|
1317
|
-
item.postponetoken = null;
|
|
1318
|
-
item.postponeconsultationtime = null;
|
|
1319
|
-
setIsLoading(true);
|
|
1320
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientbookingpostponedetails ' + consultant + ',' + JSON.stringify(footerdata.date) + ',' + '"' + pdate + '"' + ',' + item.bookingtypes + ',' + '1';
|
|
1321
|
-
console.log('getTokenList', buttonapi);
|
|
1322
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
1323
|
-
.then(function (response) {
|
|
1324
|
-
if (response.httpstatus == 200) {
|
|
1325
|
-
if (isNU(response.data) && isBNUL(response.data.tokenArr)) {
|
|
1326
|
-
item.postponetoken = response.data.tokenArr[0].tokenno;
|
|
1327
|
-
item.postponeconsultationtime = response.data.tokenArr[0].postponeconsultationtime;
|
|
1328
|
-
console.log('getTokenList', JSON.stringify(response.data.tokenArr[0]));
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
setIsLoading(false);
|
|
1332
|
-
}
|
|
1333
|
-
else {
|
|
1334
|
-
setIsLoading(false);
|
|
1335
|
-
notifyMessage('Day wise data not available.', 4);
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
getLoading(v => setIsLoading(false));
|
|
1339
|
-
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
function getTokenList2(footerdata, pdate, item) {
|
|
1343
|
-
|
|
1344
|
-
console.log('getTokenList2 itemmmmm', item);
|
|
1345
|
-
|
|
1346
|
-
setIsLoading(true);
|
|
1347
|
-
let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientbookingpostponedetails ' + consultant + ',' + JSON.stringify(footerdata.date) + ',' + '"' + pdate + '"' + ',' + item.bookingtypes + ',' + '1';
|
|
1348
|
-
console.log('getTokenList2', buttonapi);
|
|
1349
|
-
NetworkServiceCall('get', buttonapi, '')
|
|
1350
|
-
.then(function (response) {
|
|
1351
|
-
if (response.httpstatus == 200) {
|
|
1352
|
-
if (isNU(response.data) && isBNUL(response.data.tokenArr)) {
|
|
1353
|
-
|
|
1354
|
-
console.log('getTokenList2', JSON.stringify(response.data.tokenArr[0]));
|
|
1355
|
-
console.log('ggggggg');
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
// setIsLoading(false);
|
|
1359
|
-
}
|
|
1360
|
-
else {
|
|
1361
|
-
setIsLoading(false);
|
|
1362
|
-
notifyMessage('Day wise data not available.', 4);
|
|
1363
|
-
}
|
|
1364
|
-
});
|
|
1365
|
-
// getLoading(v => setIsLoading(false))
|
|
1366
|
-
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
// function getApiPatientData(data) {
|
|
1370
|
-
// setIsLoading(true)
|
|
1371
|
-
// let buttonapi = APIURL + 'emr/emrcommonget/rnhopaptientconsultationtokens ' + consultant + "," + JSON.stringify(data.date)
|
|
1372
|
-
// console.log("Butttonnnnnnnn apiiiiiiiiiiiiiiiiii CBooking", buttonapi)
|
|
1373
|
-
// NetworkServiceCall("get", buttonapi, "")
|
|
1374
|
-
// .then(function (response) {
|
|
1375
|
-
// // response = {
|
|
1376
|
-
// // "success": true,
|
|
1377
|
-
// // "httpstatus": 200,
|
|
1378
|
-
// // "message": "SUCCESS",
|
|
1379
|
-
// // "data": {
|
|
1380
|
-
// // "title": "token allocations",
|
|
1381
|
-
// // "tokensArray": [
|
|
1382
|
-
// // {
|
|
1383
|
-
// // "keyid": 1,
|
|
1384
|
-
// // "tokentype": "Morning",
|
|
1385
|
-
// // "disabletokens": false,
|
|
1386
|
-
// // "iconname": "sun",
|
|
1387
|
-
// // "reportingtime": "10:35 AM",
|
|
1388
|
-
// // "reportingto": "01:00 PM",
|
|
1389
|
-
// // "tokenArr": [
|
|
1390
|
-
// // {
|
|
1391
|
-
// // "tokenno": 1,
|
|
1392
|
-
// // "bookingtypes": "P",
|
|
1393
|
-
// // "mrngorevng": 1,
|
|
1394
|
-
// // "disabledtoken": false,
|
|
1395
|
-
// // "bookedstatus": true,
|
|
1396
|
-
// // "bookingdate": "2023-10-10",
|
|
1397
|
-
// // "reportingto": "10:35 AM",
|
|
1398
|
-
// // "reportingtime": "10:30 AM",
|
|
1399
|
-
// // "duration": 0,
|
|
1400
|
-
// // "bookingtypename": "PHONE",
|
|
1401
|
-
// // "patientname": "Albert Paul",
|
|
1402
|
-
// // "mobilenumber": "7338483582",
|
|
1403
|
-
// // "totalamount": 30,
|
|
1404
|
-
// // "canceltokenno": 0,
|
|
1405
|
-
// // "paidstatus": true,
|
|
1406
|
-
// // "hopapatient": 0,
|
|
1407
|
-
// // "patientid": 0,
|
|
1408
|
-
// // "remarks": ""
|
|
1409
|
-
// // },
|
|
1410
|
-
// // {
|
|
1411
|
-
// // "tokenno": 2,
|
|
1412
|
-
// // "bookingtypes": "P",
|
|
1413
|
-
// // "mrngorevng": 1,
|
|
1414
|
-
// // "disabledtoken": false,
|
|
1415
|
-
// // "bookedstatus": false,
|
|
1416
|
-
// // "bookingdate": "2023-10-10",
|
|
1417
|
-
// // "reportingto": "10:35 AM",
|
|
1418
|
-
// // "reportingtime": "10:30 AM",
|
|
1419
|
-
// // "duration": 0,
|
|
1420
|
-
// // "bookingtypename": "PHONE",
|
|
1421
|
-
// // "patientname": "",
|
|
1422
|
-
// // "mobilenumber": "",
|
|
1423
|
-
// // "totalamount": 30,
|
|
1424
|
-
// // "canceltokenno": 0,
|
|
1425
|
-
// // "paidstatus": true,
|
|
1426
|
-
// // "hopapatient": 0,
|
|
1427
|
-
// // "patientid": 0,
|
|
1428
|
-
// // "remarks": ""
|
|
1429
|
-
// // },
|
|
1430
|
-
// // {
|
|
1431
|
-
// // "tokenno": 3,
|
|
1432
|
-
// // "bookingtypes": "P",
|
|
1433
|
-
// // "mrngorevng": 1,
|
|
1434
|
-
// // "disabledtoken": false,
|
|
1435
|
-
// // "bookedstatus": true,
|
|
1436
|
-
// // "bookingdate": "2023-10-10",
|
|
1437
|
-
// // "reportingto": "10:35 AM",
|
|
1438
|
-
// // "reportingtime": "10:30 AM",
|
|
1439
|
-
// // "duration": 0,
|
|
1440
|
-
// // "bookingtypename": "PHONE",
|
|
1441
|
-
// // "patientname": "Mathew",
|
|
1442
|
-
// // "mobilenumber": "",
|
|
1443
|
-
// // "totalamount": 30,
|
|
1444
|
-
// // "canceltokenno": 0,
|
|
1445
|
-
// // "paidstatus": true,
|
|
1446
|
-
// // "hopapatient": 0,
|
|
1447
|
-
// // "patientid": 0,
|
|
1448
|
-
// // "remarks": ""
|
|
1449
|
-
// // },
|
|
1450
|
-
// // {
|
|
1451
|
-
// // "tokenno": 4,
|
|
1452
|
-
// // "bookingtypes": "P",
|
|
1453
|
-
// // "mrngorevng": 1,
|
|
1454
|
-
// // "disabledtoken": false,
|
|
1455
|
-
// // "bookedstatus": false,
|
|
1456
|
-
// // "bookingdate": "2023-10-10",
|
|
1457
|
-
// // "reportingto": "10:35 AM",
|
|
1458
|
-
// // "reportingtime": "10:30 AM",
|
|
1459
|
-
// // "duration": 0,
|
|
1460
|
-
// // "bookingtypename": "PHONE",
|
|
1461
|
-
// // "patientname": "",
|
|
1462
|
-
// // "mobilenumber": "",
|
|
1463
|
-
// // "totalamount": 30,
|
|
1464
|
-
// // "canceltokenno": 0,
|
|
1465
|
-
// // "paidstatus": true,
|
|
1466
|
-
// // "hopapatient": 0,
|
|
1467
|
-
// // "patientid": 0,
|
|
1468
|
-
// // "remarks": ""
|
|
1469
|
-
// // },
|
|
1470
|
-
// // {
|
|
1471
|
-
// // "tokenno": 6,
|
|
1472
|
-
// // "bookingtypes": "P",
|
|
1473
|
-
// // "mrngorevng": 1,
|
|
1474
|
-
// // "disabledtoken": false,
|
|
1475
|
-
// // "bookedstatus": false,
|
|
1476
|
-
// // "bookingdate": "2023-10-10",
|
|
1477
|
-
// // "reportingto": "10:35 AM",
|
|
1478
|
-
// // "reportingtime": "10:30 AM",
|
|
1479
|
-
// // "duration": 0,
|
|
1480
|
-
// // "bookingtypename": "PHONE",
|
|
1481
|
-
// // "patientname": "",
|
|
1482
|
-
// // "mobilenumber": "",
|
|
1483
|
-
// // "totalamount": 30,
|
|
1484
|
-
// // "canceltokenno": 0,
|
|
1485
|
-
// // "paidstatus": true,
|
|
1486
|
-
// // "hopapatient": 0,
|
|
1487
|
-
// // "patientid": 0,
|
|
1488
|
-
// // "remarks": ""
|
|
1489
|
-
// // }
|
|
1490
|
-
// // ]
|
|
1491
|
-
// // },
|
|
1492
|
-
// // {
|
|
1493
|
-
// // "keyid": 1,
|
|
1494
|
-
// // "tokentype": "Evening",
|
|
1495
|
-
// // "disabletokens": false,
|
|
1496
|
-
// // "iconname": "moon",
|
|
1497
|
-
// // "reportingtime": "02:30 PM",
|
|
1498
|
-
// // "reportingto": "06:30 PM",
|
|
1499
|
-
// // "tokenArr": [
|
|
1500
|
-
// // {
|
|
1501
|
-
// // "tokenno": 1,
|
|
1502
|
-
// // "bookingtypes": "P",
|
|
1503
|
-
// // "mrngorevng": 0,
|
|
1504
|
-
// // "disabledtoken": true,
|
|
1505
|
-
// // "bookedstatus": false,
|
|
1506
|
-
// // "bookingdate": "2023-10-10",
|
|
1507
|
-
// // "reportingtime": "02:30 PM",
|
|
1508
|
-
// // "reportingto": "06:30 PM",
|
|
1509
|
-
// // "duration": 0,
|
|
1510
|
-
// // "bookingtypename": "PHONE",
|
|
1511
|
-
// // "patientname": "",
|
|
1512
|
-
// // "mobilenumber": "",
|
|
1513
|
-
// // "totalamount": 30,
|
|
1514
|
-
// // "canceltokenno": 0,
|
|
1515
|
-
// // "paidstatus": true,
|
|
1516
|
-
// // "hopapatient": 0,
|
|
1517
|
-
// // "patientid": 0,
|
|
1518
|
-
// // "remarks": ""
|
|
1519
|
-
// // }
|
|
1520
|
-
// // ]
|
|
1521
|
-
// // }
|
|
1522
|
-
// // ]
|
|
1523
|
-
// // }
|
|
1524
|
-
// // }
|
|
1525
|
-
// if (response.httpstatus == 200) {
|
|
1526
|
-
// data.daywisedata = response.data
|
|
1527
|
-
// flatlistRef.current.scrollToEnd({ animating: true });
|
|
1528
|
-
// setIsLoading(false)
|
|
1529
|
-
// }
|
|
1530
|
-
// else {
|
|
1531
|
-
// setIsLoading(false)
|
|
1532
|
-
// notifyMessage("Day wise data not available.", 4)
|
|
1533
|
-
// }
|
|
1534
|
-
// })
|
|
1535
|
-
// getLoading(v => setIsLoading(false))
|
|
1536
|
-
|
|
1537
|
-
// }
|
|
1538
|
-
|
|
1539
|
-
function IncrementMonth() {
|
|
1540
|
-
|
|
1541
|
-
setFooterData(null);
|
|
1542
|
-
setPostponeDate();
|
|
1543
|
-
if (monthinno != 11) {
|
|
1544
|
-
// if (monthinno != d.getMonth()) {
|
|
1545
|
-
if (monthinno < 11) {
|
|
1546
|
-
setMonthInNo(monthinno + 1);
|
|
1547
|
-
} else {
|
|
1548
|
-
setYear(year + 1);
|
|
1549
|
-
setMonthInNo(0);
|
|
1550
|
-
}
|
|
1551
|
-
getConsultation(consultant, year, monthinno + 1);
|
|
1552
|
-
// }
|
|
1553
|
-
} else {
|
|
1554
|
-
setMonthInNo(0);
|
|
1555
|
-
setYear(year + 1);
|
|
1556
|
-
getConsultation(consultant, year + 1, 0);
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
function DecrementMonth() {
|
|
1561
|
-
|
|
1562
|
-
if (monthinno != 0) {
|
|
1563
|
-
if ((monthinno - 1 >= d.getMonth())) {
|
|
1564
|
-
setFooterData(null);
|
|
1565
|
-
setPostponeDate();
|
|
1566
|
-
if (monthinno > 0) {
|
|
1567
|
-
setMonthInNo(monthinno - 1);
|
|
1568
|
-
} else {
|
|
1569
|
-
setYear(year - 1);
|
|
1570
|
-
setMonthInNo(11);
|
|
1571
|
-
}
|
|
1572
|
-
getConsultation(consultant, year, monthinno - 1);
|
|
1573
|
-
}
|
|
1574
|
-
} else {
|
|
1575
|
-
setYear(year - 1);
|
|
1576
|
-
setMonthInNo(11);
|
|
1577
|
-
getConsultation(consultant, year - 1, 11);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
return (
|
|
1582
|
-
<View style={{ flex: 1, marginTop: normalize(-2) }}>
|
|
1583
|
-
{/* <HHeading
|
|
1584
|
-
styles={{
|
|
1585
|
-
"iconname": 'user-md',
|
|
1586
|
-
"bgcolor": "#f2efef",
|
|
1587
|
-
"iconsize": 16,
|
|
1588
|
-
"iconcolor": Global.AppTheme.primary_color,
|
|
1589
|
-
"displaytext": "BOOKING POSTPONE",
|
|
1590
|
-
"textsize": 14,
|
|
1591
|
-
"textcolor": Global.AppTheme.primary_color
|
|
1592
|
-
}}
|
|
1593
|
-
callBack={val => (val == undefined ? null : console.log(val))}>
|
|
1594
|
-
</HHeading> */}
|
|
1595
|
-
|
|
1596
|
-
<View
|
|
1597
|
-
// onPress={() => { }}
|
|
1598
|
-
style={{
|
|
1599
|
-
backgroundColor: '#f2efef',
|
|
1600
|
-
paddingVertical: 3,
|
|
1601
|
-
paddingHorizontal: 6,
|
|
1602
|
-
marginTop: 3,
|
|
1603
|
-
marginBottom: 2,
|
|
1604
|
-
display: 'flex',
|
|
1605
|
-
flexDirection: 'row',
|
|
1606
|
-
alignItems: 'center',
|
|
1607
|
-
justifyContent: 'center',
|
|
1608
|
-
borderTopLeftRadius: 20,
|
|
1609
|
-
borderTopRightRadius: 20,
|
|
1610
|
-
|
|
1611
|
-
}}>
|
|
1612
|
-
<TouchableOpacity onPress={() => { }}
|
|
1613
|
-
disabled={true}
|
|
1614
|
-
style={{
|
|
1615
|
-
width: normalize(20),
|
|
1616
|
-
alignItems: 'center',
|
|
1617
|
-
marginRight: 5,
|
|
1618
|
-
}}>
|
|
1619
|
-
<FontAwesome5 name={'user-md'} color={Global.AppTheme.primary_color}
|
|
1620
|
-
size={normalize(16)}
|
|
1621
|
-
/>
|
|
1622
|
-
</TouchableOpacity>
|
|
1623
|
-
<CText
|
|
1624
|
-
style={{
|
|
1625
|
-
textShadowRadius: 2,
|
|
1626
|
-
fontSize: normalize(14),
|
|
1627
|
-
fontWeight: 'bold',
|
|
1628
|
-
color: Global.AppTheme.primary_color,
|
|
1629
|
-
flex: 1,
|
|
1630
|
-
}}>
|
|
1631
|
-
{'BOOKING POSTPONE'}
|
|
1632
|
-
</CText>
|
|
1633
|
-
<TouchableOpacity
|
|
1634
|
-
onPress={() => {
|
|
1635
|
-
navigation.navigate('CPostpone');
|
|
1636
|
-
}}
|
|
1637
|
-
style={{
|
|
1638
|
-
borderWidth: 0,
|
|
1639
|
-
justifyContent: 'center',
|
|
1640
|
-
alignItems: 'center',
|
|
1641
|
-
}}>
|
|
1642
|
-
<HOCIcons.MaterialCommunityIcons
|
|
1643
|
-
name={'grid'}
|
|
1644
|
-
color={Global.AppTheme.primary_color}
|
|
1645
|
-
size={normalize(25)}
|
|
1646
|
-
/>
|
|
1647
|
-
<Text style={{
|
|
1648
|
-
color: Global.AppTheme.primary_color,
|
|
1649
|
-
fontSize: normalize(7),
|
|
1650
|
-
fontWeight: 'bold',
|
|
1651
|
-
textAlign: 'center',
|
|
1652
|
-
}}>
|
|
1653
|
-
{'Postpone Summary'}
|
|
1654
|
-
</Text>
|
|
1655
|
-
</TouchableOpacity>
|
|
1656
|
-
</View>
|
|
1657
|
-
|
|
1658
|
-
{isLoading ?
|
|
1659
|
-
<Loader displaytext={true} /> : null}
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
{Global.userData.hosuconsultant == 0 ?
|
|
1663
|
-
<View style={{ paddingHorizontal: normalize(8), marginBottom: normalize(2) }}>
|
|
1664
|
-
<Text style={{ fontSize: normalize(8), paddingHorizontal: 5 }}>Consultant :</Text>
|
|
1665
|
-
<SDropDownNew
|
|
1666
|
-
dropdownapi={'emr/emrcommonget/exec rndddwdropdownselect 1'}
|
|
1667
|
-
dropdowndata={ValueCheck(Global.userData.hosuconsultant) &&
|
|
1668
|
-
Global.userData.hosuconsultant > 0 ? Global.userData.username : ''}
|
|
1669
|
-
onChangeData={val =>
|
|
1670
|
-
val == undefined ? null : getConsultation(val.datavalue, year, monthinno)}
|
|
1671
|
-
editable={true}
|
|
1672
|
-
widthArr={Dimensions.get('screen').width * 0.96}
|
|
1673
|
-
iconName={'user-md'}
|
|
1674
|
-
refreshCount={val =>
|
|
1675
|
-
val == undefined ? null : console.log('Refresh')
|
|
1676
|
-
}
|
|
1677
|
-
/>
|
|
1678
|
-
</View> : null}
|
|
1679
|
-
|
|
1680
|
-
<View style={{ backgroundColor: 'transparent' }}>
|
|
1681
|
-
<View style={{ flexDirection: 'row', alignSelf: 'center', alignItems: 'center', justifyContent: 'space-between', width: '50%' }}>
|
|
1682
|
-
<FontAwesome5 name="arrow-left" color="black" size={normalize(15)}
|
|
1683
|
-
onPress={() => DecrementMonth()}
|
|
1684
|
-
/>
|
|
1685
|
-
<Text style={{ fontSize: normalize(14), color: 'black', paddingHorizontal: 10 }}>{monthName} {year}</Text>
|
|
1686
|
-
<FontAwesome5 name="arrow-right" color="black" size={normalize(15)} onPress={() => IncrementMonth()} />
|
|
1687
|
-
</View>
|
|
1688
|
-
</View>
|
|
1689
|
-
<View style={{ flexDirection: 'row', height: normalize(20), alignItems: 'center', justifyContent: 'center' }}>
|
|
1690
|
-
{['Sun', 'Mon', 'Tue', 'Wed', 'Thr', 'Fri', 'Sat'].map((week, i) => {
|
|
1691
|
-
return (
|
|
1692
|
-
<View key={i} style={{ width: dividedWidth, alignItems: 'center', borderWidth: 0.5 }}>
|
|
1693
|
-
<Text style={{ fontSize: normalize(12), fontWeight: 'bold', color: i == 0 ? 'red' : 'black' }}>{week}</Text>
|
|
1694
|
-
</View>);
|
|
1695
|
-
})}
|
|
1696
|
-
</View>
|
|
1697
|
-
<FlatList
|
|
1698
|
-
ref={flatlistRef}
|
|
1699
|
-
data={data}
|
|
1700
|
-
style={{ width: '100%' }}
|
|
1701
|
-
renderItem={(k) => renderItem(k)}
|
|
1702
|
-
refreshControl={
|
|
1703
|
-
<RefreshControl
|
|
1704
|
-
refreshing={pulltorefresh}
|
|
1705
|
-
size={'large'}
|
|
1706
|
-
tintColor={'blue'}
|
|
1707
|
-
colors={['red', 'green', 'cyan', 'black']}
|
|
1708
|
-
progressBackgroundColor={'white'}
|
|
1709
|
-
onRefresh={() => getConsultation(consultant, year, monthinno)} />}
|
|
1710
|
-
keyExtractor={(item) => item.displaytext}
|
|
1711
|
-
numColumns={7}
|
|
1712
|
-
ListFooterComponent={() => footerComponent()}
|
|
1713
|
-
ListFooterComponentStyle={{ width: width }}
|
|
1714
|
-
/>
|
|
1715
|
-
<View style={{
|
|
1716
|
-
// position: 'absolute',
|
|
1717
|
-
flexDirection: 'row',
|
|
1718
|
-
borderTopColor: '#c9c7c7',
|
|
1719
|
-
borderTopWidth: 2,
|
|
1720
|
-
alignItems: 'center',
|
|
1721
|
-
justifyContent: 'space-between',
|
|
1722
|
-
paddingHorizontal: 10,
|
|
1723
|
-
bottom: 0,
|
|
1724
|
-
paddingVertical: 5,
|
|
1725
|
-
width: '100%',
|
|
1726
|
-
backgroundColor: '#fff',
|
|
1727
|
-
}}>
|
|
1728
|
-
{[
|
|
1729
|
-
{
|
|
1730
|
-
'icongroup':4,
|
|
1731
|
-
'displaytext': 'Save',
|
|
1732
|
-
'size': 10,
|
|
1733
|
-
'iconname': 'save',
|
|
1734
|
-
'iconcolor': Global.AppTheme.primary_color,
|
|
1735
|
-
'fontcolor': Global.AppTheme.primary_color,
|
|
1736
|
-
'shadowcolor': '#fff',
|
|
1737
|
-
'selected': false,
|
|
1738
|
-
'visibility': edit ? true : false,
|
|
1739
|
-
'iconsize': 20,
|
|
1740
|
-
'functionid': 'CB01',
|
|
1741
|
-
'iconsize': 20,
|
|
1742
|
-
'functionid': 'CB01',
|
|
1743
|
-
'componentname': 'SetUpVitalSign',
|
|
1744
|
-
},
|
|
1745
|
-
{
|
|
1746
|
-
'icongroup':4,
|
|
1747
|
-
'displaytext': 'Monthly',
|
|
1748
|
-
'iconname': 'calendar-check-o',
|
|
1749
|
-
'stage': 1,
|
|
1750
|
-
'visibility': true,
|
|
1751
|
-
'functionid': 'CB04',
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
'icongroup':4,
|
|
1755
|
-
'iconname': 'stack-overflow',
|
|
1756
|
-
'displaytext': 'Tokens',
|
|
1757
|
-
'stage': 2,
|
|
1758
|
-
'visibility': true,
|
|
1759
|
-
'functionid': 'CB03',
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
'icongroup':4,
|
|
1763
|
-
'iconname': 'user-md',
|
|
1764
|
-
'displaytext': 'Booking',
|
|
1765
|
-
'stage': 2,
|
|
1766
|
-
'visibility': true,
|
|
1767
|
-
'selected': true,
|
|
1768
|
-
'functionid': 'CB05',
|
|
1769
|
-
},
|
|
1770
|
-
{
|
|
1771
|
-
'icongroup':4,
|
|
1772
|
-
'iconname': 'exchange',
|
|
1773
|
-
'displaytext': 'Postpone',
|
|
1774
|
-
'stage': 5,
|
|
1775
|
-
'visibility': true,
|
|
1776
|
-
'selected': true,
|
|
1777
|
-
'functionid': 'CB06',
|
|
1778
|
-
},
|
|
1779
|
-
// {
|
|
1780
|
-
// "icongroup":4,
|
|
1781
|
-
// "displaytext": "Report", "size": 10, "iconname": "file-pdf-o", "iconcolor": Global.AppTheme.primary_color,
|
|
1782
|
-
// "fontcolor": Global.AppTheme.primary_color, "shadowcolor": '#fff', "selected": false, "visibility": true, "iconsize": 20, "functionid": "CB02",
|
|
1783
|
-
// }
|
|
1784
|
-
].map((item, i) => {
|
|
1785
|
-
return (
|
|
1786
|
-
item.visibility ?
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
// <TouchableOpacity key={i} style={{ alignItems: 'center' }}
|
|
1790
|
-
// onPress={() => getFooterIconsFunctions(item)}>
|
|
1791
|
-
// <Icons.FontAwesome
|
|
1792
|
-
// name={item.iconname}
|
|
1793
|
-
// color={item.displaytext == "Booking Postpone" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black"}
|
|
1794
|
-
// size={normalize(20)}
|
|
1795
|
-
// />
|
|
1796
|
-
// <Text style={{ color: item.displaytext == "Booking Postpone" ? "#db04ac" : item.displaytext == "Save" ? "red" : "black", fontSize: normalize(10) }}>{item.displaytext}</Text>
|
|
1797
|
-
// </TouchableOpacity>
|
|
1798
|
-
|
|
1799
|
-
<View>
|
|
1800
|
-
<CAwesomeButton
|
|
1801
|
-
key={i}
|
|
1802
|
-
data={{
|
|
1803
|
-
...item,
|
|
1804
|
-
'width':normalize(45),
|
|
1805
|
-
'shadowcolor': '#fff',
|
|
1806
|
-
'iconcolor': item.displaytext == 'Postpone' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
|
|
1807
|
-
'fontcolor': item.displaytext == 'Postpone' ? '#db04ac' : item.displaytext == 'Save' ? 'red' : Global.AppTheme.primary_color,
|
|
1808
|
-
}}
|
|
1809
|
-
callBack={val => val == undefined ? null : getFooterIconsFunctions(item)}
|
|
1810
|
-
/>
|
|
1811
|
-
</View>
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
: null
|
|
1815
|
-
);
|
|
1816
|
-
})}
|
|
1817
|
-
</View>
|
|
1818
|
-
</View>
|
|
1819
|
-
);
|
|
1820
|
-
|
|
1821
|
-
};
|
|
1822
|
-
export default CBookingPostpone;
|