Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend

This commit is contained in:
bitbucket 2023-04-21 18:37:55 +05:30
commit aaa50d98d6
45 changed files with 1332 additions and 110 deletions

View File

@ -45,6 +45,10 @@ export const AppRoutes: Routes = [{
path: 'customer-info',
loadChildren: () => import('./appoinment/appoinment.module').then(m => m.AppoinmentModule)
},
{
path: 'consultant-list',
loadChildren: () => import('./appoinment/front-desk/front-desk.module').then(m => m.FrontDeskModule)
}
]

View File

@ -5,6 +5,15 @@
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
</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 ">
<i style="font-size:24px" class="fa" [routerLink]="['/appoinment/calendar-list']">&#xf073;</i>
</div> -->

View File

@ -55,11 +55,19 @@ export class AppoinmentsListComponent implements OnInit {
pipe = new DatePipe('en-US');
isLoading = true
consultants: any = [];
selectPractitioner:any = [];
user_role: any=[];
constructor(private notifierService: NotifierService,public dialog: MatDialog, public _app:AppointmentsService) { }
ngOnInit(): void {
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() {
@ -75,11 +83,47 @@ export class AppoinmentsListComponent implements OnInit {
console.log(this.appointmentListSource)
}
getAppoinmentsList() {
let user_role = localStorage.getItem('user_role');
//this._pd.getTabStatusPdDetails(this.tabStatus)
let param ={"busId": localStorage.getItem('busId')}
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=[];
}
});
}
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 => {
if (res.status == 200) {
@ -211,7 +255,7 @@ export class AppoinmentsListComponent implements OnInit {
dialogRef.afterClosed().subscribe(result => {
console.log(result)
if(result == 0){
this.getAppoinmentsList()
this.getAppoinmentsList('')
}
// this.formAddUpdateAndDelete(result,result.data)
@ -262,7 +306,7 @@ export class AppoinmentsListComponent implements OnInit {
this._app.addFormDetails(formValue[0]).subscribe(res => {
if (res.status == 200) {
// this.appoinmentsList = res.data;
this.getAppoinmentsList()
this.getAppoinmentsList('')
if(result.event == 'Add'){
this.notifierService.notify('success', 'Appointment Added Successfully');
}else if(result.event == 'Update'){

View File

@ -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> {
return this._http.post(this.apiUrl + 'CreateAppoinments', addParams)
// .pipe(

View File

@ -22,6 +22,19 @@
<input matInput placeholder="Business" name="Business" formControlName="busname" readonly>
</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-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('invalidValue')">Please choose any other</mat-error>
</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-label>Choose a date</mat-label>

View File

@ -101,6 +101,8 @@ export class DialogBoxComponent implements OnInit {
customerId: any;
slotsResult: any;
ServiceId: any;
user_role: string;
consultants: any = [];
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
public dialogRef: MatDialogRef<DialogBoxComponent>,public _api:ConsultantService, public _con:ConsultantService,
@Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) {
@ -157,6 +159,8 @@ export class DialogBoxComponent implements OnInit {
// }
// })
this.user_role = localStorage.getItem('user_role');
let tmp=[]
for(let i=0;i<=5;i++){
var someDate = new Date();
@ -168,9 +172,14 @@ export class DialogBoxComponent implements OnInit {
console.log(tmp)
this.days= tmp
this.getSlots()
let userId = localStorage.getItem('user_id')
let busId = localStorage.getItem('busId')
this.getServicesList(userId, busId)
if(this.user_role != 'FRONTDESK'){
let userId = localStorage.getItem('user_id')
let busId = localStorage.getItem('busId')
this.getServicesList(userId, busId)
}else{
this.getCosultantList()
}
this.getApiData()
this.form = new FormGroup({
busname: new FormControl('', [Validators.required]),
@ -226,6 +235,27 @@ export class DialogBoxComponent implements OnInit {
public myError = (controlName: string, errorName: string) =>{
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(){
console.log(this.form.value);
@ -392,6 +422,7 @@ export class DialogBoxComponent implements OnInit {
}
getServicesList(id,busId) {
console.log(id,busId)
this.servicesList_array = []
//this._pd.getTabStatusPdDetails(this.tabStatus)
this._api.getServicesListDetails(id,busId).subscribe(res => {

View File

@ -68,15 +68,16 @@
</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>
</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>
<notifier-container></notifier-container>
<!-- </mat-card> -->

View File

@ -55,7 +55,7 @@
overflow: hidden!important;
}
.scrollHV {
height: calc(100vh - 150px);
height: calc(100vh - 83px);
}
:ng-deep .ng-scroll-viewport-wrapper{
right: -25px !important;

View File

@ -37,6 +37,10 @@ export class ConsultantService {
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> {
throw new Error('Method not implemented.');

View File

@ -13,6 +13,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { ConsultantSettingComponent } from './consultant-setting/consultant-setting.component';
import { NotifierModule, NotifierOptions } from 'angular-notifier';
import { UnavailabilityComponent } from './unavailability/unavailability.component';
import { SharedModule } from 'app/shared/shared.module';
const customNotifierOptions: NotifierOptions = {
@ -70,6 +71,7 @@ const customNotifierOptions: NotifierOptions = {
DemoMaterialModule,
NgScrollbarModule,
MatSidenavModule,
SharedModule,
MatFormFieldModule,
NotifierModule.withConfig(customNotifierOptions),

View File

@ -1,14 +1,106 @@
<!-- <div class="user-pro-wrap">
<div class="user-profile-thumb ">
<div class="user-i">
<img src="assets/images/userpic.png" class="rad-full mb-1" width="100" height="100" alt="">
<div> <span class="userpic">Sample</span></div>
<div> <span class="admin">Super Admin</span></div>
</div>
<div *ngIf="frontDeskHidden == 1 && userRole == 'FRONTDESK'">
<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)="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> -->
<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>
<ng-template mat-tab-label>
@ -43,10 +135,10 @@
<label>Role <span style="margin-left: 6.7rem;">-</span></label>
<a style="padding: 10px;">{{usersList.role}}</a>
</div>
<div class="form-group label-container">
<!-- <div class="form-group label-container">
<label>Password <span style="margin-left: 4rem;">-</span></label>
<a style="padding: 10px;">{{hashPassword(usersList.password)}}</a>
</div>
</div> -->
<div class="form-group label-container">
<label>Gender <span style="margin-left: 5.5rem;">-</span></label>
<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">
</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 class="clearfix"></div>
@ -487,5 +580,6 @@
</mat-tab>
</mat-tab-group>
</div>
<notifier-container></notifier-container>

View File

@ -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 {
display: flex;
flex-direction: column;
@ -333,6 +520,20 @@ height: 100%;
text-align: center;
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{
font-size: 14px;
color: #666!important;

View File

@ -46,7 +46,7 @@ export class ConsultantSettingComponent implements OnInit {
"designtion": null,
"gender": null,
"description":null,
"skills": null,
// "skills": null,
"caption": null,
"isActive": "1",
@ -74,12 +74,25 @@ export class ConsultantSettingComponent implements OnInit {
userRole:any=[];
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'}]
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) {}
ngOnInit() {
this.userRole = localStorage.getItem('user_role');
console.log( this.userRole )
if(this.userRole == 'FRONTDESK'){
this.frontDeskHidden = 1
this.getCosultantList()
}else{
this.getUsersList()
}
// this.openDialog('action','obj')
this.registerForm = this.formBuilder.group({
name: ['', Validators.required],
@ -93,11 +106,40 @@ export class ConsultantSettingComponent implements OnInit {
status: ['', 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) =>{
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.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() {
//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)
this._con.getUsersListDetails(id).subscribe(res => {
if (res.status == 200) {
this.usersList = res.data[0];
localStorage.setItem('practitioner',JSON.stringify( this.usersList))
localStorage.setItem('practitioner',JSON.stringify(this.usersList))
console.log(this.usersList)
if(this.usersList['practitionerInfos'].length==0){
this.usersList['practitionerInfos'] =[
@ -183,7 +234,7 @@ unavailability(action,obj) {
"designtion": null,
"gender": null,
"description":null,
"skills": null,
// "skills": null,
"caption": null,
"isActive": "1",
@ -208,7 +259,7 @@ unavailability(action,obj) {
}
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)
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
console.log(this.practitionerdetails)
@ -220,7 +271,7 @@ unavailability(action,obj) {
}
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.userName = this.usersList.userName
this.gender=this.practitionerdetails.gender
@ -243,9 +294,9 @@ unavailability(action,obj) {
} );
}
hashPassword(password: string){
return "*".repeat(6)
}
// hashPassword(password: string){
// return "*".repeat(password.length)
// }
getAssignedList(busId) {
this._api.getAssignedDetails(busId).subscribe(res => {
console.log(res)
@ -365,7 +416,13 @@ unavailability(action,obj) {
// param = {serviceId:"",userId:"",busId:"",active:1}
getCheckedService(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}
console.log(data)
this._api.getServiceCheckedDetails(data).subscribe(res => {
@ -379,7 +436,13 @@ unavailability(action,obj) {
save(){
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 userid = localStorage.getItem('user_id')
let tmp = [{"sunday":{"hours":[],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[],"breaks":[]}},{"wednesday":{"hours":[],"breaks":[]}},{"thursday":{"hours":[],"breaks":[]}},{"friday":{"hours":[],"breaks":[]}},{"saturday":{"hours":[],"breaks":[]}}]
let param: any = { "exp": this.exp,
// "id": this.id,
@ -391,7 +454,7 @@ unavailability(action,obj) {
"gender": this.gender,
"workingHours": JSON.stringify( tmp),
"description": this.description,
"skills": JSON.stringify(this.skills),
// "skills": JSON.stringify(this.skills),
"caption": this.caption,
"userName": this.userName,
"practitionerId":userid
@ -414,6 +477,7 @@ unavailability(action,obj) {
}
copyToClipBoard(message) {
this.copiedKey = 1
console.log(message)
this.notifierService.notify('success', 'Copied...!');
const selBox = document.createElement('textarea');

View File

@ -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>

View File

@ -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;
}
}

View File

@ -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();
});
});

View File

@ -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'])
}
}

View File

@ -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> -->

View File

@ -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;
}
}

View File

@ -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();
});
});

View File

@ -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)
// }
}

View File

@ -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 { }

View File

@ -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();
});
});

View File

@ -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', []))
// )
}
}

View 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 { }

View File

@ -18,16 +18,16 @@
</mat-select>
<mat-error *ngIf="myError('duration', 'required')">Duration is required</mat-error>
</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">
<input type="number" placeholder="Fees" matInput formControlName="fees">
<mat-error *ngIf="myError('fees', 'required')">Fees is required</mat-error>
<!-- <mat-error *ngIf="myError('fees', 'maxlength')">Limit exceed</mat-error> -->
</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>
Sure to delete <b>{{local_data.servicesName}}</b>?
</ng-template>

View File

@ -19,6 +19,13 @@ export class ApiServiceService {
// 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> {
console.log('IN')
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",{})

View File

@ -3,7 +3,16 @@
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Type Here" #input>
</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 "> -->
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
<ng-scrollbar class="scrollHV">

View File

@ -35,13 +35,20 @@ export class ServiceListComponent implements OnInit {
pageEvent: PageEvent;
servicesList: any[] = [];
isLoading = true;
user_role: any=[];
consultants: any=[];
constructor(private notifierService: NotifierService,public _api:ApiServiceService, public dialog: MatDialog) { }
ngOnInit(): void {
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() {
@ -57,9 +64,35 @@ export class ServiceListComponent implements OnInit {
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')}
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)
this._api.getServicesListDetails(param).subscribe(res => {
if (res.status == 200) {
@ -175,7 +208,8 @@ export class ServiceListComponent implements OnInit {
this._api.addFormDetails(formValue[0]).subscribe(res => {
if (res.status == 200) {
// this.customersList = res.data;
this.getServicesList()
let param ={"busId": localStorage.getItem('busId')}
this.getServicesList(param)
if(result.event == 'Add'){
this.notifierService.notify('success', 'Service Added Successfully');
}else if(result.event == 'Update'){

View File

@ -64,7 +64,7 @@
<mat-error *ngIf="myError('password', 'maxlength')">Limit exceed</mat-error>
</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>
<input matInput type="password" placeholder="Password" formControlName="password" [type]="hide ? 'password' : 'text'" name="password">
<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', 'maxlength')">Limit exceed</mat-error>
</mat-form-field> -->
</ng-scrollbar>
<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>
</ng-scrollbar>
</form>
</div>
<ng-template #elseTemplate>
Sure to delete <b>{{local_data.name}}</b>?
</ng-template><br>
</ng-template>
</mat-card>
<notifier-container></notifier-container>

View File

@ -33,7 +33,7 @@
overflow: hidden!important;
}
.scrollHV {
height: calc(100vh - 190px);
height: calc(100vh - 83px);
}

View File

@ -116,7 +116,8 @@ export class AddUserComponent implements OnInit {
// if( localStorage.getItem('go_admin') =='0'){
this.local_data.businessselect = 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')
}
@ -125,9 +126,11 @@ export class AddUserComponent implements OnInit {
if(this.action == 'Update'){
this.local_data.businessselect = this.local_data.busId
}
console.log( this.local_data)
this.form.patchValue(this.local_data)
}else {
console.log( this.local_data)
this.form.patchValue(this.local_data)
}
}
}
// , error => {this.errorMessage = <any> error});
@ -153,6 +156,10 @@ export class AddUserComponent implements OnInit {
submit(){
console.log(this.form.value);
if(this.action == 'Update'){
this.form.controls['password'].clearValidators();
this.form.controls['password'].updateValueAndValidity();
}
if (!this.form.valid) {
return;
}
@ -165,14 +172,18 @@ export class AddUserComponent implements OnInit {
if(this.action == 'Update'){
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('userName', tmp.userName);
this.formData.append('password', tmp.password);
this.formData.append('role', tmp.role);
this.formData.append('email', tmp.email);
this.formData.append('contactNo', tmp.contactNo);
this.formData.append('confirmPassword', tmp.password);
// this.formData.append('confirmPassword', tmp.password);
// tmp.confirmPassword = this.local_data.confirmPassword
this.dialogRef.close({event:this.action,data: this.formData});
console.log( this.formData,this.form.value);

View File

@ -65,10 +65,10 @@
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.userName}} </td>
</ng-container>
<ng-container matColumnDef="Password">
<!-- <ng-container matColumnDef="Password">
<th mat-header-cell *matHeaderCellDef class="font-color"> Password </th>
<td mat-cell *matCellDef="let element" class="element-spc"> {{hashPassword(element.password)}} </td>
</ng-container>
</ng-container> -->
<ng-container matColumnDef="mobile_no">
<th mat-header-cell *matHeaderCellDef class="font-color"> Mobile no </th>

View File

@ -44,7 +44,7 @@ const ELEMENT_DATA: UsersData[] = [
})
export class UserListComponent implements OnInit {
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;
addFormData: any;
length = 5;
@ -123,9 +123,9 @@ export class UserListComponent implements OnInit {
// alert(error.html_format);
})
}
hashPassword(password: string){
return "*".repeat(6)
}
// hashPassword(password: string){
// return "*".repeat(6)
// }
ngAfterViewInit() {
console.log(this.usersList,this.paginator)
this.usersList.paginator = this.paginator;
@ -197,7 +197,10 @@ export class UserListComponent implements OnInit {
});
dialogRef.afterClosed().subscribe(result => {
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){
console.log(result)
this.formAddUpdateAndDelete(result,result.data)
@ -258,7 +261,11 @@ export class UserListComponent implements OnInit {
this._use.addFormDetails(formValue[0]).subscribe(res => {
if (res.status == 200) {
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.getUsersList()
if(result.event == 'Add'){

View File

@ -68,14 +68,12 @@ export class ServiceListComponent implements OnInit {
console.log(params);
this.enduser.getcusServicesMapDetails(params).subscribe(res => {
if (res.status == 200) {
if (res.status == 200) {
console.log(res)
this.full_data = res['data']
this.full_data[0].business[0].busName
localStorage.setItem('busName',this.full_data[0].business[0].busName)
let tmp =[];
res['data'].forEach(element => {
// tmp.push(element.service)
element.service.forEach(e => {

View File

@ -10,7 +10,9 @@
<div class="branding text-center">
<!-- <h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> Appointment</span>
</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>
</div>

View File

@ -10,9 +10,10 @@ export class RoleMenuItemsPipe implements PipeTransform {
// // this is for horizontal menu filter
// if(type=="1"){
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 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="users" && val.state!="consultants" && val.state!="appoinments");
case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && 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!="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" && 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 '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");

View File

@ -36,4 +36,8 @@ export class SessionService {
// 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})
}
}

View File

@ -50,10 +50,16 @@ export class LoginComponent {
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'])
}
}
}else{
console.log(res.message)
// 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 {
const dialogRef = this.dialog.open(OtpComponent, {
width: '250px',

View File

@ -117,7 +117,13 @@ const HORIZONTALMENUITEMS = [
name: 'Slot Booking',
type: 'link',
icon: 'settings_system_daydream'
}
},
{
state: 'consultant-list',
name: 'Consultant List',
type: 'link',
icon: 'settings_system_daydream'
},
];

View File

@ -99,6 +99,12 @@ const MENUITEMS : Menu[] = [
type: 'link',
icon: 'settings_system_daydream'
},
{
state: 'consultant-list',
name: 'Consultant List',
type: 'link',
icon: 'settings_system_daydream'
},
// {
// state: 'business-centers',
// name: 'Centers',

View File

@ -19,7 +19,7 @@ export class SearchFilterPipe implements PipeTransform {
return it.busName.toLowerCase().includes(filterdata);
}else if(name == 'consultants'){
return it.userName.toLowerCase().includes(filterdata);
}
}
});
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,9 @@ export const environment = {
// apiEndpoint:'http://192.168.1.20:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/',
// apiEndpoint:'http://venbainfotech.com:5000/api/',
apiEndpoint:'http://192.168.1.7:8080/api/',
//apiEndpoint:'https://api.venbait.in/api/',
apiEndpoint:'http://192.168.1.20:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/',
//EndUser URL
endUserUrl:'https://venbainfotech.com/appointment/#/customer/',