|
|
@@ -47,7 +47,8 @@ import axios from "axios"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import RazorpayCheckout from "react-native-razorpay"; |
|
|
|
import { Input } from "react-native-elements"; |
|
|
|
|
|
|
|
import back from "../assets/icons/back1.png"; |
|
|
|
import time from "../assets/icons/time.png"; |
|
|
|
export default class CreateAppointment extends Component { |
|
|
|
constructor(props) { |
|
|
|
super(props); |
|
|
@@ -84,8 +85,7 @@ export default class CreateAppointment extends Component { |
|
|
|
description: this.state.description, |
|
|
|
// total_amount: this.state.price_per_conversation, |
|
|
|
// booking_type: this.state.type }, |
|
|
|
appointmentMode: |
|
|
|
'online' |
|
|
|
appointmentMode: "online", |
|
|
|
}, |
|
|
|
}) |
|
|
|
.then(async (response) => { |
|
|
@@ -146,28 +146,26 @@ export default class CreateAppointment extends Component { |
|
|
|
// }else{ |
|
|
|
// this.check_timing(); |
|
|
|
// } |
|
|
|
await axios |
|
|
|
.post( |
|
|
|
`${api_url1}/doctor_booking/`, |
|
|
|
await axios.post( |
|
|
|
`${api_url1}/doctor_booking/`, |
|
|
|
|
|
|
|
{ |
|
|
|
doctor: this.state.doctor_id, |
|
|
|
// this.state.doctor_id, |
|
|
|
// doctor: this.state.phone_number, |
|
|
|
description: this.state.description, |
|
|
|
// this.state.description, |
|
|
|
title: this.state.title, |
|
|
|
// this.state.password, |
|
|
|
appointmentTime:this.state.start_time, |
|
|
|
appointmentMode: |
|
|
|
'online' |
|
|
|
//"2021-12-10T08:40:08.675+00:00", |
|
|
|
// this.state.start_time, |
|
|
|
// Authorization: `Bearer ${global.fcm_token}`, |
|
|
|
}, |
|
|
|
{ headers: { Authorization: `Bearer ${global.fcm_token}` } } |
|
|
|
) |
|
|
|
// .then((res) => console.log(res.data)); |
|
|
|
{ |
|
|
|
doctor: this.state.doctor_id, |
|
|
|
// this.state.doctor_id, |
|
|
|
// doctor: this.state.phone_number, |
|
|
|
description: this.state.description, |
|
|
|
// this.state.description, |
|
|
|
title: this.state.title, |
|
|
|
// this.state.password, |
|
|
|
appointmentTime: this.state.start_time, |
|
|
|
appointmentMode: "online", |
|
|
|
//"2021-12-10T08:40:08.675+00:00", |
|
|
|
// this.state.start_time, |
|
|
|
// Authorization: `Bearer ${global.fcm_token}`, |
|
|
|
}, |
|
|
|
{ headers: { Authorization: `Bearer ${global.fcm_token}` } } |
|
|
|
); |
|
|
|
// .then((res) => console.log(res.data)); |
|
|
|
alert("Appointment fixed"); |
|
|
|
this.props.navigation.navigate("Home"); |
|
|
|
}; |
|
|
@@ -250,11 +248,20 @@ export default class CreateAppointment extends Component { |
|
|
|
onPress={this.handleBackButtonClick} |
|
|
|
activeOpacity={1} |
|
|
|
> |
|
|
|
<Icon |
|
|
|
<Image |
|
|
|
style={{ |
|
|
|
width: 20, |
|
|
|
height: 20, |
|
|
|
backgroundColor: "white", |
|
|
|
marginVertical: 12, |
|
|
|
}} |
|
|
|
source={back} |
|
|
|
/> |
|
|
|
{/* <Icon |
|
|
|
onPress={this.handleBackButtonClick} |
|
|
|
style={styles.create_style3} |
|
|
|
name="arrow-back" |
|
|
|
/> |
|
|
|
/> */} |
|
|
|
</TouchableOpacity> |
|
|
|
<View style={styles.create_style4} /> |
|
|
|
<Text style={styles.create_style5}>New Appointment</Text> |
|
|
@@ -293,7 +300,17 @@ export default class CreateAppointment extends Component { |
|
|
|
style={{ width: 100 }} |
|
|
|
transparent |
|
|
|
> |
|
|
|
<Icon style={styles.create_style13} name="time" /> |
|
|
|
{/* <Icon style={styles.create_style13} name="time" /> */} |
|
|
|
<Image |
|
|
|
style={{ |
|
|
|
width: 40, |
|
|
|
height: 40, |
|
|
|
backgroundColor: "white", |
|
|
|
marginVertical: 12, |
|
|
|
marginLeft:19 |
|
|
|
}} |
|
|
|
source={time} |
|
|
|
/> |
|
|
|
</Button> |
|
|
|
<Text style={styles.create_style14}> |
|
|
|
(Select your date & time) |
|
|
|