diff --git a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html index 1ee1321..453d80f 100644 --- a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html +++ b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html @@ -29,7 +29,7 @@ - +
@@ -61,10 +61,7 @@ - + @@ -83,10 +80,10 @@ - + 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 71917f1..7a92a7e 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 @@ -1,4 +1,4 @@ - +
{{action}} Users
@@ -110,6 +110,6 @@ Sure to delete {{local_data.name}}? -
+ \ No newline at end of file diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.scss b/ng-seed/src/app/appoinment/user/add-user/add-user.component.scss index b3671dc..8c51903 100644 --- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.scss +++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.scss @@ -12,14 +12,14 @@ // margin-left: 6rem; float: right; } -::ng-deep .mat-card.settings-panel { - position: inherit; - bottom: 0px; - right: 0px; - width: 350px; - z-index: 9; - top: 58px; -} +// ::ng-deep .mat-card.settings-panel { +// position: inherit; +// bottom: 0px; +// right: 0px; +// width: 350px; +// z-index: 9; +// top: 58px; +// } ::ng-deep body .mat-card { box-shadow:none!important; diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.html b/ng-seed/src/app/appoinment/user/user-list/user-list.component.html index 4803cc6..0c2ff57 100644 --- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.html +++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.html @@ -15,19 +15,15 @@ --> - + 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 05b07fe..759d55f 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 @@ -10,6 +10,7 @@ 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'; +import { filter } from 'd3'; export interface UsersData { id: number; @@ -76,6 +77,24 @@ export class UserListComponent implements OnInit { this.getUsersList() this.getBusinessList() } + ngAfterViewInit() { + console.log(this.usersList,this.paginator) + this.usersList.paginator = this.paginator; + + this.usersList.paginator = this.paginator; + console.log(this.usersList,this.paginator) + //this.usersList.sort = this.sort; + + } + + applyFilter(filterValue: string) { + console.log(filterValue) + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.usersList.filter = filterValue; + console.log(this.usersList) + + } getUsersList() { let userRole = localStorage.getItem('user_role') let param; @@ -108,7 +127,8 @@ export class UserListComponent implements OnInit { } },error => this.isLoading = false); - } + } + getBusinessList() { //this._pd.getTabStatusPdDetails(this.tabStatus) this._bus.getBusinessListDetails().subscribe(res => { @@ -127,27 +147,29 @@ export class UserListComponent implements OnInit { // hashPassword(password: string){ // return "*".repeat(6) // } - ngAfterViewInit() { - console.log(this.usersList,this.paginator) - this.usersList.paginator = this.paginator; - this.usersList.paginator = this.paginator; - console.log(this.usersList,this.paginator) - //this.usersList.sort = this.sort; - - } - applyFilter(filterValue: string) { - console.log(filterValue) - if(filterValue == null){ - this.usersList.filter = null; - }else{ - filterValue = filterValue.trim(); // Remove whitespace - filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches - this.usersList.filter = filterValue; - console.log(this.usersList) - } - - } + + // roleFilter(param){ + // this.getUsersList() + // if(param == 'BADMIN'){ + // console.log(this.usersList['data']) + // let userList:any = this.usersList['data'] + // this.usersList['data'] = userList.filter(val => val.role == 'BADMIN') + // console.log(this.usersList['data']) + // } else if(param == 'FRONTDESK'){ + // console.log(this.usersList['data']) + // let userList:any = this.usersList['data'] + // this.usersList['data'] = userList.filter(val => val.role == 'FRONTDESK') + // console.log(this.usersList['data']) + // } else if(param == 'SADMIN'){ + // console.log(this.usersList['data']) + // let userList:any = this.usersList['data'] + // this.usersList['data'] = userList.filter(val => val.role == 'SADMIN') + // console.log(this.usersList['data']) + // } else if(param == null){ + // this.getUsersList() + // } + // } pageChange(e) { console.log(e); @@ -190,7 +212,7 @@ export class UserListComponent implements OnInit { } obj.action = action; const dialogRef = this.dialog.open(AddUserComponent, { - // width: '30%', + width: '30%', height: '100%', // maxWidth: '38vw', position: { right: '0' }, @@ -218,6 +240,7 @@ export class UserListComponent implements OnInit { } formAddUpdateAndDelete(result,row_obj,action,obj){ + console.log(result,row_obj) let formValue = [] if(result.event == 'Add'){ @@ -276,12 +299,21 @@ 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) + + let loginUser = localStorage.getItem('user_role') + if(loginUser == 'FRONTDESK'){ + if(result.role == 'PRACTITIONER'){ + console.log('PRACTITIONER') + if(action == 'Update'){ + console.log('Update') + this.openAssignService(res['data'].id,action,obj) + }else { + console.log('Update') + this.openAssignService(res['data'].id,'',res['data'].userName) + } + } } - + } else{ this.notifierService.notify('warning', res.message); 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 c72e7ef..0eb02a4 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 @@ -1,7 +1,7 @@
-
@@ -14,6 +14,60 @@
+ +
+
+
+
+
Avatar Practitioner
+
+
+

