End User URL

This commit is contained in:
surendar.m@watermelon.us 2023-04-12 10:11:07 +05:30
parent 7c6eb8b60d
commit 5d0cf0f510
7 changed files with 109 additions and 89 deletions

View File

@ -406,10 +406,10 @@
<div class="url-generate mb20"> <div class="url-generate mb20">
<div class="url-link dis-flex"> <div class="url-link dis-flex">
<span class="url field-center boxsize"> <span class="url field-center boxsize">
<input type="text" placeholder=" {{apiUrl}}" name="booking-url" id="zb-mb-workspaceBookingPageUrl" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view"> <input type="text" placeholder=" {{endUserURL}}" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view">
</span> </span>
<!-- <span id="zb-mb-BookingPageUrlCustomize" class="customize-link field-center cp ml10 mt0 mr10" data-ember-action="" data-ember-action-813="813">Customize</span> --> <!-- <span id="zb-mb-BookingPageUrlCustomize" class="customize-link field-center cp ml10 mt0 mr10" data-ember-action="" data-ember-action-813="813">Customize</span> -->
<span class="url-button field-center boxsize pb1"><button id="zb-mb-BookingPageUrlCopyLink" class="copy-button boxsize cp" data-ember-action="" data-ember-action-814="814">Copy</button></span> <span class="url-button field-center boxsize pb1"><button (click)="copyToClipBoard(endUserURL)" class="copy-button boxsize cp">Copy</button></span>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>

View File

@ -177,6 +177,7 @@ label{
margin-left: 6rem; margin-left: 6rem;
} }
.copy-button { .copy-button {
cursor: pointer;
background: #625A92; background: #625A92;
border: 1px solid #625A92; border: 1px solid #625A92;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;

View File

@ -35,7 +35,6 @@ export class ConsultantSettingComponent implements OnInit {
public servicesList:any = new MatTableDataSource(); public servicesList:any = new MatTableDataSource();
practitionerdetails: any; practitionerdetails: any;
servicesList_array: any = []; servicesList_array: any = [];
apiUrl:any;
serviceCheckedData: number; serviceCheckedData: number;
checkedArray: any[]; checkedArray: any[];
servicesList_data: any=[]; servicesList_data: any=[];
@ -50,6 +49,8 @@ export class ConsultantSettingComponent implements OnInit {
exp: any=[]; exp: any=[];
qualification: any=[]; qualification: any=[];
id: any; id: any;
public end_User_Url = environment.endUserUrl;
endUserURL: any;
constructor(private notifierService: NotifierService,private formBuilder: FormBuilder, public dialog: MatDialog, public _con:ConsultantService, private fb: FormBuilder, public _api:ConsultantService,private locationStrategy: LocationStrategy) {} constructor(private notifierService: NotifierService,private formBuilder: FormBuilder, public dialog: MatDialog, public _con:ConsultantService, private fb: FormBuilder, public _api:ConsultantService,private locationStrategy: LocationStrategy) {}
@ -157,7 +158,8 @@ workingDialog(action,obj) {
this.workinghours = JSON.parse(this.practitionerdetails.workingHours) this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
// this.workinghours = this.practitionerdetails.workingHours // this.workinghours = this.practitionerdetails.workingHours
console.log(this.workinghours) console.log(this.workinghours)
this.apiUrl = 'http://localhost:4200/customer/business/'+this.usersList.randStr this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr
console.log(this.endUserURL)
} }
} ); } );
@ -211,8 +213,6 @@ workingDialog(action,obj) {
openDialog(action,obj) { openDialog(action,obj) {
console.log(this.working_customize) console.log(this.working_customize)
//if(this.working_customize == false){ //if(this.working_customize == false){
// obj.action = action; // obj.action = action;
const dialogRef = this.dialog.open(EditWorkingHoursComponent, { const dialogRef = this.dialog.open(EditWorkingHoursComponent, {
width: '48%', width: '48%',
@ -257,6 +257,7 @@ workingDialog(action,obj) {
this._api.createDurationFeesDetails(param).subscribe(res => { this._api.createDurationFeesDetails(param).subscribe(res => {
if (res.status == 200) { if (res.status == 200) {
console.log(res) console.log(res)
this.getServicesList(this.usersList.id,this.usersList.busId)
// this.checkedList = res.data; // this.checkedList = res.data;
} }
} ); } );
@ -300,15 +301,17 @@ workingDialog(action,obj) {
save(){ save(){
this.isEditable = false; this.isEditable = false;
let userid = localStorage.getItem('user_id')
let param: any = { "exp": this.exp, let param: any = { "exp": this.exp,
"id": this.id, // "id": this.id,
"qualification": this.qualification, "qualification": this.qualification,
"fees": "800", "fees": "800",
"languages": this.languages, "languages": this.languages,
"dob": this.dob, "dob": this.dob,
"designtion": this.qualification, "designtion": this.qualification,
// "gender": this.gender, // "gender": this.gender,
"userName": this.userName "userName": this.userName,
"userId":userid
} }
if(this.usersList['practitionerInfos'].length>0) { if(this.usersList['practitionerInfos'].length>0) {
param.id = this.id param.id = this.id
@ -326,5 +329,19 @@ workingDialog(action,obj) {
} }
copyToClipBoard(message) {
console.log(message)
this.notifierService.notify('success', 'Copied...!');
const selBox = document.createElement('textarea');
selBox.style.position = 'fixed';
selBox.style.left = '0';
selBox.style.top = '0';
selBox.style.opacity = '0';
selBox.value = message;
document.body.appendChild(selBox);
selBox.focus();
selBox.select();
document.execCommand('copy');
document.body.removeChild(selBox);
}
} }

View File

@ -64,15 +64,12 @@ export class CustomersListComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
console.log('in')
this.recordStatus=false; this.recordStatus=false;
this.getCustomersList() this.getCustomersList()
} }
ngAfterViewInit() {
this.customersListSource.paginator = this.paginator;
console.log(this.customersListSource,this.paginator)
this.customersListSource.sort = this.sort;
}
applyFilter(filterValue: string) { applyFilter(filterValue: string) {
filterValue = filterValue.trim(); // Remove whitespace filterValue = filterValue.trim(); // Remove whitespace
@ -81,6 +78,7 @@ export class CustomersListComponent implements OnInit {
} }
getCustomersList() { getCustomersList() {
console.log('in')
//this._pd.getTabStatusPdDetails(this.tabStatus) //this._pd.getTabStatusPdDetails(this.tabStatus)
let user_role = localStorage.getItem('user_role'); let user_role = localStorage.getItem('user_role');
if(user_role == 'PRACTITIONER'){ if(user_role == 'PRACTITIONER'){
@ -89,17 +87,21 @@ export class CustomersListComponent implements OnInit {
this.appoinmentsList = res.data; this.appoinmentsList = res.data;
let id = localStorage.getItem('user_id') let id = localStorage.getItem('user_id')
console.log(id) console.log(id)
console.log(this.appoinmentsList) console.log(this.appoinmentsList)
let filter = this.appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"] let filter = this.appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"]
== id}) == id})
console.log(filter) console.log(filter)
filter.forEach(element => { filter.forEach(element => {
this.appoinmentsIds.push( element.customer[0].id) this.appoinmentsIds.push( element.customer[0].id)
}); });
this.getCustomerDetails()
}
})
}
this.getCustomerDetails()
}
getCustomerDetails(){
this._cus.getCustomersListDetails().subscribe(res => { this._cus.getCustomersListDetails().subscribe(res => {
if (res.status == 200) { if (res.status == 200) {
this.isLoading = false this.isLoading = false
@ -122,7 +124,6 @@ export class CustomersListComponent implements OnInit {
console.log(result) console.log(result)
this.customersList = result this.customersList = result
this.customersListSource['data'] = this.customersList; this.customersListSource['data'] = this.customersList;
} }
} }
@ -132,19 +133,14 @@ export class CustomersListComponent implements OnInit {
this.recordStatus=true; this.recordStatus=true;
} }
}, error => this.isLoading = false); }, error => this.isLoading = false);
}
else{
}
})
} }
ngAfterViewInit() {
this.customersListSource.paginator = this.paginator;
console.log(this.customersListSource,this.paginator)
this.customersListSource.sort = this.sort;
} }
pageChange(e) { pageChange(e) {
console.log(e); console.log(e);
} }

