Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
9f2c4252ae
@ -29,52 +29,95 @@
|
||||
<!-- <mat-expansion-panel>
|
||||
<mat-expansion-panel-header > -->
|
||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||
<table mat-table [dataSource]="appointmentListSource" #mytable class="my-table mat-elevation-z8 len-table">
|
||||
<ng-container matColumnDef="ClientName">
|
||||
<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>
|
||||
</ng-container>
|
||||
|
||||
<table mat-table [dataSource]="appointmentListSource" matSort *ngIf="appointmentListLength > 0" class="my-table mat-elevation-z8 len-table">
|
||||
<ng-container matColumnDef="datetime">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color th-mat"> Date and Time </th>
|
||||
<td mat-cell *matCellDef="let row"> {{row.appoinmentDate | date:'dd-MMM-YYYY'}}, {{row.appoinmentSlots[0] | date:'shortTime'}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="phoneNo">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Mobile no </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].phoneNo}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Email </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].email}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Client Address </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.customer[0].address_1}}, {{row.customer[0].city}}, {{row.customer[0].state}}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<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>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Action </th>
|
||||
<td mat-cell *matCellDef="let row" class="action-link">
|
||||
<a (click)="openDialog('Update',row)"><span class="material-icons edit-color">edit</span></a>
|
||||
<a (click)="confirmBox('Delete',row)"><span class="material-icons edit-color2 delete">delete</span></a>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- <table mat-table [dataSource]="appointmentListSource" matSort *ngIf="appointmentListLength > 0" class="my-table mat-elevation-z8 len-table"> -->
|
||||
|
||||
<!-- ID Column -->
|
||||
<!-- <ng-container matColumnDef="id">
|
||||
<ng-container matColumnDef="id">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> S.No </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.id}} </mat-cell>
|
||||
</ng-container> -->
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.index+1}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Progress Column -->
|
||||
<!--
|
||||
<ng-container matColumnDef="ClientName">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Client Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.customer[0].cusName || null }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
|
||||
<ng-container matColumnDef="datetime">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Date and Time </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.appoinmentDate | date:'dd-MMM-YYYY'}}, {{row.appoinmentSlots[0] | date:'shortTime'}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="phoneNo">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Mobile No </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" > {{row.customer[0].phoneNo}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Email </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" > {{row.customer[0].email}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Client Address </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.customer[0].address_1}} <br> {{row.customer[0].city}} <br> {{row.customer[0].state}} </mat-cell>
|
||||
</ng-container >
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Status </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> <span style="font-weight: 700;" [ngStyle] = "{'color':row.status == '0' ? '#4caf50' : '#ffd740'}">{{row.status == 0 ? 'Booked':'Cancelled'}} </span> </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Action </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
@ -86,8 +129,7 @@
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
|
||||
</table>
|
||||
</table> -->
|
||||
<mat-card *ngIf="isLoading" style="display: flex; justify-content: center; align-items: center">
|
||||
<mat-progress-spinner
|
||||
color="primary"
|
||||
|
||||
@ -157,6 +157,11 @@ export class AppoinmentsListComponent implements OnInit {
|
||||
console.log(filter)
|
||||
filter.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
filter.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.appointmentListSource['data'] = filter
|
||||
this.appointmentListLength = filter.length;
|
||||
@ -168,6 +173,11 @@ export class AppoinmentsListComponent implements OnInit {
|
||||
console.log(this.appointmentListLength)
|
||||
this.appoinmentsList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
this.appoinmentsList.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.appointmentListSource['data'] = this.appoinmentsList;
|
||||
console.log(this.appointmentListSource)
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
<mat-card class="cardDesign" *ngIf="show">
|
||||
<div class="innerdivs navStyle" fxLayoutAlign="center center">
|
||||
<button mat-raised-button (click)="goToSlotBooking2()" style="background-color: #7fffd400;box-shadow: none;color:#fff" ><mat-icon style="cursor: pointer;">keyboard_arrow_left</mat-icon></button><span style="width: 150px;text-align: center;">12 thursday 2023</span><button mat-raised-button (click)="goToSlotBooking()" *ngIf="clicks < 5" style="background-color: #7fffd400;box-shadow: none;color:#fff" ><mat-icon style="cursor: pointer;">keyboard_arrow_right</mat-icon></button>
|
||||
<button type="button" mat-raised-button (click)="goToSlotBooking2()" style="background-color: #7fffd400;box-shadow: none;color:#fff" ><mat-icon style="cursor: pointer;">keyboard_arrow_left</mat-icon></button><span style="width: 150px;text-align: center;">{{check(days) | date:'longDate'}}</span><button mat-raised-button type="button" (click)="goToSlotBooking()" *ngIf="clicks < 5" style="background-color: #7fffd400;box-shadow: none;color:#fff" ><mat-icon style="cursor: pointer;">keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
<div class="innerdivs2" >
|
||||
<!-- <button *ngFor="let slot of slots;let i=index" mat-raised-button class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i,'clickedSlot':slotIndex == i } " (click)="toggleActive($event,slot,i)" >{{slot | date:'shortTime'}}</button> -->
|
||||
|
||||
@ -39,7 +39,8 @@ export class DialogBoxComponent implements OnInit {
|
||||
local_data:any;
|
||||
url: string | ArrayBuffer;
|
||||
heroes = ['Windstorm', 'Bombasto', 'Magneta', 'Tornado'];
|
||||
|
||||
days: any=[];
|
||||
dayName:any=[];
|
||||
|
||||
busname = new FormControl('', [Validators.required]);
|
||||
name = [
|
||||
@ -160,6 +161,16 @@ export class DialogBoxComponent implements OnInit {
|
||||
// })
|
||||
|
||||
this.user_role = localStorage.getItem('user_role');
|
||||
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.getSlots()
|
||||
if(this.user_role != 'FRONTDESK'){
|
||||
let userId = localStorage.getItem('user_id')
|
||||
@ -186,8 +197,27 @@ export class DialogBoxComponent implements OnInit {
|
||||
|
||||
});
|
||||
console.log(this.local_data, this.selects)
|
||||
// this.local_data.forEach(element => {
|
||||
if(this.local_data.hasOwnProperty('action')){
|
||||
|
||||
|
||||
if(this.local_data.action != 'Add'){
|
||||
this.local_data.service = this.local_data['ServicesMapDetail.serviceId']
|
||||
this.ServiceId = this.local_data.service
|
||||
this.local_data.customer = this.local_data.customer[0].id
|
||||
this.customerId = this.local_data.customer
|
||||
this.slotsResult =this.local_data.appoinmentSlots
|
||||
|
||||
console.log(this.servicesList_array)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// });
|
||||
// this.form.controls['note'].setValue('Sample')
|
||||
this.form.patchValue(this.local_data)
|
||||
|
||||
let id = localStorage.getItem('user_id')
|
||||
console.log(id)
|
||||
this._con.getUsersListDetails(id).subscribe(res => {
|
||||
@ -237,7 +267,7 @@ export class DialogBoxComponent implements OnInit {
|
||||
this.end_user.CreatecusServicesMapDetails(paramsmap).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
let serviceMap = res['data'][0].id
|
||||
let paramsData= {
|
||||
let paramsData:any= {
|
||||
"busId": localStorage.getItem('busId'),
|
||||
"cusId": this.customerId,
|
||||
"appoinmentDate": this.form.value.appoinmentDate,
|
||||
@ -246,10 +276,24 @@ export class DialogBoxComponent implements OnInit {
|
||||
"appoinmentSlots": this.slotsResult,
|
||||
//"servicemap" :this.bookedAppointment_servicemap
|
||||
}
|
||||
if(this.local_data.hasOwnProperty('id')){
|
||||
paramsData.id =this.local_data.id
|
||||
}
|
||||
console.log(paramsData)
|
||||
this._app.addFormDetails(paramsData).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||
|
||||
if(this.local_data.hasOwnProperty('action')){
|
||||
|
||||
|
||||
if(this.local_data.action != 'Add'){
|
||||
this.notifierService.notify('success', 'Appointment Rescheduled Successfully');
|
||||
}else{
|
||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||
}
|
||||
}else{
|
||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||
}
|
||||
this.dialogRef.close(0);
|
||||
}
|
||||
})
|
||||
@ -263,12 +307,50 @@ export class DialogBoxComponent implements OnInit {
|
||||
if(this.clicks <5){
|
||||
this.clicks += 1;
|
||||
}
|
||||
console.log( this.clicks)
|
||||
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||
|
||||
let options:any = { weekday: 'long'};
|
||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||
var formatDate = prnDt.split(" ")
|
||||
console.log(formatDate)
|
||||
|
||||
this.dayName = formatDate[0]
|
||||
let userId = localStorage.getItem('user_id')
|
||||
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
||||
|
||||
this.end_user.getSlots(params).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
}
|
||||
})
|
||||
}
|
||||
goToSlotBooking2(){
|
||||
// this.days[]
|
||||
if( this.clicks >0){
|
||||
if(this.clicks >0){
|
||||
this.clicks -= 1;
|
||||
}
|
||||
console.log( this.clicks)
|
||||
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||
|
||||
let options:any = { weekday: 'long'};
|
||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||
var formatDate = prnDt.split(" ")
|
||||
console.log(formatDate)
|
||||
|
||||
this.dayName = formatDate[0]
|
||||
let userId = localStorage.getItem('user_id')
|
||||
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
||||
|
||||
this.end_user.getSlots(params).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
}
|
||||
})
|
||||
console.log( this.clicks)
|
||||
}
|
||||
check(param){
|
||||
@ -304,7 +386,8 @@ export class DialogBoxComponent implements OnInit {
|
||||
let resultDate = new DatePipe('en-US').transform(param, 'shortTime')
|
||||
this.form.controls['appoinmentTime'].setValue(resultDate)
|
||||
this.date= param
|
||||
console.log(this.date,param,this.duration)
|
||||
|
||||
console.log(this.date,param,this.duration, this.ServiceId)
|
||||
let thirtyMinutes = this.duration * 60 * 1000; // convert 30 minutes to milliseconds
|
||||
let date1 = new Date(param);
|
||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||
@ -354,6 +437,9 @@ export class DialogBoxComponent implements OnInit {
|
||||
});
|
||||
});
|
||||
console.log(this.servicesList_array)
|
||||
this.servicesList_array.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
|
||||
|
||||
this.duration = this.servicesList_array[0].duration
|
||||
}
|
||||
// this.getAssignedList(this.usersList.busId)
|
||||
});
|
||||
@ -427,5 +513,8 @@ customerIdvalue(id){
|
||||
console.log(id)
|
||||
this.customerId = id
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Phone No</mat-label>
|
||||
<input type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'pattern')">Invalid Contact No </mat-error>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<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 matColumnDef="logo">
|
||||
@ -49,7 +49,7 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Action </th>
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-action"> Action </th>
|
||||
<td mat-cell *matCellDef="let row" class="action-link">
|
||||
<a (click)="openDialog('Update',row)"><span class="material-icons edit-color">edit</span></a>
|
||||
<a (click)="confirmBox('Delete',row)"><span class="material-icons edit-color2 delete">delete</span></a>
|
||||
|
||||
@ -123,4 +123,7 @@ img {
|
||||
}
|
||||
.mat-mob{
|
||||
width: 15%;
|
||||
}
|
||||
.mat-action{
|
||||
width: 10%;
|
||||
}
|
||||
@ -66,6 +66,11 @@ export class BusinessListComponent implements OnInit {
|
||||
console.log(this.businessListLength)
|
||||
this.businessList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
this.businessList.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.businessListSource['data'] = this.businessList;
|
||||
console.log(this.businessListSource)
|
||||
|
||||
@ -229,7 +229,7 @@ unavailability(action,obj) {
|
||||
"qualification":null,
|
||||
"days": null,
|
||||
"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":[]}}]),
|
||||
"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,
|
||||
"gender": null,
|
||||
@ -239,6 +239,24 @@ unavailability(action,obj) {
|
||||
"isActive": "1",
|
||||
|
||||
}]
|
||||
let param;
|
||||
let tmp = [{"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":[]}}]
|
||||
|
||||
param ={practitionerId: this.usersList.id,workingHours:JSON.stringify(tmp)}
|
||||
|
||||
|
||||
|
||||
|
||||
this._api.createPractitionerInfo(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
||||
// this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills)
|
||||
@ -424,6 +442,8 @@ unavailability(action,obj) {
|
||||
}else{
|
||||
userid = localStorage.getItem('user_id')
|
||||
}
|
||||
// let userid = localStorage.getItem('user_id')
|
||||
let tmp = [{"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":[]}}]
|
||||
let param: any = { "exp": this.exp,
|
||||
// "id": this.id,
|
||||
"qualification": this.qualification,
|
||||
@ -432,7 +452,7 @@ unavailability(action,obj) {
|
||||
"dob": this.dob,
|
||||
"designtion": this.qualification,
|
||||
"gender": this.gender,
|
||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||
"workingHours": JSON.stringify( tmp),
|
||||
"description": this.description,
|
||||
// "skills": JSON.stringify(this.skills),
|
||||
"caption": this.caption,
|
||||
|
||||
@ -171,14 +171,14 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
|
||||
let sunday ={filters :this.data[0].sunday.hours }
|
||||
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
|
||||
for(let i=0;i<=this.data[0].sunday.hours.length-1;i++){
|
||||
this.addFilterToFiltersFormArray()
|
||||
this.dynamicForm.patchValue(sunday)
|
||||
}
|
||||
// if(this.data[0].sunday.hours.length>1){
|
||||
|
||||
// }
|
||||
|
||||
this.dynamicForm.patchValue(sunday)
|
||||
|
||||
// this.data[1].monday.hours.forEach(element => {
|
||||
// element.value = null
|
||||
@ -190,6 +190,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
this.addFilterToFiltersFormArray2()
|
||||
this.dynamicForm2.patchValue(monday)
|
||||
}
|
||||
this.dynamicForm2.patchValue(monday)
|
||||
// if(this.data[1].monday.hours.length>1){
|
||||
// this.addFilterToFiltersFormArray2()
|
||||
// }
|
||||
@ -204,7 +205,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
this.addFilterToFiltersFormArray3()
|
||||
this.dynamicForm3.patchValue(tuesday)
|
||||
}
|
||||
|
||||
this.dynamicForm3.patchValue(tuesday)
|
||||
|
||||
let wednesday ={filters4 :this.data[3].wednesday.hours }
|
||||
// if(this.data[3].wednesday.hours.length>1){
|
||||
@ -216,7 +217,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
this.dynamicForm4.patchValue(wednesday)
|
||||
}
|
||||
|
||||
this.dynamicForm4.patchValue(wednesday)
|
||||
let thursday ={filters5 :this.data[4].thursday.hours }
|
||||
// if(this.data[4].thursday.hours.length>1){
|
||||
// this.addFilterToFiltersFormArray5()
|
||||
@ -227,7 +228,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
this.dynamicForm5.patchValue(thursday)
|
||||
}
|
||||
|
||||
this.dynamicForm5.patchValue(thursday)
|
||||
// this.dynamicForm5.patchValue(thursday)
|
||||
let friday ={filters6 :this.data[5].friday.hours }
|
||||
// if(this.data[5].friday.hours.length>1){
|
||||
@ -241,7 +242,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
this.dynamicForm6.patchValue(friday)
|
||||
}
|
||||
|
||||
|
||||
this.dynamicForm6.patchValue(friday)
|
||||
let saturday ={filters7 :this.data[6].saturday.hours }
|
||||
// if(this.data[6].saturday.hours.length>1){
|
||||
// this.addFilterToFiltersFormArray7()
|
||||
@ -253,7 +254,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
this.dynamicForm7.patchValue(saturday)
|
||||
}
|
||||
|
||||
this.dynamicForm7.patchValue(saturday)
|
||||
// this.dynamicForm7.patchValue(saturday)
|
||||
|
||||
// }, 2000);
|
||||
|
||||
@ -19,41 +19,77 @@
|
||||
<!-- <mat-expansion-panel>
|
||||
<mat-expansion-panel-header > -->
|
||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||
<table mat-table [dataSource]="customersListSource" #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; let i = index;" class="element-spc"> {{row.id}} </td>
|
||||
</ng-container>
|
||||
|
||||
<table mat-table [dataSource]="customersListSource" matSort *ngIf="customersListLength > 0" class="my-table mat-elevation-z8 len-table">
|
||||
|
||||
<!-- ID Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Name </th>
|
||||
<td mat-cell *matCellDef="let row"> {{row.cusName}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color th-mat"> Email </th>
|
||||
<td mat-cell *matCellDef="let row"> {{row.email}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="phone">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Mobile no </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.phoneNo}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Address </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.address_1}}, {{row.city}}, {{row.state}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Action </th>
|
||||
<td mat-cell *matCellDef="let row" class="action-link">
|
||||
<a (click)="openDialog('Update',row)"><span class="material-icons edit-color">edit</span></a>
|
||||
<a (click)="confirmBox('Delete',row)"><span class="material-icons edit-color2 delete">delete</span></a>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<!-- <table mat-table [dataSource]="customersListSource" matSort *ngIf="customersListLength > 0" class="my-table mat-elevation-z8 len-table">
|
||||
<ng-container matColumnDef="id">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> S.No </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.id}} </mat-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.index+1}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Progress Column -->
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.cusName}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Email </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.email}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Color Column -->
|
||||
<ng-container matColumnDef="phone">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Mobile No </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" > {{row.phoneNo}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Address </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.address_1}} <br> {{row.city}} <br> {{row.state}} </mat-cell>
|
||||
</ng-container >
|
||||
|
||||
<!-- Color Column -->
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Action </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
@ -66,7 +102,11 @@
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
|
||||
</table>
|
||||
</table> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<mat-card *ngIf="isLoading" style="display: flex; justify-content: center; align-items: center">
|
||||
<mat-progress-spinner
|
||||
color="primary"
|
||||
|
||||
@ -130,6 +130,11 @@ export class CustomersListComponent implements OnInit {
|
||||
this.customersListLength = this.customersList.length;
|
||||
this.customersList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
this.customersList.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.customersListSource['data'] = this.customersList;
|
||||
} else{
|
||||
@ -137,6 +142,11 @@ export class CustomersListComponent implements OnInit {
|
||||
console.log(this.customersListLength)
|
||||
this.customersList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
this.customersList.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.customersListSource['data'] = this.customersList;
|
||||
console.log(this.customersListSource)
|
||||
|
||||
@ -24,37 +24,73 @@
|
||||
<mat-expansion-panel-header > -->
|
||||
<!-- <div class="example-container mat-elevation-z8 "> -->
|
||||
|
||||
<table mat-table [dataSource]="servicesListSource" matSort *ngIf="servicesListLength > 0" class="my-table mat-elevation-z8 len-table">
|
||||
<table mat-table [dataSource]="servicesListSource" #mytable class="my-table mat-elevation-z8 len-table">
|
||||
|
||||
<ng-container matColumnDef="serviceId">
|
||||
<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.serviceId}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="servicesName">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color">Service Name </th>
|
||||
<td mat-cell *matCellDef="let row"> {{row.servicesName}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="duration">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color th-mat"> Duration </th>
|
||||
<td mat-cell *matCellDef="let row"> {{row.duration}} Mins</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="fees">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color th-mat"> Fees </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.fees}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Description </th>
|
||||
<td mat-cell *matCellDef="let row" class="element-spc"> {{row.description}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-action"> Action </th>
|
||||
<td mat-cell *matCellDef="let row" class="action-link">
|
||||
<a (click)="openDialog('Update',row)"><span class="material-icons edit-color">edit</span></a>
|
||||
<a (click)="confirmBox('Delete',row)"><span class="material-icons edit-color2 delete">delete</span></a>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- <table mat-table [dataSource]="servicesListSource" matSort *ngIf="servicesListLength > 0" class="my-table mat-elevation-z8 len-table">
|
||||
|
||||
<!-- ID Column -->
|
||||
<ng-container matColumnDef="serviceId">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> S.No </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index;"> {{row.serviceId}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Duration Column -->
|
||||
|
||||
<ng-container matColumnDef="servicesName">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Service Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.servicesName}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Description Column -->
|
||||
<ng-container matColumnDef="duration">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Duration </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.duration}} Mins</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="fees">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Fees </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.fees}} </mat-cell>
|
||||
</ng-container>
|
||||
<!-- Description Column -->
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Description </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Action </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
@ -67,7 +103,8 @@
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
|
||||
</table>
|
||||
</table> -->
|
||||
|
||||
<mat-card *ngIf="isLoading" style="display: flex; justify-content: center; align-items: center">
|
||||
<mat-progress-spinner
|
||||
color="primary"
|
||||
|
||||
@ -88,4 +88,13 @@ img {
|
||||
/* overflow: auto; */
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.mat-no{
|
||||
width: 7%;
|
||||
}
|
||||
.th-mat{
|
||||
width: 15%;
|
||||
}
|
||||
.mat-action{
|
||||
width: 10%;
|
||||
}
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> S.No</th>
|
||||
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.id}} </td>
|
||||
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.index+1}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="logo">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Logo </th>
|
||||
@ -55,7 +55,7 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="busId">
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Business Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef class="font-color th-mat"> Business Name </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.BusinessDetails.length>0 ? element.BusinessDetails[0].busName : null }}</td>
|
||||
|
||||
</ng-container>
|
||||
|
||||
@ -204,4 +204,7 @@ img {
|
||||
overflow: auto;
|
||||
max-height: 500px;
|
||||
}
|
||||
.th-mat{
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
@ -86,11 +86,17 @@ export class UserListComponent implements OnInit {
|
||||
this._use.getUsersListDetails(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.isLoading = false
|
||||
let usersList = res.data
|
||||
let usersList:any = res.data
|
||||
usersList.sort((a: any, b: any) => {
|
||||
return b.id - a.id;
|
||||
});
|
||||
usersList.forEach((element, index) => {
|
||||
element.index = index
|
||||
|
||||
|
||||
});
|
||||
this.usersList['data'] = usersList;
|
||||
|
||||
this.usersListLength = res.data.length;
|
||||
this.recordStatus=false;
|
||||
}
|
||||
|
||||
@ -161,4 +161,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<ngx-spinner bdColor = "rgba(0, 0, 0, 0.8)" size = "medium" color = "#178a78" type = "square-jelly-box" [fullScreen] = "true"><p style="color: white" > Please Wait...... </p></ngx-spinner>
|
||||
<!-- <ngx-spinner bdColor = "rgba(0, 0, 0, 0.8)" size = "medium" color = "#178a78" type = "square-jelly-box" [fullScreen] = "true"><p style="color: white" > Please Wait...... </p></ngx-spinner> -->
|
||||
|
||||
@ -18,7 +18,7 @@ export class DoctorProfileComponent implements OnInit {
|
||||
skillsDetails: any = [];
|
||||
|
||||
constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
||||
this.spinner.show()
|
||||
// this.spinner.show()
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -47,10 +47,10 @@ export class DoctorProfileComponent implements OnInit {
|
||||
console.log(URL_AS_LIST);
|
||||
// this.router.navigate(['customer/business/'+URL_AS_LIST[3]])
|
||||
}
|
||||
setTimeout(() => {
|
||||
/** spinner ends after 5 seconds */
|
||||
this.spinner.hide();
|
||||
}, 1000);
|
||||
// setTimeout(() => {
|
||||
// /** spinner ends after 5 seconds */
|
||||
// this.spinner.hide();
|
||||
// }, 1000);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
import { EndUserService } from '../end-user.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-slot-booking-details',
|
||||
@ -47,6 +48,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
bookedAppointment:any=[];
|
||||
bookedAppointmentSlot: any=[];
|
||||
days: any=[];
|
||||
dayName:any=[];
|
||||
busName: any =[];
|
||||
doctor: any=[];
|
||||
servicesName: any=[];
|
||||
@ -295,9 +297,24 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
if( this.clicks <5){
|
||||
this.clicks += 1;
|
||||
}
|
||||
|
||||
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||
|
||||
|
||||
let options:any = { weekday: 'long'};
|
||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||
var formatDate = prnDt.split(" ")
|
||||
console.log(formatDate)
|
||||
|
||||
this.dayName = formatDate[0]
|
||||
|
||||
let params ={"id":this.user.id , "day": this.dayName , "addcount": this.clicks}
|
||||
|
||||
this.end_user.getSlots(params).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
goToSlotBooking2(){
|
||||
@ -306,7 +323,25 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
this.clicks -= 1;
|
||||
}
|
||||
console.log( this.clicks)
|
||||
|
||||
|
||||
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||
|
||||
let options:any = { weekday: 'long'};
|
||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||
var formatDate = prnDt.split(" ")
|
||||
console.log(formatDate)
|
||||
|
||||
this.dayName = formatDate[0]
|
||||
|
||||
let params ={"id":this.user.id , "day": this.dayName , "addcount": this.clicks}
|
||||
|
||||
this.end_user.getSlots(params).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user