Commit 676d0d5f834755394906617f9bcaa1926c09c5d5

Authored by Vu Bui
1 parent 5923d171a7
Exists in master

update

Showing 1 changed file with 20 additions and 18 deletions Side-by-side Diff

... ... @@ -49,7 +49,6 @@ function BookingWizard(props) {
49 49 dispatch({ type: 'BW_HAS_BOOKED', payload: true })
50 50 }
51 51 // get request id
52   - GetHelpRequestID(bwaccessToken)
53 52 }
54 53 // First we get the viewport height and we multiple it by 1% to get a value for a vh unit
55 54 let vh = window.innerHeight * 0.01;
... ... @@ -104,16 +103,15 @@ function BookingWizard(props) {
104 103 }, [show])
105 104  
106 105  
107   - const GetHelpRequestID = async (token) => {
108   - let res = await getRequestHelp (token)
109   - if(res && res.success) {
110   - if(res?.data?.id) {
111   - localStorage.setItem('request_help_id', res?.data?.id)
112   - setRequestHelpID(res?.data?.id)
113   - }
  106 + // const GetHelpRequestID = async (token) => {
  107 + // let res = await getRequestHelp (token)
  108 + // if(res && res.success) {
  109 + // if(res?.data?.id) {
  110 + // localStorage.setItem('request_help_id', res?.data?.id)
  111 + // }
114 112  
115   - }
116   - }
  113 + // }
  114 + // }
117 115 const GetAppoinent = async (patient_id, token) => {
118 116 let res = await getAppointment(patient_id,token);
119 117 if (res && res.success) {
... ... @@ -171,8 +169,8 @@ function BookingWizard(props) {
171 169 if(commonStore?.userProfile?.patient_case?.id) {
172 170 dataPram.case_id = commonStore?.userProfile?.patient_case?.id
173 171 }
174   - if(requestHelpID) {
175   - dataPram.request_id = requestHelpID
  172 + if(localStorage.getItem('request_help_id')) {
  173 + dataPram.request_id = localStorage.getItem('request_help_id')
176 174 }
177 175 console.log("bwaccessToken",bwaccessToken)
178 176 let res = await postRequestHelp(dataPram, bwaccessToken)
... ... @@ -232,12 +230,16 @@ function BookingWizard(props) {
232 230 <i className="bw-icon-clock"></i>
233 231 {commonStore?.hasBooked === true ? <span>RESCHEDULE APPOINTMENT</span> : <span>MAKE APPOINTMENT</span>}
234 232 </div>
235   - <div className="bw-col-right">
  233 + {/* <div className="bw-col-right" onClick={()=> handleRequestHelp('INCOMPLETE_BOOKING', 4)}>
236 234 <div className="bw-btn bw-btn-primary">
237 235 <i className="bw-icon-calling"></i>
238 236 Get Help
239 237 </div>
240   - </div>
  238 + </div> */}
  239 + {/* <div className="bw-btn bw-btn-primary bw-ml-15" onClick={()=> handleRequestHelp('INCOMPLETE_BOOKING', 1)}>
  240 + <i className="bw-icon-Call-Center"></i>
  241 + Request Help
  242 + </div> */}
241 243 </div>
242 244 </div>
243 245 <div className="bw-booking-modal-content">
... ... @@ -278,10 +280,10 @@ function BookingWizard(props) {
278 280 <span>Payment information</span>
279 281 </div>
280 282 <div className="bw-col-right">
281   - <div className="bw-btn bw-btn-primary">
282   - <i className="bw-icon-calling"></i>
283   - Get Help
284   - </div>
  283 + <div className="bw-btn bw-btn-primary bw-ml-15" onClick={()=> handleRequestHelp('INCOMPLETE_BOOKING', 3)}>
  284 + <i className="bw-icon-Call-Center"></i>
  285 + Request Help
  286 + </div>
285 287 </div>
286 288 </div>
287 289 </div>