end user changes
This commit is contained in:
parent
2675068bcf
commit
a7e3e3037b
@ -30,11 +30,15 @@ export const AppRoutes: Routes = [{
|
||||
{
|
||||
path: 'customers',
|
||||
loadChildren: () => import('./appoinment/customers/customers.module').then(m => m.CustomersModule)
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'users',
|
||||
loadChildren: () => import('./appoinment/user/user.module').then(m => m.UserModule)
|
||||
},
|
||||
{
|
||||
path: 'services',
|
||||
loadChildren: () => import('./appoinment/service-list-details/service-list.module').then(m => m.ServiceListModule)
|
||||
},
|
||||
{
|
||||
path: 'consultant-setting',
|
||||
loadChildren: () => import('./appoinment/consultant-setting/consultant-setting.module').then(m => m.ConsultantSettingModule)
|
||||
|
||||
@ -77,9 +77,9 @@
|
||||
.field-inline{
|
||||
display: inline-flex;
|
||||
}
|
||||
::ng-deep .swal2-height-auto {
|
||||
// height: auto!important;
|
||||
}
|
||||
// ::ng-deep .swal2-height-auto {
|
||||
// // height: auto!important;
|
||||
// }
|
||||
::ng-deep .mat-dialog-content {
|
||||
max-height: 75vh!important;
|
||||
overflow: unset!important;
|
||||
|
||||
@ -1,66 +1,66 @@
|
||||
<!-- <mat-card class="settings-panel" > -->
|
||||
<h5 mat-dialog-title> <strong>{{action}} Business</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()">
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Name" matInput formControlName="busName">
|
||||
<mat-error *ngIf="myError('busName', 'required')">Name is required</mat-error>
|
||||
<mat-error *ngIf="myError('busName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Address" matInput [(ngModel)]="local_data.address" formControlName="address">
|
||||
<mat-error *ngIf="myError('address', 'required')">Address is required</mat-error>
|
||||
<mat-error *ngIf="myError('address', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" State" matInput [(ngModel)]="local_data.state" formControlName="state">
|
||||
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
|
||||
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" City" matInput [(ngModel)]="local_data.city" formControlName="city">
|
||||
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
|
||||
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Working Hrs" matInput formControlName="workingHrsJson">
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'required')">Working Hrs is required</mat-error>
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
<img class="image mb-2" [src]="url" height="50">
|
||||
<input type='file' (change)="onSelectFile($event)" formControlName="logo">
|
||||
<!-- <mat-checkbox class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox> -->
|
||||
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- </mat-card> -->
|
||||
|
||||
|
||||
<h5 mat-dialog-title> <strong>{{action}} Business</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()">
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Name" matInput formControlName="busName">
|
||||
<mat-error *ngIf="myError('busName', 'required')">Name is required</mat-error>
|
||||
<mat-error *ngIf="myError('busName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Address" matInput [(ngModel)]="local_data.address" formControlName="address">
|
||||
<mat-error *ngIf="myError('address', 'required')">Address is required</mat-error>
|
||||
<mat-error *ngIf="myError('address', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" State" matInput [(ngModel)]="local_data.state" formControlName="state">
|
||||
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
|
||||
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" City" matInput [(ngModel)]="local_data.city" formControlName="city">
|
||||
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
|
||||
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Working Hrs" matInput formControlName="workingHrsJson">
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'required')">Working Hrs is required</mat-error>
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="50" width="50">
|
||||
<input type='file' (change)="onSelectFile($event)" formControlName="logo">
|
||||
<mat-checkbox class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- </mat-card> -->
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTable, MatTableDataSource } from '@angular/material/table';
|
||||
import { Router } from '@angular/router';
|
||||
import { DialogBoxComponent } from 'app/appoinment/appoinments/dialog-box/dialog-box.component';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js';
|
||||
import { AddBusinessComponent } from '../add-business/add-business.component';
|
||||
import { BusinessService } from '../business-service/business.service';
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
<!-- <mat-card class="settings-panel" > -->
|
||||
<h5 mat-dialog-title> <strong>{{action}} Business</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()">
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Name" matInput formControlName="busName">
|
||||
<mat-error *ngIf="myError('busName', 'required')">Name is required</mat-error>
|
||||
<mat-error *ngIf="myError('busName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Phone No" matInput [(ngModel)]="local_data.contactNo" formControlName="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Address" matInput [(ngModel)]="local_data.address" formControlName="address">
|
||||
<mat-error *ngIf="myError('address', 'required')">Address is required</mat-error>
|
||||
<mat-error *ngIf="myError('address', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" State" matInput [(ngModel)]="local_data.state" formControlName="state">
|
||||
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
|
||||
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" City" matInput [(ngModel)]="local_data.city" formControlName="city">
|
||||
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
|
||||
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Working Hrs" matInput formControlName="workingHrsJson">
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'required')">Working Hrs is required</mat-error>
|
||||
<mat-error *ngIf="myError('workingHrsJson', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="50" width="50">
|
||||
<input type='file' (change)="onSelectFile($event)" formControlName="logo">
|
||||
<mat-checkbox class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- </mat-card> -->
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ApiServiceService } from './api-service.service';
|
||||
|
||||
describe('ApiServiceService', () => {
|
||||
let service: ApiServiceService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ApiServiceService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,34 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Observable } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ApiServiceService {
|
||||
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
constructor(private _http: HttpClient) { }
|
||||
|
||||
getServicesListDetails(): Observable<any> {
|
||||
console.log('IN')
|
||||
return this._http.get<any[]>(this.apiUrl + "getServicesDetails ")
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
|
||||
addFormDetails(addParams): Observable<any> {
|
||||
return this._http.post(this.apiUrl + 'CreateService', addParams)
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
|
||||
|
||||
handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable<any>) => import("rxjs").ObservableInput<any> {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { ServiceListComponent } from './service-list/service-list.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ServiceListComponent
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class ServiceListRoutingModule { }
|
||||
@ -0,0 +1,26 @@
|
||||
<button mat-button (click)="openDialog('Add',{})" class="buttons">Add Services</button><br>
|
||||
<div fxLayout="row wrap" >
|
||||
<div fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="50" class="m-gap p-gap flx" *ngFor="let serviceListDetails of servicesList">
|
||||
<div class="Specialties-list-card">
|
||||
<mat-card class="mb-2 example-card d-flex Specialties-spContent">
|
||||
<div class="consultant-card-cover">
|
||||
<div>
|
||||
<div class="text-center consultant-thumb">
|
||||
<img class="img-responsive img-circle" src="https://prodaphstorage.blob.core.windows.net/specialties/bdf0cf0d-754e-4254-aaf7-fdc7aedd7c35.jpg" alt="Online Doctor Consultation - Allergist and Clinical Immunologist" width="120" height="120" alt="user list image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title class="service-info mb">{{serviceListDetails.servicesName}}</mat-card-title>
|
||||
<mat-card-title class="info service-list">{{serviceListDetails.info}}</mat-card-title>
|
||||
<a (click)="openDialog('Update',serviceListDetails)" class="Specialties-rightUpdate"><span class="material-icons edit-color">edit</span></a>
|
||||
<a (click)="confirmBox('Delete',serviceListDetails)" class="Specialties-rightArrow"><span class="material-icons edit-color delete">delete</span></a>
|
||||
<!-- <span class="Specialties-rightArrow"><img src="https://newassets.apollo247.com/images/ic_arrow_right.svg" alt="Arrow Right - Online Doctor Consultation"></span> -->
|
||||
<mat-card-subtitle class="service-Specialties">{{serviceListDetails.specialties}}</mat-card-subtitle>
|
||||
|
||||
</mat-card-title-group>
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,105 @@
|
||||
$white: #fff;
|
||||
$black_10: rgba(0, 0, 0, 0.1);
|
||||
$black_30: rgba(0, 0, 0, 0.3);
|
||||
$icon-size: 3rem;
|
||||
$icon-color: #D8D8D8;
|
||||
$main-color: #f44336;
|
||||
.Specialties-list-card {
|
||||
background: $white;
|
||||
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-card-cover {
|
||||
// padding: 0rem 6rem;
|
||||
position: relative;
|
||||
background-size: cover;
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.consultant-thumb {
|
||||
// position: absolute;
|
||||
// margin-top: 20px;
|
||||
// margin-left: -45rem;
|
||||
img {
|
||||
border: 5px solid #fff;;
|
||||
border-radius: 100%;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
// margin-right: -8rem;
|
||||
}
|
||||
}
|
||||
.service-info{
|
||||
line-height: 1.5rem!important;
|
||||
}
|
||||
.info{
|
||||
font-size: 12px!important;
|
||||
font-weight: 500;
|
||||
color: rgba(2,71,91,.6);
|
||||
padding: 0 0 10px;
|
||||
max-height: 38px;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.service-Specialties{
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
color: #02475b;
|
||||
padding: 10px 0 0;
|
||||
// border-top: 1px solid rgba(2,71,91,.3);
|
||||
}
|
||||
|
||||
.Specialties-rightArrow{
|
||||
top: 1rem;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
.flx{
|
||||
width: 47%;
|
||||
}
|
||||
.Specialties-spContent{
|
||||
width: 100%;
|
||||
padding: 0 10px 0 0;
|
||||
position: relative;
|
||||
// min-height: 60px;
|
||||
height: 65px;
|
||||
}
|
||||
.mb{
|
||||
margin-bottom: 0.60rem;
|
||||
}
|
||||
::ng-deep body .mat-card .mat-card-title {
|
||||
padding-left: 0rem!important;
|
||||
}
|
||||
::ng-deep body .mat-card .mat-card-subtitle {
|
||||
padding-left: 0rem!important;
|
||||
}
|
||||
.buttons{
|
||||
float: right;
|
||||
background-color: #4caf50;
|
||||
color: #ffff;
|
||||
}
|
||||
.edit-color{
|
||||
color: white;
|
||||
}
|
||||
.edit-color:hover {
|
||||
color: #4caf50;
|
||||
}
|
||||
.delete:hover {
|
||||
color:#ff0000;
|
||||
}
|
||||
.icon-lft{
|
||||
margin-left: 6rem;
|
||||
}
|
||||
.Specialties-rightUpdate{
|
||||
top: 1rem;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
padding-right: 2.5rem;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ServiceListComponent } from './service-list.component';
|
||||
|
||||
describe('ServiceListComponent', () => {
|
||||
let component: ServiceListComponent;
|
||||
let fixture: ComponentFixture<ServiceListComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ServiceListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ServiceListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,167 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import Swal from 'sweetalert2';
|
||||
import { AddServiceComponent } from '../add-service/add-service.component';
|
||||
import { ApiServiceService } from '../service-api-services/api-service.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-service-list',
|
||||
templateUrl: './service-list.component.html',
|
||||
styleUrls: ['./service-list.component.scss']
|
||||
})
|
||||
export class ServiceListComponent implements OnInit {
|
||||
// doctors = ['Dr. Sanjeev', 'Dr. Gopi', 'Dr. Surendar', 'Dr. Kamali', 'Dr. Venkatadesh', 'Dr.Javeed', 'Dr.Cyril'];
|
||||
// serviceId = ['1', '2', '3'];
|
||||
servicesName = ['Allergist and Clinical Immunologist', 'Bariatrics', 'Breast surgery','Cardiology','Cardiothoracic & Vascular Surgery','Cold, Cough and Fever', 'Colorectal Surgery'];
|
||||
info = ['Manage allergies and treat immunity', 'For obesity-related disorders', 'For breast tissue removal', 'For heart and blood pressure problems', 'For surgical treatments of thoracic organs', 'For common health concerns', 'For disorders of rectum, anus, and colon'];
|
||||
specialties = ['Recurring infections, Immunity deficiency', 'Overweight, BMI over 30', 'Breast tissue surgery & removal, Mastectomy', 'Chest pain, Heart Failure, Cholesterol', 'Heart & lung disease, Cardiac transplantation','Fever, Eye Infection, Stomach Ache, Headache', 'Inflammatory bowel disease, Fistula, Intestinal blockage'];
|
||||
serviceData: any = [];
|
||||
addFormData: any;
|
||||
push: any;
|
||||
id: number;
|
||||
serviceId: number;
|
||||
public servicesList:any = new MatTableDataSource();
|
||||
constructor(public _api:ApiServiceService, public dialog: MatDialog) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const random = i % 7;
|
||||
const obj: any = {
|
||||
servicesName: this.servicesName[random],
|
||||
// isFavourite: i % 5 === 0 ? true : false,
|
||||
// doctors: this.doctors,
|
||||
info: this.info[random],
|
||||
specialties: this.specialties[random],
|
||||
// apino: 21,
|
||||
// state: state[i % 4],
|
||||
//version: this.dropdown[0].name,
|
||||
};
|
||||
// this.serviceData.push(obj);
|
||||
}
|
||||
this.getServicesList()
|
||||
}
|
||||
|
||||
getServicesList() {
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
this._api.getServicesListDetails().subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.servicesList = res.data;
|
||||
// console.log(this.servicesList)
|
||||
// this.dataSource = res.data.length;
|
||||
// console.log(this.dataSource)
|
||||
// this.dataSource.data = this.servicesList;
|
||||
// console.log(this.dataSource.data)
|
||||
// this.recordStatus=false;
|
||||
}
|
||||
else{
|
||||
// this.servicesList=[];
|
||||
// this.dataSource = null;
|
||||
// this.recordStatus=true;
|
||||
}
|
||||
}
|
||||
,error => {
|
||||
// this.errorMessage.push(error);
|
||||
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(error.html_format);
|
||||
});
|
||||
}
|
||||
|
||||
confirmBox(event,element){
|
||||
console.log(event,element)
|
||||
Swal.fire({
|
||||
title: 'Are you sure want to remove?',
|
||||
text: 'You will not be able to recover this file!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes, delete it!',
|
||||
cancelButtonText: 'No, keep it'
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
// this.deleteRowData(element);
|
||||
this.formAddUpdateAndDelete(event,element)
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your imaginary file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
Swal.fire(
|
||||
'Cancelled',
|
||||
'Your imaginary file is safe :)',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
openDialog(action,obj) {
|
||||
obj.action = action;
|
||||
const dialogRef = this.dialog.open(AddServiceComponent, {
|
||||
width: '39%',
|
||||
height: '100%',
|
||||
// maxWidth: '38vw',
|
||||
position: { right: '0' },
|
||||
data:obj
|
||||
});
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
if(result != undefined){
|
||||
console.log(result)
|
||||
this.formAddUpdateAndDelete(result,result.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
formAddUpdateAndDelete(result,row_obj){
|
||||
console.log(result,row_obj)
|
||||
let formValue = []
|
||||
if(result.event == 'Add'){
|
||||
console.log('add')
|
||||
let addFormData = {
|
||||
// busId: 'abc123',
|
||||
// id: row_obj.id,
|
||||
|
||||
serviceId: row_obj.serviceId,
|
||||
servicesName: row_obj.servicesName
|
||||
};
|
||||
formValue.push(addFormData);
|
||||
}else if(result.event == 'Update'){
|
||||
console.log(row_obj)
|
||||
console.log('Update')
|
||||
let updatevalue = { serviceId: row_obj.serviceId,
|
||||
servicesName: row_obj.servicesName }
|
||||
formValue.push(updatevalue);
|
||||
}
|
||||
else if(result == 'Delete'){
|
||||
console.log('delete')
|
||||
let val = {
|
||||
isActive:0,
|
||||
serviceId: row_obj.serviceId
|
||||
}
|
||||
formValue.push(val);
|
||||
}
|
||||
|
||||
// var d = this.customersList.length+1
|
||||
console.log(formValue[0])
|
||||
this._api.addFormDetails(formValue[0]).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
// this.customersList = res.data;
|
||||
this.getServicesList()
|
||||
}
|
||||
else{
|
||||
// this.customersList=[];
|
||||
// this.dataSource = null;
|
||||
// this.recordStatus=true;
|
||||
}
|
||||
}
|
||||
// , error => {this.errorMessage = <any> error});
|
||||
,error => {
|
||||
// this.errorMessage.push(error);
|
||||
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(error.html_format);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,67 +1,82 @@
|
||||
<mat-card class="settings-panel" >
|
||||
<h5 mat-dialog-title> <strong>{{action}} Users</strong>
|
||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||
><mat-icon>close</mat-icon></button></h5>
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let business of businessList" [value]="business.busId">
|
||||
{{business.busName}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
||||
<!-- <mat-error *ngIf="businessselect.hasError('required')">Please Business</mat-error>
|
||||
<mat-error *ngIf="businessselect.hasError('invalidValue')">Please choose any other</mat-error> -->
|
||||
<h5 mat-dialog-title> <strong>{{action}} Users</strong>
|
||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||
><mat-icon>close</mat-icon></button></h5>
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<input placeholder="Name" matInput formControlName="businessselect" readonly>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">Username is required</mat-error>
|
||||
<mat-error *ngIf="myError('businessselect', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [disabled]="true">
|
||||
<input placeholder="Role" matInput formControlName="role">
|
||||
<mat-error *ngIf="myError('role', 'required')">role is required</mat-error>
|
||||
<mat-error *ngIf="myError('role', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Name" matInput formControlName="userName">
|
||||
<mat-error *ngIf="myError('userName', 'required')">Username is required</mat-error>
|
||||
<mat-error *ngIf="myError('userName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder=" Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
<!-- <mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let business of businessList" [value]="business.busId">
|
||||
{{business.busName}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
||||
|
||||
</mat-form-field> -->
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
|
||||
<mat-label>Role</mat-label>
|
||||
<mat-select placeholder="Select Role" formControlName="role" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let roleNmae of role" [value]="roleNmae.name">
|
||||
{{roleNmae.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="text" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="Password" matInput formControlName="password">
|
||||
<mat-error *ngIf="myError('password', 'required')">Password is required</mat-error>
|
||||
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Name</mat-label>
|
||||
<input placeholder="Name" matInput formControlName="userName">
|
||||
<mat-error *ngIf="myError('userName', 'required')">Username is required</mat-error>
|
||||
<mat-error *ngIf="myError('userName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Email</mat-label>
|
||||
<input placeholder="Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Phone No</mat-label>
|
||||
<input matInput type="text" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Password</mat-label>
|
||||
<input placeholder="Password" matInput formControlName="password">
|
||||
<mat-error *ngIf="myError('password', 'required')">Password is required</mat-error>
|
||||
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||
<mat-error *ngIf="myError('confirmPassword', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
</form>
|
||||
</div>
|
||||
</ng-scrollbar>
|
||||
<ng-template #elseTemplate>
|
||||
Sure to delete <b>{{local_data.name}}</b>?
|
||||
</ng-template><br>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button (click)="doAction()" class="mat-green" mat-raised-button >{{action}}</button>
|
||||
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||
<mat-error *ngIf="myError('confirmPassword', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
</form>
|
||||
</div>
|
||||
</ng-scrollbar>
|
||||
<ng-template #elseTemplate>
|
||||
Sure to delete <b>{{local_data.name}}</b>?
|
||||
</ng-template><br>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button (click)="doAction()" class="mat-green" mat-raised-button >{{action}}</button>
|
||||
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ export class AddUserComponent implements OnInit {
|
||||
local_data:any;
|
||||
url: string | ArrayBuffer;
|
||||
businessList: any;
|
||||
public role = [{'name':'BADMIN'},{'name':'CONSULT'},{'name':'FRONTDESK'}]
|
||||
public role = [{'name':'BADMIN'},{'name':'PRACTITIONER'},{'name':'FRONTDESK'}]
|
||||
constructor(private router: Router,private formBuilder: FormBuilder,
|
||||
public dialogRef: MatDialogRef<AddUserComponent>,
|
||||
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData,public _bus:BusinessService) {
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
<mat-card class="settings-panel" >
|
||||
<h5 mat-dialog-title> <strong>{{action}} Users</strong>
|
||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||
><mat-icon>close</mat-icon></button></h5>
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<input placeholder="Name" matInput formControlName="businessselect" readonly>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">Username is required</mat-error>
|
||||
<mat-error *ngIf="myError('businessselect', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let business of businessList" [value]="business.busId">
|
||||
{{business.busName}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
||||
|
||||
</mat-form-field> -->
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane" [readonly]="true">
|
||||
<mat-label>Role</mat-label>
|
||||
<mat-select placeholder="Select Role" formControlName="businessselect" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let roleNmae of role" [value]="roleNmae.name">
|
||||
{{roleNmae.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="myError('businessselect', 'required')">role is required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Name</mat-label>
|
||||
<input placeholder="Name" matInput formControlName="userName">
|
||||
<mat-error *ngIf="myError('userName', 'required')">Username is required</mat-error>
|
||||
<mat-error *ngIf="myError('userName', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Email</mat-label>
|
||||
<input placeholder="Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||
Email is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Phone No</mat-label>
|
||||
<input matInput type="text" placeholder="Enter Phone No" formControlName="contactNo" id="contactNo">
|
||||
<mat-error *ngIf="myError('contactNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('contactNo', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Password</mat-label>
|
||||
<input placeholder="Password" matInput formControlName="password">
|
||||
<mat-error *ngIf="myError('password', 'required')">Password is required</mat-error>
|
||||
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||
<mat-error *ngIf="myError('confirmPassword', 'maxlength')">Limit exceed</mat-error>
|
||||
</mat-form-field> -->
|
||||
</form>
|
||||
</div>
|
||||
</ng-scrollbar>
|
||||
<ng-template #elseTemplate>
|
||||
Sure to delete <b>{{local_data.name}}</b>?
|
||||
</ng-template><br>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button (click)="doAction()" class="mat-green" mat-raised-button >{{action}}</button>
|
||||
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ export class SearchCategoryComponent implements OnInit {
|
||||
this._use.getUsersListDetails().subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
// let data = res['data'].filter(val => val.role == 'CONSULT')
|
||||
// let data = res['data'].filter(val => val.role == 'PRACTITIONER')
|
||||
this.usersList = this.consultants;
|
||||
console.log(this.usersList)
|
||||
}
|
||||
|
||||
@ -12,8 +12,8 @@ export class RoleMenuItemsPipe implements PipeTransform {
|
||||
switch(localStorage.getItem('user_role')){
|
||||
case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting");
|
||||
case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="appoinments" && val.state!="customers" && val.state!="consultants" && val.state != "consultant-setting");
|
||||
case 'CONSULT': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services");
|
||||
// case 'CONSULT':
|
||||
case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services");
|
||||
// case 'PRACTITIONER':
|
||||
// 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 '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list");
|
||||
|
||||
@ -93,30 +93,30 @@ const MENUITEMS : Menu[] = [
|
||||
// // {state: 'add-user-list', name: 'Add Users '},
|
||||
// ]
|
||||
},
|
||||
{
|
||||
state: 'consultant-setting',
|
||||
name: 'My Settings',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'business-centers',
|
||||
name: 'Centers',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'search-category',
|
||||
name: 'search Category',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'slot-booking',
|
||||
name: 'Slot Booking',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
}
|
||||
// {
|
||||
// state: 'consultant-setting',
|
||||
// name: 'My Settings',
|
||||
// type: 'link',
|
||||
// icon: 'settings_system_daydream'
|
||||
// },
|
||||
// {
|
||||
// state: 'business-centers',
|
||||
// name: 'Centers',
|
||||
// type: 'link',
|
||||
// icon: 'settings_system_daydream'
|
||||
// },
|
||||
// {
|
||||
// state: 'search-category',
|
||||
// name: 'search Category',
|
||||
// type: 'link',
|
||||
// icon: 'settings_system_daydream'
|
||||
// },
|
||||
// {
|
||||
// state: 'slot-booking',
|
||||
// name: 'Slot Booking',
|
||||
// type: 'link',
|
||||
// icon: 'settings_system_daydream'
|
||||
// }
|
||||
|
||||
];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user