demo changes done

This commit is contained in:
Surendiran 2023-05-27 17:35:14 +05:30
parent b8ef670d4c
commit a2953d7502
7 changed files with 70 additions and 27 deletions

View File

@ -42,7 +42,7 @@
{{business.servicesName}} {{business.servicesName}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="service.hasError('required')">Please choose an Service</mat-error> <mat-error *ngIf="service.hasError('required')">Please choose a Service</mat-error>
<mat-error *ngIf="service.hasError('invalidValue')">Please choose any other</mat-error> <mat-error *ngIf="service.hasError('invalidValue')">Please choose any other</mat-error>
</mat-form-field> </mat-form-field>
@ -115,7 +115,7 @@
}} }}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="customer.hasError('required')">Please choose an Customer</mat-error> <mat-error *ngIf="customer.hasError('required')">Please choose a Customer</mat-error>
<mat-error *ngIf="customer.hasError('invalidValue')">Please choose any other</mat-error> <mat-error *ngIf="customer.hasError('invalidValue')">Please choose any other</mat-error>
</mat-form-field> </mat-form-field>
<app-appointment-addcustomer (childButtonEvent)="receivedMessageHandler($event)" <app-appointment-addcustomer (childButtonEvent)="receivedMessageHandler($event)"

View File

@ -105,16 +105,12 @@
<button *ngIf="userRole == 'FRONTDESK'" mat-mini-fab class="fabBack" (click)="backRoute(1)"> <button *ngIf="userRole == 'FRONTDESK'" mat-mini-fab class="fabBack" (click)="backRoute(1)">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>
<mat-tab-group [@.disabled]="true" (selectedTabChange)="tabClick($event)"> <mat-tab-group class="right-align-tab-label" [@.disabled]="true" (selectedTabChange)="tabClick($event)">
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<div fxLayout="row wrap"> <i class="material-icons icons-info">&#xe7fd;</i>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="p-gap" fxLayoutAlign="start center"> My Profile
<span><i class="material-icons icons-info">&#xe7fd;</i>My Profile </span>
</div>
</div>
</ng-template> </ng-template>
<div class="staff"> <div class="staff">
<span class="staff-title"> <span class="staff-title">
@ -122,8 +118,8 @@
</span> </span>
<button mat-icon-button matTooltip="Edit" style="padding: 4px 20px;" *ngIf="isEditable == false" (click)="edit_table(isEditable)" fileName="customers"><mat-icon >edit</mat-icon></button> <button mat-icon-button matTooltip="Edit" style="padding: 4px 20px;" *ngIf="isEditable == false" (click)="edit_table(isEditable)" fileName="customers"><mat-icon >edit</mat-icon></button>
<!-- <button mat-icon-button *ngIf="table[0].statement == statement_item && table[0].statement != 'Cash Flow Statement'" color="accent" matTooltip="Edit" matTooltipPosition="right" (click)="editandcancel(true,table[0].section)" ><mat-icon>edit</mat-icon></button> --> <!-- <button mat-icon-button *ngIf="table[0].statement == statement_item && table[0].statement != 'Cash Flow Statement'" color="accent" matTooltip="Edit" matTooltipPosition="right" (click)="editandcancel(true,table[0].section)" ><mat-icon>edit</mat-icon></button> -->
<button mat-icon-button color="accent" *ngIf="isEditable == true" (click)="edit_table(isEditable)" matTooltip="Cancel" matTooltipPosition="right" ><mat-icon>cancel_presentation</mat-icon></button> <button mat-icon-button color="accent" *ngIf="isEditable == true" (click)="edit_table(isEditable)" matTooltip="Cancel" matTooltipPosition="right" ><mat-icon class="tabIcon2">cancel_presentation</mat-icon></button>
<button mat-icon-button color="accent" *ngIf="isEditable == true" (click)="save()" matTooltip="Submit" matTooltipPosition="right" ><mat-icon>done</mat-icon></button> <button mat-icon-button color="accent" *ngIf="isEditable == true" (click)="save()" matTooltip="Submit" matTooltipPosition="right" ><mat-icon class="tabIcon">done</mat-icon></button>
</div> </div>
<div mat-dialog-content class="my-table" style="margin-top: 15px;margin-left: 10px;"> <div mat-dialog-content class="my-table" style="margin-top: 15px;margin-left: 10px;">
@ -574,7 +570,16 @@
</div> </div>
</div> </div>
</mat-tab> </mat-tab>
<!-- <mat-tab *ngIf="userRole == 'BIZADMIN'">
<ng-template mat-tab-label>
<i class="material-icons icons">&#xe7fb;</i>Edit Business
</ng-template>
<div class="staff" >
<span class="staff-title">
Edit Business
</span>
</div>
</mat-tab> -->
<mat-tab> <mat-tab>
<ng-template mat-tab-label> <ng-template mat-tab-label>
<i class="material-icons icons">&#xe85d;</i> Appointment Booking Link <i class="material-icons icons">&#xe85d;</i> Appointment Booking Link

View File

