Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
33ce3fe583
@ -30,6 +30,10 @@
|
|||||||
<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">
|
||||||
|
<ng-container matColumnDef="id">
|
||||||
|
<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>
|
||||||
|
</ng-container>
|
||||||
<ng-container matColumnDef="ClientName">
|
<ng-container matColumnDef="ClientName">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-no"> Client Name</th>
|
<th mat-header-cell *matHeaderCellDef class="font-color mat-no"> Client Name</th>
|
||||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].cusName || null }}</td>
|
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].cusName || null }}</td>
|
||||||
@ -57,7 +61,10 @@
|
|||||||
|
|
||||||
<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"> {{row.status == 0 ? 'Booked':'Cancelled'}}</td>
|
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{
|
||||||
|
'positive' :row.status == 'Booked',
|
||||||
|
'negative' : row.status != 'Booked'
|
||||||
|
}"> {{row.status}}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="action">
|
<ng-container matColumnDef="action">
|
||||||
|
|||||||
@ -115,3 +115,13 @@ tr.mat-header-row {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positive {
|
||||||
|
color: green;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.negative {
|
||||||
|
color: rgb(230, 174, 21);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export interface UsersData {
|
|||||||
export class AppoinmentsListComponent implements OnInit {
|
export class AppoinmentsListComponent implements OnInit {
|
||||||
|
|
||||||
push: any;
|
push: any;
|
||||||
displayedColumns: string[] = ['ClientName','datetime','phoneNo','email','address','status', 'action'];
|
displayedColumns: string[] = ['id','ClientName','datetime','phoneNo','email','address','status', 'action'];
|
||||||
public appointmentListLength: number;
|
public appointmentListLength: number;
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|||||||
@ -114,6 +114,16 @@
|
|||||||
<textarea matInput rows="5" cols="40" placeholder="Description" formControlName="note"></textarea>
|
<textarea matInput rows="5" cols="40" placeholder="Description" formControlName="note"></textarea>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
|
|
||||||
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="action == 'Update'">
|
||||||
|
|
||||||
|
<mat-label>Status</mat-label>
|
||||||
|
<mat-select placeholder="Select Status" formControlName="status" required>
|
||||||
|
<mat-option *ngFor="let details of Status" [value]="details.value">
|
||||||
|
{{details.value}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<div class="notes">
|
<div class="notes">
|
||||||
<input type="checkbox" id="scales" name="scales" checked>
|
<input type="checkbox" id="scales" name="scales" checked>
|
||||||
<label for="scales">Send notifications for customer</label>
|
<label for="scales">Send notifications for customer</label>
|
||||||
|
|||||||
@ -103,6 +103,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
ServiceId: any;
|
ServiceId: any;
|
||||||
user_role: string;
|
user_role: string;
|
||||||
consultants: any = [];
|
consultants: any = [];
|
||||||
|
Status:any = [{id:1,value:"Consult"},{id:2,value:"Attend"},{id:1,value:"No Show"},{id:1,value:"Cancel"}]
|
||||||
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
|
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
|
||||||
public dialogRef: MatDialogRef<DialogBoxComponent>,public _api:ConsultantService, public _con:ConsultantService,
|
public dialogRef: MatDialogRef<DialogBoxComponent>,public _api:ConsultantService, public _con:ConsultantService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) {
|
@Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) {
|
||||||
@ -190,7 +191,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
customer: new FormControl('', [Validators.required]),
|
customer: new FormControl('', [Validators.required]),
|
||||||
// note: new FormControl('', [Validators.required]),
|
// note: new FormControl('', [Validators.required]),
|
||||||
|
|
||||||
|
status: new FormControl('', null),
|
||||||
|
|
||||||
|
|
||||||
appoinmentSlots: new FormControl('', [Validators.required]),
|
appoinmentSlots: new FormControl('', [Validators.required]),
|
||||||
@ -278,6 +279,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
if(this.local_data.hasOwnProperty('id')){
|
if(this.local_data.hasOwnProperty('id')){
|
||||||
paramsData.id =this.local_data.id
|
paramsData.id =this.local_data.id
|
||||||
|
paramsData.status =this.form.value.status
|
||||||
}
|
}
|
||||||
console.log(paramsData)
|
console.log(paramsData)
|
||||||
this._app.addFormDetails(paramsData).subscribe(res => {
|
this._app.addFormDetails(paramsData).subscribe(res => {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="main-content" fxLayout="row" fxLayoutAlign="center start">
|
<div class="main-content" fxLayout="row" fxLayoutAlign="center start">
|
||||||
<div fxFlex.gt-sm="90" fxFlex.gt-xs="95" fxFlex="100">
|
<div fxFlex.gt-sm="90" fxFlex.gt-xs="95" fxFlex="100">
|
||||||
<div class="messages-list material fullscreen">
|
<div class="messages-list material fullscreen">
|
||||||
<mat-accordion>
|
<mat-accordion *ngIf="!recordStatus">
|
||||||
<!-- <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 "> -->
|
||||||
|
|||||||
@ -265,8 +265,8 @@ unavailability(action,obj) {
|
|||||||
console.log(this.practitionerdetails)
|
console.log(this.practitionerdetails)
|
||||||
|
|
||||||
if(this.userRole == 'PRACTITIONER'){
|
if(this.userRole == 'PRACTITIONER'){
|
||||||
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr
|
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr+"/details"
|
||||||
} else if (this.userRole == 'BADMIN' || this.userRole == 'FRONTDESK'){
|
} else if (this.userRole == 'BADMIN'){
|
||||||
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<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; let i = index;" class="element-spc"> {{row.id}} </td>
|
<td mat-cell *matCellDef="let row; let i = index;" class="element-spc"> {{row.index+1}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
|
|||||||
@ -16,9 +16,11 @@ export class DoctorProfileComponent implements OnInit {
|
|||||||
busName: any=[];
|
busName: any=[];
|
||||||
profileDetails: any;
|
profileDetails: any;
|
||||||
skillsDetails: any = [];
|
skillsDetails: any = [];
|
||||||
|
consultants:any =[];
|
||||||
|
ServicesMapDetailsList:any=[];
|
||||||
constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
||||||
// this.spinner.show()
|
// this.spinner.show()
|
||||||
|
this.getpractitionerList()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -74,4 +76,70 @@ export class DoctorProfileComponent implements OnInit {
|
|||||||
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)
|
||||||
|
|
||||||
|
// let filter2 = this.consultants.filter(arr=>{return arr.userId == param.id && arr.busId ==param.busId})
|
||||||
|
// console.log(filter)
|
||||||
|
localStorage.setItem('workingHrs',this.consultants[0].practitionerInfos
|
||||||
|
[0].workingHours)
|
||||||
|
this.end_user.appointmentBooked.next(this.ServicesMapDetailsList)
|
||||||
|
|
||||||
|
this.bookedAppointment = this.ServicesMapDetailsList[0].user[0]
|
||||||
|
this.dp = this.apiUrl+'imageViewer?img_name='+ this.bookedAppointment.logo
|
||||||
|
console.log(this.dp)
|
||||||
|
this.profileDetails = this.bookedAppointment.practitionerInfos[0]
|
||||||
|
console.log(this.profileDetails)
|
||||||
|
this.skillsDetails = JSON.parse(this.profileDetails.skills)
|
||||||
|
// this.skillsDetails = JSON.parse(this.skillsDetails)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,10 +49,10 @@ const routes: Routes = [{
|
|||||||
path: 'business/:randstr',
|
path: 'business/:randstr',
|
||||||
component: ServiceListComponent
|
component: ServiceListComponent
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'practitioner/:randstr',
|
// path: 'practitioner/:randstr',
|
||||||
component: ConsultantsListComponent
|
// component: ConsultantsListComponent
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: 'practitioner/:randstr/details',
|
path: 'practitioner/:randstr/details',
|
||||||
component: DoctorProfileComponent
|
component: DoctorProfileComponent
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user