bug fix
This commit is contained in:
parent
176a12c13c
commit
b72f9d7804
@ -29,7 +29,7 @@
|
|||||||
<!-- <mat-expansion-panel>
|
<!-- <mat-expansion-panel>
|
||||||
<mat-expansion-panel-header > -->
|
<mat-expansion-panel-header > -->
|
||||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||||
<table mat-table [dataSource]="appointmentListSource" #mytable class="my-table mat-elevation-z8 len-table">
|
<table mat-table [dataSource]="appointmentListSource" #mytable class="my-table mat-elevation-z8 len-table" *ngIf="!recordStatus">
|
||||||
<ng-container matColumnDef="id">
|
<ng-container matColumnDef="id">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-no"> S.No</th>
|
<th mat-header-cell *matHeaderCellDef class="font-color mat-no"> S.No</th>
|
||||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.index+1 }}</td>
|
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.index+1 }}</td>
|
||||||
@ -61,10 +61,7 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="status">
|
<ng-container matColumnDef="status">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Status </th>
|
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Status </th>
|
||||||
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{
|
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{'positive' :row.status == 'Booked','negative' : row.status != 'Booked','cancelStatus' : row.status == 'Cancel'}"> {{row.status}}</td>
|
||||||
'positive' :row.status == 'Booked',
|
|
||||||
'negative' : row.status != 'Booked'
|
|
||||||
}"> {{row.status}}</td>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
@ -83,10 +80,10 @@
|
|||||||
<!-- <table mat-table [dataSource]="appointmentListSource" matSort *ngIf="appointmentListLength > 0" class="my-table mat-elevation-z8 len-table"> -->
|
<!-- <table mat-table [dataSource]="appointmentListSource" matSort *ngIf="appointmentListLength > 0" class="my-table mat-elevation-z8 len-table"> -->
|
||||||
|
|
||||||
<!-- ID Column -->
|
<!-- ID Column -->
|
||||||
<ng-container matColumnDef="id">
|
<!-- <ng-container matColumnDef="id">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> S.No </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> S.No </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.index+1}} </mat-cell>
|
<mat-cell *matCellDef="let row; let i = index;"> {{row.index+1}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container> -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<ng-container matColumnDef="ClientName">
|
<ng-container matColumnDef="ClientName">
|
||||||
|
|||||||
@ -117,11 +117,16 @@ tr.mat-header-row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.positive {
|
.positive {
|
||||||
color: green;
|
color: green;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.negative {
|
.negative {
|
||||||
color: rgb(230, 174, 21);
|
color: rgb(230, 174, 21);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancelStatus {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
pageIndex = 0;
|
pageIndex = 0;
|
||||||
pageSize = 5;
|
pageSize = 5;
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
appoinmentsList: any[] = [];
|
appoinmentsList: any = [];
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
// dataSource: any;
|
// dataSource: any;
|
||||||
public appointmentListSource:any = new MatTableDataSource();
|
public appointmentListSource:any = new MatTableDataSource();
|
||||||
@ -115,12 +115,14 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
|
|
||||||
getPractitioner(selectedPractititoner){
|
getPractitioner(selectedPractititoner){
|
||||||
console.log(selectedPractititoner)
|
console.log(selectedPractititoner)
|
||||||
|
this.appoinmentsList=[]
|
||||||
// {"busId":abc123,userId:"2"} or param = {"busId":abc123}
|
// {"busId":abc123,userId:"2"} or param = {"busId":abc123}
|
||||||
let param = {"busId": selectedPractititoner.busId,"userId":selectedPractititoner.id}
|
let param = {"busId": selectedPractititoner.busId,"userId":selectedPractititoner.id}
|
||||||
this.getAppoinmentsList(param)
|
this.getAppoinmentsList(param)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppoinmentsList(param) {
|
getAppoinmentsList(param) {
|
||||||
|
this.appoinmentsList=[]
|
||||||
let user_role = localStorage.getItem('user_role');
|
let user_role = localStorage.getItem('user_role');
|
||||||
// let param
|
// let param
|
||||||
// if(user_role != 'FRONTDESK'){
|
// if(user_role != 'FRONTDESK'){
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
<h5 mat-dialog-title> <strong>{{action}} Business</strong>
|
<h5 mat-dialog-title> <strong>{{action}} Business</strong>
|
||||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||||
><mat-icon>close</mat-icon></button></h5>
|
><mat-icon>close</mat-icon></button></h5>
|
||||||
|
|
||||||
|
<div mat-dialog-content class="my-table">
|
||||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||||
<ng-scrollbar class="scrollHV">
|
<ng-scrollbar class="scrollHV">
|
||||||
<div mat-dialog-content class="my-table">
|
|
||||||
|
|
||||||
<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>Name</mat-label>
|
<mat-label>Name</mat-label>
|
||||||
@ -74,10 +76,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<ng-template #elseTemplate>
|
|
||||||
Sure to delete <b>{{local_data.name}}</b>?
|
|
||||||
</ng-template>
|
|
||||||
<div mat-dialog-actions>
|
<div mat-dialog-actions>
|
||||||
<button mat-button type="submit" class="mat-green" mat-raised-button >{{action}}</button>
|
<button mat-button type="submit" class="mat-green" mat-raised-button >{{action}}</button>
|
||||||
<button mat-button type="button" (click)="closeDialog()" >Cancel</button>
|
<button mat-button type="button" (click)="closeDialog()" >Cancel</button>
|
||||||
@ -85,6 +85,12 @@
|
|||||||
</ng-scrollbar>
|
</ng-scrollbar>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
<ng-template #elseTemplate>
|
||||||
|
Sure to delete <b>{{local_data.name}}</b>?
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
<!-- </mat-card> -->
|
<!-- </mat-card> -->
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<mat-card class="settings-panel" >
|
<!-- <mat-card class="settings-panel" > -->
|
||||||
<h5 mat-dialog-title> <strong>{{action}} Users</strong>
|
<h5 mat-dialog-title> <strong>{{action}} Users</strong>
|
||||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||||
><mat-icon>close</mat-icon></button></h5>
|
><mat-icon>close</mat-icon></button></h5>
|
||||||
@ -110,6 +110,6 @@
|
|||||||
Sure to delete <b>{{local_data.name}}</b>?
|
Sure to delete <b>{{local_data.name}}</b>?
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</mat-card>
|
<!-- </mat-card> -->
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
@ -12,14 +12,14 @@
|
|||||||
// margin-left: 6rem;
|
// margin-left: 6rem;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
::ng-deep .mat-card.settings-panel {
|
// ::ng-deep .mat-card.settings-panel {
|
||||||
position: inherit;
|
// position: inherit;
|
||||||
bottom: 0px;
|
// bottom: 0px;
|
||||||
right: 0px;
|
// right: 0px;
|
||||||
width: 350px;
|
// width: 350px;
|
||||||
z-index: 9;
|
// z-index: 9;
|
||||||
top: 58px;
|
// top: 58px;
|
||||||
}
|
// }
|
||||||
|
|
||||||
::ng-deep body .mat-card {
|
::ng-deep body .mat-card {
|
||||||
box-shadow:none!important;
|
box-shadow:none!important;
|
||||||
|
|||||||
@ -15,19 +15,15 @@
|
|||||||
|
|
||||||
|
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field appearance="outline" style="width:20%;margin-left: 5%;">
|
<!-- <mat-form-field appearance="outline" style="width:20%;margin-left: 5%;">
|
||||||
<mat-label>Role</mat-label>
|
<mat-label>Role</mat-label>
|
||||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||||
<mat-option value="All" (click)="applyFilter(null)">All</mat-option>
|
<mat-option value="All" (click)="applyFilter(null)">All</mat-option>
|
||||||
<mat-option value="SADMIN" (click)="applyFilter('SADMIN')">SADMIN</mat-option>
|
<mat-option value="SADMIN" (click)="applyFilter('SADMIN')">SADMIN</mat-option>
|
||||||
<mat-option value="PRACTITIONER"(click)="applyFilter('PRACTITIONER')"> PRACTITIONER</mat-option>
|
<mat-option value="PRACTITIONER"(click)="applyFilter('PRACTITIONER')"> PRACTITIONER</mat-option>
|
||||||
<mat-option value="BADMIN" (click)="applyFilter('BADMIN')">BADMIN</mat-option>
|
<mat-option value="BADMIN" (click)="applyFilter('BADMIN')">BADMIN</mat-option>
|
||||||
|
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
</mat-form-field> -->
|
||||||
|
|
||||||
</mat-form-field>
|
|
||||||
<button mat-button (click)="openDialog('Add',{})" class="button">Add Users</button>
|
<button mat-button (click)="openDialog('Add',{})" class="button">Add Users</button>
|
||||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import { UserService } from '../user-service/user.service';
|
|||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
import { BusinessService } from 'app/appoinment/business/business-service/business.service';
|
import { BusinessService } from 'app/appoinment/business/business-service/business.service';
|
||||||
import { PractAssignServiceComponent } from '../pract-assign-service/pract-assign-service.component';
|
import { PractAssignServiceComponent } from '../pract-assign-service/pract-assign-service.component';
|
||||||
|
import { filter } from 'd3';
|
||||||
|
|
||||||
export interface UsersData {
|
export interface UsersData {
|
||||||
id: number;
|
id: number;
|
||||||
@ -76,6 +77,24 @@ export class UserListComponent implements OnInit {
|
|||||||
this.getUsersList()
|
this.getUsersList()
|
||||||
this.getBusinessList()
|
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() {
|
getUsersList() {
|
||||||
let userRole = localStorage.getItem('user_role')
|
let userRole = localStorage.getItem('user_role')
|
||||||
let param;
|
let param;
|
||||||
@ -109,6 +128,7 @@ export class UserListComponent implements OnInit {
|
|||||||
},error => this.isLoading = false);
|
},error => this.isLoading = false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getBusinessList() {
|
getBusinessList() {
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
this._bus.getBusinessListDetails().subscribe(res => {
|
this._bus.getBusinessListDetails().subscribe(res => {
|
||||||
@ -127,27 +147,29 @@ export class UserListComponent implements OnInit {
|
|||||||
// hashPassword(password: string){
|
// hashPassword(password: string){
|
||||||
// return "*".repeat(6)
|
// 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;
|
|
||||||
|
|
||||||
}
|
// roleFilter(param){
|
||||||
applyFilter(filterValue: string) {
|
// this.getUsersList()
|
||||||
console.log(filterValue)
|
// if(param == 'BADMIN'){
|
||||||
if(filterValue == null){
|
// console.log(this.usersList['data'])
|
||||||
this.usersList.filter = null;
|
// let userList:any = this.usersList['data']
|
||||||
}else{
|
// this.usersList['data'] = userList.filter(val => val.role == 'BADMIN')
|
||||||
filterValue = filterValue.trim(); // Remove whitespace
|
// console.log(this.usersList['data'])
|
||||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
// } else if(param == 'FRONTDESK'){
|
||||||
this.usersList.filter = filterValue;
|
// console.log(this.usersList['data'])
|
||||||
console.log(this.usersList)
|
// 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) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -190,7 +212,7 @@ export class UserListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
obj.action = action;
|
obj.action = action;
|
||||||
const dialogRef = this.dialog.open(AddUserComponent, {
|
const dialogRef = this.dialog.open(AddUserComponent, {
|
||||||
// width: '30%',
|
width: '30%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
// maxWidth: '38vw',
|
// maxWidth: '38vw',
|
||||||
position: { right: '0' },
|
position: { right: '0' },
|
||||||
@ -218,6 +240,7 @@ export class UserListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
formAddUpdateAndDelete(result,row_obj,action,obj){
|
formAddUpdateAndDelete(result,row_obj,action,obj){
|
||||||
|
|
||||||
console.log(result,row_obj)
|
console.log(result,row_obj)
|
||||||
let formValue = []
|
let formValue = []
|
||||||
if(result.event == 'Add'){
|
if(result.event == 'Add'){
|
||||||
@ -276,11 +299,20 @@ export class UserListComponent implements OnInit {
|
|||||||
} else if(result == 'Delete'){
|
} else if(result == 'Delete'){
|
||||||
this.notifierService.notify('success', 'User Deleted Successfully');
|
this.notifierService.notify('success', 'User Deleted Successfully');
|
||||||
}
|
}
|
||||||
if(action == 'Update' && result.role == 'PRACTITIONER'){
|
|
||||||
|
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)
|
this.openAssignService(res['data'].id,action,obj)
|
||||||
}else if(result.role == 'PRACTITIONER'){
|
}else {
|
||||||
|
console.log('Update')
|
||||||
this.openAssignService(res['data'].id,'',res['data'].userName)
|
this.openAssignService(res['data'].id,'',res['data'].userName)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<mat-toolbar>
|
<mat-toolbar>
|
||||||
<div fxLayout="row wrap" style="padding:15px 0px;">
|
<div fxLayout="row wrap" style="padding:15px 0px;">
|
||||||
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
|
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
|
||||||
<button (click)="backRedireact()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
|
<button (click)="bookedDetails()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
|
||||||
<mat-icon>keyboard_backspace</mat-icon>
|
<mat-icon>keyboard_backspace</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -14,6 +14,60 @@
|
|||||||
</mat-toolbar>
|
</mat-toolbar>
|
||||||
<ng-scrollbar class="scrollHV">
|
<ng-scrollbar class="scrollHV">
|
||||||
<div class="container mt-1">
|
<div class="container mt-1">
|
||||||
|
<mat-card class="pad radius" *ngIf="bookedDetails.length != 0">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h5 class="heading"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner</h5>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<p class="bookedDetails">Dr. {{bookedDetails.doctor}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h5 class="heading"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service</h5>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<p class="bookedDetails">{{bookedDetails.service}} ({{bookedDetails.duration}}Mins)</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h5 class="heading"><img src="assets/images/Languages.svg" alt="Avatar" class="img"> Date</h5>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<p class="bookedDetails">{{bookedDetails.date | date:'longDate'}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h5 class="heading"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img"> Slot Time</h5>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<p class="bookedDetails">{{bookedDetails.time | date:'shortTime'}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="center center">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h5 class="heading"><img src="assets/images/Location.svg" alt="Avatar" class="img"> Fees</h5>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<p class="bookedDetails"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">₹</span> {{bookedDetails.amount}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
<div fxLayout="row wrap" fxLayoutAlign="center">
|
<div fxLayout="row wrap" fxLayoutAlign="center">
|
||||||
<div class="column mat-width" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
<div class="column mat-width" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||||
<mat-card class="p-2 radius">
|
<mat-card class="p-2 radius">
|
||||||
|
|||||||
@ -92,3 +92,21 @@ mat-toolbar{
|
|||||||
.mat-toolbar-single-row {
|
.mat-toolbar-single-row {
|
||||||
display: block !important;
|
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;
|
||||||
|
}
|
||||||
@ -39,7 +39,14 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
noChangeNo: any = 0;
|
noChangeNo: any = 0;
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
logo: any;
|
logo: any;
|
||||||
|
bookedDetails: any = [];
|
||||||
constructor(public dialog: MatDialog,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) {
|
||||||
|
this._cus.bookedDetails_observable$.subscribe((res) => {
|
||||||
|
console.log('booked2', res);
|
||||||
|
this.bookedDetails = res
|
||||||
|
console.log(this.bookedDetails)
|
||||||
|
|
||||||
|
})
|
||||||
// firebase.initializeApp(config)
|
// firebase.initializeApp(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import { catchError } from 'rxjs/operators';
|
|||||||
})
|
})
|
||||||
export class EndUserService {
|
export class EndUserService {
|
||||||
|
|
||||||
|
public bookedDetails:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
||||||
|
public bookedDetails_observable$ = this.bookedDetails.asObservable();
|
||||||
public appointmentBooked:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
public appointmentBooked:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
||||||
public appointmentBooked_observable$ = this.appointmentBooked.asObservable();
|
public appointmentBooked_observable$ = this.appointmentBooked.asObservable();
|
||||||
public summmarylist:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
public summmarylist:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
||||||
|
|||||||
@ -290,9 +290,32 @@ if(this.getHours.length != 0){
|
|||||||
console.log( this.slot_array)
|
console.log( this.slot_array)
|
||||||
localStorage.setItem("slotData",JSON.stringify(this.slot_array))
|
localStorage.setItem("slotData",JSON.stringify(this.slot_array))
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
console.log( JSON.parse(localStorage.getItem("slotData")))
|
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"])
|
this.router.navigate([URL+"/cus"])
|
||||||
}
|
}
|
||||||
|
|
||||||
checkBooked(param){
|
checkBooked(param){
|
||||||
// console.log(param, this.bookedAppointment)
|
// console.log(param, this.bookedAppointment)
|
||||||
this.bookedAppointmentSlot
|
this.bookedAppointmentSlot
|
||||||
|
|||||||
@ -27,4 +27,17 @@ export const environment = {
|
|||||||
measurementId: "G-48RM8BFRFK"
|
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"]
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user