Front Desk
This commit is contained in:
parent
c711eaf709
commit
e4515074b3
@ -45,6 +45,10 @@ export const AppRoutes: Routes = [{
|
|||||||
path: 'customer-info',
|
path: 'customer-info',
|
||||||
loadChildren: () => import('./appoinment/appoinment.module').then(m => m.AppoinmentModule)
|
loadChildren: () => import('./appoinment/appoinment.module').then(m => m.AppoinmentModule)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'consultant-list',
|
||||||
|
loadChildren: () => import('./appoinment/front-desk/front-desk.module').then(m => m.FrontDeskModule)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@ -5,6 +5,15 @@
|
|||||||
<mat-label>Filter</mat-label>
|
<mat-label>Filter</mat-label>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline" style="width:20%;margin-left: 5%;" *ngIf="user_role == 'FRONTDESK'">
|
||||||
|
<mat-label>Practitioner</mat-label>
|
||||||
|
<mat-select placeholder="Select Business" [(ngModel)]="selectPractitioner" required>
|
||||||
|
<mat-option value="All" (click)="allPractitioner()">All</mat-option>
|
||||||
|
<mat-option *ngFor="let details of consultants" (click)="getPractitioner(details)" [value]="details.id">
|
||||||
|
Dr. {{details.userName}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
<!-- <div class="calender ">
|
<!-- <div class="calender ">
|
||||||
<i style="font-size:24px" class="fa" [routerLink]="['/appoinment/calendar-list']"></i>
|
<i style="font-size:24px" class="fa" [routerLink]="['/appoinment/calendar-list']"></i>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|||||||
@ -55,11 +55,19 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
|
|
||||||
pipe = new DatePipe('en-US');
|
pipe = new DatePipe('en-US');
|
||||||
isLoading = true
|
isLoading = true
|
||||||
|
consultants: any = [];
|
||||||
|
selectPractitioner:any = [];
|
||||||
|
user_role: any=[];
|
||||||
constructor(private notifierService: NotifierService,public dialog: MatDialog, public _app:AppointmentsService) { }
|
constructor(private notifierService: NotifierService,public dialog: MatDialog, public _app:AppointmentsService) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
this.getAppoinmentsList()
|
this.user_role = localStorage.getItem('user_role');
|
||||||
|
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this.getAppoinmentsList(param)
|
||||||
|
this.getCosultantList()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
@ -75,11 +83,47 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
console.log(this.appointmentListSource)
|
console.log(this.appointmentListSource)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppoinmentsList() {
|
getCosultantList() {
|
||||||
let user_role = localStorage.getItem('user_role');
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
|
||||||
let param ={"busId": localStorage.getItem('busId')}
|
|
||||||
console.log(param)
|
console.log(param)
|
||||||
|
this._app.getCosultantListDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.consultants = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.consultants=[];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
allPractitioner(){
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this.getAppoinmentsList(param)
|
||||||
|
}
|
||||||
|
|
||||||
|
getPractitioner(selectedPractititoner){
|
||||||
|
console.log(selectedPractititoner)
|
||||||
|
// {"busId":abc123,userId:"2"} or param = {"busId":abc123}
|
||||||
|
let param = {"busId": selectedPractititoner.busId,"userId":selectedPractititoner.id}
|
||||||
|
this.getAppoinmentsList(param)
|
||||||
|
}
|
||||||
|
|
||||||
|
getAppoinmentsList(param) {
|
||||||
|
let user_role = localStorage.getItem('user_role');
|
||||||
|
// let param
|
||||||
|
// if(user_role != 'FRONTDESK'){
|
||||||
|
// console.log('others')
|
||||||
|
// param ={"busId": localStorage.getItem('busId')}
|
||||||
|
// console.log(param)
|
||||||
|
// }else {
|
||||||
|
// console.log('frontdesk')
|
||||||
|
// param = {"busId": selectedPractititoner.busId}
|
||||||
|
// console.log(param)
|
||||||
|
// }
|
||||||
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
|
|
||||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||||
|
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
@ -201,7 +245,7 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
if(result == 0){
|
if(result == 0){
|
||||||
this.getAppoinmentsList()
|
this.getAppoinmentsList('')
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.formAddUpdateAndDelete(result,result.data)
|
// this.formAddUpdateAndDelete(result,result.data)
|
||||||
@ -252,7 +296,7 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
this._app.addFormDetails(formValue[0]).subscribe(res => {
|
this._app.addFormDetails(formValue[0]).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// this.appoinmentsList = res.data;
|
// this.appoinmentsList = res.data;
|
||||||
this.getAppoinmentsList()
|
this.getAppoinmentsList('')
|
||||||
if(result.event == 'Add'){
|
if(result.event == 'Add'){
|
||||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||||
}else if(result.event == 'Update'){
|
}else if(result.event == 'Update'){
|
||||||
|
|||||||
@ -22,6 +22,14 @@ public customerlist_observable$ = this.customerlist.asObservable();
|
|||||||
// )
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCosultantListDetails(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getusers",param)
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
|
||||||
addFormDetails(addParams): Observable<any> {
|
addFormDetails(addParams): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'CreateAppoinments', addParams)
|
return this._http.post(this.apiUrl + 'CreateAppoinments', addParams)
|
||||||
// .pipe(
|
// .pipe(
|
||||||
|
|||||||
@ -22,6 +22,19 @@
|
|||||||
<input matInput placeholder="Business" name="Business" formControlName="busname" readonly>
|
<input matInput placeholder="Business" name="Business" formControlName="busname" readonly>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="user_role != 'FRONTDESK'">
|
||||||
|
<mat-label>Practitioner</mat-label>
|
||||||
|
<input matInput placeholder="practitioner" name="practitioner" formControlName="practitioner" readonly>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="user_role == 'FRONTDESK'">
|
||||||
|
<mat-label>Practitioner</mat-label>
|
||||||
|
<mat-select placeholder="Select Business" formControlName="practitioner" required>
|
||||||
|
<mat-option *ngFor="let details of consultants" (click)="getConsultServices(details)" [value]="details.id">
|
||||||
|
Dr. {{details.userName}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field appearance="outline" class="mat-pane">
|
<mat-form-field appearance="outline" class="mat-pane">
|
||||||
<mat-label>Service</mat-label>
|
<mat-label>Service</mat-label>
|
||||||
@ -47,11 +60,7 @@
|
|||||||
<mat-error *ngIf="service.hasError('required')">Please choose an Practitioner</mat-error>
|
<mat-error *ngIf="service.hasError('required')">Please choose an Practitioner</mat-error>
|
||||||
<mat-error *ngIf="service.hasError('invalidValue')">Please choose any other</mat-error>
|
<mat-error *ngIf="service.hasError('invalidValue')">Please choose any other</mat-error>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field appearance="outline" class="mat-pane">
|
|
||||||
<mat-label>Practitioner</mat-label>
|
|
||||||
<input matInput placeholder="practitioner" name="practitioner" formControlName="practitioner" readonly>
|
|
||||||
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field appearance="outline" class="mate">
|
<mat-form-field appearance="outline" class="mate">
|
||||||
<mat-label>Choose a date</mat-label>
|
<mat-label>Choose a date</mat-label>
|
||||||
|
|||||||
@ -100,6 +100,8 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
customerId: any;
|
customerId: any;
|
||||||
slotsResult: any;
|
slotsResult: any;
|
||||||
ServiceId: any;
|
ServiceId: any;
|
||||||
|
user_role: string;
|
||||||
|
consultants: any = [];
|
||||||
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) {
|
||||||
@ -156,10 +158,17 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
this.user_role = localStorage.getItem('user_role');
|
||||||
this.getSlots()
|
this.getSlots()
|
||||||
let userId = localStorage.getItem('user_id')
|
if(this.user_role != 'FRONTDESK'){
|
||||||
let busId = localStorage.getItem('busId')
|
let userId = localStorage.getItem('user_id')
|
||||||
this.getServicesList(userId, busId)
|
let busId = localStorage.getItem('busId')
|
||||||
|
this.getServicesList(userId, busId)
|
||||||
|
}else{
|
||||||
|
this.getCosultantList()
|
||||||
|
}
|
||||||
|
|
||||||
this.getApiData()
|
this.getApiData()
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
busname: new FormControl('', [Validators.required]),
|
busname: new FormControl('', [Validators.required]),
|
||||||
@ -196,6 +205,27 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
public myError = (controlName: string, errorName: string) =>{
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
return this.form.controls[controlName].hasError(errorName);
|
return this.form.controls[controlName].hasError(errorName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCosultantList() {
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this._app.getCosultantListDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.consultants = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.consultants=[];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getConsultServices(selectedPractititoner){
|
||||||
|
console.log(selectedPractititoner)
|
||||||
|
let userId = selectedPractititoner.id
|
||||||
|
let busId = localStorage.getItem('busId')
|
||||||
|
this.getServicesList(userId, busId)
|
||||||
|
}
|
||||||
|
|
||||||
submit(){
|
submit(){
|
||||||
console.log(this.form.value);
|
console.log(this.form.value);
|
||||||
|
|
||||||
@ -309,6 +339,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getServicesList(id,busId) {
|
getServicesList(id,busId) {
|
||||||
|
console.log(id,busId)
|
||||||
this.servicesList_array = []
|
this.servicesList_array = []
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
this._api.getServicesListDetails(id,busId).subscribe(res => {
|
this._api.getServicesListDetails(id,busId).subscribe(res => {
|
||||||
|
|||||||
@ -67,15 +67,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<ng-template #elseTemplate>
|
||||||
|
Sure to delete <b>{{local_data.name}}</b>?
|
||||||
|
</ng-template>
|
||||||
|
<div mat-dialog-actions>
|
||||||
|
<button mat-button type="submit" class="mat-green" mat-raised-button >{{action}}</button>
|
||||||
|
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</ng-scrollbar>
|
</ng-scrollbar>
|
||||||
<ng-template #elseTemplate>
|
|
||||||
Sure to delete <b>{{local_data.name}}</b>?
|
|
||||||
</ng-template>
|
|
||||||
<div mat-dialog-actions>
|
|
||||||
<button mat-button type="submit" class="mat-green" mat-raised-button >{{action}}</button>
|
|
||||||
<button mat-button (click)="closeDialog()" >Cancel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
<!-- </mat-card> -->
|
<!-- </mat-card> -->
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
overflow: hidden!important;
|
overflow: hidden!important;
|
||||||
}
|
}
|
||||||
.scrollHV {
|
.scrollHV {
|
||||||
height: calc(100vh - 150px);
|
height: calc(100vh - 83px);
|
||||||
}
|
}
|
||||||
:ng-deep .ng-scroll-viewport-wrapper{
|
:ng-deep .ng-scroll-viewport-wrapper{
|
||||||
right: -25px !important;
|
right: -25px !important;
|
||||||
|
|||||||
@ -37,6 +37,10 @@ export class ConsultantService {
|
|||||||
return this._http.post(this.apiUrl + 'createPractitionerInfo', param)
|
return this._http.post(this.apiUrl + 'createPractitionerInfo', param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCosultantListDetails(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getPractitionerInfo",param)
|
||||||
|
}
|
||||||
|
|
||||||
handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable<any>) => import("rxjs").ObservableInput<any> {
|
handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable<any>) => import("rxjs").ObservableInput<any> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|||||||
import { ConsultantSettingComponent } from './consultant-setting/consultant-setting.component';
|
import { ConsultantSettingComponent } from './consultant-setting/consultant-setting.component';
|
||||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
import { UnavailabilityComponent } from './unavailability/unavailability.component';
|
import { UnavailabilityComponent } from './unavailability/unavailability.component';
|
||||||
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
|
|
||||||
|
|
||||||
const customNotifierOptions: NotifierOptions = {
|
const customNotifierOptions: NotifierOptions = {
|
||||||
@ -70,6 +71,7 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
DemoMaterialModule,
|
DemoMaterialModule,
|
||||||
NgScrollbarModule,
|
NgScrollbarModule,
|
||||||
MatSidenavModule,
|
MatSidenavModule,
|
||||||
|
SharedModule,
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
NotifierModule.withConfig(customNotifierOptions),
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,106 @@
|
|||||||
<!-- <div class="user-pro-wrap">
|
<div *ngIf="frontDeskHidden == 1 && userRole == 'FRONTDESK'">
|
||||||
<div class="user-profile-thumb ">
|
<div class="container mt-1">
|
||||||
<div class="user-i">
|
<div *ngIf="consultants.length != 0">
|
||||||
<img src="assets/images/userpic.png" class="rad-full mb-1" width="100" height="100" alt="">
|
<div fxLayout="row wrap">
|
||||||
<div> <span class="userpic">Sample</span></div>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="m-gap p-gap">
|
||||||
<div> <span class="admin">Super Admin</span></div>
|
<div fxLayout="row wrap">
|
||||||
</div>
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||||
|
<h3 class="page-h">Practitioner List</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="m-gap p-gap" fxLayoutAlign="end center">
|
||||||
|
<mat-form-field class="form-field">
|
||||||
|
<mat-label>Search practitioner</mat-label>
|
||||||
|
<input type="text" [(ngModel)]="filterdata" matInput placeholder="Search Service">
|
||||||
|
<mat-icon matSuffix>search</mat-icon>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap mt-2 mb-2" class="flexRow">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="23.33" fxFlex.lg="23.33" fxFlex.xl="23.33" class="m-gap p-gap" *ngFor="let consultant of consultants | searchFilter:filterdata : 'consultants'">
|
||||||
|
<div class="consultant-list-card card-inner-circle-orange" (click)="redirectToSetting(consultant)">
|
||||||
|
<!-- <div class="consultant-content"> -->
|
||||||
|
<div class="pad-wrap" >
|
||||||
|
<!-- <div class="consultant-img">
|
||||||
|
<img src="https://newassets.apollo247.com/specialties/ic_oncology.png " alt="Online Doctor Consultation - Medical Oncology" style="width: 40px;">
|
||||||
|
</div> -->
|
||||||
|
<div class="consultant-card-cover">
|
||||||
|
<div>
|
||||||
|
<div class="text-center consultant-thumb">
|
||||||
|
<img class="img-responsive img-circle"[src]="image_view(consultant.logo)" width="120" height="120" alt="user list image">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="consultant-profile text-center">
|
||||||
|
<h5 class="text-primary">Dr.{{consultant.userName}}</h5>
|
||||||
|
<!-- <span class="silk-block mb-1 consultant-qualification">{{consultant.practitionerInfos[0].qualification || null}}</span><br> -->
|
||||||
|
<!-- <span class="silk-block consultant-span">{{consultant.practitionerInfos[0].designtion
|
||||||
|
|| "ENT" }}</span><br>
|
||||||
|
<span class="silk-block mb-1 consultant-year">{{consultant.practitionerInfos[0].exp || null}}</span><br>
|
||||||
|
<span class="silk-block mb-1 consultant-amount">Starts at <span class="consultant-pay">₹ {{consultant.practitionerInfos[0].fees || 100}}</span> </span><br> -->
|
||||||
|
<!-- <span class="d-flex mb consultant-time">
|
||||||
|
<mat-icon>access_time</mat-icon>
|
||||||
|
<span class="consultant-language">10:00 Am</span>
|
||||||
|
<span class="consultant-language pl-1">{{consultant.time}}</span>
|
||||||
|
</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <span class="d-flex mb">
|
||||||
|
<mat-icon class="mt-1">transcribe</mat-icon>
|
||||||
|
<span class="mt-1 pl-1 consultant-language">{{consultant.practitionerInfos[0].languages || ""}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="d-flex mb">
|
||||||
|
<mat-icon>location_on</mat-icon>
|
||||||
|
<span class="consultant-language pl-1">{{consultant.city}}</span>
|
||||||
|
</span> -->
|
||||||
|
<!-- <div class="text-center mt-1">
|
||||||
|
<a><img src="assets/images/facebook.svg" alt="Avatar" class="img"></a>
|
||||||
|
<a><img src="assets/images/twitter.svg" alt="Avatar" class="img"></a>
|
||||||
|
<a><img src="assets/images/instagram.svg" alt="Avatar" class="img"></a>
|
||||||
|
</div> -->
|
||||||
|
<!-- <p class="message text-center">Apollo Hospitals Cancer Centre Nandanam,Chennai</p> -->
|
||||||
|
<!-- <div style="text-align: center;">
|
||||||
|
<button class="button pill-shape text-center" routerLink="/customer/doctor-profile"> View Profile</button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<!-- <div class="align-self-center">
|
||||||
|
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary btn-red" data-scribe-element="profile_edit_button">
|
||||||
|
<span class="material-icons"> bookmark_add </span><span class="button-text">Book Appoinment</span>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap">
|
||||||
|
<app-summary></app-summary>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- </ng-scrollbar> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<mat-tab-group [@.disabled]="true" (selectedTabChange)="tabClick($event)">
|
<div *ngIf="consultants.length == 0">
|
||||||
|
<div fxLayout="row" class="flexCard">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<div><img src="assets/images/service.png" width="300" height="300"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" class="flexCard">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h3 class="noAssignedService">No Doctor</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div *ngIf="frontDeskHidden == 0">
|
||||||
|
<button *ngIf="userRole == 'FRONTDESK'" mat-mini-fab class="fabBack" (click)="backRoute(1)">
|
||||||
|
<mat-icon>arrow_back</mat-icon>
|
||||||
|
</button>
|
||||||
|
<mat-tab-group [@.disabled]="true" (selectedTabChange)="tabClick($event)">
|
||||||
|
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
@ -43,10 +135,10 @@
|
|||||||
<label>Role <span style="margin-left: 6.7rem;">-</span></label>
|
<label>Role <span style="margin-left: 6.7rem;">-</span></label>
|
||||||
<a style="padding: 10px;">{{usersList.role}}</a>
|
<a style="padding: 10px;">{{usersList.role}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group label-container">
|
<!-- <div class="form-group label-container">
|
||||||
<label>Password <span style="margin-left: 4rem;">-</span></label>
|
<label>Password <span style="margin-left: 4rem;">-</span></label>
|
||||||
<a style="padding: 10px;">{{hashPassword(usersList.password)}}</a>
|
<a style="padding: 10px;">{{hashPassword(usersList.password)}}</a>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="form-group label-container">
|
<div class="form-group label-container">
|
||||||
<label>Gender <span style="margin-left: 5.5rem;">-</span></label>
|
<label>Gender <span style="margin-left: 5.5rem;">-</span></label>
|
||||||
<a *ngIf="isEditable == false" style="padding: 10px;">{{practitionerdetails.gender}}</a>
|
<a *ngIf="isEditable == false" style="padding: 10px;">{{practitionerdetails.gender}}</a>
|
||||||
@ -478,7 +570,8 @@
|
|||||||
<input type="text" placeholder=" {{endUserURL}}" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view">
|
<input type="text" placeholder=" {{endUserURL}}" class="booking-url-input boxsize text-ellipsis cn ember-text-field ember-view">
|
||||||
</span>
|
</span>
|
||||||
<!-- <span id="zb-mb-BookingPageUrlCustomize" class="customize-link field-center cp ml10 mt0 mr10" data-ember-action="" data-ember-action-813="813">Customize</span> -->
|
<!-- <span id="zb-mb-BookingPageUrlCustomize" class="customize-link field-center cp ml10 mt0 mr10" data-ember-action="" data-ember-action-813="813">Customize</span> -->
|
||||||
<span class="url-button field-center boxsize pb1"><button (click)="copyToClipBoard(endUserURL)" class="copy-button boxsize cp">Copy</button></span>
|
<span class="url-button field-center boxsize pb1" *ngIf="copiedKey == 0"><button (click)="copyToClipBoard(endUserURL)" class="copy-button boxsize cp">Copy</button></span>
|
||||||
|
<span class="url-button field-center boxsize pb1" *ngIf="copiedKey == 1"><button class="copy-button-copied boxsize cp">Copied...!</button></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@ -487,5 +580,6 @@
|
|||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -1,3 +1,190 @@
|
|||||||
|
|
||||||
|
//colors
|
||||||
|
$white: #fff;
|
||||||
|
$black_10: rgba(0, 0, 0, 0.1);
|
||||||
|
$black_30: rgba(0, 0, 0, 0.3);
|
||||||
|
// $color_red_orange_approx: #207b68f2;
|
||||||
|
$color_red_orange_approx: #4caf50;
|
||||||
|
$black_60: rgba(0, 0, 0, 0.6);
|
||||||
|
.fabBack{
|
||||||
|
background-color: #007b6b !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.page-h{
|
||||||
|
color: #217e69;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
.form-field{
|
||||||
|
margin-left: -3rem;
|
||||||
|
}
|
||||||
|
.consultant-content {
|
||||||
|
padding: 0rem 0.5rem 1rem;
|
||||||
|
// padding-bottom: 4rem;
|
||||||
|
}
|
||||||
|
h5{
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
.flexRow{
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollHV {
|
||||||
|
height: calc(100vh - 105px);
|
||||||
|
}
|
||||||
|
.consultant-list-card {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #EBF4FA;
|
||||||
|
box-shadow: 0 2px 6px $black_10;
|
||||||
|
transition: all 0.3s ease-in-out 0s;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 21px $black_30;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: scale(1.04);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.consultant-span{
|
||||||
|
font-size: 10px;
|
||||||
|
color: #0087ba;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.consultant-year{
|
||||||
|
font-size: 12px;
|
||||||
|
color: #0087ba;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.consultant-qualification{
|
||||||
|
font-size: 13px;
|
||||||
|
color: #0087ba;
|
||||||
|
// font-weight: 600;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.consultant-amount{
|
||||||
|
color: #658F9B;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px !important;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.consultant-pay{
|
||||||
|
color: #0087BA;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.consultant-language{
|
||||||
|
color: #658F9B;
|
||||||
|
padding: 2px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
word-break: break-word;
|
||||||
|
line-height: 16px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.consultant-time{
|
||||||
|
margin-left: 5rem;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
background-color: #4caf50;
|
||||||
|
color: #efefef;
|
||||||
|
border: none;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 25px;
|
||||||
|
// margin-left: 4rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 25px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
color: rgba(0, 0, 0, 0.54);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
// line-height: 10px;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
// .consultant-img {
|
||||||
|
// top: 25px;
|
||||||
|
// left: 25px;
|
||||||
|
// height: 24px;
|
||||||
|
// display: flex;
|
||||||
|
// text-align: center;
|
||||||
|
// align-items: center;
|
||||||
|
// border-radius: 6px;
|
||||||
|
// justify-content: center;
|
||||||
|
// }
|
||||||
|
// .mb{
|
||||||
|
// margin-bottom: 0.20rem;
|
||||||
|
// }
|
||||||
|
// .consultant-card-cover {
|
||||||
|
// padding: 0rem 6rem;
|
||||||
|
// position: relative;
|
||||||
|
// background-size: cover;
|
||||||
|
// margin-left: -8rem;
|
||||||
|
// }
|
||||||
|
.consultant-thumb {
|
||||||
|
// position: absolute;
|
||||||
|
margin-top: 20px;
|
||||||
|
img {
|
||||||
|
border: 5px solid $white;
|
||||||
|
border-radius: 100%;
|
||||||
|
height: 90px;
|
||||||
|
width: 90px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-red {
|
||||||
|
background-color: $color_red_orange_approx;
|
||||||
|
color: $white;
|
||||||
|
border: 1px solid $color_red_orange_approx;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
// .user-list-wrapper>.user-card-w {
|
||||||
|
// padding: 1rem;
|
||||||
|
// }
|
||||||
|
// ::ng-deep .body-container {
|
||||||
|
// // overflow-x: hidden;
|
||||||
|
// overflow-y: auto!important;
|
||||||
|
// background-color: #ffff;
|
||||||
|
// }
|
||||||
|
// .consultant-profile{
|
||||||
|
// margin-left: -2rem;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.container{
|
||||||
|
max-width: 1217px;
|
||||||
|
min-width: 375px;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-right: 0rem;
|
||||||
|
}
|
||||||
|
.flx{
|
||||||
|
flex: 1 1 0%!important;
|
||||||
|
// max-width: 15%!important;
|
||||||
|
display: initial!important;
|
||||||
|
margin-top: -5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-mat{
|
||||||
|
flex: 1 1 0%!important;
|
||||||
|
display: contents!important;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
h3{
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
.flx{
|
||||||
|
margin-top: -6rem!important;
|
||||||
|
}
|
||||||
|
.btn-red{
|
||||||
|
margin: 0rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -333,6 +520,20 @@ height: 100%;
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
.copy-button-copied {
|
||||||
|
background: green;
|
||||||
|
border: 1px solid green;
|
||||||
|
-webkit-border-radius: 2px;
|
||||||
|
-moz-border-radius: 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
color: #FFF;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.booking-para{
|
.booking-para{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666!important;
|
color: #666!important;
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export class ConsultantSettingComponent implements OnInit {
|
|||||||
"designtion": null,
|
"designtion": null,
|
||||||
"gender": null,
|
"gender": null,
|
||||||
"description":null,
|
"description":null,
|
||||||
"skills": null,
|
// "skills": null,
|
||||||
"caption": null,
|
"caption": null,
|
||||||
"isActive": "1",
|
"isActive": "1",
|
||||||
|
|
||||||
@ -74,12 +74,25 @@ export class ConsultantSettingComponent implements OnInit {
|
|||||||
userRole:any=[];
|
userRole:any=[];
|
||||||
genderOption:any = [{'name':'Male'},{'name':'Female'}]
|
genderOption:any = [{'name':'Male'},{'name':'Female'}]
|
||||||
skillsOption:any = [{'name':'Assisting with walking from bed to wheelchair'},{'name':'Bathing, dressing and grooming assistance'},{'name':'Medication reminders'},{'name':'Safety and fall prevention'},{'name':'Status reporting to family'},{'name':'Assisting with walking from bed to wheelchair'},{'name':'Bathing, dressing and grooming assistance'},{'name':'Medication reminders'},{'name':'Safety and fall prevention'},{'name':'Status reporting to family'}]
|
skillsOption:any = [{'name':'Assisting with walking from bed to wheelchair'},{'name':'Bathing, dressing and grooming assistance'},{'name':'Medication reminders'},{'name':'Safety and fall prevention'},{'name':'Status reporting to family'},{'name':'Assisting with walking from bed to wheelchair'},{'name':'Bathing, dressing and grooming assistance'},{'name':'Medication reminders'},{'name':'Safety and fall prevention'},{'name':'Status reporting to family'}]
|
||||||
|
copiedKey: any = 0;
|
||||||
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
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() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.userRole = localStorage.getItem('user_role');
|
this.userRole = localStorage.getItem('user_role');
|
||||||
console.log( this.userRole )
|
console.log( this.userRole )
|
||||||
|
if(this.userRole == 'FRONTDESK'){
|
||||||
|
this.frontDeskHidden = 1
|
||||||
|
this.getCosultantList()
|
||||||
|
}else{
|
||||||
|
this.getUsersList()
|
||||||
|
}
|
||||||
|
|
||||||
// this.openDialog('action','obj')
|
// this.openDialog('action','obj')
|
||||||
this.registerForm = this.formBuilder.group({
|
this.registerForm = this.formBuilder.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
@ -93,11 +106,40 @@ export class ConsultantSettingComponent implements OnInit {
|
|||||||
status: ['', Validators.required],
|
status: ['', Validators.required],
|
||||||
information: ['', Validators.required],
|
information: ['', Validators.required],
|
||||||
});
|
});
|
||||||
this.getUsersList()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCosultantList() {
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
|
||||||
|
this._con.getCosultantListDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.consultants = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.consultants=[];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
image_view(image){
|
||||||
|
return this.apiUrl+'imageViewer?img_name='+image;
|
||||||
|
}
|
||||||
|
|
||||||
|
backRoute(param){
|
||||||
|
this.frontDeskHidden = param
|
||||||
|
}
|
||||||
|
|
||||||
|
redirectToSetting(practitiionerDetails){
|
||||||
|
console.log(practitiionerDetails)
|
||||||
|
this.frontDeskPractdetails = practitiionerDetails
|
||||||
|
this.frontDeskHidden = 0
|
||||||
|
this.getUsersList()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public myError = (controlName: string, errorName: string) =>{
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
return this.registerForm.controls[controlName].hasError(errorName);
|
return this.registerForm.controls[controlName].hasError(errorName);
|
||||||
@ -109,6 +151,9 @@ export class ConsultantSettingComponent implements OnInit {
|
|||||||
this.getServicesList(this.usersList.id,this.usersList.busId)
|
this.getServicesList(this.usersList.id,this.usersList.busId)
|
||||||
// this.getAssignedList(this.usersList.busId)
|
// this.getAssignedList(this.usersList.busId)
|
||||||
}
|
}
|
||||||
|
if(this.userRole == 'FRONTDESK' && tab.index == '1'){
|
||||||
|
this.getServicesList(this.usersList.id,this.usersList.busId)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,13 +207,19 @@ unavailability(action,obj) {
|
|||||||
}
|
}
|
||||||
getUsersList() {
|
getUsersList() {
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
let id = localStorage.getItem('user_id')
|
let id
|
||||||
|
if(this.userRole == 'FRONTDESK'){
|
||||||
|
id = this.frontDeskPractdetails.id
|
||||||
|
}else{
|
||||||
|
id = localStorage.getItem('user_id')
|
||||||
|
}
|
||||||
|
|
||||||
console.log(id)
|
console.log(id)
|
||||||
this._con.getUsersListDetails(id).subscribe(res => {
|
this._con.getUsersListDetails(id).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.usersList = res.data[0];
|
this.usersList = res.data[0];
|
||||||
|
|
||||||
localStorage.setItem('practitioner',JSON.stringify( this.usersList))
|
localStorage.setItem('practitioner',JSON.stringify(this.usersList))
|
||||||
console.log(this.usersList)
|
console.log(this.usersList)
|
||||||
if(this.usersList['practitionerInfos'].length==0){
|
if(this.usersList['practitionerInfos'].length==0){
|
||||||
this.usersList['practitionerInfos'] =[
|
this.usersList['practitionerInfos'] =[
|
||||||
@ -183,26 +234,26 @@ unavailability(action,obj) {
|
|||||||
"designtion": null,
|
"designtion": null,
|
||||||
"gender": null,
|
"gender": null,
|
||||||
"description":null,
|
"description":null,
|
||||||
"skills": null,
|
// "skills": null,
|
||||||
"caption": null,
|
"caption": null,
|
||||||
"isActive": "1",
|
"isActive": "1",
|
||||||
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
||||||
this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills)
|
// this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills)
|
||||||
console.log( this.practitionerdetails)
|
console.log( this.practitionerdetails)
|
||||||
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
||||||
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
|
||||||
} else if (this.userRole == 'BADMIN'){
|
} else if (this.userRole == 'BADMIN' || this.userRole == 'FRONTDESK'){
|
||||||
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
||||||
this.skills= JSON.parse(this.practitionerdetails.skills)
|
// this.skills= JSON.parse(this.practitionerdetails.skills)
|
||||||
this.id=this.practitionerdetails.id
|
this.id=this.practitionerdetails.id
|
||||||
this.userName = this.usersList.userName
|
this.userName = this.usersList.userName
|
||||||
this.gender=this.practitionerdetails.gender
|
this.gender=this.practitionerdetails.gender
|
||||||
@ -225,9 +276,9 @@ unavailability(action,obj) {
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
hashPassword(password: string){
|
// hashPassword(password: string){
|
||||||
return "*".repeat(password.length)
|
// return "*".repeat(password.length)
|
||||||
}
|
// }
|
||||||
getAssignedList(busId) {
|
getAssignedList(busId) {
|
||||||
this._api.getAssignedDetails(busId).subscribe(res => {
|
this._api.getAssignedDetails(busId).subscribe(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -347,7 +398,13 @@ unavailability(action,obj) {
|
|||||||
// param = {serviceId:"",userId:"",busId:"",active:1}
|
// param = {serviceId:"",userId:"",busId:"",active:1}
|
||||||
getCheckedService(params){
|
getCheckedService(params){
|
||||||
console.log(params)
|
console.log(params)
|
||||||
let userid = localStorage.getItem('user_id')
|
let userid
|
||||||
|
if(this.userRole == 'FRONTDESK'){
|
||||||
|
userid = this.frontDeskPractdetails.id
|
||||||
|
}else{
|
||||||
|
userid = localStorage.getItem('user_id')
|
||||||
|
}
|
||||||
|
|
||||||
let data = {serviceId:params.serviceId,userId:userid,busId:params.busId,active:this.serviceCheckedData}
|
let data = {serviceId:params.serviceId,userId:userid,busId:params.busId,active:this.serviceCheckedData}
|
||||||
console.log(data)
|
console.log(data)
|
||||||
this._api.getServiceCheckedDetails(data).subscribe(res => {
|
this._api.getServiceCheckedDetails(data).subscribe(res => {
|
||||||
@ -361,7 +418,12 @@ unavailability(action,obj) {
|
|||||||
|
|
||||||
save(){
|
save(){
|
||||||
this.isEditable = false;
|
this.isEditable = false;
|
||||||
let userid = localStorage.getItem('user_id')
|
let userid
|
||||||
|
if(this.userRole == 'FRONTDESK'){
|
||||||
|
userid = this.frontDeskPractdetails.id
|
||||||
|
}else{
|
||||||
|
userid = localStorage.getItem('user_id')
|
||||||
|
}
|
||||||
let param: any = { "exp": this.exp,
|
let param: any = { "exp": this.exp,
|
||||||
// "id": this.id,
|
// "id": this.id,
|
||||||
"qualification": this.qualification,
|
"qualification": this.qualification,
|
||||||
@ -372,7 +434,7 @@ unavailability(action,obj) {
|
|||||||
"gender": this.gender,
|
"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([{"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":[]}}]),
|
||||||
"description": this.description,
|
"description": this.description,
|
||||||
"skills": JSON.stringify(this.skills),
|
// "skills": JSON.stringify(this.skills),
|
||||||
"caption": this.caption,
|
"caption": this.caption,
|
||||||
"userName": this.userName,
|
"userName": this.userName,
|
||||||
"practitionerId":userid
|
"practitionerId":userid
|
||||||
@ -395,6 +457,7 @@ unavailability(action,obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copyToClipBoard(message) {
|
copyToClipBoard(message) {
|
||||||
|
this.copiedKey = 1
|
||||||
console.log(message)
|
console.log(message)
|
||||||
this.notifierService.notify('success', 'Copied...!');
|
this.notifierService.notify('success', 'Copied...!');
|
||||||
const selBox = document.createElement('textarea');
|
const selBox = document.createElement('textarea');
|
||||||
|
|||||||
@ -0,0 +1,95 @@
|
|||||||
|
<div class="container mt-1">
|
||||||
|
<div *ngIf="consultants.length != 0">
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="m-gap p-gap">
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||||
|
<h3 class="page-h">Practitioner List</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="m-gap p-gap" fxLayoutAlign="end center">
|
||||||
|
<mat-form-field class="form-field">
|
||||||
|
<mat-label>Search practitioner</mat-label>
|
||||||
|
<input type="text" [(ngModel)]="filterdata" matInput placeholder="Search Service">
|
||||||
|
<mat-icon matSuffix>search</mat-icon>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap mt-2 mb-2" class="flexRow">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="23.33" fxFlex.lg="23.33" fxFlex.xl="23.33" class="m-gap p-gap" *ngFor="let consultant of consultants | searchFilter:filterdata : 'consultants'">
|
||||||
|
<div class="consultant-list-card card-inner-circle-orange" (click)="assignService(consultant)">
|
||||||
|
<!-- <div class="consultant-content"> -->
|
||||||
|
<div class="pad-wrap" >
|
||||||
|
<!-- <div class="consultant-img">
|
||||||
|
<img src="https://newassets.apollo247.com/specialties/ic_oncology.png " alt="Online Doctor Consultation - Medical Oncology" style="width: 40px;">
|
||||||
|
</div> -->
|
||||||
|
<div class="consultant-card-cover">
|
||||||
|
<div>
|
||||||
|
<div class="text-center consultant-thumb">
|
||||||
|
<img class="img-responsive img-circle"[src]="image_view(consultant.logo)" width="120" height="120" alt="user list image">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="consultant-profile text-center">
|
||||||
|
<h5 class="text-primary">Dr.{{consultant.userName}}</h5>
|
||||||
|
<!-- <span class="silk-block mb-1 consultant-qualification">{{consultant.practitionerInfos[0].qualification || null}}</span><br> -->
|
||||||
|
<!-- <span class="silk-block consultant-span">{{consultant.practitionerInfos[0].designtion
|
||||||
|
|| "ENT" }}</span><br>
|
||||||
|
<span class="silk-block mb-1 consultant-year">{{consultant.practitionerInfos[0].exp || null}}</span><br>
|
||||||
|
<span class="silk-block mb-1 consultant-amount">Starts at <span class="consultant-pay">₹ {{consultant.practitionerInfos[0].fees || 100}}</span> </span><br> -->
|
||||||
|
<!-- <span class="d-flex mb consultant-time">
|
||||||
|
<mat-icon>access_time</mat-icon>
|
||||||
|
<span class="consultant-language">10:00 Am</span>
|
||||||
|
<span class="consultant-language pl-1">{{consultant.time}}</span>
|
||||||
|
</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <span class="d-flex mb">
|
||||||
|
<mat-icon class="mt-1">transcribe</mat-icon>
|
||||||
|
<span class="mt-1 pl-1 consultant-language">{{consultant.practitionerInfos[0].languages || ""}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="d-flex mb">
|
||||||
|
<mat-icon>location_on</mat-icon>
|
||||||
|
<span class="consultant-language pl-1">{{consultant.city}}</span>
|
||||||
|
</span> -->
|
||||||
|
<!-- <div class="text-center mt-1">
|
||||||
|
<a><img src="assets/images/facebook.svg" alt="Avatar" class="img"></a>
|
||||||
|
<a><img src="assets/images/twitter.svg" alt="Avatar" class="img"></a>
|
||||||
|
<a><img src="assets/images/instagram.svg" alt="Avatar" class="img"></a>
|
||||||
|
</div> -->
|
||||||
|
<!-- <p class="message text-center">Apollo Hospitals Cancer Centre Nandanam,Chennai</p> -->
|
||||||
|
<!-- <div style="text-align: center;">
|
||||||
|
<button class="button pill-shape text-center" routerLink="/customer/doctor-profile"> View Profile</button>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<!-- <div class="align-self-center">
|
||||||
|
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary btn-red" data-scribe-element="profile_edit_button">
|
||||||
|
<span class="material-icons"> bookmark_add </span><span class="button-text">Book Appoinment</span>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap">
|
||||||
|
<app-summary></app-summary>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- </ng-scrollbar> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="consultants.length == 0">
|
||||||
|
<div fxLayout="row" class="flexCard">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<div><img src="assets/images/service.png" width="300" height="300"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" class="flexCard">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
|
||||||
|
<h3 class="noAssignedService">No Doctor</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,189 @@
|
|||||||
|
//colors
|
||||||
|
$white: #fff;
|
||||||
|
$black_10: rgba(0, 0, 0, 0.1);
|
||||||
|
$black_30: rgba(0, 0, 0, 0.3);
|
||||||
|
// $color_red_orange_approx: #207b68f2;
|
||||||
|
$color_red_orange_approx: #4caf50;
|
||||||
|
$black_60: rgba(0, 0, 0, 0.6);
|
||||||
|
.consultant-content {
|
||||||
|
padding: 0rem 0.5rem 1rem;
|
||||||
|
// padding-bottom: 4rem;
|
||||||
|
}
|
||||||
|
h5{
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
.flexRow{
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
|
.page-h{
|
||||||
|
color: #217e69;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
.scrollHV {
|
||||||
|
height: calc(100vh - 105px);
|
||||||
|
}
|
||||||
|
.consultant-list-card {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #EBF4FA;
|
||||||
|
box-shadow: 0 2px 6px $black_10;
|
||||||
|
transition: all 0.3s ease-in-out 0s;
|
||||||
|
&:hover {
|
||||||
|
box-shadow: 0 0 21px $black_30;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: scale(1.04);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.consultant-span{
|
||||||
|
font-size: 10px;
|
||||||
|
color: #0087ba;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.consultant-year{
|
||||||
|
font-size: 12px;
|
||||||
|
color: #0087ba;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.consultant-qualification{
|
||||||
|
font-size: 13px;
|
||||||
|
color: #0087ba;
|
||||||
|
// font-weight: 600;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.consultant-amount{
|
||||||
|
color: #658F9B;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px !important;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.consultant-pay{
|
||||||
|
color: #0087BA;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.consultant-language{
|
||||||
|
color: #658F9B;
|
||||||
|
padding: 2px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
word-break: break-word;
|
||||||
|
line-height: 16px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.consultant-time{
|
||||||
|
margin-left: 5rem;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
background-color: #4caf50;
|
||||||
|
color: #efefef;
|
||||||
|
border: none;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 25px;
|
||||||
|
// margin-left: 4rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 25px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
color: rgba(0, 0, 0, 0.54);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
// line-height: 10px;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
// .consultant-img {
|
||||||
|
// top: 25px;
|
||||||
|
// left: 25px;
|
||||||
|
// height: 24px;
|
||||||
|
// display: flex;
|
||||||
|
// text-align: center;
|
||||||
|
// align-items: center;
|
||||||
|
// border-radius: 6px;
|
||||||
|
// justify-content: center;
|
||||||
|
// }
|
||||||
|
// .mb{
|
||||||
|
// margin-bottom: 0.20rem;
|
||||||
|
// }
|
||||||
|
// .consultant-card-cover {
|
||||||
|
// padding: 0rem 6rem;
|
||||||
|
// position: relative;
|
||||||
|
// background-size: cover;
|
||||||
|
// margin-left: -8rem;
|
||||||
|
// }
|
||||||
|
.consultant-thumb {
|
||||||
|
// position: absolute;
|
||||||
|
margin-top: 20px;
|
||||||
|
img {
|
||||||
|
border: 5px solid $white;
|
||||||
|
border-radius: 100%;
|
||||||
|
height: 90px;
|
||||||
|
width: 90px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-red {
|
||||||
|
background-color: $color_red_orange_approx;
|
||||||
|
color: $white;
|
||||||
|
border: 1px solid $color_red_orange_approx;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
// .user-list-wrapper>.user-card-w {
|
||||||
|
// padding: 1rem;
|
||||||
|
// }
|
||||||
|
// ::ng-deep .body-container {
|
||||||
|
// // overflow-x: hidden;
|
||||||
|
// overflow-y: auto!important;
|
||||||
|
// background-color: #ffff;
|
||||||
|
// }
|
||||||
|
// .consultant-profile{
|
||||||
|
// margin-left: -2rem;
|
||||||
|
// }
|
||||||
|
mat-icon{
|
||||||
|
color: #979797;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
mat-toolbar{
|
||||||
|
background-color: #227f6e;
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
max-width: 1217px;
|
||||||
|
min-width: 375px;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-right: 0rem;
|
||||||
|
}
|
||||||
|
.flx{
|
||||||
|
flex: 1 1 0%!important;
|
||||||
|
// max-width: 15%!important;
|
||||||
|
display: initial!important;
|
||||||
|
margin-top: -5rem!important;
|
||||||
|
}
|
||||||
|
.form-field{
|
||||||
|
margin-left: -3rem;
|
||||||
|
}
|
||||||
|
.search-mat{
|
||||||
|
flex: 1 1 0%!important;
|
||||||
|
display: contents!important;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
h3{
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
.flx{
|
||||||
|
margin-top: -6rem!important;
|
||||||
|
}
|
||||||
|
.btn-red{
|
||||||
|
margin: 0rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ConsultantListComponent } from './consultant-list.component';
|
||||||
|
|
||||||
|
describe('ConsultantListComponent', () => {
|
||||||
|
let component: ConsultantListComponent;
|
||||||
|
let fixture: ComponentFixture<ConsultantListComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ ConsultantListComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ConsultantListComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { environment } from 'environments/environment';
|
||||||
|
import { CosultantAssignServicesComponent } from '../cosultant-assign-services/cosultant-assign-services.component';
|
||||||
|
import { FrontDeskService } from '../front-desk-service/front-desk.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-consultant-list',
|
||||||
|
templateUrl: './consultant-list.component.html',
|
||||||
|
styleUrls: ['./consultant-list.component.scss']
|
||||||
|
})
|
||||||
|
export class ConsultantListComponent implements OnInit {
|
||||||
|
consultants: any = [];
|
||||||
|
public filterdata = null;
|
||||||
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
constructor(private router:Router,private _api:FrontDeskService,public dialog: MatDialog) { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.getCosultantList()
|
||||||
|
}
|
||||||
|
|
||||||
|
getCosultantList() {
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
|
||||||
|
this._api.getCosultantListDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.consultants = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.consultants=[];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
image_view(image){
|
||||||
|
|
||||||
|
return this.apiUrl+'imageViewer?img_name='+image;
|
||||||
|
}
|
||||||
|
assignService(param){
|
||||||
|
console.log(param)
|
||||||
|
this.router.navigate(['/consultant-list'])
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<!-- <h5 mat-dialog-title> <strong>{{action}} Services</strong>
|
||||||
|
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||||
|
><mat-icon>close</mat-icon></button></h5>
|
||||||
|
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||||
|
<div mat-dialog-content class="my-table">
|
||||||
|
<mat-form-field appearance="outline" class="mat-pane">
|
||||||
|
<mat-label>Assign Service</mat-label>
|
||||||
|
<mat-select placeholder="Select Role" formControlName="assignService" multiple required>
|
||||||
|
<mat-option *ngFor="let details of servicesList" [value]="details.serviceId">
|
||||||
|
{{details.servicesName}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="myError('assignService', 'required')">ServiceName is required</mat-error>
|
||||||
|
<mat-error *ngIf="myError('assignService', 'maxlength')">Limit exceed</mat-error> </mat-form-field>
|
||||||
|
<ng-template #elseTemplate>
|
||||||
|
Sure to delete <b>{{local_data.servicesName}}</b>?
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
<div mat-dialog-actions>
|
||||||
|
<button mat-button type="submit" class="mat-green" mat-raised-button >Add</button>
|
||||||
|
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form> -->
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
.button{
|
||||||
|
// float: right;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
background-color: #ffff;
|
||||||
|
margin-top: -1rem;
|
||||||
|
// margin-left: 6rem;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.mat-pane{
|
||||||
|
width: 20rem;
|
||||||
|
}
|
||||||
|
.staff{
|
||||||
|
display: flex;
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
border-bottom: 1px solid #EFEFEF;
|
||||||
|
height: 63px;
|
||||||
|
padding: 0 30px;
|
||||||
|
}
|
||||||
|
.staff-title{
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 19px;
|
||||||
|
color: #4C4C4C;
|
||||||
|
padding-top: 1rem;
|
||||||
|
}
|
||||||
|
.assignService{
|
||||||
|
.scrollHV {
|
||||||
|
height: calc(100vh - 461px) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { CosultantAssignServicesComponent } from './cosultant-assign-services.component';
|
||||||
|
|
||||||
|
describe('CosultantAssignServicesComponent', () => {
|
||||||
|
let component: CosultantAssignServicesComponent;
|
||||||
|
let fixture: ComponentFixture<CosultantAssignServicesComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ CosultantAssignServicesComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(CosultantAssignServicesComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
import { Component, Inject, OnInit, Optional } from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { FrontDeskService } from '../front-desk-service/front-desk.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-cosultant-assign-services',
|
||||||
|
templateUrl: './cosultant-assign-services.component.html',
|
||||||
|
styleUrls: ['./cosultant-assign-services.component.scss']
|
||||||
|
})
|
||||||
|
export class CosultantAssignServicesComponent implements OnInit {
|
||||||
|
form: FormGroup;
|
||||||
|
local_data:any;
|
||||||
|
action:string;
|
||||||
|
servicesList: any = [];
|
||||||
|
constructor(private router: Router,private formBuilder: FormBuilder,private _api:FrontDeskService,
|
||||||
|
public dialogRef: MatDialogRef<CosultantAssignServicesComponent>,
|
||||||
|
@Optional() @Inject(MAT_DIALOG_DATA) public data) {
|
||||||
|
console.log(data);
|
||||||
|
this.local_data = {...data};
|
||||||
|
// this.action = this.local_data.action;
|
||||||
|
}
|
||||||
|
get f(){
|
||||||
|
return this.form.controls;
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
closeDialog(){
|
||||||
|
this.dialogRef.close({event:'Cancel'});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
// getServicesDetails - post
|
||||||
|
// param = {"busId":abc123}
|
||||||
|
this.getServicesList()
|
||||||
|
// this.form = new FormGroup({
|
||||||
|
// servicesName: new FormControl('', [Validators.required]),
|
||||||
|
// });
|
||||||
|
// console.log(this.local_data)
|
||||||
|
// this.local_data.duration = JSON.stringify(this.local_data.duration)
|
||||||
|
// this.form.patchValue(this.local_data)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public myError = (controlName: string, errorName: string) =>{
|
||||||
|
// return this.form.controls[controlName].hasError(errorName);
|
||||||
|
}
|
||||||
|
|
||||||
|
getServicesList() {
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this._api.getServicesDetailsApi(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.servicesList = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.servicesList=[];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// submit(){
|
||||||
|
// console.log(this.form.value);
|
||||||
|
// let tmp = this.form.value
|
||||||
|
// tmp.serviceId = this.local_data.serviceId
|
||||||
|
// if (!this.form.valid) {
|
||||||
|
// console.log("check")
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// this.dialogRef.close({event:this.action,data:tmp});
|
||||||
|
// console.log(this.form.value);
|
||||||
|
// console.log(this.action,this.local_data)
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { ConsultantListComponent } from './consultant-list/consultant-list.component';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ConsultantListComponent
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule]
|
||||||
|
})
|
||||||
|
export class FrontDeskRoutingModule { }
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { FrontDeskService } from './front-desk.service';
|
||||||
|
|
||||||
|
describe('FrontDeskService', () => {
|
||||||
|
let service: FrontDeskService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(FrontDeskService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { environment } from 'environments/environment';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class FrontDeskService {
|
||||||
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
constructor(private _http: HttpClient) { }
|
||||||
|
|
||||||
|
getCosultantListDetails(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getPractitionerInfo",param)
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
|
||||||
|
getServicesDetailsApi(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",param)
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
}
|
||||||
67
ng-seed/src/app/appoinment/front-desk/front-desk.module.ts
Normal file
67
ng-seed/src/app/appoinment/front-desk/front-desk.module.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
|
import { FrontDeskRoutingModule } from './front-desk-routing.module';
|
||||||
|
import { ConsultantListComponent } from './consultant-list/consultant-list.component';
|
||||||
|
import { DemoMaterialModule } from 'app/shared/demo.module';
|
||||||
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
||||||
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
|
import { CosultantAssignServicesComponent } from './cosultant-assign-services/cosultant-assign-services.component';
|
||||||
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
|
|
||||||
|
const customNotifierOptions: NotifierOptions = {
|
||||||
|
position: {
|
||||||
|
horizontal: {
|
||||||
|
position: 'right',
|
||||||
|
distance: 12
|
||||||
|
},
|
||||||
|
vertical: {
|
||||||
|
position: 'top',
|
||||||
|
distance: 32,
|
||||||
|
gap: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme: 'material',
|
||||||
|
behaviour: {
|
||||||
|
autoHide: 5000,
|
||||||
|
onClick: 'hide',
|
||||||
|
onMouseover: 'pauseAutoHide',
|
||||||
|
showDismissButton: true,
|
||||||
|
stacking: 4
|
||||||
|
},
|
||||||
|
animations: {
|
||||||
|
enabled: true,
|
||||||
|
show: {
|
||||||
|
preset: 'slide',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
preset: 'fade',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease',
|
||||||
|
offset: 50
|
||||||
|
},
|
||||||
|
shift: {
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
overlap: 150
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
ConsultantListComponent,
|
||||||
|
CosultantAssignServicesComponent,
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FrontDeskRoutingModule,
|
||||||
|
DemoMaterialModule,
|
||||||
|
CommonModule,
|
||||||
|
SharedModule,
|
||||||
|
NgScrollbarModule,
|
||||||
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class FrontDeskModule { }
|
||||||
@ -18,16 +18,16 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="myError('duration', 'required')">Duration is required</mat-error>
|
<mat-error *ngIf="myError('duration', 'required')">Duration is required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
|
||||||
<mat-label>Description</mat-label>
|
|
||||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
|
||||||
<mat-error *ngIf="myError('description', 'required')">Duration is required</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<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">
|
||||||
<input type="number" placeholder="Fees" matInput formControlName="fees">
|
<input type="number" placeholder="Fees" matInput formControlName="fees">
|
||||||
<mat-error *ngIf="myError('fees', 'required')">Fees is required</mat-error>
|
<mat-error *ngIf="myError('fees', 'required')">Fees is required</mat-error>
|
||||||
<!-- <mat-error *ngIf="myError('fees', 'maxlength')">Limit exceed</mat-error> -->
|
<!-- <mat-error *ngIf="myError('fees', 'maxlength')">Limit exceed</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||||
|
<mat-label>Description</mat-label>
|
||||||
|
<textarea row="5" cols="7" matInput placeholder="Description" formControlName="description"></textarea>
|
||||||
|
<mat-error *ngIf="myError('description', 'required')">Duration is required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
<ng-template #elseTemplate>
|
<ng-template #elseTemplate>
|
||||||
Sure to delete <b>{{local_data.servicesName}}</b>?
|
Sure to delete <b>{{local_data.servicesName}}</b>?
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@ -19,6 +19,13 @@ export class ApiServiceService {
|
|||||||
// catchError(this.handleError('role', []))
|
// catchError(this.handleError('role', []))
|
||||||
// )
|
// )
|
||||||
}
|
}
|
||||||
|
getCosultantListDetails(param): Observable<any> {
|
||||||
|
console.log('IN')
|
||||||
|
return this._http.post<any[]>(this.apiUrl + "getusers",param)
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
}
|
||||||
getServicesListDetails2(): Observable<any> {
|
getServicesListDetails2(): Observable<any> {
|
||||||
console.log('IN')
|
console.log('IN')
|
||||||
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",{})
|
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",{})
|
||||||
|
|||||||
@ -3,7 +3,16 @@
|
|||||||
<mat-label>Filter</mat-label>
|
<mat-label>Filter</mat-label>
|
||||||
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
|
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-button (click)="openDialog('Add',{})" class="button">Add Services</button>
|
<mat-form-field appearance="outline" style="width:20%;margin-left: 5%;" *ngIf="user_role == 'FRONTDESK'">
|
||||||
|
<mat-label>Practitioner</mat-label>
|
||||||
|
<mat-select placeholder="Select Business" [(ngModel)]="selectPractitioner" required>
|
||||||
|
<mat-option value="All" (click)="allPractitioner()">All</mat-option>
|
||||||
|
<mat-option *ngFor="let details of consultants" (click)="getPractitioner(details)" [value]="details.id">
|
||||||
|
Dr. {{details.userName}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<button mat-button *ngIf="user_role != 'FRONTDESK'" (click)="openDialog('Add',{})" class="button">Add Services</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">
|
||||||
<ng-scrollbar class="scrollHV">
|
<ng-scrollbar class="scrollHV">
|
||||||
|
|||||||
@ -35,13 +35,20 @@ export class ServiceListComponent implements OnInit {
|
|||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
servicesList: any[] = [];
|
servicesList: any[] = [];
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
user_role: any=[];
|
||||||
|
consultants: any=[];
|
||||||
|
|
||||||
constructor(private notifierService: NotifierService,public _api:ApiServiceService, public dialog: MatDialog) { }
|
constructor(private notifierService: NotifierService,public _api:ApiServiceService, public dialog: MatDialog) { }
|
||||||
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
this.getServicesList()
|
this.user_role = localStorage.getItem('user_role');
|
||||||
|
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this.getServicesList(param)
|
||||||
|
this.getCosultantList()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
@ -57,9 +64,35 @@ export class ServiceListComponent implements OnInit {
|
|||||||
this.servicesListSource.filter = filterValue;
|
this.servicesListSource.filter = filterValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCosultantList() {
|
||||||
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this._api.getCosultantListDetails(param).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.consultants = res.data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.consultants=[];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getServicesList() {
|
allPractitioner(){
|
||||||
let param ={"busId": localStorage.getItem('busId')}
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
console.log(param)
|
||||||
|
this.getServicesList(param)
|
||||||
|
}
|
||||||
|
|
||||||
|
getPractitioner(selectedPractititoner){
|
||||||
|
console.log(selectedPractititoner)
|
||||||
|
let param = {"busId": selectedPractititoner.busId,"userId":selectedPractititoner.id}
|
||||||
|
this.getServicesList(param)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getServicesList(param) {
|
||||||
|
// let param ={"busId": localStorage.getItem('busId')}
|
||||||
console.log(param)
|
console.log(param)
|
||||||
this._api.getServicesListDetails(param).subscribe(res => {
|
this._api.getServicesListDetails(param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
@ -175,7 +208,8 @@ export class ServiceListComponent implements OnInit {
|
|||||||
this._api.addFormDetails(formValue[0]).subscribe(res => {
|
this._api.addFormDetails(formValue[0]).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// this.customersList = res.data;
|
// this.customersList = res.data;
|
||||||
this.getServicesList()
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
|
this.getServicesList(param)
|
||||||
if(result.event == 'Add'){
|
if(result.event == 'Add'){
|
||||||
this.notifierService.notify('success', 'Service Added Successfully');
|
this.notifierService.notify('success', 'Service Added Successfully');
|
||||||
}else if(result.event == 'Update'){
|
}else if(result.event == 'Update'){
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
|
|
||||||
<mat-form-field appearance="outline" class="mat-pane user-mate">
|
<mat-form-field appearance="outline" class="mat-pane user-mate" *ngIf="action != 'Update'">
|
||||||
<mat-label>Password</mat-label>
|
<mat-label>Password</mat-label>
|
||||||
<input matInput type="password" placeholder="Password" formControlName="password" [type]="hide ? 'password' : 'text'" name="password">
|
<input matInput type="password" placeholder="Password" formControlName="password" [type]="hide ? 'password' : 'text'" name="password">
|
||||||
<mat-error *ngIf="!form.get('password')?.errors?.required">
|
<mat-error *ngIf="!form.get('password')?.errors?.required">
|
||||||
@ -85,17 +85,18 @@
|
|||||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||||
<mat-error *ngIf="myError('confirmPassword', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('confirmPassword', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
</ng-scrollbar>
|
|
||||||
<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 (click)="closeDialog()" >Cancel</button>
|
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-scrollbar>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-template #elseTemplate>
|
<ng-template #elseTemplate>
|
||||||
Sure to delete <b>{{local_data.name}}</b>?
|
Sure to delete <b>{{local_data.name}}</b>?
|
||||||
</ng-template><br>
|
</ng-template>
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
overflow: hidden!important;
|
overflow: hidden!important;
|
||||||
}
|
}
|
||||||
.scrollHV {
|
.scrollHV {
|
||||||
height: calc(100vh - 190px);
|
height: calc(100vh - 83px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,8 @@ export class AddUserComponent implements OnInit {
|
|||||||
// if( localStorage.getItem('go_admin') =='0'){
|
// if( localStorage.getItem('go_admin') =='0'){
|
||||||
this.local_data.businessselect = localStorage.getItem('busNameID')
|
this.local_data.businessselect = localStorage.getItem('busNameID')
|
||||||
this.form.controls['businessselect'].setValue(localStorage.getItem('busNameID'))
|
this.form.controls['businessselect'].setValue(localStorage.getItem('busNameID'))
|
||||||
if( this.disableBus == 0){
|
|
||||||
|
if(this.disableBus == 0){
|
||||||
this.form.controls['role'].setValue('BADMIN')
|
this.form.controls['role'].setValue('BADMIN')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,9 +126,11 @@ export class AddUserComponent implements OnInit {
|
|||||||
|
|
||||||
if(this.action == 'Update'){
|
if(this.action == 'Update'){
|
||||||
this.local_data.businessselect = this.local_data.busId
|
this.local_data.businessselect = this.local_data.busId
|
||||||
}
|
}else {
|
||||||
console.log( this.local_data)
|
console.log( this.local_data)
|
||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// , error => {this.errorMessage = <any> error});
|
// , error => {this.errorMessage = <any> error});
|
||||||
@ -153,6 +156,10 @@ export class AddUserComponent implements OnInit {
|
|||||||
|
|
||||||
submit(){
|
submit(){
|
||||||
console.log(this.form.value);
|
console.log(this.form.value);
|
||||||
|
if(this.action == 'Update'){
|
||||||
|
this.form.controls['password'].clearValidators();
|
||||||
|
this.form.controls['password'].updateValueAndValidity();
|
||||||
|
}
|
||||||
if (!this.form.valid) {
|
if (!this.form.valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -165,14 +172,18 @@ export class AddUserComponent implements OnInit {
|
|||||||
if(this.action == 'Update'){
|
if(this.action == 'Update'){
|
||||||
this.formData.append('id', tmp.id);
|
this.formData.append('id', tmp.id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(this.action != 'Update'){
|
||||||
|
this.formData.append('password', tmp.password);
|
||||||
|
}
|
||||||
|
let userrole = localStorage.getItem('user_role')
|
||||||
|
this.formData.append('createdBy',userrole)
|
||||||
this.formData.append('busId', this.busId);
|
this.formData.append('busId', this.busId);
|
||||||
this.formData.append('userName', tmp.userName);
|
this.formData.append('userName', tmp.userName);
|
||||||
this.formData.append('password', tmp.password);
|
|
||||||
this.formData.append('role', tmp.role);
|
this.formData.append('role', tmp.role);
|
||||||
this.formData.append('email', tmp.email);
|
this.formData.append('email', tmp.email);
|
||||||
this.formData.append('contactNo', tmp.contactNo);
|
this.formData.append('contactNo', tmp.contactNo);
|
||||||
this.formData.append('confirmPassword', tmp.password);
|
// this.formData.append('confirmPassword', tmp.password);
|
||||||
// tmp.confirmPassword = this.local_data.confirmPassword
|
// tmp.confirmPassword = this.local_data.confirmPassword
|
||||||
this.dialogRef.close({event:this.action,data: this.formData});
|
this.dialogRef.close({event:this.action,data: this.formData});
|
||||||
console.log( this.formData,this.form.value);
|
console.log( this.formData,this.form.value);
|
||||||
|
|||||||
@ -65,10 +65,10 @@
|
|||||||
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.userName}} </td>
|
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.userName}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Password">
|
<!-- <ng-container matColumnDef="Password">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Password </th>
|
<th mat-header-cell *matHeaderCellDef class="font-color"> Password </th>
|
||||||
<td mat-cell *matCellDef="let element" class="element-spc"> {{hashPassword(element.password)}} </td>
|
<td mat-cell *matCellDef="let element" class="element-spc"> {{hashPassword(element.password)}} </td>
|
||||||
</ng-container>
|
</ng-container> -->
|
||||||
|
|
||||||
<ng-container matColumnDef="mobile_no">
|
<ng-container matColumnDef="mobile_no">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Mobile no </th>
|
<th mat-header-cell *matHeaderCellDef class="font-color"> Mobile no </th>
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const ELEMENT_DATA: UsersData[] = [
|
|||||||
})
|
})
|
||||||
export class UserListComponent implements OnInit {
|
export class UserListComponent implements OnInit {
|
||||||
push: any;
|
push: any;
|
||||||
displayedColumns: string[] = ['id','logo', 'role', 'busId','Username', 'Password', 'mobile_no', 'email', 'action'];
|
displayedColumns: string[] = ['id','logo', 'role', 'busId','Username', 'mobile_no', 'email', 'action'];
|
||||||
dataSource: any;
|
dataSource: any;
|
||||||
addFormData: any;
|
addFormData: any;
|
||||||
length = 5;
|
length = 5;
|
||||||
@ -117,9 +117,9 @@ export class UserListComponent implements OnInit {
|
|||||||
// alert(error.html_format);
|
// alert(error.html_format);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
hashPassword(password: string){
|
// hashPassword(password: string){
|
||||||
return "*".repeat(6)
|
// return "*".repeat(6)
|
||||||
}
|
// }
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
console.log(this.usersList,this.paginator)
|
console.log(this.usersList,this.paginator)
|
||||||
this.usersList.paginator = this.paginator;
|
this.usersList.paginator = this.paginator;
|
||||||
@ -191,7 +191,10 @@ export class UserListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
localStorage.setItem('go_admin','1')
|
localStorage.setItem('go_admin','1')
|
||||||
localStorage.setItem('busNameID',null)
|
let user_role = localStorage.getItem('user_role')
|
||||||
|
if(user_role != 'BADMIN'){
|
||||||
|
localStorage.setItem('busNameID',null)
|
||||||
|
}
|
||||||
if(result != undefined){
|
if(result != undefined){
|
||||||
console.log(result)
|
console.log(result)
|
||||||
this.formAddUpdateAndDelete(result,result.data)
|
this.formAddUpdateAndDelete(result,result.data)
|
||||||
@ -252,7 +255,11 @@ export class UserListComponent implements OnInit {
|
|||||||
this._use.addFormDetails(formValue[0]).subscribe(res => {
|
this._use.addFormDetails(formValue[0]).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
localStorage.setItem('go_admin','1')
|
localStorage.setItem('go_admin','1')
|
||||||
localStorage.setItem('busNameID',null)
|
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()
|
this.getUsersList()
|
||||||
if(result.event == 'Add'){
|
if(result.event == 'Add'){
|
||||||
|
|||||||
@ -86,7 +86,7 @@ $p: 12px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
background: url('assets/images/1.jpg') no-repeat center center / cover;
|
background: url('~assets/images/1.jpg') no-repeat center center / cover;
|
||||||
clip-path: polygon(0 0, 100% 0, 100% 75%, 0% 100%);
|
clip-path: polygon(0 0, 100% 0, 100% 75%, 0% 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,14 +68,12 @@ export class ServiceListComponent implements OnInit {
|
|||||||
console.log(params);
|
console.log(params);
|
||||||
|
|
||||||
this.enduser.getcusServicesMapDetails(params).subscribe(res => {
|
this.enduser.getcusServicesMapDetails(params).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.full_data = res['data']
|
this.full_data = res['data']
|
||||||
this.full_data[0].business[0].busName
|
this.full_data[0].business[0].busName
|
||||||
localStorage.setItem('busName',this.full_data[0].business[0].busName)
|
localStorage.setItem('busName',this.full_data[0].business[0].busName)
|
||||||
let tmp =[];
|
let tmp =[];
|
||||||
|
|
||||||
res['data'].forEach(element => {
|
res['data'].forEach(element => {
|
||||||
// tmp.push(element.service)
|
// tmp.push(element.service)
|
||||||
element.service.forEach(e => {
|
element.service.forEach(e => {
|
||||||
|
|||||||
@ -10,7 +10,9 @@
|
|||||||
<div class="branding text-center">
|
<div class="branding text-center">
|
||||||
<!-- <h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> Appointment</span>
|
<!-- <h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> Appointment</span>
|
||||||
</h2> -->
|
</h2> -->
|
||||||
<h2><i class="fa fa-calendar" aria-hidden="true"></i> <span> {{getUserData.role == 'SADMIN' ? 'Appointment' : getUserData.BusinessDetails[0].busName}}</span>
|
<h2>
|
||||||
|
<!-- <i class="fa fa-calendar" aria-hidden="true"> </i>-->
|
||||||
|
<span style="font-size: 24px;font-variant-caps: petite-caps;"> {{getUserData.role == 'SADMIN' ? 'Appointment' : getUserData.BusinessDetails[0].busName}}</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -10,9 +10,10 @@ export class RoleMenuItemsPipe implements PipeTransform {
|
|||||||
// // this is for horizontal menu filter
|
// // this is for horizontal menu filter
|
||||||
// if(type=="1"){
|
// if(type=="1"){
|
||||||
switch(localStorage.getItem('user_role')){
|
switch(localStorage.getItem('user_role')){
|
||||||
case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting" && val.state!="consultants" && val.state!="services");
|
case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting" && val.state!="consultants" && val.state!="services" && val.state!= "consultant-list");
|
||||||
case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="users" && val.state!="consultants" && val.state!="appoinments");
|
case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="appoinments" && val.state!= "consultant-list");
|
||||||
case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services");
|
case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services" && val.state!= "consultant-list");
|
||||||
|
case 'FRONTDESK': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state != "home" && val.state!="customers" && val.state!= "consultant-list");
|
||||||
// case 'PRACTITIONER':
|
// case 'PRACTITIONER':
|
||||||
// case '3': return value.filter(val=>val.state!="settings");
|
// case '3': return value.filter(val=>val.state!="settings");
|
||||||
// case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list");
|
// case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list");
|
||||||
|
|||||||
@ -36,4 +36,8 @@ export class SessionService {
|
|||||||
// return this._http.post(this.apiUrl + 'login', {'email':params.email,'password':params.password})
|
// return this._http.post(this.apiUrl + 'login', {'email':params.email,'password':params.password})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getUsersListDetails(id): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'getPractitionerInfo', {id:id})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,10 +50,16 @@ export class LoginComponent {
|
|||||||
localStorage.setItem('user_id',res.roleId
|
localStorage.setItem('user_id',res.roleId
|
||||||
);
|
);
|
||||||
|
|
||||||
localStorage.setItem('busId',res.busId)
|
localStorage.setItem('busId',res.busId)
|
||||||
|
if(res.role == 'BADMIN' || res.role == 'PRACTITIONER'){
|
||||||
|
localStorage.setItem('busNameID',res.busId)
|
||||||
|
this.getUserDetails()
|
||||||
|
}else{
|
||||||
this.router.navigate(['/home'])
|
this.router.navigate(['/home'])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log(res.message)
|
console.log(res.message)
|
||||||
// this.notifierService.notify('success', 'You are awesome! I mean it!');
|
// this.notifierService.notify('success', 'You are awesome! I mean it!');
|
||||||
@ -67,6 +73,24 @@ export class LoginComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getUserDetails(){
|
||||||
|
let id = localStorage.getItem('user_id')
|
||||||
|
console.log(id)
|
||||||
|
this._ser.getUsersListDetails(id).subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
let usersList = res.data[0];
|
||||||
|
localStorage.setItem('practitioner',JSON.stringify(usersList))
|
||||||
|
console.log(usersList)
|
||||||
|
if(usersList['practitionerInfos'].length==0){
|
||||||
|
console.log('in')
|
||||||
|
this.router.navigate(['/consultant-setting'])
|
||||||
|
}else{
|
||||||
|
this.router.navigate(['/home'])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
openDialog(): void {
|
openDialog(): void {
|
||||||
const dialogRef = this.dialog.open(OtpComponent, {
|
const dialogRef = this.dialog.open(OtpComponent, {
|
||||||
width: '250px',
|
width: '250px',
|
||||||
|
|||||||
@ -117,7 +117,13 @@ const HORIZONTALMENUITEMS = [
|
|||||||
name: 'Slot Booking',
|
name: 'Slot Booking',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: 'settings_system_daydream'
|
icon: 'settings_system_daydream'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
state: 'consultant-list',
|
||||||
|
name: 'Consultant List',
|
||||||
|
type: 'link',
|
||||||
|
icon: 'settings_system_daydream'
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -99,6 +99,12 @@ const MENUITEMS : Menu[] = [
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
icon: 'settings_system_daydream'
|
icon: 'settings_system_daydream'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
state: 'consultant-list',
|
||||||
|
name: 'Consultant List',
|
||||||
|
type: 'link',
|
||||||
|
icon: 'settings_system_daydream'
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// state: 'business-centers',
|
// state: 'business-centers',
|
||||||
// name: 'Centers',
|
// name: 'Centers',
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export class SearchFilterPipe implements PipeTransform {
|
|||||||
return it.busName.toLowerCase().includes(filterdata);
|
return it.busName.toLowerCase().includes(filterdata);
|
||||||
}else if(name == 'consultants'){
|
}else if(name == 'consultants'){
|
||||||
return it.userName.toLowerCase().includes(filterdata);
|
return it.userName.toLowerCase().includes(filterdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -417,7 +417,7 @@ $hover-font-color:#fff;
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: rgba(214, 224, 226, 0.2);
|
background-color: rgba(214, 224, 226, 0.2);
|
||||||
.cardheader {
|
.cardheader {
|
||||||
background: url("assets/images/night.jpg");
|
background: url("~assets/images/night.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
height: 135px;
|
height: 135px;
|
||||||
}
|
}
|
||||||
@ -469,7 +469,7 @@ $hover-font-color:#fff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.profile-cover {
|
.profile-cover {
|
||||||
background-image: url("/assets/images/night.jpg");
|
background-image: url("~assets/images/night.jpg");
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
padding: 7rem 0;
|
padding: 7rem 0;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -10,7 +10,8 @@ export const environment = {
|
|||||||
// apiEndpoint:'http://192.168.1.20:8080/api/',
|
// apiEndpoint:'http://192.168.1.20:8080/api/',
|
||||||
// apiEndpoint:'https://api.venbait.in/api/',
|
// apiEndpoint:'https://api.venbait.in/api/',
|
||||||
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
||||||
apiEndpoint:'http://192.168.1.12:8080/api/',
|
apiEndpoint:'http://192.168.1.20:8080/api/',
|
||||||
|
|
||||||
// apiEndpoint:'https://api.venbait.in/api/',
|
// apiEndpoint:'https://api.venbait.in/api/',
|
||||||
|
|
||||||
//EndUser URL
|
//EndUser URL
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user