Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
e8a1e66401
@ -23,11 +23,11 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||||
<mat-label>Phone</mat-label>
|
<mat-label>Phone</mat-label>
|
||||||
<input placeholder=" Phone" matInput formControlName="phoneNo">
|
<input placeholder=" Phone" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput formControlName="phoneNo">
|
||||||
<!-- <mat-error *ngIf="myError('phoneNo', 'required')">Contact 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', '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', '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>
|
</div>
|
||||||
<div class="popup-button">
|
<div class="popup-button">
|
||||||
|
|||||||
@ -17,11 +17,14 @@ export class AppointmentAddcustomerComponent implements OnInit {
|
|||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
name: new FormControl('', [Validators.required]),
|
name: new FormControl('', [Validators.required]),
|
||||||
email: new FormControl('', [Validators.required]),
|
email: new FormControl('', [Validators.required]),
|
||||||
phoneNo: new FormControl('', [Validators.required]),
|
phoneNo: new FormControl('', [Validators.required,Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
|
return this.form.controls[controlName].hasError(errorName);
|
||||||
|
}
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
<input type="number" placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
<input type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
||||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||||
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
|
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
|
||||||
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
|
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
|
||||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
||||||
<input type='file'accept="image/*" data-max-size="2048" style="width: 50%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
<input type='file'accept="image/*" data-max-size="2048" style="width: 50%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
||||||
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg anf png)</span>
|
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" fxLayoutAlign="start end">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" fxLayoutAlign="start end">
|
||||||
<mat-checkbox *ngIf="action != 'Update'" class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
<mat-checkbox *ngIf="action != 'Update'" class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
||||||
|
|||||||
@ -97,7 +97,7 @@ export class AddBusinessComponent 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}$',
|
||||||
),]),
|
),]),
|
||||||
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10),Validators.pattern('^[0-9]{10}$')]),
|
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
createdBy:new FormControl(userrole,[Validators.required]),
|
createdBy:new FormControl(userrole,[Validators.required]),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
BusinessListComponent,
|
BusinessListComponent,
|
||||||
AddBusinessComponent
|
AddBusinessComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
@ -14,10 +14,13 @@ export class AssignServiceComponent implements OnInit {
|
|||||||
constructor(public dialogRef: MatDialogRef<AssignServiceComponent>,@Optional() @Inject(MAT_DIALOG_DATA) public data) {
|
constructor(public dialogRef: MatDialogRef<AssignServiceComponent>,@Optional() @Inject(MAT_DIALOG_DATA) public data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
this.local_data = data
|
this.local_data = data
|
||||||
|
if(this.local_data.hasOwnProperty('durationNew')){
|
||||||
this.local_data.duration = this.local_data.durationNew
|
this.local_data.duration = this.local_data.durationNew
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
duration: new FormControl('', [Validators.required]),
|
duration: new FormControl('', [Validators.required]),
|
||||||
|
|||||||
@ -433,7 +433,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70">
|
||||||
<div class="service-info">{{details.servicesName}}</div>
|
<div class="service-info">{{details.servicesName}}</div>
|
||||||
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : 0}}</span></div>
|
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees}}</span></div>
|
||||||
<div class="info" (click)="asignService(details,i)">+ Customize the price and duration of a service.</div>
|
<div class="info" (click)="asignService(details,i)">+ Customize the price and duration of a service.</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15" fxLayoutAlign="center center">
|
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15" fxLayoutAlign="center center">
|
||||||
|
|||||||
@ -194,7 +194,13 @@ unavailability(action,obj) {
|
|||||||
console.log( this.practitionerdetails)
|
console.log( this.practitionerdetails)
|
||||||
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
||||||
console.log(this.practitionerdetails)
|
console.log(this.practitionerdetails)
|
||||||
this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr
|
|
||||||
|
if(this.userRole == 'PRACTITIONER'){
|
||||||
|
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr
|
||||||
|
} else if (this.userRole == 'BADMIN'){
|
||||||
|
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
||||||
|
}
|
||||||
|
|
||||||
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
||||||
this.skills= JSON.parse(this.practitionerdetails.skills)
|
this.skills= JSON.parse(this.practitionerdetails.skills)
|
||||||
this.id=this.practitionerdetails.id
|
this.id=this.practitionerdetails.id
|
||||||
@ -366,7 +372,7 @@ unavailability(action,obj) {
|
|||||||
"gender": this.gender,
|
"gender": this.gender,
|
||||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||||
"description": this.description,
|
"description": this.description,
|
||||||
"skills": this.skills,
|
"skills": JSON.stringify(this.skills),
|
||||||
"caption": this.caption,
|
"caption": this.caption,
|
||||||
"userName": this.userName,
|
"userName": this.userName,
|
||||||
"practitionerId":userid
|
"practitionerId":userid
|
||||||
|
|||||||
@ -173,12 +173,13 @@ export class EditWorkingHoursComponent implements OnInit {
|
|||||||
let sunday ={filters :this.data[0].sunday.hours }
|
let sunday ={filters :this.data[0].sunday.hours }
|
||||||
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
|
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
|
||||||
this.addFilterToFiltersFormArray()
|
this.addFilterToFiltersFormArray()
|
||||||
|
this.dynamicForm.patchValue(sunday)
|
||||||
}
|
}
|
||||||
// if(this.data[0].sunday.hours.length>1){
|
// if(this.data[0].sunday.hours.length>1){
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.dynamicForm.patchValue(sunday)
|
|
||||||
// this.data[1].monday.hours.forEach(element => {
|
// this.data[1].monday.hours.forEach(element => {
|
||||||
// element.value = null
|
// element.value = null
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
<input placeholder=" Phone" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
|
<input placeholder=" Phone" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
|
||||||
<mat-error *ngIf="myError('phoneNo', 'required')">Contact 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', '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', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||||
|
|||||||
@ -52,15 +52,15 @@ export class AddCustomersComponent implements OnInit {
|
|||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
// businessselect: new FormControl('', [Validators.required]),
|
// businessselect: new FormControl('', [Validators.required]),
|
||||||
// image: new FormControl('', null),
|
// image: new FormControl('', null),
|
||||||
cusName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
cusName: new FormControl('', [Validators.required]),
|
||||||
address_1: new FormControl('', [Validators.required, Validators.maxLength(50)]),
|
address_1: new FormControl('', [Validators.required, Validators.maxLength(100)]),
|
||||||
city: new FormControl('', [Validators.required, Validators.maxLength(10)]),
|
city: new FormControl('', [Validators.required]),
|
||||||
state: new FormControl('', [Validators.required, Validators.maxLength(10)]),
|
state: new FormControl('', [Validators.required]),
|
||||||
pincode: new FormControl('', [Validators.required, Validators.maxLength(10)]),
|
pincode: new FormControl('', [Validators.required, Validators.maxLength(6)]),
|
||||||
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}$')]),
|
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
|
|
||||||
});
|
});
|
||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
|
|||||||
@ -87,7 +87,7 @@ export class CustomersListComponent implements OnInit {
|
|||||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.appoinmentsList = res.data;
|
this.appoinmentsList = res.data;
|
||||||
this.recordStatus=true;
|
// this.recordStatus=true;
|
||||||
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)
|
||||||
|
|||||||
@ -38,11 +38,13 @@ closeDialog(){
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
servicesName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
servicesName: new FormControl('', [Validators.required]),
|
||||||
duration: new FormControl('',[Validators.required]),
|
duration: new FormControl('',[Validators.required]),
|
||||||
description: new FormControl('',[Validators.required]),
|
description: new FormControl('',[Validators.required]),
|
||||||
fees:new FormControl('',[Validators.required])
|
fees:new FormControl('',[Validators.required])
|
||||||
});
|
});
|
||||||
|
console.log(this.local_data)
|
||||||
|
this.local_data.duration = JSON.stringify(this.local_data.duration)
|
||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<!-- Description Column -->
|
<!-- Description Column -->
|
||||||
<ng-container matColumnDef="duration">
|
<ng-container matColumnDef="duration">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Duration </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Duration </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"> {{row.duration}} </mat-cell>
|
<mat-cell *matCellDef="let row"> {{row.duration}} Mins</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="fees">
|
<ng-container matColumnDef="fees">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Fees </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Fees </mat-header-cell>
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="myError('businessselect', 'required')">business is required</mat-error>
|
<mat-error *ngIf="myError('businessselect', 'required')">business is required</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
|
||||||
<mat-label>Role</mat-label>
|
<mat-label>Role</mat-label>
|
||||||
@ -31,7 +30,7 @@
|
|||||||
{{roleNmae.name}}
|
{{roleNmae.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
<mat-error *ngIf="myError('role', 'required')">role is required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
@ -52,7 +51,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
<mat-label>Phone No</mat-label>
|
<mat-label>Phone No</mat-label>
|
||||||
<input matInput type="number" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
|
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
|
||||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||||
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
|
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
|
||||||
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||||
@ -80,7 +79,7 @@
|
|||||||
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
|
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
|
||||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
||||||
<input type='file'accept="image/*" data-max-size="2048" style="width: 33%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
<input type='file'accept="image/*" data-max-size="2048" style="width: 33%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
||||||
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg anf png)</span>
|
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
||||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
||||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export class AddUserComponent implements OnInit {
|
|||||||
role: new FormControl('', [Validators.required]),
|
role: new FormControl('', [Validators.required]),
|
||||||
userName: new FormControl('', [Validators.required]),
|
userName: new FormControl('', [Validators.required]),
|
||||||
// contactNo: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
// contactNo: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
||||||
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
|
contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
// lastName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
// lastName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
||||||
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}$',
|
||||||
@ -74,6 +74,7 @@ export class AddUserComponent implements OnInit {
|
|||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
public myError = (controlName: string, errorName: string) =>{
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
return this.form.controls[controlName].hasError(errorName);
|
return this.form.controls[controlName].hasError(errorName);
|
||||||
}
|
}
|
||||||
@ -157,7 +158,7 @@ export class AddUserComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
let tmp = this.form.value
|
let tmp = this.form.value
|
||||||
tmp.id = this.local_data.id
|
tmp.id = this.local_data.id
|
||||||
console.log(this.formData.getAll('image'));
|
console.log(tmp,this.formData.getAll('image'));
|
||||||
if(this.busId == null){
|
if(this.busId == null){
|
||||||
this.busId = localStorage.getItem('busNameID') || null
|
this.busId = localStorage.getItem('busNameID') || null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,8 +76,14 @@ export class UserListComponent implements OnInit {
|
|||||||
this.getBusinessList()
|
this.getBusinessList()
|
||||||
}
|
}
|
||||||
getUsersList() {
|
getUsersList() {
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
let userRole = localStorage.getItem('user_role')
|
||||||
this._use.getUsersListDetails().subscribe(res => {
|
let param;
|
||||||
|
if(userRole == 'BADMIN'){
|
||||||
|
param ={"busId": localStorage.getItem('busId')}
|
||||||
|
}else {
|
||||||
|
param = {}
|
||||||
|
}
|
||||||
|
this._use.getUsersListDetails(param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
let usersList = res.data
|
let usersList = res.data
|
||||||
@ -94,6 +100,7 @@ export class UserListComponent implements OnInit {
|
|||||||
this.recordStatus=true;
|
this.recordStatus=true;
|
||||||
}
|
}
|
||||||
},error => this.isLoading = false);
|
},error => this.isLoading = false);
|
||||||
|
|
||||||
}
|
}
|
||||||
getBusinessList() {
|
getBusinessList() {
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
|
|||||||
@ -11,10 +11,17 @@ export class UserService {
|
|||||||
|
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
constructor(private _http: HttpClient) { }
|
constructor(private _http: HttpClient) { }
|
||||||
|
getUsersListDetails2(): Observable<any> {
|
||||||
getUsersListDetails(): Observable<any> {
|
|
||||||
console.log('IN')
|
console.log('IN')
|
||||||
return this._http.get<any[]>(this.apiUrl + "getusers")
|
return this._http.post<any[]>(this.apiUrl + "getusers",{})
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
|
||||||
|
getUsersListDetails(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getusers",param)
|
||||||
// .pipe(
|
// .pipe(
|
||||||
// catchError(this.handleError('role', []))
|
// catchError(this.handleError('role', []))
|
||||||
// )
|
// )
|
||||||
|
|||||||
@ -53,7 +53,8 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
UserListComponent,
|
UserListComponent,
|
||||||
AddUserComponent
|
AddUserComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
DemoMaterialModule,
|
DemoMaterialModule,
|
||||||
|
|||||||
@ -20,14 +20,24 @@ export class ConsultantsListComponent implements OnInit {
|
|||||||
|
|
||||||
busName:any=[]
|
busName:any=[]
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
ServicesMapDetailsList: any=[];
|
||||||
constructor(private router:Router,public dialog: MatDialog,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
constructor(private router:Router,public dialog: MatDialog,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
||||||
this.spinner.show();
|
this.spinner.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
||||||
this.busName = localStorage.getItem('busName')
|
this.busName = localStorage.getItem('busName')
|
||||||
let tmp = localStorage.getItem('cusServiceData')
|
let tmp = localStorage.getItem('cusServiceData')
|
||||||
|
let URL = this.router.url;
|
||||||
|
console.log(URL);
|
||||||
|
let URL_AS_LIST = URL.split('/');
|
||||||
|
console.log(URL_AS_LIST);
|
||||||
|
if(URL_AS_LIST[2] == 'business'){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let practitioner = JSON.parse(tmp)
|
let practitioner = JSON.parse(tmp)
|
||||||
console.log(practitioner)
|
console.log(practitioner)
|
||||||
let arr_val=[]
|
let arr_val=[]
|
||||||
@ -87,7 +97,9 @@ export class ConsultantsListComponent implements OnInit {
|
|||||||
|
|
||||||
});
|
});
|
||||||
console.log(workinghrs)
|
console.log(workinghrs)
|
||||||
|
}else{
|
||||||
|
this.getpractitionerList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
random_ng_past()
|
random_ng_past()
|
||||||
{
|
{
|
||||||
@ -103,6 +115,11 @@ export class ConsultantsListComponent implements OnInit {
|
|||||||
goToSlotBooking(param){
|
goToSlotBooking(param){
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
console.log(URL,param)
|
console.log(URL,param)
|
||||||
|
let URL_AS_LIST = URL.split('/');
|
||||||
|
console.log(URL_AS_LIST);
|
||||||
|
if(URL_AS_LIST[2] == 'business'){
|
||||||
|
|
||||||
|
|
||||||
let tmp = localStorage.getItem('cusServiceData')
|
let tmp = localStorage.getItem('cusServiceData')
|
||||||
let practitioner = JSON.parse(tmp)
|
let practitioner = JSON.parse(tmp)
|
||||||
console.log(practitioner)
|
console.log(practitioner)
|
||||||
@ -122,10 +139,76 @@ export class ConsultantsListComponent implements OnInit {
|
|||||||
// console.log(URL+"/"+data.randStr+"/practitioner")
|
// console.log(URL+"/"+data.randStr+"/practitioner")
|
||||||
// this.router.navigate([URL+"/slot"])
|
// this.router.navigate([URL+"/slot"])
|
||||||
this.router.navigate([URL+"/details"])
|
this.router.navigate([URL+"/details"])
|
||||||
|
}else{
|
||||||
|
console.log(URL,param,this.ServicesMapDetailsList)
|
||||||
|
|
||||||
|
let filter = this.ServicesMapDetailsList.filter(arr=>{return arr.userId == param.id && arr.busId ==param.busId})
|
||||||
|
console.log(filter)
|
||||||
|
localStorage.setItem('workingHrs',param.practitionerInfos
|
||||||
|
[0].workingHours)
|
||||||
|
this.end_user.appointmentBooked.next(filter)
|
||||||
|
|
||||||
|
this.router.navigate([URL+"/details"])
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
image_view(image){
|
image_view(image){
|
||||||
|
|
||||||
return this.apiUrl+'imageViewer?img_name='+image;
|
return this.apiUrl+'imageViewer?img_name='+image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getpractitionerList() {
|
||||||
|
|
||||||
|
let URL = this.router.url;
|
||||||
|
console.log(URL);
|
||||||
|
let URL_AS_LIST = URL.split('/');
|
||||||
|
console.log(URL_AS_LIST);
|
||||||
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
|
let params = {
|
||||||
|
"randStr":URL_AS_LIST[3],
|
||||||
|
"queryName":URL_AS_LIST[2]
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
|
||||||
|
this.end_user.getcusServicesMapDetails(params).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res)
|
||||||
|
let tmp =[]
|
||||||
|
let arr_val =res['data'];
|
||||||
|
this.ServicesMapDetailsList = arr_val
|
||||||
|
arr_val.forEach(element => {
|
||||||
|
tmp.push(element.user[0] )
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let filter = tmp.filter(arr=>{return arr.role == "PRACTITIONER"})
|
||||||
|
console.log(tmp,filter)
|
||||||
|
|
||||||
|
|
||||||
|
let result = filter.filter((obj, index, self) =>
|
||||||
|
|
||||||
|
index === self.findIndex((t) => (
|
||||||
|
|
||||||
|
t.id=== obj.id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
))
|
||||||
|
);
|
||||||
|
this.consultants = result;
|
||||||
|
setTimeout(() => {
|
||||||
|
/** spinner ends after 5 seconds */
|
||||||
|
this.spinner.hide();
|
||||||
|
}, 1000);
|
||||||
|
console.log(this.consultants)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<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" [readonly]="verifyOTP == '1'" required>
|
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" name="phone" formControlName="phoneNo" [readonly]="verifyOTP == '1'" required>
|
||||||
<mat-error *ngIf="myError('phoneNo', 'required')">Contact 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', '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', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||||
|
|||||||
@ -44,12 +44,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}$')]),
|
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
address_1: new FormControl('', [ Validators.maxLength(50)]),
|
address_1: new FormControl('', [ Validators.maxLength(100)]),
|
||||||
city: new FormControl('', [ Validators.maxLength(10)]),
|
city: new FormControl(''),
|
||||||
state: new FormControl('', [ Validators.maxLength(10)]),
|
state: new FormControl(''),
|
||||||
otp: new FormControl('', [ Validators.maxLength(10)]),
|
otp: new FormControl('', [ Validators.maxLength(6),Validators.minLength(6)]),
|
||||||
pincode: new FormControl('',[ Validators.maxLength(6)]),
|
pincode: new FormControl(''),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,8 +58,14 @@ export class DoctorProfileComponent implements OnInit {
|
|||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
console.log(URL)
|
console.log(URL)
|
||||||
|
|
||||||
// this.router.navigate([URL+"/slot"])
|
let URL_AS_LIST = URL.split('/');
|
||||||
|
console.log(URL_AS_LIST);
|
||||||
|
if(URL_AS_LIST[2] == 'business'){
|
||||||
this.router.navigate([URL+"/slot"])
|
this.router.navigate([URL+"/slot"])
|
||||||
|
}else{
|
||||||
|
this.router.navigate([URL+"/services"])
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
image_view(image){
|
image_view(image){
|
||||||
|
|||||||
@ -49,6 +49,24 @@ const routes: Routes = [{
|
|||||||
path: 'business/:randstr',
|
path: 'business/:randstr',
|
||||||
component: ServiceListComponent
|
component: ServiceListComponent
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr',
|
||||||
|
component: ConsultantsListComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details',
|
||||||
|
component: DoctorProfileComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details/services',
|
||||||
|
component: ServiceListComponent
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details/services/slots/list',
|
||||||
|
component: SlotBookingDetailsComponent
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: 'business/:randstr/:randstrs/practitioner',
|
path: 'business/:randstr/:randstrs/practitioner',
|
||||||
component: ConsultantsListComponent
|
component: ConsultantsListComponent
|
||||||
@ -69,6 +87,19 @@ const routes: Routes = [{
|
|||||||
path: 'business/:randstr/:randstrs/practitioner/details/slot/cus/:cusId/pt/bts',
|
path: 'business/:randstr/:randstrs/practitioner/details/slot/cus/:cusId/pt/bts',
|
||||||
component: BookingSummaryComponent
|
component: BookingSummaryComponent
|
||||||
},
|
},
|
||||||
|
///
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details/services/slots/list/cus',
|
||||||
|
component: CustomerInfoComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt',
|
||||||
|
component: PaymentComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt/bts',
|
||||||
|
component: BookingSummaryComponent
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'business/:randstr/:randstrs/practitioner/details',
|
path: 'business/:randstr/:randstrs/practitioner/details',
|
||||||
component: DoctorProfileComponent
|
component: DoctorProfileComponent
|
||||||
|
|||||||
@ -123,7 +123,7 @@ export class SearchCategoryComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if(this.eventData == 'consultants'){
|
} else if(this.eventData == 'consultants'){
|
||||||
this._use.getUsersListDetails().subscribe(res => {
|
this._use.getUsersListDetails2().subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// let data = res['data'].filter(val => val.role == 'PRACTITIONER')
|
// let data = res['data'].filter(val => val.role == 'PRACTITIONER')
|
||||||
|
|||||||
@ -209,6 +209,12 @@ let updatevalue = { serviceId: row_obj.serviceId,
|
|||||||
}
|
}
|
||||||
goto(data){
|
goto(data){
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
|
|
||||||
|
let URL_AS_LIST = URL.split('/');
|
||||||
|
console.log(URL_AS_LIST);
|
||||||
|
if(URL_AS_LIST[2] == 'business'){
|
||||||
|
|
||||||
|
|
||||||
console.log(URL,data,this.full_data)
|
console.log(URL,data,this.full_data)
|
||||||
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
|
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
|
||||||
console.log(filter)
|
console.log(filter)
|
||||||
@ -216,6 +222,13 @@ let updatevalue = { serviceId: row_obj.serviceId,
|
|||||||
localStorage.setItem("servicedetails",JSON.stringify(data))
|
localStorage.setItem("servicedetails",JSON.stringify(data))
|
||||||
console.log(URL+"/"+data.randStr+"/practitioner")
|
console.log(URL+"/"+data.randStr+"/practitioner")
|
||||||
this.router.navigate([URL+"/"+data.randStr+"/practitioner"])
|
this.router.navigate([URL+"/"+data.randStr+"/practitioner"])
|
||||||
|
}else{
|
||||||
|
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
|
||||||
|
console.log(filter)
|
||||||
|
localStorage.setItem('cusServiceData',JSON.stringify(filter))
|
||||||
|
localStorage.setItem("servicedetails",JSON.stringify(data))
|
||||||
|
this.router.navigate([URL+"/slots/list"])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
<p class="param"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner </p>
|
<p class="param"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner </p>
|
||||||
<span class="span-text">Dr. {{doctor}}</span>
|
<span class="span-text">Dr. {{doctor}}</span>
|
||||||
<p class="param"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service </p>
|
<p class="param"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service </p>
|
||||||
<span class="span-text"> {{servicesName.servicesName}} ({{servicesName.duration
|
<span class="span-text"> {{servicesName.servicesName}} ({{serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].durationNew:serviceMapdetails[0].service[0].duration
|
||||||
}} Mins)</span>
|
}} Mins)</span>
|
||||||
<!-- <p class="text-color d-flex align-items-start" >
|
<!-- <p class="text-color d-flex align-items-start" >
|
||||||
<img src="assets/images/information.svg" alt="Avatar" class="img" />
|
<img src="assets/images/information.svg" alt="Avatar" class="img" />
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time : </p>
|
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time : </p>
|
||||||
<span class="span-text">{{slotTime | date:'shortTime'}}</span>
|
<span class="span-text">{{slotTime | date:'shortTime'}}</span>
|
||||||
<p class="param"><img src="assets/images/Location.svg" alt="Avatar" class="img">Amount : </p>
|
<p class="param"><img src="assets/images/Location.svg" alt="Avatar" class="img">Amount : </p>
|
||||||
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">₹</span> {{user.practitionerInfos[0].days}}</span>
|
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">₹</span> {{ serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].fees:serviceMapdetails[0].service[0].fees}}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -275,7 +275,7 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scrollHV {
|
.scrollHV {
|
||||||
height: calc(100vh - 150px);
|
//height: calc(100vh - 150px);
|
||||||
// zoom: 90%;
|
// zoom: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,11 +51,14 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
doctor: any=[];
|
doctor: any=[];
|
||||||
servicesName: any=[];
|
servicesName: any=[];
|
||||||
user: any=[];
|
user: any=[];
|
||||||
|
serviceMapdetails:any =[]
|
||||||
constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
|
constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
|
||||||
this.end_user.appointmentBooked_observable$.subscribe((res) => {
|
this.end_user.appointmentBooked_observable$.subscribe((res) => {
|
||||||
console.log('booked', res);
|
console.log('booked', res);
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
|
this.serviceMapdetails =res
|
||||||
this.servicesName = res[0].service[0]
|
this.servicesName = res[0].service[0]
|
||||||
|
console.log(this.servicesName)
|
||||||
this.user = res[0].user[0]
|
this.user = res[0].user[0]
|
||||||
this.doctor = res[0].user[0].userName
|
this.doctor = res[0].user[0].userName
|
||||||
this.getApiData()
|
this.getApiData()
|
||||||
@ -106,8 +109,13 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
// console.log(key,value1)
|
// console.log(key,value1)
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
let getDuration = JSON.parse(localStorage.getItem('servicedetails'))
|
let tmpdata = localStorage.getItem('servicedetails')
|
||||||
|
let getDuration;
|
||||||
|
if(tmpdata != null){
|
||||||
|
getDuration = JSON.parse(localStorage.getItem('servicedetails'))
|
||||||
console.log(getDuration.duration)
|
console.log(getDuration.duration)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function convertTime12to24 (time12h) {
|
function convertTime12to24 (time12h) {
|
||||||
const [time, modifier] = time12h.split(' ');
|
const [time, modifier] = time12h.split(' ');
|
||||||
@ -165,6 +173,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
// Output the intervals
|
// Output the intervals
|
||||||
console.log(intervals);
|
console.log(intervals);
|
||||||
|
|
||||||
//this.slots = intervals
|
//this.slots = intervals
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,6 +186,10 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
let service = localStorage.getItem("servicedetails")
|
let service = localStorage.getItem("servicedetails")
|
||||||
let serviceDetails = JSON.parse(service)
|
let serviceDetails = JSON.parse(service)
|
||||||
console.log(serviceDetails)
|
console.log(serviceDetails)
|
||||||
|
this.servicesName = serviceDetails
|
||||||
|
this.serviceMapdetails = this.serviceMapdetails.filter(arr=>{return arr.serviceId == serviceDetails.serviceId })
|
||||||
|
|
||||||
|
console.log( this.serviceMapdetails)
|
||||||
// this.form.controls['note'].setValue('Sample')
|
// this.form.controls['note'].setValue('Sample')
|
||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -188,7 +188,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="vertical-menu w-100">
|
<div class="vertical-menu w-100 " style="margin: 1rem;" >
|
||||||
<!-- <button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
|
<!-- <button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button> -->
|
</button> -->
|
||||||
|
|||||||
@ -21,10 +21,10 @@ export class RegisterComponent {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
bus_name: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
bus_name: new FormControl('', [Validators.required]),
|
||||||
address: new FormControl('', [Validators.required, Validators.maxLength(50)]),
|
address: new FormControl('', [Validators.required, Validators.maxLength(100)]),
|
||||||
city: new FormControl('', [Validators.required, Validators.maxLength(10)]),
|
city: new FormControl('', [Validators.required]),
|
||||||
state: new FormControl('', [Validators.required, Validators.maxLength(10)]),
|
state: new FormControl('', [Validators.required]),
|
||||||
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}$',
|
||||||
),]),
|
),]),
|
||||||
|
|||||||
@ -41,12 +41,60 @@ import {PortalModule} from '@angular/cdk/portal';
|
|||||||
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatCardModule } from '@angular/material/card';
|
||||||
import { FlexModule } from '@angular/flex-layout';
|
import { FlexModule } from '@angular/flex-layout';
|
||||||
|
import { MobileNumberPatternDirective } from './mobile_number_pattern/mobile-number-pattern.directive';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NgModule that includes all Material modules that are required to serve the demo-app.
|
* NgModule that includes all Material modules that are required to serve the demo-app.
|
||||||
*/
|
*/
|
||||||
const modules = [
|
// const modules = [
|
||||||
|
// MatCardModule,
|
||||||
|
// MatAutocompleteModule,
|
||||||
|
// MatButtonModule,
|
||||||
|
// MatButtonToggleModule,
|
||||||
|
// MatCheckboxModule,
|
||||||
|
// MatChipsModule,
|
||||||
|
// MatTableModule,
|
||||||
|
// MatDatepickerModule,
|
||||||
|
// MatDialogModule,
|
||||||
|
// MatDividerModule,
|
||||||
|
// MatExpansionModule,
|
||||||
|
// MatFormFieldModule,
|
||||||
|
// MatGridListModule,
|
||||||
|
// MatIconModule,
|
||||||
|
// MatInputModule,
|
||||||
|
// MatListModule,
|
||||||
|
// MatMenuModule,
|
||||||
|
// MatPaginatorModule,
|
||||||
|
// MatProgressBarModule,
|
||||||
|
// MatProgressSpinnerModule,
|
||||||
|
// MatRadioModule,
|
||||||
|
// MatRippleModule,
|
||||||
|
// MatSelectModule,
|
||||||
|
// MatSidenavModule,
|
||||||
|
// MatSlideToggleModule,
|
||||||
|
// MatSliderModule,
|
||||||
|
// MatSnackBarModule,
|
||||||
|
// MatSortModule,
|
||||||
|
// MatStepperModule,
|
||||||
|
// MatTabsModule,
|
||||||
|
// MatToolbarModule,
|
||||||
|
// MatTooltipModule,
|
||||||
|
// MatNativeDateModule,
|
||||||
|
// CdkTableModule,
|
||||||
|
// A11yModule,
|
||||||
|
// BidiModule,
|
||||||
|
// CdkAccordionModule,
|
||||||
|
// ObserversModule,
|
||||||
|
// OverlayModule,
|
||||||
|
// PlatformModule,
|
||||||
|
// PortalModule,
|
||||||
|
// FlexModule,
|
||||||
|
// FormsModule,
|
||||||
|
// ReactiveFormsModule]
|
||||||
|
@NgModule({
|
||||||
|
declarations:[MobileNumberPatternDirective],
|
||||||
|
imports: [
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
MatAutocompleteModule,
|
MatAutocompleteModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
@ -90,9 +138,52 @@ const modules = [
|
|||||||
PortalModule,
|
PortalModule,
|
||||||
FlexModule,
|
FlexModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule]
|
ReactiveFormsModule],
|
||||||
@NgModule({
|
exports: [
|
||||||
imports: [...modules],
|
MatCardModule,
|
||||||
exports: [...modules]
|
MatAutocompleteModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatButtonToggleModule,
|
||||||
|
MatCheckboxModule,
|
||||||
|
MatChipsModule,
|
||||||
|
MatTableModule,
|
||||||
|
MatDatepickerModule,
|
||||||
|
MatDialogModule,
|
||||||
|
MatDividerModule,
|
||||||
|
MatExpansionModule,
|
||||||
|
MatFormFieldModule,
|
||||||
|
MatGridListModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatListModule,
|
||||||
|
MatMenuModule,
|
||||||
|
MatPaginatorModule,
|
||||||
|
MatProgressBarModule,
|
||||||
|
MatProgressSpinnerModule,
|
||||||
|
MatRadioModule,
|
||||||
|
MatRippleModule,
|
||||||
|
MatSelectModule,
|
||||||
|
MatSidenavModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
|
MatSliderModule,
|
||||||
|
MatSnackBarModule,
|
||||||
|
MatSortModule,
|
||||||
|
MatStepperModule,
|
||||||
|
MatTabsModule,
|
||||||
|
MatToolbarModule,
|
||||||
|
MatTooltipModule,
|
||||||
|
MatNativeDateModule,
|
||||||
|
CdkTableModule,
|
||||||
|
A11yModule,
|
||||||
|
BidiModule,
|
||||||
|
CdkAccordionModule,
|
||||||
|
ObserversModule,
|
||||||
|
OverlayModule,
|
||||||
|
PlatformModule,
|
||||||
|
PortalModule,
|
||||||
|
FlexModule,
|
||||||
|
FormsModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MobileNumberPatternDirective]
|
||||||
})
|
})
|
||||||
export class DemoMaterialModule {}
|
export class DemoMaterialModule {}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
import { MobileNumberPatternDirective } from './mobile-number-pattern.directive';
|
||||||
|
|
||||||
|
describe('MobileNumberPatternDirective', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
const directive = new MobileNumberPatternDirective();
|
||||||
|
expect(directive).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
import { Directive, ElementRef, HostListener } from '@angular/core';
|
||||||
|
|
||||||
|
@Directive({
|
||||||
|
selector: '[appMobileNumberPattern]'
|
||||||
|
})
|
||||||
|
export class MobileNumberPatternDirective {
|
||||||
|
|
||||||
|
constructor(private _el: ElementRef) { }
|
||||||
|
|
||||||
|
@HostListener('input', ['$event']) onInputChange(event) {
|
||||||
|
const initalValue = this._el.nativeElement.value;
|
||||||
|
this._el.nativeElement.value = initalValue.replace(/[^0-9]*/g, '');
|
||||||
|
if ( initalValue !== this._el.nativeElement.value) {
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -10,11 +10,11 @@ export const environment = {
|
|||||||
// apiEndpoint:'http://192.168.1.20:8080/api/',
|
// apiEndpoint:'http://192.168.1.20:8080/api/',
|
||||||
// apiEndpoint:'https://api.venbait.in/api/',
|
// apiEndpoint:'https://api.venbait.in/api/',
|
||||||
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
||||||
apiEndpoint:'http://192.168.1.4:8080/api/',
|
apiEndpoint:'http://192.168.1.8:8080/api/',
|
||||||
// apiEndpoint:'https://api.venbait.in/api/',
|
// apiEndpoint:'https://api.venbait.in/api/',
|
||||||
|
|
||||||
//EndUser URL
|
//EndUser URL
|
||||||
endUserUrl:'https://venbainfotech.com/appointment/#/customer/business/',
|
endUserUrl:'https://venbainfotech.com/appointment/#/customer/',
|
||||||
|
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user