Commit aa0b9131f9994f46dd0b5f08af8447ab0c71f07c

Authored by Vu Bui
1 parent c60671c601
Exists in master

update

Showing 1 changed file with 17 additions and 2 deletions Side-by-side Diff

... ... @@ -9,6 +9,7 @@ import PickTime from '../../components/Steps/PickTime'
9 9 import PickDoctor from '../../components/Steps/PickDoctor';
10 10 import Profile from '../../components/Steps/Profile';
11 11 import Payment from '../../components/Steps/Payment';
  12 +
12 13 import './styles.scss'
13 14 import { useCommonState, useCommonDispatch } from '../../store/common'
14 15  
... ... @@ -17,6 +18,7 @@ function BookingWizard(props) {
17 18 const [step, setStep] = useState('step-login')
18 19 const commonStore = useCommonState()
19 20 const dispatch = useCommonDispatch()
  21 +
20 22 const [cookies, setCookie, removeCookie] = useCookies('patient-dashboard')
21 23 let { accessToken } = cookies
22 24  
... ... @@ -38,6 +40,8 @@ function BookingWizard(props) {
38 40 localStorage.setItem('activeStep','step-login') // remove active step
39 41 }
40 42 },[accessToken])
  43 +
  44 +
41 45  
42 46 useEffect(() => {
43 47 if (commonStore.activeStep !== null) {
... ... @@ -53,6 +57,7 @@ function BookingWizard(props) {
53 57 dispatch({ type: 'BW_SHOW_BOOKING_MODAL', payload: false })
54 58 }
55 59  
  60 +
56 61 const renderStep = (step) => {
57 62 switch (step) {
58 63 case 'step-login':
... ... @@ -66,7 +71,8 @@ function BookingWizard(props) {
66 71 <div className="bw-booking-modal-header">
67 72 <div className="bw-row">
68 73 <div className="bw-col-left">
69   - <i className="bw-icon-health-care"></i>
  74 + {process.env.REACT_APP_NAME ==='rce' && <i className="bw-icon-health-care"></i>}
  75 + {process.env.REACT_APP_NAME ==='mm' && <i className="bw-icon-leaf"></i>}
70 76 <span>Confirm your services</span>
71 77 </div>
72 78 <div className="bw-col-right">
... ... @@ -132,7 +138,7 @@ function BookingWizard(props) {
132 138 <div className="bw-booking-modal-header">
133 139 <div className="bw-row">
134 140 <div className="bw-col-left">
135   - <i className="bw-icon-health-doctor"></i>
  141 + <i className="bw-icon-card"></i>
136 142 <span>Payment information</span>
137 143 </div>
138 144 <div className="bw-col-right">
... ... @@ -153,6 +159,10 @@ function BookingWizard(props) {
153 159 return <>
154 160 <Profile />
155 161 </>
  162 + case 'step-signup-update-profile':
  163 + return <>
  164 + <Profile signupStep={true} />
  165 + </>
156 166 default:
157 167 break;
158 168 }
... ... @@ -161,6 +171,7 @@ function BookingWizard(props) {
161 171 return (<>
162 172 {process.env.NODE_ENV === 'development' ?
163 173 <Portal id="bwBookingWizardID">
  174 + <>
164 175 {show && <div className="bw-backdrop" onClick={() => handleCloseModal()}></div>}
165 176 {show && <div className="bw-booking-popup-wraper">
166 177 <div className="bw-booking-modal">
... ... @@ -176,6 +187,8 @@ function BookingWizard(props) {
176 187 />
177 188 </div>
178 189 </div>}
  190 +
  191 + </>
179 192 </Portal> :
180 193 <Portal id="bwBookingWizardID">
181 194 <root.div>
... ... @@ -196,7 +209,9 @@ function BookingWizard(props) {
196 209 />
197 210 </div>
198 211 </div>}
  212 +
199 213 </root.div>
  214 +
200 215 </Portal>
201 216 }
202 217 </>