@ -228,7 +228,7 @@ mat-tab-body {
} }
//mat-tab1start //mat-tab1start
.icons-info{ .icons-info{
margin-left: -4rem; margin-left: -1rem;
margin-right: 1rem; margin-right: 1rem;
} }
.staff{ .staff{
@ -289,7 +289,7 @@ position: absolute;
} }
//mat-tab2start //mat-tab2start
.icons-Hours{ .icons-Hours{
margin-left: -2rem; margin-left: -1rem;
margin-right: 1rem; margin-right: 1rem;
} }
.working-hours{ .working-hours{
@ -644,3 +644,12 @@ content: "\20B9";
.scrollHVtab3 { .scrollHVtab3 {
height: calc(100vh - 190px) !important; height: calc(100vh - 190px) !important;
} }
::ng-deep .right-align-tab-label .mat-tab-label {
justify-content: flex-start !important;
}
.tabIcon{
color: green;
}
.tabIcon2{
color: red;
}

View File

@ -30,7 +30,7 @@
</div> </div>
</div> </div>
<div> <span class="hed-span text-capitalize">{{getUserData.userName}}</span></div> <div> <span class="hed-span text-capitalize">{{getUserData.userName}}</span></div>
<div> <span class="sub-span text-capitalize">- {{roleName}}</span></div> <div> <span class="sub-span text-capitalize">{{roleName}}</span></div>
<!-- <img *ngIf="getUserData.role == 'SADMIN'" src="assets/images/userpic.png" class="rad-full mb-1" width="100" height="100" alt=""> <!-- <img *ngIf="getUserData.role == 'SADMIN'" src="assets/images/userpic.png" class="rad-full mb-1" width="100" height="100" alt="">
<img *ngIf="getUserData.role != 'SADMIN'" [src]="getUserData.logo != '' ? image_view(getUserData.logo) : 'assets/images/userpic.png'" class="rad-full mb-1" width="100" height="100" alt=""> <img *ngIf="getUserData.role != 'SADMIN'" [src]="getUserData.logo != '' ? image_view(getUserData.logo) : 'assets/images/userpic.png'" class="rad-full mb-1" width="100" height="100" alt="">

View File

@ -20,6 +20,14 @@ export class SessionService {
this.nameSource.next(params); this.nameSource.next(params);
} }
getServicesListDetails(param): Observable<any> {
console.log('IN')
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",param)
// .pipe(
// catchError(this.handleError('role', []))
// )
}
getLoginToken(params): Observable<any> { getLoginToken(params): Observable<any> {
console.log(params.email) console.log(params.email)
return this._http.post<any>(this.apiUrl + "login",{'email':params.email,'password':params.password}) return this._http.post<any>(this.apiUrl + "login",{'email':params.email,'password':params.password})

View File

@ -5,6 +5,8 @@ import {Router} from "@angular/router";
import { NotifierService } from 'angular-notifier'; import { NotifierService } from 'angular-notifier';
import { SessionService } from 'app/session-services/session.service'; import { SessionService } from 'app/session-services/session.service';
import { OtpComponent } from '../otp/otp.component'; import { OtpComponent } from '../otp/otp.component';
import { param } from 'jquery';
import { local } from 'd3';
@Component({ @Component({
selector: 'ms-login-session', selector: 'ms-login-session',
@ -50,19 +52,19 @@ export class LoginComponent {
localStorage.setItem('user_id',res.roleId localStorage.setItem('user_id',res.roleId
); );
localStorage.setItem('busId',res.busId) localStorage.setItem('busId',res.busId)
let user_role = localStorage.getItem('user_role') let user_role = localStorage.getItem('user_role')
if(res.role == 'PRACTITIONER'){ if(res.role == 'PRACTITIONER'){
localStorage.setItem('busNameID',res.busId) localStorage.setItem('busNameID',res.busId)
this.getUserDetails() this.getUserDetails()
}else if(user_role == 'BIZADMIN'){ }else if(user_role == 'BIZADMIN'){
this.router.navigate(['/services']) let param ={"busId": res.busId}
this.getServicesList(param)
// this.router.navigate(['/services'])
}else if(user_role != 'BIZADMIN' && res.role != 'PRACTITIONER'){ }else if(user_role != 'BIZADMIN' && res.role != 'PRACTITIONER'){
this.router.navigate(['/home']) this.router.navigate(['/home'])
} }
} }
}else{ }else{
console.log(res.message) console.log(res.message)
@ -77,6 +79,29 @@ export class LoginComponent {
} }
getServicesList(param) {
// let param ={"busId": localStorage.getItem('busId')}
console.log(param)
this._ser.getServicesListDetails(param).subscribe(res => {
if (res.status == 200) {
console.log(res)
let result = res.data.filter((obj, index, self) =>
index === self.findIndex((t) => (
t.serviceId === obj.serviceId
))
)
console.log(result)
if(result.length > 0){
this.router.navigate(['/home'])
}else{
this.router.navigate(['/services'])
}
} else{
this.router.navigate(['/services'])
}
})
}
getUserDetails(){ getUserDetails(){
let id = localStorage.getItem('user_id') let id = localStorage.getItem('user_id')
console.log(id) console.log(id)

View File

@ -7,12 +7,8 @@ export const environment = {
production: false, production: false,
environmentName: 'Testing Environment',//Localhost Environment. environmentName: 'Testing Environment',//Localhost Environment.
// apiEndpoint:'http://venbainfotech.com:5000/api/', // apiEndpoint:'http://venbainfotech.com:5000/api/',
apiEndpoint:'http://192.168.1.10:8080/api/', // apiEndpoint:'http://192.168.1.14:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/', apiEndpoint:'https://api.venbait.in/api/',
// apiEndpoint:'http://venbainfotech.com:5000/api/',
apiEndpoint:'http://192.168.1.10:8080/api/',
// apiEndpoint:'https://api.venbait.in/api/',
//EndUser URL //EndUser URL
endUserUrl: window.location.origin+'/#/customer/', endUserUrl: window.location.origin+'/#/customer/',