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}}
</mat-option>
</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-form-field>
@ -115,7 +115,7 @@
}}
</mat-option>
</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-form-field>
<app-appointment-addcustomer (childButtonEvent)="receivedMessageHandler($event)"

View File

@ -105,16 +105,12 @@
<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-group class="right-align-tab-label" [@.disabled]="true" (selectedTabChange)="tabClick($event)">
<mat-tab>
<ng-template mat-tab-label>
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="p-gap" fxLayoutAlign="start center">
<span><i class="material-icons icons-info">&#xe7fd;</i>My Profile </span>
</div>
</div>
<i class="material-icons icons-info">&#xe7fd;</i>
My Profile
</ng-template>
<div class="staff">
<span class="staff-title">
@ -122,8 +118,8 @@
</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 *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)="save()" matTooltip="Submit" matTooltipPosition="right" ><mat-icon>done</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 class="tabIcon">done</mat-icon></button>
</div>
<div mat-dialog-content class="my-table" style="margin-top: 15px;margin-left: 10px;">
@ -574,7 +570,16 @@
</div>
</div>
</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>
<ng-template mat-tab-label>
<i class="material-icons icons">&#xe85d;</i> Appointment Booking Link

View File

@ -228,7 +228,7 @@ mat-tab-body {
}
//mat-tab1start
.icons-info{
margin-left: -4rem;
margin-left: -1rem;
margin-right: 1rem;
}
.staff{
@ -289,7 +289,7 @@ position: absolute;
}
//mat-tab2start
.icons-Hours{
margin-left: -2rem;
margin-left: -1rem;
margin-right: 1rem;
}
.working-hours{
@ -643,4 +643,13 @@ content: "\20B9";
.scrollHVtab3 {
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> <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]="getUserData.logo != '' ? image_view(getUserData.logo) : 'assets/images/userpic.png'" class="rad-full mb-1" width="100" height="100" alt="">

View File

@ -19,6 +19,14 @@ export class SessionService {
getForgotDetails(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> {
console.log(params.email)

View File

@ -5,6 +5,8 @@ import {Router} from "@angular/router";
import { NotifierService } from 'angular-notifier';
import { SessionService } from 'app/session-services/session.service';
import { OtpComponent } from '../otp/otp.component';
import { param } from 'jquery';
import { local } from 'd3';
@Component({
selector: 'ms-login-session',
@ -48,20 +50,20 @@ export class LoginComponent {
localStorage.setItem('user_role',res.role);
localStorage.setItem('email',JSON.stringify(auth))
localStorage.setItem('user_id',res.roleId
);
);
localStorage.setItem('busId',res.busId)
let user_role = localStorage.getItem('user_role')
if(res.role == 'PRACTITIONER'){
localStorage.setItem('busNameID',res.busId)
this.getUserDetails()
}else if(user_role == 'BIZADMIN'){
this.router.navigate(['/services'])
}else if(user_role == 'BIZADMIN'){
let param ={"busId": res.busId}
this.getServicesList(param)
// this.router.navigate(['/services'])
}else if(user_role != 'BIZADMIN' && res.role != 'PRACTITIONER'){
this.router.navigate(['/home'])
}
}
}
}else{
@ -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(){
let id = localStorage.getItem('user_id')
console.log(id)

View File

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