View File

@ -20,6 +20,7 @@
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)"> <mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
Please enter a valid email address Please enter a valid email address
</mat-error> </mat-error>
<mat-error *ngIf="myError('email', 'required')">email is required</mat-error>
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required"> <mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
Email is required Email is required
</mat-error> </mat-error>
@ -29,7 +30,9 @@
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80"> <div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Phone No" type="text" name="phone" formControlName="phoneNo" required> <input matInput placeholder="Phone No" type="text" name="phone" formControlName="phoneNo" required>
<mat-error *ngIf="myError('phoneNo', 'required')">Phone No is required</mat-error> <mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error> <mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
</mat-form-field> </mat-form-field>
<div id="sign-in-button"></div> <div id="sign-in-button"></div>

View File

@ -43,12 +43,12 @@ export class CustomerInfoComponent implements OnInit {
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern( email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$', '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
),]), ),]),
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
address_1: new FormControl('', [Validators.maxLength(50)]), address_1: new FormControl('', [Validators.maxLength(50)]),
city: new FormControl('', [Validators.maxLength(10)]), city: new FormControl('', [Validators.maxLength(10)]),
state: new FormControl('', [Validators.maxLength(10)]), state: new FormControl('', [Validators.maxLength(10)]),
otp: new FormControl('', [Validators.maxLength(10)]), otp: new FormControl('', [Validators.maxLength(10)]),
pincode: new FormControl('',[Validators.maxLength(6)]), pincode: new FormControl('',[Validators.maxLength(6)]),
phoneNo: new FormControl('', [Validators.required, Validators.maxLength(10),Validators.minLength(10)]),
}); });
} }

View File

@ -10,6 +10,9 @@ export const environment = {
apiEndpoint:'http://192.168.1.17:8080/api/', apiEndpoint:'http://192.168.1.17:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/', // apiEndpoint:'https://api.venbait.in/api/',
//EndUser URL
endUserUrl:'https://venbainfotech.com/appointment/#/customer/business/',
firebase: { firebase: {
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw", apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
authDomain: "venba-appointment.firebaseapp.com", authDomain: "venba-appointment.firebaseapp.com",