end user url routing issue fixed
This commit is contained in:
parent
fc3c328574
commit
146b40517f
@ -610,11 +610,11 @@ console.log(params)
|
|||||||
this.date= param
|
this.date= param
|
||||||
|
|
||||||
console.log(this.date,param,this.duration, this.ServiceId)
|
console.log(this.date,param,this.duration, this.ServiceId)
|
||||||
let thirtyMinutes = this.duration * 60 * 1000; // convert 30 minutes to milliseconds
|
let thirtyMinutes = this.duration*60000; // convert 30 minutes to milliseconds
|
||||||
let date1 = new Date(param);
|
let date1 = new Date(param);
|
||||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||||
console.log(date1);
|
console.log(date1);
|
||||||
console.log(date2);
|
console.log(date2,thirtyMinutes);
|
||||||
const currentTime = new Date(); // Get the current time
|
const currentTime = new Date(); // Get the current time
|
||||||
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
||||||
|
|
||||||
@ -630,10 +630,10 @@ console.log(params)
|
|||||||
const filteredTimes = this.slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
const filteredTimes = this.slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
||||||
|
|
||||||
console.log(resultArray,filteredTimes);
|
console.log(resultArray,filteredTimes);
|
||||||
if(filteredTimes.length > 1){
|
// if(filteredTimes.length > 1){
|
||||||
let result = filteredTimes.pop();
|
// let result = filteredTimes.pop();
|
||||||
console.log(result);
|
// console.log(result);
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.slotsResult = filteredTimes
|
this.slotsResult = filteredTimes
|
||||||
// this.show = false;
|
// this.show = false;
|
||||||
|
|||||||
@ -56,9 +56,15 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
console.log(URL,slot_array)
|
console.log(URL,slot_array)
|
||||||
let URL_AS_LIST = URL.split('/');
|
let URL_AS_LIST = URL.split('/');
|
||||||
console.log(URL_AS_LIST);
|
console.log(URL_AS_LIST);
|
||||||
|
let cusID;
|
||||||
|
if(URL_AS_LIST[2] == 'business'){
|
||||||
|
cusID=URL_AS_LIST[9]
|
||||||
|
}else{
|
||||||
|
cusID=URL_AS_LIST[8]
|
||||||
|
}
|
||||||
// if(serviceDetails.hasOwnProperty('userId')){
|
// if(serviceDetails.hasOwnProperty('userId')){
|
||||||
serviceDetails.userId = localStorage.getItem('user_id')
|
serviceDetails.userId = localStorage.getItem('user_id')
|
||||||
let paramPay = {"cusId":URL_AS_LIST[9]}
|
let paramPay = {"cusId":cusID}
|
||||||
this.end_user.paymentstatus(paramPay).subscribe(resPay => {
|
this.end_user.paymentstatus(paramPay).subscribe(resPay => {
|
||||||
|
|
||||||
|
|
||||||
@ -79,9 +85,51 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
let serviceMap = res['data'][0].id
|
let serviceMap = res['data'][0].id
|
||||||
let time = new Date().toLocaleTimeString()
|
let time = new Date().toLocaleTimeString()
|
||||||
|
let param= {
|
||||||
|
"busId": serviceDetails.busId,
|
||||||
|
"cusId": cusID,
|
||||||
|
"appoinmentDate": slot_array[0].date,
|
||||||
|
"userId": serviceDetails.userId,
|
||||||
|
"appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
||||||
|
//"servicemap" :this.bookedAppointment_servicemap
|
||||||
|
}
|
||||||
|
console.log(param)
|
||||||
|
|
||||||
|
this.end_user.CheckAppoinmentsDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res)
|
||||||
|
res = res.data;
|
||||||
|
// this.end_user.summmarylist.next(res.data)
|
||||||
|
console.log('booked2', res);
|
||||||
|
this.customerBookingDetails = res[0].customer[0]
|
||||||
|
console.log(this.customerBookingDetails)
|
||||||
|
this.bookingSummary = res[0]
|
||||||
|
|
||||||
|
this.bookingSummary.createdAt2 = this.bookingSummary.createdAt
|
||||||
|
if(this.bookingSummary.appoinmentSlots instanceof Array){
|
||||||
|
this.bookingSummary.appoinmentSlots =this.bookingSummary.appoinmentSlots
|
||||||
|
}else{
|
||||||
|
this.bookingSummary.appoinmentSlots =JSON.parse(this.bookingSummary.appoinmentSlots)
|
||||||
|
}
|
||||||
|
// this.bookingSummary.appoinmentSlots =JSON.parse(this.bookingSummary.appoinmentSlots)
|
||||||
|
|
||||||
|
// this.end_user.getcusServicesMapDetails()
|
||||||
|
let param ={id:this.bookingSummary.serviceMap}
|
||||||
|
this.end_user.getcusServicesMapDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res)
|
||||||
|
this.serviceMapDetails = res['data'][0]
|
||||||
|
this.busCurrency = this.serviceMapDetails['business'][0].currency
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
let params= {
|
let params= {
|
||||||
"busId": serviceDetails.busId,
|
"busId": serviceDetails.busId,
|
||||||
"cusId": URL_AS_LIST[9],
|
"cusId": cusID,
|
||||||
"appoinmentDate": slot_array[0].date,
|
"appoinmentDate": slot_array[0].date,
|
||||||
"appoinmentTime": time,
|
"appoinmentTime": time,
|
||||||
"serviceMap": serviceMap,
|
"serviceMap": serviceMap,
|
||||||
@ -91,7 +139,7 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
"appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
"appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
||||||
//"servicemap" :this.bookedAppointment_servicemap
|
//"servicemap" :this.bookedAppointment_servicemap
|
||||||
}
|
}
|
||||||
console.log(params)
|
|
||||||
this.end_user.CreateAppoinmentsCus(params).subscribe(res => {
|
this.end_user.CreateAppoinmentsCus(params).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -125,6 +173,9 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -54,16 +54,16 @@ const routes: Routes = [{
|
|||||||
// component: ConsultantsListComponent
|
// component: ConsultantsListComponent
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details',
|
path: 'practitioner/:randstr',
|
||||||
component: DoctorProfileComponent
|
component: DoctorProfileComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details/services',
|
path: 'practitioner/:randstr/services',
|
||||||
component: ServiceListComponent
|
component: ServiceListComponent
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details/services/slots/list',
|
path: 'practitioner/:randstr/services/slots/list',
|
||||||
component: SlotBookingDetailsComponent
|
component: SlotBookingDetailsComponent
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -89,15 +89,15 @@ const routes: Routes = [{
|
|||||||
},
|
},
|
||||||
///
|
///
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details/services/slots/list/cus',
|
path: 'practitioner/:randstr/services/slots/list/cus',
|
||||||
component: CustomerInfoComponent
|
component: CustomerInfoComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt',
|
path: 'practitioner/:randstr/services/slots/list/cus/:cusId/pt',
|
||||||
component: PaymentComponent
|
component: PaymentComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt/bts',
|
path: 'practitioner/:randstr/services/slots/list/cus/:cusId/pt/bts',
|
||||||
component: BookingSummaryComponent
|
component: BookingSummaryComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -51,6 +51,11 @@ private apiUrl = environment.apiEndpoint;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CheckAppoinmentsDetails(Params): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'CheckAppoinmentsDetails', Params)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
paymentRequest(Params): Observable<any> {
|
paymentRequest(Params): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'paymentRequest', Params)
|
return this._http.post(this.apiUrl + 'paymentRequest', Params)
|
||||||
|
|
||||||
|
|||||||
@ -78,11 +78,11 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
let URL_AS_LIST = URL.split('/');
|
let URL_AS_LIST = URL.split('/');
|
||||||
console.log(URL_AS_LIST);
|
console.log(URL_AS_LIST);
|
||||||
|
|
||||||
if(URL_AS_LIST[2] == 'practitioner'){
|
// if(URL_AS_LIST[2] == 'practitioner'){
|
||||||
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
|
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
|
||||||
}else{
|
// }else{
|
||||||
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -255,7 +255,7 @@ if(this.getHours.length != 0){
|
|||||||
this.slotTime = param
|
this.slotTime = param
|
||||||
|
|
||||||
console.log(this.date,param,this.servicesName.duration)
|
console.log(this.date,param,this.servicesName.duration)
|
||||||
let thirtyMinutes = this.servicesName.duration * 60 * 1000; // convert 30 minutes to milliseconds
|
let thirtyMinutes = this.servicesName.duration *60000; // convert 30 minutes to milliseconds
|
||||||
console.log(thirtyMinutes)
|
console.log(thirtyMinutes)
|
||||||
let date1 = new Date(param);
|
let date1 = new Date(param);
|
||||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||||
|
|||||||
@ -7,8 +7,8 @@ export const environment = {
|
|||||||
production: false,
|
production: false,
|
||||||
environmentName: 'Testing Environment',//Localhost Environment.
|
environmentName: 'Testing Environment',//Localhost Environment.
|
||||||
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
||||||
// apiEndpoint:'http://192.168.1.14:8080/api/',
|
apiEndpoint:'http://192.168.1.23:8080/api/',
|
||||||
apiEndpoint:'https://api.venbait.in/api/',
|
// apiEndpoint:'https://api.venbait.in/api/',
|
||||||
|
|
||||||
//EndUser URL
|
//EndUser URL
|
||||||
endUserUrl: window.location.origin+'/#/customer/',
|
endUserUrl: window.location.origin+'/#/customer/',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user