Dr. {{bookedDetails.doctor}}

+
+
+
+
+
+
+
Avatar Service
+
+
+

{{bookedDetails.service}} ({{bookedDetails.duration}}Mins)

+
+
+
+
+
+
+
Avatar Date
+
+
+

{{bookedDetails.date | date:'longDate'}}

+
+
+
+
+
+
+
Avatar Slot Time
+
+
+

{{bookedDetails.time | date:'shortTime'}}

+
+
+
+
+
+
+
Avatar Fees
+
+
+

{{bookedDetails.amount}}

+
+
+
+
+
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 568e859..a9d399e 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 @@ -91,4 +91,22 @@ mat-toolbar{ } .mat-toolbar-single-row { display: block !important; +} +.heading{ + margin: 0; + color: #227f6e; +} +.pad{ + padding: 10px !important; +} +.bookedDetails{ + padding: 0; + margin: 10px; + color: #959595; + font-size: 16px; +} +.img{ + width: 20px; + // margin-right: 1.5rem; + vertical-align: top !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 728942d..25ed79f 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 @@ -39,7 +39,14 @@ export class CustomerInfoComponent implements OnInit { noChangeNo: any = 0; private apiUrl = environment.apiEndpoint; logo: any; + bookedDetails: any = []; constructor(public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) { + this._cus.bookedDetails_observable$.subscribe((res) => { + console.log('booked2', res); + this.bookedDetails = res + console.log(this.bookedDetails) + + }) // firebase.initializeApp(config) } diff --git a/ng-seed/src/app/end-user/end-user.service.ts b/ng-seed/src/app/end-user/end-user.service.ts index 1361db4..4ec2ab0 100644 --- a/ng-seed/src/app/end-user/end-user.service.ts +++ b/ng-seed/src/app/end-user/end-user.service.ts @@ -9,7 +9,8 @@ import { catchError } from 'rxjs/operators'; }) export class EndUserService { - +public bookedDetails:BehaviorSubject = new BehaviorSubject([]); +public bookedDetails_observable$ = this.bookedDetails.asObservable(); public appointmentBooked:BehaviorSubject = new BehaviorSubject([]); public appointmentBooked_observable$ = this.appointmentBooked.asObservable(); public summmarylist:BehaviorSubject = new BehaviorSubject([]); 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 a3d9e16..4e11a73 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 @@ -290,9 +290,32 @@ if(this.getHours.length != 0){ console.log( this.slot_array) localStorage.setItem("slotData",JSON.stringify(this.slot_array)) let URL = this.router.url; - console.log( JSON.parse(localStorage.getItem("slotData"))) - this.router.navigate([URL+"/cus"]) + console.log(JSON.parse(localStorage.getItem("slotData"))) + let duration + let fees + if(this.serviceMapdetails[0].duration.length>0 ){ + duration = this.serviceMapdetails[0].duration[0].durationNew + fees = this.serviceMapdetails[0].duration[0].fees + } else{ + duration = this.serviceMapdetails[0].service[0].duration + fees = this.serviceMapdetails[0].service[0].fees + } + console.log(this.doctor,this.servicesName.servicesName,this.days[this.clicks],this.slotTime,this.serviceMapdetails[0].service[0].fees) + + let bookedDetails = { + "doctor" : this.doctor, + "service": this.servicesName.servicesName, + "duration": duration, + "date":this.days[this.clicks], + "time":this.slotTime, + "amount": fees + } + console.log(bookedDetails) + this.end_user.bookedDetails.next(bookedDetails) + + this.router.navigate([URL+"/cus"]) } + checkBooked(param){ // console.log(param, this.bookedAppointment) this.bookedAppointmentSlot diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 12c3dc9..a5d99a4 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -26,5 +26,18 @@ export const environment = { appId: "1:513912226817:web:eebcec6f7c6407a1dd2c00", measurementId: "G-48RM8BFRFK" }, + + // web:{ + // client_id:"1070360493694-f47l99s7bjqf7of1n7amgkg3mfk7l425.apps.googleusercontent.com", + // project_id:"neon-nexus-386307", + // auth_uri:"https://accounts.google.com/o/oauth2/auth", + // token_uri:"https://oauth2.googleapis.com/token", + // auth_provider_x509_cert_url:"https://www.googleapis.com/oauth2/v1/certs", + // client_secret:"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", + // redirect_uris:["http://localhost:4200"], + // javascript_origins:["http://localhost:4200"] + // } + + -}; +}
S.No {{row.index+1 }} Status {{row.status}} {{row.status}}