rounting issue fixed
This commit is contained in:
parent
34146c7a71
commit
f1a72f8182
@ -28,6 +28,20 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
constructor(public end_user:EndUserService,private router:Router,) {
|
constructor(public end_user:EndUserService,private router:Router,) {
|
||||||
this.logo = localStorage.getItem('logo')
|
this.logo = localStorage.getItem('logo')
|
||||||
this.busName = localStorage.getItem('busName')
|
this.busName = localStorage.getItem('busName')
|
||||||
|
|
||||||
|
this.end_user.bookedDetails_observable$.subscribe((res) => {
|
||||||
|
console.log('booked2', res);
|
||||||
|
|
||||||
|
if(res instanceof Array){
|
||||||
|
|
||||||
|
if(res.length == 0){
|
||||||
|
this.backRedireact()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
this.end_user.summmarylist_observable$.subscribe((res) => {
|
this.end_user.summmarylist_observable$.subscribe((res) => {
|
||||||
console.log('booked', res);
|
console.log('booked', res);
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
|
|||||||
@ -239,7 +239,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center"> -->
|
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center"> -->
|
||||||
<mat-form-field style="width: 80%; ">
|
<mat-form-field style="width: 80%;display:none; ">
|
||||||
<input matInput placeholder="udf3" type="text" name="udf3" formControlName="udf3" >
|
<input matInput placeholder="udf3" type="text" name="udf3" formControlName="udf3" >
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -40,6 +40,7 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
currency:any=[];
|
currency:any=[];
|
||||||
noChangeNo: any = 0;
|
noChangeNo: any = 0;
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
private apiUrlkey = environment;
|
||||||
logo: any;
|
logo: any;
|
||||||
formData:any =[];
|
formData:any =[];
|
||||||
url ="https://api.payaidpayments.com/v2/paymentrequest";
|
url ="https://api.payaidpayments.com/v2/paymentrequest";
|
||||||
@ -50,6 +51,14 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
constructor(private _location: Location,public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
|
constructor(private _location: Location,public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
|
||||||
this._cus.bookedDetails_observable$.subscribe((res) => {
|
this._cus.bookedDetails_observable$.subscribe((res) => {
|
||||||
console.log('booked2', res);
|
console.log('booked2', res);
|
||||||
|
|
||||||
|
if(res instanceof Array){
|
||||||
|
|
||||||
|
if(res.length == 0){
|
||||||
|
this.backRedireact()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
this.bookedDetails = res
|
this.bookedDetails = res
|
||||||
console.log(this.bookedDetails)
|
console.log(this.bookedDetails)
|
||||||
|
|
||||||
@ -59,6 +68,16 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
if (performance.navigation.type === 1) {
|
||||||
|
console.log(0)
|
||||||
|
// This condition checks if the page is refreshed
|
||||||
|
// Type 1 represents a page reload event
|
||||||
|
|
||||||
|
// Redirect to another page using the Router navigate method
|
||||||
|
// this.router.navigate(['/booking/practitioner/lytv3lm']);
|
||||||
|
}
|
||||||
|
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
console.log(URL)
|
console.log(URL)
|
||||||
let URL_AS_LIST = URL.split('/');
|
let URL_AS_LIST = URL.split('/');
|
||||||
@ -109,13 +128,13 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
return prefix + randomNum;
|
return prefix + randomNum;
|
||||||
}
|
}
|
||||||
let payment = {
|
let payment = {
|
||||||
api_key: '4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
api_key: ''+this.apiUrlkey.payment_api_key+'',
|
||||||
hash: '',
|
hash: '',
|
||||||
amount: ""+this.bookedDetails.amount+"",
|
amount: ""+this.bookedDetails.amount+"",
|
||||||
order_id: generateRandomString(),
|
order_id: generateRandomString(),
|
||||||
description: 'testing',
|
description: 'testing',
|
||||||
mode: 'TEST',
|
mode: ''+this.apiUrlkey.payment_mode+'',
|
||||||
return_url: 'http://localhost:8080/api/paymentResponse',
|
return_url: this.apiUrl+'paymentResponse',
|
||||||
currency: 'INR',
|
currency: 'INR',
|
||||||
country: 'IND',
|
country: 'IND',
|
||||||
udf1: ''+busId+'',
|
udf1: ''+busId+'',
|
||||||
@ -325,10 +344,10 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
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(['booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
this.router.navigate(['/booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
||||||
console.log('practitioner')
|
console.log('practitioner')
|
||||||
}else{
|
}else{
|
||||||
this.router.navigate(['booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
this.router.navigate(['/booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
||||||
console.log('Business')
|
console.log('Business')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,7 +390,8 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
}else {
|
}else {
|
||||||
if(this.verifyOTP == 1){
|
if(this.verifyOTP == 1){
|
||||||
let payment = {
|
let payment = {
|
||||||
api_key: "4cb964d4-9ef4-4a25-8f85-a2a13f43cbba",
|
// api_key: "4cb964d4-9ef4-4a25-8f85-a2a13f43cbba",
|
||||||
|
api_key: ''+this.apiUrlkey.payment_api_key+'',
|
||||||
hash: '',
|
hash: '',
|
||||||
amount: this.bookedDetails.amount,
|
amount: this.bookedDetails.amount,
|
||||||
name: row_obj.cusName,
|
name: row_obj.cusName,
|
||||||
@ -381,8 +401,8 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
address_line_2: row_obj.address_1,
|
address_line_2: row_obj.address_1,
|
||||||
order_id: generateRandomString(),
|
order_id: generateRandomString(),
|
||||||
description: 'testing',
|
description: 'testing',
|
||||||
mode: 'TEST',
|
mode: ''+this.apiUrlkey.payment_mode+'',
|
||||||
return_url: 'http://localhost:8080/api/paymentResponse',
|
return_url: this.apiUrl+'paymentResponse',
|
||||||
currency: 'INR',
|
currency: 'INR',
|
||||||
country: 'IND',
|
country: 'IND',
|
||||||
zip_code: row_obj.pincode,
|
zip_code: row_obj.pincode,
|
||||||
@ -455,6 +475,18 @@ this.paymentform = payment;
|
|||||||
|
|
||||||
|
|
||||||
onclickfun(){
|
onclickfun(){
|
||||||
|
|
||||||
|
if(this.verifyOTP == 0){
|
||||||
|
this.getOTP(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.form.valid ){
|
||||||
|
|
||||||
|
return
|
||||||
|
}else {
|
||||||
|
if(this.verifyOTP == 1){
|
||||||
|
|
||||||
|
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
let busId = localStorage.getItem('busId')
|
let busId = localStorage.getItem('busId')
|
||||||
|
|
||||||
@ -471,11 +503,7 @@ onclickfun(){
|
|||||||
console.log(addFormData)
|
console.log(addFormData)
|
||||||
|
|
||||||
|
|
||||||
function generateRandomString() {
|
|
||||||
const prefix = "ORD-";
|
|
||||||
const randomNum = (Math.random() + 1).toString(36).substring(7);
|
|
||||||
return prefix + randomNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._cus.addCusDetails(addFormData).subscribe(async (res1) => {
|
this._cus.addCusDetails(addFormData).subscribe(async (res1) => {
|
||||||
if (res1.status == 200) {
|
if (res1.status == 200) {
|
||||||
@ -486,6 +514,9 @@ if (res1.status == 200) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -550,13 +581,14 @@ let paramsmap= {
|
|||||||
let appointmentId = res[0].id
|
let appointmentId = res[0].id
|
||||||
|
|
||||||
let payment = {
|
let payment = {
|
||||||
api_key: '4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
// api_key: '4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
||||||
|
api_key: ''+this.apiUrlkey.payment_api_key+'',
|
||||||
hash: '',
|
hash: '',
|
||||||
amount: ""+this.bookedDetails.amount+"",
|
amount: ""+this.bookedDetails.amount+"",
|
||||||
order_id: ''+bookingId+'',
|
order_id: ''+bookingId+'',
|
||||||
description: 'testing',
|
description: 'testing',
|
||||||
mode: 'TEST',
|
mode: ''+this.apiUrlkey.payment_mode+'',
|
||||||
return_url: 'http://localhost:8080/api/paymentResponse',
|
return_url: this.apiUrl+'paymentResponse',
|
||||||
currency: 'INR',
|
currency: 'INR',
|
||||||
country: 'IND',
|
country: 'IND',
|
||||||
udf1: ''+busId+'',
|
udf1: ''+busId+'',
|
||||||
|
|||||||
@ -42,6 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<div *ngIf="bookedAppointment.userName != null">
|
||||||
<mat-toolbar>
|
<mat-toolbar>
|
||||||
<div fxLayout="row wrap" style="padding:15px 0px;">
|
<div fxLayout="row wrap" style="padding:15px 0px;">
|
||||||
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
|
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
|
||||||
@ -168,4 +169,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
</div>
|
||||||
<ngx-spinner bdColor = "rgba(0, 0, 0, 0.8)" size = "medium" color = "#178a78" type = "square-jelly-box" [fullScreen] = "true"><p style="color: white" > Please Wait...... </p></ngx-spinner>
|
<ngx-spinner bdColor = "rgba(0, 0, 0, 0.8)" size = "medium" color = "#178a78" type = "square-jelly-box" [fullScreen] = "true"><p style="color: white" > Please Wait...... </p></ngx-spinner>
|
||||||
|
|||||||
@ -8,7 +8,8 @@ export const environment = {
|
|||||||
//EndUser URL
|
//EndUser URL
|
||||||
endUserUrl: window.location.origin+'/#/booking/',
|
endUserUrl: window.location.origin+'/#/booking/',
|
||||||
mailUrl:window.location.origin,
|
mailUrl:window.location.origin,
|
||||||
|
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
||||||
|
payment_mode:'LIVE',
|
||||||
|
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
||||||
|
|||||||
@ -13,6 +13,8 @@ export const environment = {
|
|||||||
//EndUser URL
|
//EndUser URL
|
||||||
endUserUrl: window.location.origin+'/#/booking/',
|
endUserUrl: window.location.origin+'/#/booking/',
|
||||||
mailUrl:window.location.origin,
|
mailUrl:window.location.origin,
|
||||||
|
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
||||||
|
payment_mode:'TEST',
|
||||||
|
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
||||||
@ -24,6 +26,8 @@ export const environment = {
|
|||||||
measurementId: "G-48RM8BFRFK"
|
measurementId: "G-48RM8BFRFK"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// web:{
|
// web:{
|
||||||
// client_id:"1070360493694-f47l99s7bjqf7of1n7amgkg3mfk7l425.apps.googleusercontent.com",
|
// client_id:"1070360493694-f47l99s7bjqf7of1n7amgkg3mfk7l425.apps.googleusercontent.com",
|
||||||
// project_id:"neon-nexus-386307",
|
// project_id:"neon-nexus-386307",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user