-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppointmentOverview.tsx
268 lines (259 loc) · 6.79 KB
/
AppointmentOverview.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
import React from 'react'
import {
View,
Text,
StyleSheet,
Dimensions,
Animated,
TouchableOpacity,
ScrollView,
Image,
} from 'react-native'
import {
FontAwesome,
Ionicons,
MaterialCommunityIcons,
MaterialIcons,
} from '@expo/vector-icons'
const { width } = Dimensions.get('window')
const patientData = {
name: 'John Doe',
location: 'Quebec, Canada',
rating: 4.7,
age: 35,
gender: 'Male',
date: '20th Sep 2023',
type: 'Check-up',
tags: ['Diabetes', 'Chronic Heart Diseases'],
notes: 'Occasional dizziness.',
prescriptions: [
'https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg',
'https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg',
],
medicines: ['Medicine1', 'Medicine2', 'Medicine3'],
}
const AppointmentDetails = () => {
return (
<ScrollView style={styles.container}>
{/* Top Section - Frosted Glass Avatar */}
<View style={styles.frostedContainer}>
<Image
source={{
uri: 'https://images.pexels.com/photos/307008/pexels-photo-307008.jpeg',
}}
style={styles.backgroundImage}
/>
<View style={styles.frostedOverlay} />
</View>
{/* Frosted Glassmorphism Card */}
<View style={styles.glassCard}>
<Text style={styles.nameText}>{patientData.name}</Text>
<Text style={styles.locationText}>{patientData.location}</Text>
<View style={styles.detailRow}>
<Ionicons name='star' size={20} color='#1069AD' />
<Text style={styles.detailText}>{patientData.rating}</Text>
<View style={styles.separator} />
<FontAwesome name='calendar' size={20} color='#1069AD' />
<Text style={styles.detailText}>{patientData.age}</Text>
<View style={styles.separator} />
<MaterialCommunityIcons
name='gender-male-female'
size={20}
color='#1069AD'
/>
<Text style={styles.detailText}>{patientData.gender}</Text>
</View>
</View>
{/* Modern Interactive Details */}
<View style={styles.detailsContainer}>
{/* Details */}
<View style={styles.appointmentDetailsContainer}>
<View style={styles.infoRow}>
<MaterialIcons name='event' size={24} color='#1069AD' />
<Text style={styles.infoText}>Appointment: {patientData.date}</Text>
</View>
<View style={styles.infoRow}>
<MaterialIcons name='medical-services' size={24} color='#1069AD' />
<Text style={styles.infoText}>Type: {patientData.type}</Text>
</View>
<View style={styles.infoRow}>
<FontAwesome name='tags' size={24} color='#1069AD' />
<Text style={styles.infoText}>
Concerns: {patientData.tags.join(', ')}
</Text>
</View>
</View>
{/* Notes */}
<View style={styles.notesContainer}>
<Text style={styles.notesHeader}>Notes:</Text>
<Text style={styles.notesText}>{patientData.notes}</Text>
</View>
{/* Medicines */}
<View style={styles.medicinesContainer}>
<Text style={styles.medicinesHeader}>Prescribed Medicines:</Text>
{patientData.medicines.map((medicine, index) => (
<View key={index} style={styles.medicineItem}>
<MaterialIcons name='local-pharmacy' size={24} color='#1069AD' />
<Text style={styles.medicineText}>{medicine}</Text>
</View>
))}
</View>
</View>
{/* Floating Action Buttons */}
<View style={styles.fabContainer}>
<TouchableOpacity style={[styles.fab, styles.fabVideoCall]}>
<MaterialIcons name='videocam' size={24} color='#FFF' />
</TouchableOpacity>
<TouchableOpacity style={[styles.fab, styles.fabCall]}>
<MaterialIcons name='call' size={24} color='#FFF' />
</TouchableOpacity>
<TouchableOpacity style={[styles.fab, styles.fabMessage]}>
<MaterialIcons name='message' size={24} color='#FFF' />
</TouchableOpacity>
</View>
</ScrollView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#E4E4E4',
},
frostedContainer: {
width: width,
height: 220,
overflow: 'hidden',
},
backgroundImage: {
width: '100%',
height: '100%',
position: 'absolute',
},
frostedOverlay: {
width: '100%',
height: '100%',
backgroundColor: 'rgba(255, 255, 255, 0.3)',
position: 'absolute',
},
glassCard: {
position: 'absolute',
top: width - 225,
left: 20,
right: 20,
height: 90,
paddingHorizontal: 20,
borderRadius: 10,
backgroundColor: 'rgba(255, 255, 255, 0.7)',
alignItems: 'center',
justifyContent: 'space-between',
},
nameText: {
fontSize: 22,
color: '#1069AD',
marginBottom: 0,
marginTop: 5,
},
locationText: {
fontSize: 14,
color: '#1069AD',
marginBottom: 15,
},
detailRow: {
flexDirection: 'row',
alignItems: 'center',
width: '100%',
justifyContent: 'space-between',
marginBottom: 10,
},
detailText: {
fontSize: 15,
marginLeft: 10,
color: '#1069AD',
},
separator: {
height: '70%',
width: 1,
backgroundColor: '#1069AD',
marginHorizontal: 10,
},
detailsContainer: {
marginTop: 50,
margin: 15,
padding: 15,
borderRadius: 15,
backgroundColor: '#FFF',
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.2,
shadowRadius: 4,
},
infoRow: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 10,
},
infoText: {
marginLeft: 10,
fontSize: 16,
color: '#555',
},
notesContainer: {
marginTop: 20,
},
notesHeader: {
fontSize: 18,
marginBottom: 10,
color: '#1069AD',
},
notesText: {
fontSize: 16,
color: '#555',
},
medicinesContainer: {
marginTop: 20,
},
medicinesHeader: {
fontSize: 18,
marginBottom: 10,
color: '#1069AD',
},
medicineItem: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 10,
},
medicineText: {
marginLeft: 10,
fontSize: 16,
color: '#555',
},
fabContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
marginTop: 10,
marginBottom: 30,
paddingHorizontal: 15,
},
fab: {
width: 70,
height: 70,
borderRadius: 35,
alignItems: 'center',
justifyContent: 'center',
elevation: 5, // For Android shadow
shadowColor: '#000', // For iOS shadow
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.3,
shadowRadius: 4,
},
fabVideoCall: {
backgroundColor: '#1069AD',
},
fabCall: {
backgroundColor: '#1069AD',
},
fabMessage: {
backgroundColor: '#1069AD',
},
})
export default AppointmentDetails