this.userForm.get('skills')).controls
+ }
+
+ send(values) {
+ console.log(values);
+ this.dialogRef.close(values);
+ }
+
+
+ closeDialog(){
+ this.dialogRef.close();
+ }
+
+ close() {
+ this.dialogRef.close();
+}
+
+}
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts
index 2b40826..cc8fb34 100644
--- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts
+++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts
@@ -14,6 +14,8 @@ import { ConsultantSettingComponent } from './consultant-setting/consultant-sett
import { NotifierModule, NotifierOptions } from 'angular-notifier';
import { UnavailabilityComponent } from './unavailability/unavailability.component';
import { SharedModule } from 'app/shared/shared.module';
+import { AddSkillsComponent } from './add-skills/add-skills.component';
+import { MatInputModule } from '@angular/material/input';
const customNotifierOptions: NotifierOptions = {
@@ -63,7 +65,8 @@ const customNotifierOptions: NotifierOptions = {
EditWorkingHoursComponent,
ExtraWorkingHoursComponent,
AssignServiceComponent,
- UnavailabilityComponent
+ UnavailabilityComponent,
+ AddSkillsComponent
],
imports: [
CommonModule,
@@ -73,7 +76,7 @@ const customNotifierOptions: NotifierOptions = {
MatSidenavModule,
SharedModule,
MatFormFieldModule,
- NotifierModule.withConfig(customNotifierOptions),
+ NotifierModule.withConfig(customNotifierOptions),MatInputModule
]
})
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html
index 158b2a6..a8f28b0 100644
--- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html
+++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html
@@ -15,8 +15,11 @@
+
+
Caption -
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss
index a307397..fc3a782 100644
--- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss
+++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss
@@ -585,7 +585,7 @@ box-sizing: border-box;
line-height: 15px;
}
.scrollHV {
-height: calc(100vh - 200px);
+height: calc(100vh - 240px);
}
::ng-deep .mat-form-field-infix {
height: 50px!important;
@@ -638,3 +638,6 @@ content: "\20B9";
+.scrollHV2{
+ height: calc(100vh - 305px);
+}
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts
index 210067a..41eff23 100644
--- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts
+++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts
@@ -1,6 +1,6 @@
import { LocationStrategy } from '@angular/common';
import { Component, OnInit } from '@angular/core';
-import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatTableDataSource } from '@angular/material/table';
import { NotifierService } from 'angular-notifier';
@@ -11,6 +11,8 @@ import { ConsultantService } from '../consultant-service/consultant.service';
import { EditWorkingHoursComponent } from '../edit-working-hours/edit-working-hours.component';
import { ExtraWorkingHoursComponent } from '../extra-working-hours/extra-working-hours.component';
import { UnavailabilityComponent } from '../unavailability/unavailability.component';
+import { AddSkillsComponent } from '../add-skills/add-skills.component';
+import { json } from 'd3';
@Component({
selector: 'app-consultant-setting',
@@ -43,11 +45,10 @@ export class ConsultantSettingComponent implements OnInit {
"languages": null,
"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":[]}}]),
// "dob": null,
- "designtion": null,
+ // "designtion": null,
"gender": null,
"description":null,
- "skills": [],
- "slotDays":null,
+ "skills": [],
"caption": null,
"isActive": "1",
@@ -66,12 +67,12 @@ export class ConsultantSettingComponent implements OnInit {
caption:any = [];
// dob: any=[];
languages: any=[];
- designtion: any=[];
- slotDays: any = [];
+ // designtion: any=[];
+ days: any = [];
exp: any=[];
qualification: any=[];
id: any;
- public end_User_Url = environment.endUserUrl;
+ public end_User_Url = environment.endUserUrl;
endUserURL: any;
userRole:any=[];
genderOption:any = [{'name':'Male'},{'name':'Female'}]
@@ -81,7 +82,9 @@ export class ConsultantSettingComponent implements OnInit {
consultants: any = [];
frontDeskHidden: any = 0;
frontDeskPractdetails: 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) {
+
+ }
ngOnInit() {
@@ -119,7 +122,9 @@ getCosultantList() {
this._con.getCosultantListDetails(param).subscribe(res => {
if (res.status == 200) {
console.log(res.data)
- this.consultants = res.data;
+ this.consultants = res.data;
+ this.consultants = this.consultants.filter(val => val.role == 'PRACTITIONER')
+ console.log(this.consultants)
}
else{
this.consultants=[];
@@ -233,8 +238,7 @@ unavailability(action,obj) {
"languages": null,
"workingHours": JSON.stringify( [{"sunday":{"hours":[],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[],"breaks":[]}},{"wednesday":{"hours":[],"breaks":[]}},{"thursday":{"hours":[],"breaks":[]}},{"friday":{"hours":[],"breaks":[]}},{"saturday":{"hours":[],"breaks":[]}}]),
// "dob": null,
- "designtion": null,
- "slotDays": null,
+ // "designtion": null,
"gender": null,
"description":null,
"skills": [],
@@ -287,8 +291,8 @@ unavailability(action,obj) {
this.exp=this.practitionerdetails.exp
this.languages=this.practitionerdetails.languages
this.qualification=this.practitionerdetails.qualification
- this.designtion=this.practitionerdetails.designtion
- this.slotDays = this.practitionerdetails.slotDays
+ // this.designtion=this.practitionerdetails.designtion
+ this.days = this.practitionerdetails.days
console.log(this.gender)
// this.workinghours = this.practitionerdetails.workingHours
@@ -478,12 +482,12 @@ unavailability(action,obj) {
// "fees": "800",
"languages": this.languages,
// "dob": this.dob,
- "designtion": this.qualification,
- "slotDays": this.slotDays,
+ // "designtion": this.qualification,
+ "days": this.days,
"gender": this.gender,
- "workingHours": JSON.stringify( tmp),
+ "workingHours": JSON.stringify(tmp),
"description": this.description,
- "skills": JSON.stringify(this.skills),
+ "skills":this.skills,
"caption": this.caption,
"userName": this.userName,
"practitionerId":userid
@@ -510,6 +514,31 @@ unavailability(action,obj) {
}
+ addSkills(){
+ const dialogRef = this.dialog.open(AddSkillsComponent, {
+ width: '30%',
+ height: '100%',
+ // maxWidth: '38vw',
+ position: { right: '0' },
+ // disableClose: true ,
+ // panelClass: 'custom-dialog-container',
+
+ data: this.skills
+ });
+ dialogRef.afterClosed().subscribe(result => {
+ console.log(result)
+
+ console.log(this.skills)
+ if(result != undefined){
+ this.skills = result.skills
+ this.notifierService.notify('success', 'Skills Added Successfully');
+ }
+
+
+ });
+ }
+
+
copyToClipBoard(message) {
this.copiedKey = 1
console.log(message)
diff --git a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html
index 5a203de..0b03043 100644
--- a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html
+++ b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html
@@ -10,8 +10,8 @@
-
{{action}}
- Cancel
+ Cancel
diff --git a/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.html b/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.html
index 34e6139..57dfd97 100644
--- a/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.html
+++ b/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.html
@@ -11,7 +11,8 @@
ServiceName is required
- Limit exceed
+ Limit exceed
+
Sure to delete {{local_data.servicesName}} ?
diff --git a/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.ts b/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.ts
index f17e593..a0b3110 100644
--- a/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.ts
+++ b/ng-seed/src/app/appoinment/front-desk/cosultant-assign-services/cosultant-assign-services.component.ts
@@ -49,7 +49,7 @@ this.getServicesList()
}
getServicesList() {
- let param ={"busId": localStorage.getItem('busId')}
+ let param ={"busId":localStorage.getItem('busId')}
console.log(param)
this._api.getServicesDetailsApi(param).subscribe(res => {
if (res.status == 200) {
diff --git a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html
index 815f757..2f82c9e 100644
--- a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html
+++ b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html
@@ -36,6 +36,6 @@
{{action}}
- Cancel
+ Cancel
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
index 575d716..71917f1 100644
--- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
+++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
@@ -12,7 +12,7 @@
Username is required
Limit exceed
-->
-
+
Business
--
@@ -32,6 +32,17 @@
role is required
+
+
Name
@@ -89,7 +100,7 @@
{{action}}
- Cancel
+ Cancel
diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
index 66b6913..a1a4044 100644
--- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
+++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
@@ -4,6 +4,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NotifierService } from 'angular-notifier';
import { BusinessService } from 'app/appoinment/business/business-service/business.service';
+import { ApiServiceService } from 'app/appoinment/service-list-details/service-api-services/api-service.service';
import { environment } from 'environments/environment';
export interface UsersData {
@@ -32,12 +33,16 @@ export class AddUserComponent implements OnInit {
private apiUrl = environment.apiEndpoint;
busId: any;
disableBus: any=1;
+ userrole: any = [];
+ servicesList: any = [];
+ serviceCheckedData: any = [];
+ assignedServiceValue: any = [];
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder,
public dialogRef: MatDialogRef,
- @Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData,public _bus:BusinessService) {
+ @Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData,public _bus:BusinessService,public _ser:ApiServiceService) {
console.log(data);
this.local_data = {...data};
- console.log( this.local_data)
+ console.log(this.local_data)
// this.local_data.busId = localStorage.getItem('busNameID')
this.action = this.local_data.action;
this.formData= new FormData();
@@ -48,7 +53,7 @@ export class AddUserComponent implements OnInit {
ngOnInit() {
this.hide = true;
this.disableBus = localStorage.getItem('go_admin')
- let userrole = localStorage.getItem('user_role')
+ this.userrole = localStorage.getItem('user_role')
this.form = new FormGroup({
businessselect: new FormControl('',[Validators.required]),
role: new FormControl('', [Validators.required]),
@@ -65,7 +70,7 @@ export class AddUserComponent implements OnInit {
)]),
logo: new FormControl('', null),
// confirmPassword: new FormControl('', [Validators.required, Validators.minLength(6)]),
- createdBy:new FormControl(userrole,null),
+ createdBy:new FormControl(this.userrole,null),
});
console.log(this.local_data);
@@ -154,16 +159,21 @@ export class AddUserComponent implements OnInit {
close() {
this.dialogRef.close();
}
-
+
submit(){
- console.log(this.form.value);
+ console.log(this.form.value);
+ if(this.userrole == 'BADMIN'){
+ this.form.controls['businessselect'].clearValidators();
+ this.form.controls['businessselect'].updateValueAndValidity();
+ this.busId = localStorage.getItem('busId')
+ }
if(this.action == 'Update'){
this.form.controls['password'].clearValidators();
this.form.controls['password'].updateValueAndValidity();
}
if (!this.form.valid) {
return;
- }
+ }
let tmp = this.form.value
tmp.id = this.local_data.id
console.log(tmp,this.formData.getAll('image'));
@@ -186,8 +196,8 @@ export class AddUserComponent implements OnInit {
this.formData.append('contactNo', tmp.contactNo);
// this.formData.append('confirmPassword', tmp.password);
// tmp.confirmPassword = this.local_data.confirmPassword
- this.dialogRef.close({event:this.action,data: this.formData});
- console.log( this.formData,this.form.value);
+ this.dialogRef.close({event:this.action,data: this.formData,role:this.form.value.role});
+ console.log(this.formData,this.form.value);
console.log(this.action,this.local_data)
}
@@ -212,6 +222,7 @@ export class AddUserComponent implements OnInit {
}
// this.formData= new FormData();
// this.formData=[];
+ this.formData= new FormData();
this.formData.append('image', file, file.name);
// this.formData.append('file', file, file.name);
}
diff --git a/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.html b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.html
new file mode 100644
index 0000000..85d30c7
--- /dev/null
+++ b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.html
@@ -0,0 +1,53 @@
+ Assign Service to Dr. {{pracititionerName}}
+ close
+
+
+ Assign Service
+
+
+ {{details.servicesName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{details.servicesName}}
+
{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | {{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees}}
+
+
+
+
+
+
+
+ Done
+ Cancel
+
+
+
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.scss b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.scss
new file mode 100644
index 0000000..3dee33e
--- /dev/null
+++ b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.scss
@@ -0,0 +1,67 @@
+.p-1{
+ padding: 1rem !important;
+ .flexCard{
+ display: contents !important;
+ }
+ }
+ .mat-pane{
+ width: 100%;
+ }
+ .scrollHV {
+ height: calc(100vh - 267px) !important;
+ }
+ .service-info{
+ // line-height: 3rem!important;
+ font-size: 14px!important;
+ font-weight: 500!important;
+ color: #2f2c2c;
+ }
+ .service-info2{
+ // line-height: 3rem!important;
+ font-size: 12px!important;
+ font-weight: 500!important;
+ color: #5F5F5F;
+ }
+ .indianSymbol {
+ content: "\20B9";
+ }
+
+ .mat-card{
+ background-color: #FFF;
+ min-height: 45px;
+ border-bottom: 1px solid #F5F6F8;
+ position: relative;
+ margin: 17px 10px 17px 10px;
+ display: flex;
+ .mat-nav-list .mat-list-item:hover{
+ background: none;
+ }
+ .name{
+ font-size: 15px;
+ color: #111;
+ }
+ .time-amount{
+ color: #5B6572!important;
+ font-size: 13px;
+ line-height: 25px;
+ }
+ .Customize{
+ color: #567FC2!important;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 12px;
+ }
+ .mat-name{
+ font-size: 14px;
+ color: #5B6572!important;
+ padding-top: 3rem;
+ padding-right: 8rem;
+ padding-left: 8rem;
+ }
+ .mat-status{
+ font-size: 14px;
+ color: green!important;
+ padding-top: 3rem;
+ }
+ }
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.spec.ts b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.spec.ts
new file mode 100644
index 0000000..53ae61d
--- /dev/null
+++ b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PractAssignServiceComponent } from './pract-assign-service.component';
+
+describe('PractAssignServiceComponent', () => {
+ let component: PractAssignServiceComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ PractAssignServiceComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PractAssignServiceComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.ts b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.ts
new file mode 100644
index 0000000..56a2249
--- /dev/null
+++ b/ng-seed/src/app/appoinment/user/pract-assign-service/pract-assign-service.component.ts
@@ -0,0 +1,147 @@
+import { Component, Inject, OnInit, Optional } from '@angular/core';
+import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
+import { UserService } from '../user-service/user.service';
+import { ApiServiceService } from 'app/appoinment/service-list-details/service-api-services/api-service.service';
+import { ConsultantService } from 'app/appoinment/consultant-setting/consultant-service/consultant.service';
+
+@Component({
+ selector: 'app-pract-assign-service',
+ templateUrl: './pract-assign-service.component.html',
+ styleUrls: ['./pract-assign-service.component.scss']
+})
+export class PractAssignServiceComponent implements OnInit {
+ assignService:any = []
+ serviceCheckedData: number;
+ pracititionerUserId: any = [];
+ servicesList: any = [];
+ servicesList_array: any[];
+ servicesList_data: any = [];
+ user_ID: any;
+ busId: any;
+ pracititionerName: any;
+ constructor(public _use:UserService, public dialogRef: MatDialogRef,
+ @Optional() @Inject(MAT_DIALOG_DATA) public data,public _ser:ApiServiceService,public _api:ConsultantService) {
+ console.log(data)
+ if(data.action == 'Update'){
+ this.pracititionerUserId = data.obj.id
+ this.pracititionerName = data.obj.userName
+ }else{
+ this.pracititionerUserId = data.userId
+ this.pracititionerName = data.obj
+ }
+
+ }
+
+ ngOnInit(): void {
+ // this.getServicesList()
+ // this.user_ID = localStorage.getItem('user_id')
+ this.busId = localStorage.getItem('busId')
+ this.getServicesList(this.pracititionerUserId,this.busId)
+ }
+
+ closeDialog(){
+ this.dialogRef.close({event:'Cancel'});
+ }
+
+ close() {
+ this.dialogRef.close();
+}
+ // getServicesList() {
+ // let param ={"busId":localStorage.getItem('busId')}
+ // console.log(param)
+ // this._ser.getServicesListDetails(param).subscribe(res => {
+ // if (res.status == 200) {
+ // this.servicesList = res.data;
+ // }
+ // else{
+ // this.servicesList=[];
+ // }
+ // })
+ // }
+
+ getValues(event: {
+ isUserInput: any;
+ source: { value: any; selected: any };
+ },details) {
+ console.log(event,details,this.assignService)
+ if (event.isUserInput) {
+ if (event.source.selected === true) {
+ console.log('1',event.source.value)
+ this.serviceCheckedData = 1
+ this.getCheckedService(details)
+ } else {
+ console.log('2',event.source.value)
+ this.serviceCheckedData = 0
+ this.getCheckedService(details)
+ }
+ }
+
+ }
+
+
+
+ getCheckedService(params){
+ console.log(params)
+ let data = {serviceId:params.serviceId,userId:this.pracititionerUserId,busId:params.busId,active:this.serviceCheckedData}
+ console.log(data)
+ this._use.getServiceCheckedDetails(data).subscribe(res => {
+ if (res.status == 200) {
+ console.log(res)
+ // this.checkedList = res.data;
+ this.getServicesList(this.pracititionerUserId,this.busId)
+ }
+ } );
+ }
+
+ getAssignedList(busId) {
+ this._api.getAssignedDetails(busId).subscribe(res => {
+ console.log(res)
+ if (res.status == 200) {
+ this.servicesList = res.data;
+
+ let result = this.servicesList.filter((obj, index, self) =>
+ index === self.findIndex((t) => (
+ t.serviceId === obj.serviceId
+ ))
+ );
+ this.servicesList = result
+ console.log(this.servicesList)
+ }
+ } );
+ }
+
+ getServicesList(id,busId) {
+ this.servicesList_array = []
+ //this._pd.getTabStatusPdDetails(this.tabStatus)
+ this._api.getServicesListDetails(id,busId).subscribe(res => {
+ if (res.status == 200) {
+ this.servicesList_data = res.data;
+ console.log(this.servicesList_data)
+ res['data'].forEach(element => {
+ // tmp.push(element.service)
+ element.service.forEach(e => {
+ console.log(e)
+ this.servicesList_array.push(e)
+ this.assignService.push(e.servicesName)
+ });
+ });
+
+ // this.servicesList_array = this.servicesList_array.filter((obj, index, self) =>
+ // index === self.findIndex((t) => (
+ // t.serviceId === obj.serviceId
+ // ))
+ // );
+ // let result = this.assignService.filter((obj, index, self) =>
+ // index === self.findIndex((t) => (
+ // t.serviceId === obj.serviceId
+ // ))
+ // );
+ // this.assignService = result
+ console.log(this.servicesList_array)
+ }
+ this.getAssignedList(this.busId)
+ });
+ // this.assignService = this.checkedArray
+ }
+
+}
diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
index 4dbbe26..05b07fe 100644
--- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
+++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
@@ -9,6 +9,7 @@ import { AddUserComponent } from '../add-user/add-user.component';
import { UserService } from '../user-service/user.service';
import { environment } from 'environments/environment';
import { BusinessService } from 'app/appoinment/business/business-service/business.service';
+import { PractAssignServiceComponent } from '../pract-assign-service/pract-assign-service.component';
export interface UsersData {
id: number;
@@ -164,7 +165,7 @@ export class UserListComponent implements OnInit {
}).then((result) => {
if (result.value) {
// this.deleteRowData(element);
- this.formAddUpdateAndDelete(name,element)
+ this.formAddUpdateAndDelete(name,element,'','')
Swal.fire(
'Deleted!',
'Your imaginary file has been deleted.',
@@ -203,7 +204,7 @@ export class UserListComponent implements OnInit {
}
if(result != undefined){
console.log(result)
- this.formAddUpdateAndDelete(result,result.data)
+ this.formAddUpdateAndDelete(result,result.data,action,obj)
}
// console.log(result)
// if(result.event == 'Add'){
@@ -216,7 +217,7 @@ export class UserListComponent implements OnInit {
});
}
- formAddUpdateAndDelete(result,row_obj){
+ formAddUpdateAndDelete(result,row_obj,action,obj){
console.log(result,row_obj)
let formValue = []
if(result.event == 'Add'){
@@ -264,9 +265,9 @@ export class UserListComponent implements OnInit {
let user_role = localStorage.getItem('user_role')
if(user_role != 'BADMIN'){
localStorage.setItem('busNameID',null)
- }
+ }
- // this.usersList = res.data;
+ // this.usersList = res.data;
this.getUsersList()
if(result.event == 'Add'){
this.notifierService.notify('success', 'User Added Successfully');
@@ -275,6 +276,12 @@ export class UserListComponent implements OnInit {
} else if(result == 'Delete'){
this.notifierService.notify('success', 'User Deleted Successfully');
}
+ if(action == 'Update' && result.role == 'PRACTITIONER'){
+ this.openAssignService(res['data'].id,action,obj)
+ }else if(result.role == 'PRACTITIONER'){
+ this.openAssignService(res['data'].id,'',res['data'].userName)
+ }
+
}
else{
this.notifierService.notify('warning', res.message);
@@ -288,6 +295,19 @@ export class UserListComponent implements OnInit {
});
}
+ openAssignService(userId,action,obj) {
+ const dialogRef = this.dialog.open(PractAssignServiceComponent, {
+ width: '25%',
+ height: '100%',
+ // maxWidth: '38vw',
+ position: { right: '0' },
+ data:{userId,action,obj}
+ });
+ dialogRef.afterClosed().subscribe(result => {
+
+ });
+ }
+
// addRowData(row_obj){
// var d = this.dataSource.data.length+1
// console.log(this.dataSource)
diff --git a/ng-seed/src/app/appoinment/user/user-service/user.service.ts b/ng-seed/src/app/appoinment/user/user-service/user.service.ts
index 8d9ec72..b9af196 100644
--- a/ng-seed/src/app/appoinment/user/user-service/user.service.ts
+++ b/ng-seed/src/app/appoinment/user/user-service/user.service.ts
@@ -34,6 +34,11 @@ export class UserService {
// )
}
+ getServiceCheckedDetails(params): Observable{
+ return this._http.post(this.apiUrl + 'AlterServicesMap', params)
+ }
+
+
handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable) => import("rxjs").ObservableInput {
throw new Error('Method not implemented.');
diff --git a/ng-seed/src/app/appoinment/user/user.module.ts b/ng-seed/src/app/appoinment/user/user.module.ts
index 74c4d3d..5c0626b 100644
--- a/ng-seed/src/app/appoinment/user/user.module.ts
+++ b/ng-seed/src/app/appoinment/user/user.module.ts
@@ -8,6 +8,7 @@ import { DemoMaterialModule } from 'app/shared/demo.module';
import { NgScrollbarModule } from 'ngx-scrollbar';
import { AddUserComponent } from './add-user/add-user.component';
import { NotifierModule, NotifierOptions } from 'angular-notifier';
+import { PractAssignServiceComponent } from './pract-assign-service/pract-assign-service.component';
const customNotifierOptions: NotifierOptions = {
position: {
@@ -54,6 +55,7 @@ const customNotifierOptions: NotifierOptions = {
declarations: [
UserListComponent,
AddUserComponent,
+ PractAssignServiceComponent,
],
imports: [
diff --git a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html
index f244959..b23120a 100644
--- a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html
+++ b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html
@@ -79,7 +79,7 @@
Date & Time
- : {{bookingSummary.appoinmentDate | date:'fullDate'}} ({{bookingSummary.appoinmentSlots[0] | date:'shortTime'}})
+ : {{bookingSummary.appoinmentDate}} {{bookingSummary.appoinmentSlots[0] | date:'shortTime'}}
diff --git a/ng-seed/src/app/end-user/consultants/consultants-list.component.ts b/ng-seed/src/app/end-user/consultants/consultants-list.component.ts
index 6a1b22f..ccee00a 100644
--- a/ng-seed/src/app/end-user/consultants/consultants-list.component.ts
+++ b/ng-seed/src/app/end-user/consultants/consultants-list.component.ts
@@ -116,6 +116,7 @@ export class ConsultantsListComponent implements OnInit {
localStorage.setItem('user_id',param.id)
let URL = this.router.url;
console.log(URL,param)
+ localStorage.setItem('advanced_slot_days',param['practitionerInfos'][0].days)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'business'){
diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.html b/ng-seed/src/app/end-user/customer-info/customer-info.component.html
index 933490d..6090832 100644
--- a/ng-seed/src/app/end-user/customer-info/customer-info.component.html
+++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.html
@@ -31,7 +31,7 @@
-
+
Contact No is required
Invalid Contact No
Contact No must be at least 10 characters
diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.scss b/ng-seed/src/app/end-user/customer-info/customer-info.component.scss
index 3939962..d055eed 100644
--- a/ng-seed/src/app/end-user/customer-info/customer-info.component.scss
+++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.scss
@@ -70,4 +70,9 @@ mat-toolbar{
height: 50px;
font-size: 14px
}
+
+ .custom-dialog-container{
+ background: none !important;
+ padding: 0px !important;
+ }
\ No newline at end of file
diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
index 9f870c5..8a2f91f 100644
--- a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
+++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts
@@ -5,6 +5,9 @@ import { EndUserService } from '../end-user.service';
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
+import { MatDialog } from '@angular/material/dialog';
+import { OptVerifyComponent } from './opt-verify/opt-verify.component';
+import { event } from 'jquery';
var config = {
@@ -32,8 +35,9 @@ export class CustomerInfoComponent implements OnInit {
otp!: string;
verifykey: any;
busName: string;
+ noChangeNo: any = 0;
- constructor(private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
+ constructor(public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
// firebase.initializeApp(config)
}
@@ -61,7 +65,7 @@ export class CustomerInfoComponent implements OnInit {
console.log(this.form.value)
console.log('add')
if(!this.form.valid){
- return
+ return
}
let row_obj = this.form.value
console.log(row_obj)
@@ -69,7 +73,7 @@ export class CustomerInfoComponent implements OnInit {
cusName: row_obj.cusName,
email: row_obj.email,
address_1: row_obj.address_1,
- phoneNo: this.phoneNumber.substring(3) ,
+ phoneNo: row_obj.phoneNo,
pincode: row_obj.pincode,
state: row_obj.state,
city: row_obj.city,
@@ -100,126 +104,43 @@ export class CustomerInfoComponent implements OnInit {
},1000)
}
- resendOTP() {
- this.phoneNumber = this.form.value.phoneNo
- if( this.phoneNumber.length!=10){
-alert("invalid Phone No...!")
- }else{
- this.otpData = event
- this.timeLeft = 60;
- this.interval = setInterval(() => {
- if(this.timeLeft > 0) {
- this.timeLeft--;
- } else {
- clearInterval(this.interval);
- }
- },1000)
-
- this.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier(
- 'sign-in-button',
- {
- size: 'invisible',
- }
- );
- console.log(this.reCaptchaVerifier);
- this.phoneNumber = "+91"+this.phoneNumber;
- console.log(this.phoneNumber);
- firebase
- .auth()
- .signInWithPhoneNumber(this.phoneNumber, this.reCaptchaVerifier)
- .then((confirmationResult) => {
- localStorage.setItem(
- 'verificationId',
- JSON.stringify(confirmationResult.verificationId)
- );
- this.ngZone.run(() => {
- //this.router.navigate(['/code']);
- });
- })
- .catch((error) => {
- console.log(error.message);
- alert(error.message);
- setTimeout(() => {
- window.location.reload();
- }, 5000);
- });
- }
- }
- verify(event){
- this.verifykey = JSON.parse(localStorage.getItem('verificationId') || '{}');
- console.log(this.verifykey);
- this.otp = this.form.value.otp
- console.log(this.otp);
- var credential = firebase.auth.PhoneAuthProvider.credential(
- this.verifykey,
- this.otp
- );
- console.log(credential);
- firebase
- .auth()
- .signInWithCredential(credential)
- .then((response) => {
- console.log(response);
- localStorage.setItem('user_data', JSON.stringify(response));
- this.ngZone.run(() => {
- // this.router.navigate(['/dashboard']);
- this.verifyOTP = event
- });
- })
- .catch((error) => {
- console.log(error);
- alert(error.message);
- });
- }
-
- getOTP(event) {
+
+ getOTP(event) {
this.phoneNumber = this.form.value.phoneNo
if( this.phoneNumber.length!=10){
-alert("invalid Phone No...!")
+ alert("invalid Phone No...!")
}else{
- this.otpData = event
- this.timeLeft = 60;
- this.interval = setInterval(() => {
- if(this.timeLeft > 0) {
- this.timeLeft--;
- } else {
- clearInterval(this.interval);
- }
- },1000)
-
- this.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier(
- 'sign-in-button',
- {
- size: 'invisible',
- }
- );
- console.log(this.reCaptchaVerifier);
- this.phoneNumber = "+91"+this.phoneNumber;
- console.log(this.phoneNumber);
- firebase
- .auth()
- .signInWithPhoneNumber(this.phoneNumber, this.reCaptchaVerifier)
- .then((confirmationResult) => {
- localStorage.setItem(
- 'verificationId',
- JSON.stringify(confirmationResult.verificationId)
- );
- this.ngZone.run(() => {
- //this.router.navigate(['/code']);
- });
- })
- .catch((error) => {
- console.log(error.message);
- alert(error.message);
- setTimeout(() => {
- window.location.reload();
- }, 5000);
- });
+ this.openOtp(event)
+ this.noChangeNo = event
+ console.log(this.noChangeNo)
+ // this.otpData = event
}
}
+
+ openOtp(event) {
+ const dialogRef = this.dialog.open(OptVerifyComponent, {
+ width: '30%',
+ // height: '100%',
+ // maxWidth: '38vw',
+ // position: { right: '0' },
+ disableClose: true ,
+ panelClass: 'custom-dialog-container',
+
+ data:{event,phoneNo:this.phoneNumber}
+ });
+ dialogRef.afterClosed().subscribe(result => {
+ console.log(result)
+ if(result == 'signIn'){
+ this.verifyOTP = 1
+ }else{
+ this.noChangeNo = 0
+ }
+ });
+ }
+
}
diff --git a/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.html b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.html
new file mode 100644
index 0000000..8d79cf4
--- /dev/null
+++ b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.html
@@ -0,0 +1,23 @@
+
+
+
+
+
OTP
+
+
+ {{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }}
+ {{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }}
+
+
+
+
+
\ No newline at end of file
diff --git a/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.scss b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.scss
new file mode 100644
index 0000000..7694db0
--- /dev/null
+++ b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.scss
@@ -0,0 +1,7 @@
+.mat-dialog-container{
+ background: none !important;
+ padding: 0px !important;
+}
+.base-border{
+ margin-top: 0 !important;
+}
\ No newline at end of file
diff --git a/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.spec.ts b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.spec.ts
new file mode 100644
index 0000000..da1cd00
--- /dev/null
+++ b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { OptVerifyComponent } from './opt-verify.component';
+
+describe('OptVerifyComponent', () => {
+ let component: OptVerifyComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ OptVerifyComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(OptVerifyComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.ts b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.ts
new file mode 100644
index 0000000..da7099a
--- /dev/null
+++ b/ng-seed/src/app/end-user/customer-info/opt-verify/opt-verify.component.ts
@@ -0,0 +1,160 @@
+import { Component, Inject, NgZone, OnInit } from '@angular/core';
+import { FormGroup } from '@angular/forms';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import firebase from 'firebase/app';
+import 'firebase/auth';
+import 'firebase/firestore';
+
+@Component({
+ selector: 'app-opt-verify',
+ templateUrl: './opt-verify.component.html',
+ styleUrls: ['./opt-verify.component.scss']
+})
+export class OptVerifyComponent implements OnInit {
+ form: FormGroup;
+ otpData: any = 0;
+ timeLeft: number = 0;
+ interval;
+ verifyOTP: any = 0;
+ phoneNumber: any;
+ reCaptchaVerifier!: any;
+ getOtpvalue:any =[]
+ otp!: string;
+ verifykey: any;
+ busName: string;
+ noChangeNo: any = 0;
+ constructor(public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private ngZone: NgZone) {
+ this.getOtp(data)
+ }
+
+ ngOnInit(): void {
+ }
+
+ getOtp(data){
+ console.log(data)
+ this.phoneNumber = data.phoneNo
+ this.timeLeft = 60;
+ this.interval = setInterval(() => {
+ if(this.timeLeft > 0) {
+ this.timeLeft--;
+ } else {
+ clearInterval(this.interval);
+ }
+ },1000)
+
+ this.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier(
+ 'sign-in-button',
+ {
+ size: 'invisible',
+ }
+ );
+ console.log(this.reCaptchaVerifier);
+ this.phoneNumber = "+91"+this.phoneNumber;
+ console.log(this.phoneNumber);
+ firebase
+ .auth()
+ .signInWithPhoneNumber(this.phoneNumber, this.reCaptchaVerifier)
+ .then((confirmationResult) => {
+ localStorage.setItem(
+ 'verificationId',
+ JSON.stringify(confirmationResult.verificationId)
+ );
+ this.ngZone.run(() => {
+ //this.router.navigate(['/code']);
+ });
+ })
+ .catch((error) => {
+ console.log(error.message);
+ alert(error.message);
+ setTimeout(() => {
+ window.location.reload();
+ }, 5000);
+ });
+ }
+
+ verify(event){
+ this.verifykey = JSON.parse(localStorage.getItem('verificationId') || '{}');
+ console.log(this.verifykey);
+ this.otp = this.getOtpvalue
+ console.log(this.otp);
+ var credential = firebase.auth.PhoneAuthProvider.credential(
+ this.verifykey,
+ this.otp
+ );
+
+ console.log(credential);
+ firebase
+ .auth()
+ .signInWithCredential(credential)
+ .then((response) => {
+ console.log(response);
+ this.dialogRef.close(response.operationType);
+ localStorage.setItem('user_data', JSON.stringify(response));
+ this.ngZone.run(() => {
+ // this.router.navigate(['/dashboard']);
+ console.log(response)
+ this.verifyOTP = event
+ });
+ })
+ .catch((error) => {
+ console.log(error);
+ this.dialogRef.close()
+ alert(error.message);
+ });
+ }
+
+ resendOTP() {
+ this.phoneNumber = this.phoneNumber
+ if( this.phoneNumber.length!=10){
+alert("invalid Phone No...!")
+ }else{
+ this.otpData = event
+ this.timeLeft = 60;
+ this.interval = setInterval(() => {
+ if(this.timeLeft > 0) {
+ this.timeLeft--;
+ } else {
+ clearInterval(this.interval);
+ }
+ },1000)
+
+ this.reCaptchaVerifier = new firebase.auth.RecaptchaVerifier(
+ 'sign-in-button',
+ {
+ size: 'invisible',
+ }
+ );
+ console.log(this.reCaptchaVerifier);
+ this.phoneNumber = "+91"+this.phoneNumber;
+ console.log(this.phoneNumber);
+ firebase
+ .auth()
+ .signInWithPhoneNumber(this.phoneNumber, this.reCaptchaVerifier)
+ .then((confirmationResult) => {
+ localStorage.setItem(
+ 'verificationId',
+ JSON.stringify(confirmationResult.verificationId)
+ );
+ this.ngZone.run(() => {
+ //this.router.navigate(['/code']);
+ });
+ })
+ .catch((error) => {
+ console.log(error.message);
+ alert(error.message);
+ setTimeout(() => {
+ window.location.reload();
+ }, 5000);
+ });
+ }
+ }
+
+ closeDialog(){
+ this.dialogRef.close({event:'Cancel'});
+ }
+
+ close() {
+ this.dialogRef.close();
+}
+
+}
diff --git a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts
index 6134c3d..d40fbf5 100644
--- a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts
+++ b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts
@@ -136,6 +136,7 @@ export class DoctorProfileComponent implements OnInit {
console.log(this.dp)
this.profileDetails = this.bookedAppointment.practitionerInfos[0]
console.log(this.profileDetails)
+ localStorage.setItem('advanced_slot_days',this.profileDetails.days)
this.skillsDetails = JSON.parse(this.profileDetails.skills)
// this.skillsDetails = JSON.parse(this.skillsDetails)
diff --git a/ng-seed/src/app/end-user/end-user.module.ts b/ng-seed/src/app/end-user/end-user.module.ts
index b676910..9acdb68 100644
--- a/ng-seed/src/app/end-user/end-user.module.ts
+++ b/ng-seed/src/app/end-user/end-user.module.ts
@@ -18,6 +18,7 @@ import { BookingSummaryComponent } from './booking-summary/booking-summary.compo
import { SummaryComponent } from './summary/summary.component';
import { DoctorProfileComponent } from './doctor-profile/doctor-profile.component';
import { NgxSpinnerModule } from "ngx-spinner";
+import { OptVerifyComponent } from './customer-info/opt-verify/opt-verify.component';
@NgModule({
declarations: [
@@ -26,7 +27,7 @@ import { NgxSpinnerModule } from "ngx-spinner";
SearchCategoryComponent,
ConsultantsListComponent,
CentersListComponent,
- PaymentComponent,CustomerInfoComponent, BookingSummaryComponent, SummaryComponent, DoctorProfileComponent
+ PaymentComponent,CustomerInfoComponent, BookingSummaryComponent, SummaryComponent, DoctorProfileComponent, OptVerifyComponent
],
imports: [
CommonModule,
diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html
index 46aec3f..c6690a6 100644
--- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html
+++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html
@@ -66,7 +66,7 @@
- keyboard_arrow_left {{check(days) | date:'longDate'}} keyboard_arrow_right
+ keyboard_arrow_left {{check(days) | date:'longDate'}} keyboard_arrow_right
- {{slot | date:'shortTime'}}
+ {{slot | date:'shortTime'}}
@@ -187,9 +187,9 @@
-
+
diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
index c31acb1..d540d5c 100644
--- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
+++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
@@ -54,6 +54,7 @@ export class SlotBookingDetailsComponent implements OnInit {
servicesName: any=[];
user: any=[];
serviceMapdetails:any =[]
+ advanced_slot_days: any;
constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
this.end_user.appointmentBooked_observable$.subscribe((res) => {
console.log('booked', res);
@@ -86,7 +87,24 @@ export class SlotBookingDetailsComponent implements OnInit {
this.slot_Split()
+ this.advanced_slot_days = parseInt(localStorage.getItem('advanced_slot_days'))-1
+ console.log(this.advanced_slot_days)
+
+ let tmp=[]
+ for(let i=0;i<=this.advanced_slot_days;i++){
+ console.log(i)
+ var someDate = new Date();
+ someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
+ var dateFormated = someDate.toISOString().substr(0,10);
+ console.log(dateFormated);
+ tmp.push(dateFormated)
+ this.days= tmp
+
+ }
+ console.log(tmp)
+ console.log(this.days)
+
}
@@ -291,17 +309,9 @@ if(this.getHours.length != 0){
}
getApiData(){
- this.busName = localStorage.getItem('busName')
- let tmp=[]
- for(let i=0;i<=5;i++){
- var someDate = new Date();
- someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
- var dateFormated = someDate.toISOString().substr(0,10);
- console.log(dateFormated);
- tmp.push(dateFormated)
- }
- console.log(tmp)
- this.days= tmp
+ this.busName = localStorage.getItem('busName')
+
+
let params ={"id":this.user.id}
this.end_user.getSlots(params).subscribe(res => {
if (res.status == 200) {
@@ -314,7 +324,7 @@ if(this.getHours.length != 0){
}
goToSlotBooking(){
// this.days[]
- if( this.clicks <5){
+ if( this.clicks