medos-sdk 1.1.9 → 1.1.11
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/client/MedosClient.d.ts +1 -0
- package/dist/client/MedosClient.js +7 -0
- package/dist/components/AppointmentCalender.js +22 -8
- package/dist/components/AppointmentConfirmationStep.d.ts +4 -0
- package/dist/components/AppointmentConfirmationStep.js +50 -52
- package/dist/components/AppointmentDateTimeModal.d.ts +4 -0
- package/dist/components/AppointmentDateTimeModal.js +216 -165
- package/dist/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/AppointmentSummaryStep.js +168 -0
- package/dist/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/BookingOptionStep.js +346 -0
- package/dist/components/ContactInformationStep.js +13 -6
- package/dist/components/ContactPreferenceStep.js +16 -6
- package/dist/components/DoctorSelectModal.d.ts +5 -0
- package/dist/components/DoctorSelectModal.js +169 -74
- package/dist/components/EnquiryForm.js +84 -72
- package/dist/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/components/Icons/CloseIcon.js +5 -0
- package/dist/components/InquiryDetailsStep.js +11 -6
- package/dist/components/PatientDetailsStep.js +17 -12
- package/dist/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/PatientSelectionStep.js +254 -0
- package/dist/components/PhoneVerificationStep.js +1 -1
- package/dist/components/SuccessStep.js +1 -1
- package/dist/components/appointment-booking/AppointmentCalender.d.ts +5 -0
- package/dist/components/appointment-booking/AppointmentCalender.js +247 -0
- package/dist/components/appointment-booking/hooks/index.d.ts +3 -0
- package/dist/components/appointment-booking/hooks/index.js +3 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +318 -0
- package/dist/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
- package/dist/components/appointment-booking/hooks/useAppointmentState.js +125 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +55 -0
- package/dist/components/appointment-booking/index.d.ts +5 -0
- package/dist/components/appointment-booking/index.js +3 -0
- package/dist/components/appointment-booking/types.d.ts +291 -0
- package/dist/components/appointment-booking/types.js +49 -0
- package/dist/components/appointment-modal-styles.d.ts +259 -0
- package/dist/components/appointment-modal-styles.js +395 -0
- package/dist/components/constant.d.ts +2 -0
- package/dist/components/constant.js +15 -0
- package/dist/components/custom-calendar.js +20 -11
- package/dist/components/styles.js +93 -52
- package/dist/components/theme-styles.d.ts +5 -4
- package/dist/components/theme-styles.js +221 -125
- package/dist/components/types.d.ts +12 -139
- package/dist/components/types.js +15 -32
- package/dist/components/uiComponents/SelectDropdown.d.ts +1 -1
- package/dist/components/uiComponents/SelectDropdown.js +24 -24
- package/dist/components/utils.d.ts +3 -0
- package/dist/components/utils.js +59 -0
- package/dist/components/validation.d.ts +2 -0
- package/dist/components/validation.js +41 -0
- package/dist/core/theme/index.d.ts +1 -0
- package/dist/core/theme/index.js +1 -0
- package/dist/core/theme/responsive.d.ts +15 -0
- package/dist/core/theme/responsive.js +113 -0
- package/dist/core/theme/themes.js +16 -4
- package/dist/core/theme/types.d.ts +8 -0
- package/dist/enquiry-form/validation.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/react/ThemeProvider.d.ts +2 -1
- package/dist/react/ThemeProvider.js +49 -10
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +1 -1
- package/dist/services/AppointmentService.d.ts +80 -2
- package/dist/services/AppointmentService.js +114 -5
- package/dist/services/WorkspaceService.d.ts +58 -3
- package/dist/services/WorkspaceService.js +10 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +9 -7
- package/dist/vanilla/AppointmentCalendarWidget.js +834 -384
- package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/EnquiryFormWidget.js +25 -43
- package/dist/vanilla/client/MedosClient.d.ts +1 -0
- package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +4 -0
- package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +4 -0
- package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/DoctorSelectModal.d.ts +5 -0
- package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/VanillaCalendar.js +33 -18
- package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/components/VanillaIcons.js +92 -0
- package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/components/VanillaSelect.js +93 -5
- package/dist/vanilla/components/appointment-booking/AppointmentCalender.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/hooks/index.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
- package/dist/vanilla/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
- package/dist/vanilla/components/appointment-booking/index.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/types.d.ts +291 -0
- package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
- package/dist/vanilla/components/constant.d.ts +2 -0
- package/dist/vanilla/components/theme-styles.d.ts +5 -4
- package/dist/vanilla/components/types.d.ts +12 -139
- package/dist/vanilla/components/uiComponents/SelectDropdown.d.ts +1 -1
- package/dist/vanilla/components/utils.d.ts +3 -0
- package/dist/vanilla/components/validation.d.ts +2 -0
- package/dist/vanilla/core/theme/index.d.ts +1 -0
- package/dist/vanilla/core/theme/responsive.d.ts +15 -0
- package/dist/vanilla/core/theme/types.d.ts +8 -0
- package/dist/vanilla/enquiry-widget.js +374 -53
- package/dist/vanilla/index.d.ts +3 -1
- package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
- package/dist/vanilla/react/index.d.ts +2 -1
- package/dist/vanilla/services/AppointmentService.d.ts +80 -2
- package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
- package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +9 -7
- package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/widget.css +833 -207
- package/dist/vanilla/widget.js +6463 -5687
- package/package.json +1 -1
|
@@ -1,93 +1,188 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { AppointmentService, } from "../services/AppointmentService";
|
|
4
|
-
import { Select, SelectTrigger,
|
|
4
|
+
import { Select, SelectTrigger, SelectContent, SelectItem, } from "./uiComponents/SelectDropdown";
|
|
5
5
|
import { useTheme } from "../react/hooks/useTheme";
|
|
6
|
-
|
|
6
|
+
import { useBreakpoint } from "../core/theme/responsive";
|
|
7
|
+
export const DoctorSelectModal = ({ addresses: initialAddresses, addressDoctorsMap: initialAddressDoctorsMap, selectedAddressId: initialSelectedAddressId, selectedDoctorId: initialSelectedDoctorId, onCancel, onContinue, }) => {
|
|
7
8
|
const theme = useTheme();
|
|
8
|
-
const
|
|
9
|
-
const [
|
|
10
|
-
const [
|
|
11
|
-
const [
|
|
9
|
+
const breakpoint = useBreakpoint(theme);
|
|
10
|
+
const [addresses, setAddresses] = useState(initialAddresses || []);
|
|
11
|
+
const [addressDoctorsMap, setAddressDoctorsMap] = useState(initialAddressDoctorsMap || {});
|
|
12
|
+
const [selectedAddressId, setSelectedAddressId] = useState(initialSelectedAddressId ? String(initialSelectedAddressId) : "");
|
|
13
|
+
const [selectedDoctorId, setSelectedDoctorId] = useState(initialSelectedDoctorId ? String(initialSelectedDoctorId) : "");
|
|
12
14
|
const [appointmentNotes, setAppointmentNotes] = useState("");
|
|
13
15
|
useEffect(() => {
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
if (initialAddresses && initialAddresses.length > 0) {
|
|
17
|
+
setAddresses(initialAddresses);
|
|
18
|
+
}
|
|
19
|
+
if (initialAddressDoctorsMap &&
|
|
20
|
+
Object.keys(initialAddressDoctorsMap).length > 0) {
|
|
21
|
+
setAddressDoctorsMap(initialAddressDoctorsMap);
|
|
22
|
+
}
|
|
23
|
+
if (initialSelectedAddressId !== undefined &&
|
|
24
|
+
initialSelectedAddressId !== null) {
|
|
25
|
+
setSelectedAddressId(String(initialSelectedAddressId));
|
|
26
|
+
}
|
|
27
|
+
if (initialSelectedDoctorId !== undefined &&
|
|
28
|
+
initialSelectedDoctorId !== null) {
|
|
29
|
+
setSelectedDoctorId(String(initialSelectedDoctorId));
|
|
30
|
+
}
|
|
31
|
+
}, [
|
|
32
|
+
initialAddresses,
|
|
33
|
+
initialAddressDoctorsMap,
|
|
34
|
+
initialSelectedAddressId,
|
|
35
|
+
initialSelectedDoctorId,
|
|
36
|
+
]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!initialAddresses || initialAddresses.length === 0) {
|
|
39
|
+
(async () => {
|
|
40
|
+
try {
|
|
41
|
+
const response = await AppointmentService.getAddresses();
|
|
42
|
+
if (response.addresses?.length > 0) {
|
|
43
|
+
setAddresses(response.addresses);
|
|
44
|
+
const doctorMap = {};
|
|
45
|
+
response.addresses.forEach((addr) => {
|
|
46
|
+
doctorMap[addr.id] = addr.doctors || [];
|
|
47
|
+
});
|
|
48
|
+
setAddressDoctorsMap(doctorMap);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.error("Failed to fetch addresses:", error);
|
|
53
|
+
}
|
|
54
|
+
})();
|
|
55
|
+
}
|
|
23
56
|
}, []);
|
|
24
57
|
const doctorsForAddress = selectedAddressId
|
|
25
58
|
? addressDoctorsMap[Number(selectedAddressId)] || []
|
|
26
59
|
: [];
|
|
60
|
+
const selectedAddressLabel = addresses.find((a) => String(a.id) === selectedAddressId)?.label ||
|
|
61
|
+
addresses.find((a) => String(a.id) === selectedAddressId)
|
|
62
|
+
?.completeAddress ||
|
|
63
|
+
"";
|
|
64
|
+
const selectedDoctorLabel = doctorsForAddress.find((d) => String(d.id) === selectedDoctorId)?.name ||
|
|
65
|
+
"";
|
|
27
66
|
const canContinue = !!selectedAddressId && !!selectedDoctorId;
|
|
28
|
-
const styles = getStyles(theme);
|
|
67
|
+
const styles = getStyles(theme, breakpoint);
|
|
29
68
|
return (_jsx("div", { style: {
|
|
30
69
|
border: `1px solid ${theme.colors.border}`,
|
|
31
70
|
borderRadius: "2px",
|
|
32
71
|
}, children: _jsxs("div", { style: styles.modalWrapper, children: [_jsx("div", { style: styles.headerWrapper, children: _jsx("h3", { style: styles.title, children: "Location & Doctor" }) }), _jsx("div", { style: { borderBottom: `1px solid ${theme.colors.border}` } }), _jsxs("div", { style: styles.contentWrapper, children: [_jsxs("div", { style: styles.fieldGroup, children: [_jsxs("label", { style: styles.label, children: ["Preferred Location ", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsxs(Select, { value: selectedAddressId, onValueChange: (value) => {
|
|
33
72
|
setSelectedAddressId(value);
|
|
34
73
|
setSelectedDoctorId("");
|
|
35
|
-
}, children: [_jsx(SelectTrigger, { style: { width: "100%" }, children: _jsx(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
74
|
+
}, children: [_jsx(SelectTrigger, { style: { width: "100%" }, children: _jsx("span", { style: {
|
|
75
|
+
color: selectedAddressId ? "#1e293b" : "#94a3b8",
|
|
76
|
+
overflow: "hidden",
|
|
77
|
+
textOverflow: "ellipsis",
|
|
78
|
+
whiteSpace: "nowrap",
|
|
79
|
+
flex: 1,
|
|
80
|
+
}, children: selectedAddressLabel || "Select Address" }) }), _jsx(SelectContent, { children: addresses.map((a) => (_jsx(SelectItem, { value: String(a.id), children: a.completeAddress || a.label || `Address ${a.id}` }, a.id))) })] })] }), _jsxs("div", { style: styles.fieldGroup, children: [_jsxs("label", { style: styles.label, children: ["Preferred Doctor ", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsxs(Select, { value: selectedDoctorId, onValueChange: setSelectedDoctorId, disabled: !selectedAddressId, children: [_jsx(SelectTrigger, { style: { width: "100%" }, children: _jsx("span", { style: {
|
|
81
|
+
color: selectedDoctorId ? "#1e293b" : "#94a3b8",
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
textOverflow: "ellipsis",
|
|
84
|
+
whiteSpace: "nowrap",
|
|
85
|
+
flex: 1,
|
|
86
|
+
}, children: selectedDoctorLabel || "Select Doctor" }) }), _jsx(SelectContent, { children: doctorsForAddress.length > 0 ? (doctorsForAddress.map((d) => (_jsxs(SelectItem, { value: String(d.id), children: [d.name, " ", d.specialty ? `- ${d.specialty}` : ""] }, d.id)))) : (_jsx(SelectItem, { value: "no-doctors", disabled: true, children: "No doctors available" })) })] })] }), _jsxs("div", { style: styles.fieldGroup, children: [_jsxs("label", { style: styles.label, children: ["Chief Complaint ", _jsx("span", { style: styles.optional, children: "(optional)" })] }), _jsx("textarea", { style: styles.textarea, placeholder: "Enter Chief Complaint or Appointment Notes", value: appointmentNotes, onChange: (e) => setAppointmentNotes(e.target.value) })] }), _jsxs("div", { style: styles.footer, children: [_jsx("button", { style: styles.backBtn, onClick: onCancel, children: "Back" }), _jsx("button", { style: {
|
|
87
|
+
...styles.continueBtn,
|
|
88
|
+
opacity: canContinue ? 1 : 0.6,
|
|
89
|
+
}, disabled: !canContinue, onClick: () => onContinue(Number(selectedAddressId), Number(selectedDoctorId), appointmentNotes), children: "Next" })] })] })] }) }));
|
|
90
|
+
};
|
|
91
|
+
const getStyles = (theme, breakpoint) => {
|
|
92
|
+
const isMobile = breakpoint === "mobile";
|
|
93
|
+
const isTablet = breakpoint === "tablet";
|
|
94
|
+
const borderRadius = "12px";
|
|
95
|
+
const buttonRadius = "8px";
|
|
96
|
+
const cardBorder = `1px solid ${theme.colors.border}`;
|
|
97
|
+
return {
|
|
98
|
+
modalWrapper: {
|
|
99
|
+
backgroundColor: theme.colors.background,
|
|
100
|
+
borderRadius,
|
|
101
|
+
maxWidth: isMobile || isTablet ? "100%" : 840,
|
|
102
|
+
margin: "0 auto",
|
|
103
|
+
fontFamily: theme.typography.fontFamily,
|
|
104
|
+
color: theme.colors.text,
|
|
105
|
+
},
|
|
106
|
+
headerWrapper: {
|
|
107
|
+
padding: isMobile ? "16px 20px" : "18px 24px",
|
|
108
|
+
backgroundColor: theme.colors.primary,
|
|
109
|
+
color: theme.colors.textOnPrimary,
|
|
110
|
+
},
|
|
111
|
+
contentWrapper: {
|
|
112
|
+
padding: isMobile ? "20px" : "24px",
|
|
113
|
+
},
|
|
114
|
+
title: {
|
|
115
|
+
fontSize: isMobile ? 16 : 18,
|
|
116
|
+
fontWeight: 600,
|
|
117
|
+
margin: 0,
|
|
118
|
+
color: theme.colors.textOnPrimary,
|
|
119
|
+
},
|
|
120
|
+
fieldGroup: { marginBottom: isMobile ? 18 : 20 },
|
|
121
|
+
label: {
|
|
122
|
+
fontSize: 14,
|
|
123
|
+
fontWeight: 500,
|
|
124
|
+
marginBottom: 8,
|
|
125
|
+
display: "block",
|
|
126
|
+
color: theme.colors.text,
|
|
127
|
+
},
|
|
128
|
+
mandatory: { color: theme.colors.error, marginLeft: 4 },
|
|
129
|
+
optional: {
|
|
130
|
+
color: theme.colors.textSecondary,
|
|
131
|
+
fontWeight: 400,
|
|
132
|
+
marginLeft: 4,
|
|
133
|
+
fontSize: 13,
|
|
134
|
+
},
|
|
135
|
+
textarea: {
|
|
136
|
+
width: "100%",
|
|
137
|
+
border: cardBorder,
|
|
138
|
+
borderRadius: buttonRadius,
|
|
139
|
+
minHeight: 100,
|
|
140
|
+
padding: "12px 14px",
|
|
141
|
+
fontSize: 14,
|
|
142
|
+
resize: "vertical",
|
|
143
|
+
boxSizing: "border-box",
|
|
144
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
145
|
+
outline: "none",
|
|
146
|
+
backgroundColor: theme.colors.surface,
|
|
147
|
+
color: theme.colors.text,
|
|
148
|
+
},
|
|
149
|
+
footer: {
|
|
150
|
+
marginTop: isMobile ? 20 : 24,
|
|
151
|
+
paddingTop: 20,
|
|
152
|
+
borderTop: cardBorder,
|
|
153
|
+
display: "flex",
|
|
154
|
+
justifyContent: isMobile ? "stretch" : "flex-end",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
gap: 12,
|
|
157
|
+
flexDirection: isMobile ? "column" : "row",
|
|
158
|
+
},
|
|
159
|
+
brand: { color: theme.colors.primary, fontWeight: 600 },
|
|
160
|
+
backBtn: {
|
|
161
|
+
background: theme.colors.surface,
|
|
162
|
+
color: theme.colors.text,
|
|
163
|
+
border: cardBorder,
|
|
164
|
+
borderRadius: buttonRadius,
|
|
165
|
+
fontWeight: 600,
|
|
166
|
+
padding: isMobile ? "12px 20px" : "10px 20px",
|
|
167
|
+
cursor: "pointer",
|
|
168
|
+
width: isMobile ? "100%" : "auto",
|
|
169
|
+
minHeight: isMobile ? "44px" : "40px",
|
|
170
|
+
fontSize: 14,
|
|
171
|
+
transition: "all 0.2s ease",
|
|
172
|
+
},
|
|
173
|
+
continueBtn: {
|
|
174
|
+
background: theme.colors.secondary,
|
|
175
|
+
color: theme.colors.textOnSecondary,
|
|
176
|
+
border: "none",
|
|
177
|
+
borderRadius: buttonRadius,
|
|
178
|
+
fontWeight: 600,
|
|
179
|
+
padding: isMobile ? "12px 20px" : "10px 20px",
|
|
180
|
+
cursor: "pointer",
|
|
181
|
+
width: isMobile ? "100%" : "auto",
|
|
182
|
+
minHeight: isMobile ? "44px" : "40px",
|
|
183
|
+
fontSize: 14,
|
|
184
|
+
transition: "all 0.2s ease",
|
|
185
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
186
|
+
},
|
|
187
|
+
};
|
|
39
188
|
};
|
|
40
|
-
const getStyles = (theme) => ({
|
|
41
|
-
modalWrapper: {
|
|
42
|
-
backgroundColor: theme.colors.background,
|
|
43
|
-
borderRadius: 12,
|
|
44
|
-
maxWidth: 840,
|
|
45
|
-
margin: "0 auto",
|
|
46
|
-
fontFamily: theme.typography.fontFamily,
|
|
47
|
-
color: theme.colors.text,
|
|
48
|
-
},
|
|
49
|
-
headerWrapper: {
|
|
50
|
-
padding: "20px 24px 10px 24px",
|
|
51
|
-
},
|
|
52
|
-
contentWrapper: {
|
|
53
|
-
padding: "20px 24px 10px 24px",
|
|
54
|
-
},
|
|
55
|
-
title: { fontSize: 20, fontWeight: 600, margin: 0 },
|
|
56
|
-
fieldGroup: { marginBottom: 18 },
|
|
57
|
-
label: { fontSize: 15, fontWeight: 500, marginBottom: 6, display: "block" },
|
|
58
|
-
mandatory: { color: theme.colors.error, marginLeft: 4 },
|
|
59
|
-
optional: {
|
|
60
|
-
color: theme.colors.textSecondary,
|
|
61
|
-
fontWeight: 400,
|
|
62
|
-
marginLeft: 4,
|
|
63
|
-
fontSize: 13,
|
|
64
|
-
},
|
|
65
|
-
textarea: {
|
|
66
|
-
width: "100%",
|
|
67
|
-
border: `1px solid ${theme.colors.border}`,
|
|
68
|
-
borderRadius: theme.radii.md,
|
|
69
|
-
minHeight: 80,
|
|
70
|
-
padding: "10px",
|
|
71
|
-
fontSize: 14,
|
|
72
|
-
resize: "vertical",
|
|
73
|
-
boxSizing: "border-box",
|
|
74
|
-
},
|
|
75
|
-
footer: {
|
|
76
|
-
marginTop: 24,
|
|
77
|
-
marginBottom: 10,
|
|
78
|
-
display: "flex",
|
|
79
|
-
justifyContent: "flex-end",
|
|
80
|
-
alignItems: "center",
|
|
81
|
-
gap: 10,
|
|
82
|
-
},
|
|
83
|
-
brand: { color: theme.colors.primary, fontWeight: 600 },
|
|
84
|
-
continueBtn: {
|
|
85
|
-
background: theme.colors.secondary,
|
|
86
|
-
color: theme.colors.textOnSecondary,
|
|
87
|
-
border: "none",
|
|
88
|
-
borderRadius: theme.radii.md,
|
|
89
|
-
fontWeight: 600,
|
|
90
|
-
padding: "8px 22px",
|
|
91
|
-
cursor: "pointer",
|
|
92
|
-
},
|
|
93
|
-
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useReducer, useCallback } from "react";
|
|
2
|
+
import React, { useReducer, useCallback } from "react";
|
|
3
3
|
import { EnquiryService } from "../services/EnquiryService";
|
|
4
4
|
import { validateName, validateEmail, validatePhoneNumber, validateSubject, validateMessage, validateCountryCode, } from "../enquiry-form/validation";
|
|
5
5
|
import { ContactInformationStep } from "./ContactInformationStep";
|
|
@@ -7,6 +7,7 @@ import { InquiryDetailsStep } from "./InquiryDetailsStep";
|
|
|
7
7
|
import { ContactPreferenceStep } from "./ContactPreferenceStep";
|
|
8
8
|
import { SuccessStep } from "./SuccessStep";
|
|
9
9
|
import { useTheme } from "../react/hooks/useTheme";
|
|
10
|
+
import { useBreakpoint } from "../core/theme/responsive";
|
|
10
11
|
import MedosLogo from "./Icons/MedosLogo";
|
|
11
12
|
const INITIAL_STATE = {
|
|
12
13
|
step: 0,
|
|
@@ -100,7 +101,7 @@ export const EnquiryForm = ({ onSuccess, onError, }) => {
|
|
|
100
101
|
if (!validateMessage(state.inquiryMessage)) {
|
|
101
102
|
dispatch({
|
|
102
103
|
type: "SET_ERROR",
|
|
103
|
-
payload: "Please enter a valid message
|
|
104
|
+
payload: "Please enter a valid message.",
|
|
104
105
|
});
|
|
105
106
|
return false;
|
|
106
107
|
}
|
|
@@ -151,78 +152,89 @@ export const EnquiryForm = ({ onSuccess, onError, }) => {
|
|
|
151
152
|
finally {
|
|
152
153
|
dispatch({ type: "SET_LOADING", payload: false });
|
|
153
154
|
}
|
|
154
|
-
}, [state, validateContactStep, validateInquiryStep
|
|
155
|
+
}, [state, validateContactStep, validateInquiryStep]);
|
|
155
156
|
const theme = useTheme();
|
|
156
|
-
const
|
|
157
|
-
|
|
157
|
+
const breakpoint = useBreakpoint(theme);
|
|
158
|
+
const styles = React.useMemo(() => getStyles(theme, breakpoint), [theme, breakpoint]);
|
|
159
|
+
return (_jsx("div", { style: styles.container, children: _jsxs("div", { style: styles.card, children: [_jsx("div", { style: styles.header, children: _jsx("h2", { style: styles.title, children: "Submit Inquiry" }) }), _jsxs("div", { style: styles.content, children: [state.loading && _jsx("div", { style: { marginBottom: 12 }, children: "Loading..." }), state.error && _jsx("div", { style: styles.errorMessage, children: state.error }), state.step === 0 && (_jsx(ContactInformationStep, { patientName: state.patientName, patientEmail: state.patientEmail, countryCode: state.countryCode, patientPhone: state.patientPhone, onNameChange: (value) => dispatch({ type: "SET_PATIENT_NAME", payload: value }), onEmailChange: (value) => dispatch({ type: "SET_PATIENT_EMAIL", payload: value }), onCountryCodeChange: (value) => dispatch({ type: "SET_COUNTRY_CODE", payload: value }), onPhoneChange: (value) => dispatch({ type: "SET_PATIENT_PHONE", payload: value }), onNext: goToNext })), state.step === 1 && (_jsx(InquiryDetailsStep, { inquirySubject: state.inquirySubject, inquiryMessage: state.inquiryMessage, onSubjectChange: (value) => dispatch({ type: "SET_INQUIRY_SUBJECT", payload: value }), onMessageChange: (value) => dispatch({ type: "SET_INQUIRY_MESSAGE", payload: value }), onBack: goBack, onNext: goToNext })), state.step === 2 && (_jsx(ContactPreferenceStep, { preferredContactMethod: state.preferredContactMethod, onContactMethodChange: (method) => dispatch({
|
|
158
160
|
type: "SET_PREFERRED_CONTACT_METHOD",
|
|
159
161
|
payload: method,
|
|
160
162
|
}), onBack: goBack, onSubmit: submitEnquiry, isLoading: state.loading })), state.step === 3 && _jsx(SuccessStep, { onReset: resetForm }), _jsxs("div", { style: styles.branding, children: [_jsx("span", { style: styles.poweredBy, children: "Powered by" }), _jsx("a", { href: "https://medos.one", target: "_blank", rel: "noopener noreferrer", children: _jsx(MedosLogo, { style: { height: 50, width: "auto" } }) })] })] })] }) }));
|
|
161
163
|
};
|
|
162
|
-
const getStyles = (theme) =>
|
|
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
|
-
|
|
164
|
+
const getStyles = (theme, breakpoint) => {
|
|
165
|
+
const isMobile = breakpoint === "mobile";
|
|
166
|
+
const isTablet = breakpoint === "tablet";
|
|
167
|
+
return {
|
|
168
|
+
container: {
|
|
169
|
+
display: "flex",
|
|
170
|
+
justifyContent: "center",
|
|
171
|
+
padding: isMobile ? 12 : 20,
|
|
172
|
+
fontFamily: theme.typography.fontFamily,
|
|
173
|
+
background: theme.colors.background,
|
|
174
|
+
},
|
|
175
|
+
card: {
|
|
176
|
+
width: "100%",
|
|
177
|
+
maxWidth: isMobile || isTablet ? "100%" : 600,
|
|
178
|
+
background: theme.colors.surface,
|
|
179
|
+
borderRadius: isMobile ? theme.radii.md : theme.radii.lg,
|
|
180
|
+
boxShadow: isMobile ? theme.shadows.md : theme.shadows.lg,
|
|
181
|
+
overflow: "hidden",
|
|
182
|
+
boxSizing: "border-box",
|
|
183
|
+
},
|
|
184
|
+
header: {
|
|
185
|
+
background: theme.colors.primary,
|
|
186
|
+
padding: isMobile ? "16px 16px" : "20px 24px",
|
|
187
|
+
borderBottom: `1px solid ${theme.colors.border}`,
|
|
188
|
+
display: "flex",
|
|
189
|
+
justifyContent: "space-between",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
flexWrap: (isMobile ? "wrap" : "nowrap"),
|
|
192
|
+
gap: isMobile ? 8 : 0,
|
|
193
|
+
},
|
|
194
|
+
title: {
|
|
195
|
+
margin: 0,
|
|
196
|
+
fontSize: isMobile
|
|
197
|
+
? theme.typography.fontSizeLg
|
|
198
|
+
: theme.typography.fontSizeXl,
|
|
199
|
+
fontWeight: theme.typography.fontWeightSemibold,
|
|
200
|
+
color: theme.colors.textOnPrimary,
|
|
201
|
+
},
|
|
202
|
+
stepIndicator: {
|
|
203
|
+
fontSize: isMobile
|
|
204
|
+
? theme.typography.fontSizeXs
|
|
205
|
+
: theme.typography.fontSizeSm,
|
|
206
|
+
color: theme.colors.textOnPrimary,
|
|
207
|
+
opacity: 0.9,
|
|
208
|
+
margin: 0,
|
|
209
|
+
fontWeight: 500,
|
|
210
|
+
},
|
|
211
|
+
content: {
|
|
212
|
+
padding: isMobile ? 16 : 24,
|
|
213
|
+
},
|
|
214
|
+
errorMessage: {
|
|
215
|
+
marginBottom: 12,
|
|
216
|
+
color: theme.colors.error,
|
|
217
|
+
fontWeight: 600,
|
|
218
|
+
padding: isMobile ? "10px" : "12px",
|
|
219
|
+
background: theme.colors.errorBackground,
|
|
220
|
+
borderRadius: theme.radii.md,
|
|
221
|
+
border: `1px solid ${theme.colors.errorBorder}`,
|
|
222
|
+
fontSize: theme.typography.fontSizeSm,
|
|
223
|
+
},
|
|
224
|
+
branding: {
|
|
225
|
+
display: "flex",
|
|
226
|
+
alignItems: "center",
|
|
227
|
+
justifyContent: "center",
|
|
228
|
+
gap: 8,
|
|
229
|
+
marginTop: isMobile ? 16 : 24,
|
|
230
|
+
paddingTop: isMobile ? 12 : 16,
|
|
231
|
+
borderTop: `1px solid ${theme.colors.border}`,
|
|
232
|
+
opacity: 0.8,
|
|
233
|
+
},
|
|
234
|
+
poweredBy: {
|
|
235
|
+
fontSize: 12,
|
|
236
|
+
color: theme.colors.textSecondary,
|
|
237
|
+
fontWeight: 500,
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const CloseIcon = ({ size = 12, color = "black", className, style, }) => {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 12 12", fill: "none", className: className, style: style, children: _jsx("path", { d: "M0.878125 11.0896L0 10.2115L4.66667 5.54479L0 0.878126L0.878125 0L5.54479 4.66667L10.2115 0L11.0896 0.878126L6.42292 5.54479L11.0896 10.2115L10.2115 11.0896L5.54479 6.42292L0.878125 11.0896Z", fill: color }) }));
|
|
4
|
+
};
|
|
5
|
+
export default CloseIcon;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { useTheme } from "../react/hooks/useTheme";
|
|
3
4
|
import { getContainerStyles, getPhoneVerifyStyles, getButtonStyles, } from "./theme-styles";
|
|
4
|
-
export const InquiryDetailsStep = ({ inquirySubject, inquiryMessage, onSubjectChange, onMessageChange, onBack, onNext, }) => {
|
|
5
|
+
export const InquiryDetailsStep = React.memo(({ inquirySubject, inquiryMessage, onSubjectChange, onMessageChange, onBack, onNext, }) => {
|
|
5
6
|
const theme = useTheme();
|
|
6
|
-
const PHONE_VERIFY_STYLES = getPhoneVerifyStyles(theme);
|
|
7
|
-
const BUTTON_STYLES = getButtonStyles(theme);
|
|
8
|
-
const CONTAINER_STYLES = getContainerStyles(theme);
|
|
9
|
-
|
|
7
|
+
const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme), [theme]);
|
|
8
|
+
const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme), [theme]);
|
|
9
|
+
const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme), [theme]);
|
|
10
|
+
const styles = getStyles(theme);
|
|
11
|
+
return (_jsxs("div", { children: [_jsxs("div", { style: { marginBottom: "16px" }, children: [_jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Subject", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsx("input", { type: "text", value: inquirySubject, onChange: (e) => onSubjectChange(e.target.value), placeholder: "Enter inquiry subject", style: PHONE_VERIFY_STYLES.phoneInput })] }), _jsxs("div", { style: { marginBottom: "16px" }, children: [_jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Message", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsx("textarea", { value: inquiryMessage, onChange: (e) => onMessageChange(e.target.value), placeholder: "Enter your inquiry message", rows: 5, style: {
|
|
10
12
|
...PHONE_VERIFY_STYLES.otpInput,
|
|
11
13
|
minHeight: "120px",
|
|
12
14
|
resize: "vertical",
|
|
13
15
|
fontFamily: "inherit",
|
|
14
16
|
} })] }), _jsxs("div", { style: CONTAINER_STYLES.actions, children: [_jsx("button", { onClick: onBack, style: BUTTON_STYLES.secondary, children: "Back" }), _jsx("button", { onClick: onNext, style: BUTTON_STYLES.primary, children: "Next" })] })] }));
|
|
15
|
-
};
|
|
17
|
+
});
|
|
18
|
+
const getStyles = (theme) => ({
|
|
19
|
+
mandatory: { color: theme.colors.error, marginLeft: 4 },
|
|
20
|
+
});
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { GENDER_OPTIONS, BLOOD_GROUP_OPTIONS, } from "./types";
|
|
3
3
|
import { useTheme } from "../react/hooks/useTheme";
|
|
4
|
+
import { useBreakpoint } from "../core/theme/responsive";
|
|
4
5
|
import { getButtonStyles, getPatientDetailsStyles, getContainerStyles, } from "./theme-styles";
|
|
5
6
|
import { UserIcon } from "./Icons/UserIcon";
|
|
6
7
|
import { MapPinIcon } from "./Icons/MapIcon";
|
|
7
8
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, } from "./uiComponents/SelectDropdown";
|
|
8
|
-
export const PatientDetailsStep = ({ state, dispatch, onBack, onSubmit, }) => {
|
|
9
|
+
export const PatientDetailsStep = ({ state, dispatch, onBack, onSubmit, isFirstStep = false, }) => {
|
|
9
10
|
const theme = useTheme();
|
|
10
|
-
const
|
|
11
|
-
const
|
|
11
|
+
const breakpoint = useBreakpoint(theme);
|
|
12
|
+
const CONTAINER_STYLES = getContainerStyles(theme, "medos", breakpoint);
|
|
13
|
+
const BUTTON_STYLES = getButtonStyles(theme, "medos", breakpoint);
|
|
12
14
|
const isFormValid = state.patientName &&
|
|
13
15
|
state.patientAge &&
|
|
14
|
-
state.patientEmail &&
|
|
15
16
|
state.patientGender &&
|
|
16
|
-
state.bloodGroup &&
|
|
17
17
|
state.patientAddress &&
|
|
18
18
|
state.patientCity &&
|
|
19
19
|
state.patientState &&
|
|
20
20
|
state.patientCountry &&
|
|
21
21
|
state.patientZipcode &&
|
|
22
22
|
state.otpVerified;
|
|
23
|
-
return (_jsxs("div", { style: CONTAINER_STYLES.section, children: [_jsx(PatientInfoSection, { state: state, dispatch: dispatch }), _jsx(AddressInfoSection, { state: state, dispatch: dispatch }), _jsxs("div", { style:
|
|
23
|
+
return (_jsxs("div", { style: CONTAINER_STYLES.section, children: [_jsx(PatientInfoSection, { state: state, dispatch: dispatch }), _jsx(AddressInfoSection, { state: state, dispatch: dispatch }), _jsxs("div", { style: {
|
|
24
|
+
...CONTAINER_STYLES.actions,
|
|
25
|
+
justifyContent: isFirstStep ? "flex-end" : "space-between",
|
|
26
|
+
}, children: [!isFirstStep && (_jsx("button", { style: BUTTON_STYLES.secondary, onClick: onBack, children: "Back" })), _jsx("button", { style: {
|
|
24
27
|
...BUTTON_STYLES.primary,
|
|
25
28
|
opacity: isFormValid ? 1 : 0.6,
|
|
26
29
|
}, disabled: !isFormValid || state.loading, onClick: onSubmit, children: state.loading ? "Booking..." : "Continue" })] })] }));
|
|
27
30
|
};
|
|
28
31
|
const PatientInfoSection = ({ state, dispatch }) => {
|
|
29
32
|
const theme = useTheme();
|
|
30
|
-
const
|
|
33
|
+
const breakpoint = useBreakpoint(theme);
|
|
34
|
+
const PATIENT_DETAILS_STYLES = getPatientDetailsStyles(theme, "medos", breakpoint);
|
|
31
35
|
const firstName = state.patientName.split(" ")[0] || "";
|
|
32
36
|
const lastName = state.patientName.split(" ").slice(1).join(" ") || "";
|
|
33
37
|
return (_jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionCard, children: [_jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionHeader, children: [_jsx(UserIcon, {}), _jsx("h3", { style: PATIENT_DETAILS_STYLES.sectionTitle, children: "Patient Information" })] }), _jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionBody, children: [_jsxs("div", { style: PATIENT_DETAILS_STYLES.gridRow, children: [_jsxs("div", { children: [_jsxs("label", { style: PATIENT_DETAILS_STYLES.label, children: ["First Name ", _jsx("span", { style: { color: "#EF4444" }, children: "*" })] }), _jsx("input", { style: PATIENT_DETAILS_STYLES.input, placeholder: "Jane", value: firstName, onChange: (e) => {
|
|
@@ -40,7 +44,7 @@ const PatientInfoSection = ({ state, dispatch }) => {
|
|
|
40
44
|
type: "SET_PATIENT_NAME",
|
|
41
45
|
payload: `${firstName} ${e.target.value}`,
|
|
42
46
|
});
|
|
43
|
-
} })] })] }), _jsxs("div", { style: PATIENT_DETAILS_STYLES.gridRow, children: [_jsxs("div", { children: [
|
|
47
|
+
} })] })] }), _jsxs("div", { style: PATIENT_DETAILS_STYLES.gridRow, children: [_jsxs("div", { children: [_jsxs("label", { style: PATIENT_DETAILS_STYLES.label, children: ["Age ", _jsx("span", { style: { color: "#EF4444" }, children: "*" })] }), _jsx("input", { style: PATIENT_DETAILS_STYLES.input, type: "number", placeholder: "25", value: state.patientAge || "", min: "0", max: "120", onChange: (e) => {
|
|
44
48
|
const val = e.target.value;
|
|
45
49
|
if (val === "") {
|
|
46
50
|
dispatch({
|
|
@@ -56,20 +60,21 @@ const PatientInfoSection = ({ state, dispatch }) => {
|
|
|
56
60
|
payload: val,
|
|
57
61
|
});
|
|
58
62
|
}
|
|
59
|
-
} })] }), _jsxs("div", { children: [
|
|
63
|
+
} })] }), _jsxs("div", { children: [_jsx("label", { style: PATIENT_DETAILS_STYLES.label, children: "Email" }), _jsx("input", { style: PATIENT_DETAILS_STYLES.input, type: "email", placeholder: "jane@example.com (optional)", value: state.patientEmail, onChange: (e) => dispatch({
|
|
60
64
|
type: "SET_PATIENT_EMAIL",
|
|
61
65
|
payload: e.target.value,
|
|
62
66
|
}) })] })] }), _jsxs("div", { style: PATIENT_DETAILS_STYLES.gridRow, children: [_jsxs("div", { children: [_jsxs("label", { style: PATIENT_DETAILS_STYLES.label, children: ["Gender ", _jsx("span", { style: { color: "#EF4444" }, children: "*" })] }), _jsxs(Select, { value: state.patientGender, onValueChange: (value) => dispatch({
|
|
63
67
|
type: "SET_PATIENT_GENDER",
|
|
64
68
|
payload: value,
|
|
65
|
-
}), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select gender" }) }), _jsx(SelectContent, { children: GENDER_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] })] }), _jsxs("div", { children: [
|
|
69
|
+
}), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select gender" }) }), _jsx(SelectContent, { children: GENDER_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] })] }), _jsxs("div", { children: [_jsx("label", { style: PATIENT_DETAILS_STYLES.label, children: "Blood Group" }), _jsxs(Select, { value: state.bloodGroup, onValueChange: (value) => dispatch({
|
|
66
70
|
type: "SET_BLOOD_GROUP",
|
|
67
71
|
payload: value,
|
|
68
|
-
}), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select blood group" }) }), _jsx(SelectContent, { children: BLOOD_GROUP_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] })] })] })] })] }));
|
|
72
|
+
}), children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select blood group (optional)" }) }), _jsx(SelectContent, { children: BLOOD_GROUP_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] })] })] })] })] }));
|
|
69
73
|
};
|
|
70
74
|
const AddressInfoSection = ({ state, dispatch }) => {
|
|
71
75
|
const theme = useTheme();
|
|
72
|
-
const
|
|
76
|
+
const breakpoint = useBreakpoint(theme);
|
|
77
|
+
const PATIENT_DETAILS_STYLES = getPatientDetailsStyles(theme, "medos", breakpoint);
|
|
73
78
|
return (_jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionCard, children: [_jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionHeader, children: [_jsx(MapPinIcon, {}), _jsx("h3", { style: PATIENT_DETAILS_STYLES.sectionTitle, children: "Address Information" })] }), _jsxs("div", { style: PATIENT_DETAILS_STYLES.sectionBody, children: [_jsxs("div", { style: { marginBottom: 20 }, children: [_jsxs("label", { style: PATIENT_DETAILS_STYLES.label, children: ["Address ", _jsx("span", { style: { color: "#EF4444" }, children: "*" })] }), _jsx("input", { style: PATIENT_DETAILS_STYLES.input, placeholder: "123 Main Street", value: state.patientAddress, onChange: (e) => dispatch({
|
|
74
79
|
type: "SET_PATIENT_ADDRESS",
|
|
75
80
|
payload: e.target.value,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Patient } from "./appointment-booking/types";
|
|
3
|
+
interface PatientSelectionStepProps {
|
|
4
|
+
verifiedPatients: Patient[];
|
|
5
|
+
selectedPatient: Patient | null;
|
|
6
|
+
onSelectPatient: (patient: Patient) => void;
|
|
7
|
+
onProceedAsNewPatient: () => void;
|
|
8
|
+
onBack: () => void;
|
|
9
|
+
isFirstStep?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const PatientSelectionStep: React.FC<PatientSelectionStepProps>;
|
|
12
|
+
export {};
|