Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
3d096b4cf3
20664
ng-seed/package-lock.json
generated
20664
ng-seed/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -78,11 +78,21 @@ export class AppoinmentsListComponent implements OnInit {
|
||||
getAppoinmentsList() {
|
||||
let user_role = localStorage.getItem('user_role');
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
this._app.getAppoinmentsListDetails().subscribe(res => {
|
||||
let param ={"busId": localStorage.getItem('busId')}
|
||||
console.log(param)
|
||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||
|
||||
if (res.status == 200) {
|
||||
this.isLoading = false
|
||||
this.appoinmentsList = res.data;
|
||||
localStorage.setItem('busId', res.data[0].busId
|
||||
)
|
||||
console.log(this.appoinmentsList)
|
||||
this.appointmentListLength = res.data.length;
|
||||
console.log(this.appointmentListLength)
|
||||
this.appointmentListSource['data'] = this.appoinmentsList;
|
||||
console.log(this.appointmentListSource)
|
||||
this.recordStatus=false;
|
||||
console.log(this.appoinmentsList)
|
||||
|
||||
this.appoinmentsList.forEach(element => {
|
||||
@ -122,6 +132,7 @@ export class AppoinmentsListComponent implements OnInit {
|
||||
this.recordStatus=false;
|
||||
}
|
||||
else{
|
||||
this.isLoading = false
|
||||
this.appoinmentsList=[];
|
||||
this.appointmentListLength= null;
|
||||
this.recordStatus=true;
|
||||
|
||||
@ -10,7 +10,8 @@ import { DialogBoxComponent } from './dialog-box/dialog-box.component';
|
||||
import { DemoMaterialModule } from 'app/shared/demo.module';
|
||||
import { NgScrollbarModule } from 'ngx-scrollbar';
|
||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||
import { DataTableModule } from 'ornamentum'
|
||||
import { DataTableModule } from 'ornamentum';
|
||||
import { AppointmentAddcustomerComponent } from './appointment-addcustomer/appointment-addcustomer.component'
|
||||
// import CalendarTodayIcon from '@material-ui/icons/CalendarToday';
|
||||
|
||||
|
||||
@ -58,7 +59,8 @@ const customNotifierOptions: NotifierOptions = {
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppoinmentsListComponent,
|
||||
DialogBoxComponent
|
||||
DialogBoxComponent,
|
||||
AppointmentAddcustomerComponent
|
||||
],
|
||||
imports: [
|
||||
DemoMaterialModule,
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
|
||||
<mat-card class="cardDesign2" >
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<div class="pad">
|
||||
<h6 class="new">+ New Customer <button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" ><mat-icon>close</mat-icon></button></h6>
|
||||
|
||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||
<mat-label>Name</mat-label>
|
||||
<input placeholder=" Name" formControlName="name" matInput>
|
||||
<!-- <mat-error *ngIf="myError('cusName', 'required')">Name is required</mat-error>
|
||||
<mat-error *ngIf="myError('cusName', 'maxlength')">Limit exceed</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||
<mat-label>Email</mat-label>
|
||||
<input type="email" placeholder=" Email" formControlName="email" matInput >
|
||||
<!-- <mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="myError('email', 'required')">email is required</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" class="card-mat-pane">
|
||||
<mat-label>Phone</mat-label>
|
||||
<input placeholder=" Phone" matInput formControlName="phoneNo">
|
||||
<!-- <mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="popup-button">
|
||||
<!-- <span class="buttons cancel" (click)="close()">Cancel</span> -->
|
||||
<button type="button"class="buttons cancel" (click)="close()" >Cancel</button>
|
||||
<button type="submit"class="buttons add" (click)="save()" >Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
@ -0,0 +1,253 @@
|
||||
$color_red_orange_approx: #107c14;
|
||||
$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;
|
||||
$tem-color : #217e69;
|
||||
.mat-pane{
|
||||
width: 27rem;
|
||||
}
|
||||
.button{
|
||||
margin-bottom: 1rem;
|
||||
background-color: #ffff!important;
|
||||
margin-top: -1rem;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
::ng-deep .mat-card.settings-panel {
|
||||
position: inherit;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
top: 58px;
|
||||
}
|
||||
|
||||
::ng-deep body .mat-card {
|
||||
box-shadow:none!important;
|
||||
}
|
||||
|
||||
// @include media-breakpoint-down(lg) {
|
||||
// padding-top: 150px;
|
||||
// }
|
||||
// @include media-breakpoint-down(md) {
|
||||
// padding-top: 100px;
|
||||
// }
|
||||
// @include media-breakpoint-down(sm) {
|
||||
// padding-top: 100px;
|
||||
// }
|
||||
|
||||
|
||||
// @media only screen and (max-width: 600px) {
|
||||
// .cdk-overlay-pane{
|
||||
// width: 90%!important;
|
||||
// }
|
||||
// }
|
||||
|
||||
@media (max-width: 959px){
|
||||
.cdk-overlay-pane{
|
||||
width: 90%!important;
|
||||
}
|
||||
}
|
||||
|
||||
.field{
|
||||
display: flex;
|
||||
}
|
||||
.label-container{
|
||||
flex: 1;
|
||||
color: #666;
|
||||
position: relative;
|
||||
text-transform: capitalize;
|
||||
width: 100px;
|
||||
flex: none;
|
||||
margin-right: 20px;
|
||||
align-self: flex-start;
|
||||
padding-top: 20px;
|
||||
box-sizing: border-box;
|
||||
line-height: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.Date-container{
|
||||
margin-right: 40px!important;
|
||||
}
|
||||
// ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper {
|
||||
// margin: 0.25em 0;
|
||||
// width: 175%!important;
|
||||
// }
|
||||
.mate{
|
||||
width: 43% !important;
|
||||
}
|
||||
.date-marge{
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
.field-inline{
|
||||
display: inline-flex;
|
||||
}
|
||||
// ::ng-deep .swal2-height-auto {
|
||||
// // height: auto!important;
|
||||
// }
|
||||
::ng-deep .mat-dialog-content {
|
||||
max-height: 75vh!important;
|
||||
overflow: unset!important;
|
||||
// overflow: hidden!important;
|
||||
}
|
||||
::ng-deep .mat-dialog-container{
|
||||
overflow: hidden!important;
|
||||
}
|
||||
.scrollHV {
|
||||
height: calc(100vh - 190px);
|
||||
}
|
||||
.notes{
|
||||
margin-left: 7.5rem;
|
||||
margin-top: 2rem;
|
||||
color: #666;
|
||||
}
|
||||
//popup
|
||||
.card {
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
|
||||
transition: 0.3s;
|
||||
width: 100%;
|
||||
// padding: 10px;
|
||||
}
|
||||
.topnav {
|
||||
overflow: hidden;
|
||||
background: #52518F;
|
||||
color: #ffff;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
// display: flex;
|
||||
}
|
||||
.days{
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
}
|
||||
// .flexxx{
|
||||
|
||||
// display: flex;
|
||||
// // margin-top: 1rem;
|
||||
// // border-top:1px solid #ccc;
|
||||
// }
|
||||
// .date-time{
|
||||
// position: absolute;
|
||||
// // top: -11px;
|
||||
// bottom: 0px;
|
||||
// }
|
||||
// .date-position{
|
||||
// position: relative;
|
||||
// }
|
||||
.add-customer{
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.navStyle{
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
background-color: #227f6e;
|
||||
color: #fff;
|
||||
}
|
||||
.innerdivs{
|
||||
width:100%;
|
||||
// float:left;
|
||||
}
|
||||
.innerdivs2{
|
||||
width:100%;
|
||||
// float:left;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
.cardDesign{
|
||||
border: 1px solid #e8edef;
|
||||
width: 89%;
|
||||
background-color: #227f6e21;
|
||||
// box-shadow: 0 2px 0 rgb(0 0 0 / 3%)
|
||||
}
|
||||
.hoverButton{
|
||||
background: $white;
|
||||
// box-shadow: 0 2px 6px $tem-color;
|
||||
transition: all 0.1s ease-in-out 0s;
|
||||
&:hover {
|
||||
box-shadow: 0 0 8px $tem-color;
|
||||
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
.primary{
|
||||
background-color: #00866e00;
|
||||
color: brown;
|
||||
width: auto;
|
||||
border: 1px solid brown;
|
||||
cursor: pointer;
|
||||
}
|
||||
.clickedSlot{
|
||||
color: white !important;
|
||||
background-color: brown !important;
|
||||
cursor: pointer !important;
|
||||
width: auto;
|
||||
}
|
||||
.bookedSlot{
|
||||
background-color: darkgrey;
|
||||
color: white;
|
||||
width: 6rem;
|
||||
cursor: no-drop !important;
|
||||
}
|
||||
.newCustomer{
|
||||
color: #227f6e;
|
||||
text-align: center;
|
||||
border: 1px solid #e8edef;
|
||||
}
|
||||
|
||||
.cardDesign2{
|
||||
border: 1px dashed #227f6e;
|
||||
width: 75%;
|
||||
height: 337px;
|
||||
margin-left: 3rem;
|
||||
background-color: #fcfcfc;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.card-mat-pane{
|
||||
width: 20rem;
|
||||
}
|
||||
.new{
|
||||
color: #227f6e;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.popup-button {
|
||||
// margin-top: 2rem;
|
||||
width: 100%;
|
||||
}
|
||||
.cancel {
|
||||
background: #F5F5F5;
|
||||
color: #111;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.buttons {
|
||||
width: 50%;
|
||||
background: #FFF;
|
||||
color: #111;
|
||||
font-size: 15px;
|
||||
// font-family: zohopuvi-medium;
|
||||
text-align: center;
|
||||
border-top: 1px solid #E2E2E2;
|
||||
padding: 10px;
|
||||
-webkit-transition: all .2s ease-in;
|
||||
-moz-transition: all .2s ease-in;
|
||||
transition: all .2s ease-in;
|
||||
border: 0;
|
||||
}
|
||||
.add {
|
||||
background-color: #4caf50;
|
||||
color: #FFF;
|
||||
border-top: 1px solid #4caf50;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.pad{
|
||||
padding: 20px !important;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AppointmentAddcustomerComponent } from './appointment-addcustomer.component';
|
||||
|
||||
describe('AppointmentAddcustomerComponent', () => {
|
||||
let component: AppointmentAddcustomerComponent;
|
||||
let fixture: ComponentFixture<AppointmentAddcustomerComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AppointmentAddcustomerComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AppointmentAddcustomerComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,52 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { AppointmentsService } from '../appointments-service/appointments.service';
|
||||
import { CustomersService } from 'app/appoinment/customers/customers-service/customers.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-appointment-addcustomer',
|
||||
templateUrl: './appointment-addcustomer.component.html',
|
||||
styleUrls: ['./appointment-addcustomer.component.scss']
|
||||
})
|
||||
export class AppointmentAddcustomerComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
@Output() childButtonEvent = new EventEmitter();
|
||||
constructor(public _app:AppointmentsService,public _cus:CustomersService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form = new FormGroup({
|
||||
name: new FormControl('', [Validators.required]),
|
||||
email: new FormControl('', [Validators.required]),
|
||||
phoneNo: new FormControl('', [Validators.required]),
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
save(){
|
||||
|
||||
}
|
||||
close(){
|
||||
|
||||
}
|
||||
submit(){
|
||||
|
||||
console.log(this.form.value)
|
||||
|
||||
|
||||
|
||||
let form ={
|
||||
"cusName":this.form.value.name,
|
||||
"email":this.form.value.email,
|
||||
"phoneNo":this.form.value.phoneNo,
|
||||
"busId":localStorage.getItem('busId')
|
||||
|
||||
}
|
||||
this._cus.addFormDetails(form).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.childButtonEvent.emit(res);
|
||||
// this._app.customerlist.next(res)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,20 +1,22 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Observable } from 'rxjs';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppointmentsService {
|
||||
|
||||
|
||||
public customerlist:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
||||
public customerlist_observable$ = this.customerlist.asObservable();
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
constructor(private _http: HttpClient) { }
|
||||
|
||||
getAppoinmentsListDetails(): Observable<any> {
|
||||
getAppoinmentsListDetails(param): Observable<any> {
|
||||
console.log('IN')
|
||||
return this._http.get<any[]>(this.apiUrl + "getAppoinmentsDetails")
|
||||
return this._http.post<any[]>(this.apiUrl + "getAppoinmentsDetails",param)
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
@ -33,6 +35,10 @@ export class AppointmentsService {
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
getSlots(Params){
|
||||
|
||||
return this._http.post(this.apiUrl + 'getSlots', Params)
|
||||
}
|
||||
|
||||
|
||||
handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable<any>) => import("rxjs").ObservableInput<any> {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<ng-scrollbar class="scrollHV">
|
||||
<div mat-dialog-content class="my-table">
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane">
|
||||
<!-- <mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<mat-select placeholder="Select Business" formControlName="busname" required>
|
||||
<mat-option *ngFor="let business of name" [value]="business.busname">
|
||||
@ -15,21 +15,28 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="service.hasError('required')">Please choose an Business</mat-error>
|
||||
<mat-error *ngIf="service.hasError('invalidValue')">Please choose any other</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Business</mat-label>
|
||||
<input matInput placeholder="Business" name="Business" formControlName="busname" readonly>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Service</mat-label>
|
||||
<mat-select placeholder="Select Service" formControlName="service" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let business of select" [value]="business.service">
|
||||
{{business.service}}
|
||||
<mat-option *ngFor="let business of servicesList_array" (click)="serviceData(business)" [value]="business.serviceId
|
||||
">
|
||||
{{business.servicesName}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="service.hasError('required')">Please choose an Service</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-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Practitioner</mat-label>
|
||||
<mat-select placeholder="Select Practitioner" formControlName="practitioner" required>
|
||||
<mat-option>--</mat-option>
|
||||
@ -39,7 +46,12 @@
|
||||
</mat-select>
|
||||
<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> -->
|
||||
<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>
|
||||
@ -49,7 +61,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="mate date-marge" (click)="toggle()" id="bt">
|
||||
<mat-label>Choose a Time</mat-label>
|
||||
<input matInput placeholder="Select Time" name="week" formControlName="appoinmentTime">
|
||||
<input matInput placeholder="Select Time" name="week" [readonly]="!form.get('service').value" formControlName="appoinmentTime">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-card class="cardDesign" *ngIf="show">
|
||||
@ -58,8 +70,8 @@
|
||||
</div>
|
||||
<div class="innerdivs2" >
|
||||
<!-- <button *ngFor="let slot of slots;let i=index" mat-raised-button class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i,'clickedSlot':slotIndex == i } " (click)="toggleActive($event,slot,i)" >{{slot | date:'shortTime'}}</button> -->
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >09:30am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >09:45am</button>
|
||||
<button type="button" *ngFor="let slot of slots;let i=index" mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" (click)="toggleActive($event,slot,i)">{{slot | date:'shortTime'}}</button>
|
||||
<!-- <button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >09:45am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >10:00am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >10:15am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >10:30am</button>
|
||||
@ -67,7 +79,7 @@
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >11:00am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >11:15am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >11:30am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >11:45am</button>
|
||||
<button mat-raised-button class="mr-1 mt-1 hoverButton buttontimeline" >11:45am</button> -->
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
@ -76,54 +88,22 @@
|
||||
<mat-select placeholder="Select Customer" formControlName="customer" required>
|
||||
<!-- <div class="add-customer"> Add customer</div> -->
|
||||
<mat-option class="newCustomer" (click)="addCustomerList(1)">+ New Customer</mat-option>
|
||||
<mat-option *ngFor="let business of customers" [value]="business.customer">
|
||||
{{business.customer}}
|
||||
<mat-option *ngFor="let business of customersList" [value]="business.id" (click)="customerIdvalue(business.id)" >
|
||||
{{business.cusName
|
||||
}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="customer.hasError('required')">Please choose an Customer</mat-error>
|
||||
<mat-error *ngIf="customer.hasError('invalidValue')">Please choose any other</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-card class="cardDesign2" *ngIf="customerCard == 1">
|
||||
<div class="pad">
|
||||
<h6 class="new">+ New Customer <button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="addCustomerList(0)"><mat-icon>close</mat-icon></button></h6>
|
||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||
<mat-label>Name</mat-label>
|
||||
<input placeholder=" Name" matInput>
|
||||
<!-- <mat-error *ngIf="myError('cusName', 'required')">Name is required</mat-error>
|
||||
<mat-error *ngIf="myError('cusName', 'maxlength')">Limit exceed</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||
<mat-label>Email</mat-label>
|
||||
<input type="email" placeholder=" Email" matInput >
|
||||
<!-- <mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||
Please enter a valid email address
|
||||
</mat-error>
|
||||
<mat-error *ngIf="myError('email', 'required')">email is required</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" class="card-mat-pane">
|
||||
<mat-label>Phone</mat-label>
|
||||
<input placeholder=" Phone" matInput >
|
||||
<!-- <mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error> -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="popup-button">
|
||||
<span class="buttons cancel" (click)="close()">Cancel</span>
|
||||
<span (click)="save()" class="buttons add">Save</span>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane">
|
||||
<app-appointment-addcustomer (childButtonEvent)="receivedMessageHandler($event)"
|
||||
(onInitEvent)="receiveAutoMsgHandler($event)" *ngIf="customerCard == 1"></app-appointment-addcustomer>
|
||||
|
||||
<!-- <mat-form-field appearance="outline" class="mat-pane">
|
||||
<mat-label>Customer</mat-label>
|
||||
<mat-label>Description</mat-label>
|
||||
<textarea matInput rows="5" cols="40" placeholder="Description" formControlName="note"></textarea>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<div class="notes">
|
||||
<input type="checkbox" id="scales" name="scales" checked>
|
||||
@ -141,4 +121,5 @@
|
||||
<button mat-button type="submit" class="mat-green" mat-raised-button >{{action}}</button>
|
||||
<button mat-button (click)="closeDialog()" >Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
@ -2,6 +2,12 @@ import { Component, Inject, OnInit, Optional } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { Router } from '@angular/router';
|
||||
import { AppointmentsService } from '../appointments-service/appointments.service';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { ConsultantService } from 'app/appoinment/consultant-setting/consultant-service/consultant.service';
|
||||
import { CustomersService } from 'app/appoinment/customers/customers-service/customers.service';
|
||||
import { EndUserService } from 'app/end-user/end-user.service';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
export interface UsersData {
|
||||
// id: number;
|
||||
busname: string;
|
||||
@ -78,28 +84,30 @@ export class DialogBoxComponent implements OnInit {
|
||||
{staff: 'Devi.k'},
|
||||
];
|
||||
appoinmentSlots = new FormControl('', [Validators.required]);
|
||||
slots = [
|
||||
{appoinmentSlots: '9AM - 9.30AM'},
|
||||
{appoinmentSlots: '10AM - 10.30AM'},
|
||||
{appoinmentSlots: '11AM - 11.30AM'},
|
||||
{appoinmentSlots: '12AM - 12.30AM'},
|
||||
{appoinmentSlots: '01PM - 01.30PM'},
|
||||
{appoinmentSlots: '02PM - 02.30PM'},
|
||||
{appoinmentSlots: '03PM - 03.30PM'},
|
||||
{appoinmentSlots: '04PM - 04.30PM'},
|
||||
{appoinmentSlots: '05PM - 05.30PM'},
|
||||
{appoinmentSlots: '06PM - 06.30PM'},
|
||||
{appoinmentSlots: '07PM - 07.30PM'},
|
||||
];
|
||||
slots:any =[];
|
||||
|
||||
clicks:any = 0;
|
||||
customerCard: any;
|
||||
constructor(private router: Router,private formBuilder: FormBuilder,
|
||||
public dialogRef: MatDialogRef<DialogBoxComponent>,
|
||||
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData) {
|
||||
slot_array: any;
|
||||
date: any;
|
||||
servicesList_array: any[];
|
||||
servicesList_data: any;
|
||||
assignService: any=[];
|
||||
duration: any;
|
||||
userData: any;
|
||||
appoinmentsIds: any=[];
|
||||
customersList: any;
|
||||
customerId: any;
|
||||
slotsResult: any;
|
||||
ServiceId: 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) {
|
||||
console.log(data);
|
||||
this.local_data = {...data};
|
||||
this.action = this.local_data.action;
|
||||
|
||||
|
||||
}
|
||||
get f(){
|
||||
return this.form.controls;
|
||||
@ -139,6 +147,20 @@ export class DialogBoxComponent implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
// this._app.customerlist_observable$.subscribe((res) => {
|
||||
// console.log('cus', res);
|
||||
|
||||
// if(res){
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// })
|
||||
this.getSlots()
|
||||
let userId = localStorage.getItem('user_id')
|
||||
let busId = localStorage.getItem('busId')
|
||||
this.getServicesList(userId, busId)
|
||||
this.getApiData()
|
||||
this.form = new FormGroup({
|
||||
busname: new FormControl('', [Validators.required]),
|
||||
service: new FormControl('', [Validators.required]),
|
||||
@ -146,23 +168,63 @@ export class DialogBoxComponent implements OnInit {
|
||||
appoinmentDate: new FormControl('', [Validators.required]),
|
||||
appoinmentTime: new FormControl('', [Validators.required]),
|
||||
customer: new FormControl('', [Validators.required]),
|
||||
note: new FormControl('', [Validators.required]),
|
||||
// note: new FormControl('', [Validators.required]),
|
||||
|
||||
workspace: new FormControl('', [Validators.required]),
|
||||
staff: new FormControl('', [Validators.required]),
|
||||
slot: new FormControl('', [Validators.required]),
|
||||
|
||||
|
||||
|
||||
appoinmentSlots: new FormControl('', [Validators.required]),
|
||||
|
||||
});
|
||||
console.log(this.local_data, this.selects)
|
||||
// this.form.controls['note'].setValue('Sample')
|
||||
this.form.patchValue(this.local_data)
|
||||
let id = localStorage.getItem('user_id')
|
||||
console.log(id)
|
||||
this._con.getUsersListDetails(id).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
|
||||
this.userData = res.data[0]
|
||||
this.form.controls['busname'].setValue( this.userData.BusinessDetails[0].busName
|
||||
);
|
||||
|
||||
this.form.controls['practitioner'].setValue( this.userData.userName);
|
||||
}
|
||||
})
|
||||
}
|
||||
public myError = (controlName: string, errorName: string) =>{
|
||||
return this.form.controls[controlName].hasError(errorName);
|
||||
}
|
||||
submit(){
|
||||
console.log(this.form.value);
|
||||
|
||||
let paramsmap= {
|
||||
"serviceId": ""+this.ServiceId+"",
|
||||
"userId":localStorage.getItem('user_id'),
|
||||
"busId": localStorage.getItem('busId')
|
||||
}
|
||||
this.end_user.CreatecusServicesMapDetails(paramsmap).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
let serviceMap = res['data'][0].id
|
||||
let paramsData= {
|
||||
"busId": localStorage.getItem('busId'),
|
||||
"cusId": this.customerId,
|
||||
"appoinmentDate": this.form.value.appoinmentDate,
|
||||
"appoinmentTime": this.form.value.appoinmentTime,
|
||||
"serviceMap":serviceMap,
|
||||
"appoinmentSlots": this.slotsResult,
|
||||
//"servicemap" :this.bookedAppointment_servicemap
|
||||
}
|
||||
console.log(paramsData)
|
||||
this._app.addFormDetails(paramsData).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||
this.dialogRef.close();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -189,4 +251,150 @@ export class DialogBoxComponent implements OnInit {
|
||||
save(){
|
||||
|
||||
}
|
||||
|
||||
getSlots(){
|
||||
let id = localStorage.getItem('user_id')
|
||||
let params ={"id": id}
|
||||
this._app.getSlots(params).subscribe((res:any) => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let data = res['data'];
|
||||
this.slots = data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
toggleActive(event:any,param:any,i:any){
|
||||
console.log(event,param,i)
|
||||
this.slot_array =[];
|
||||
// debugger;
|
||||
// // event.preventDefault();
|
||||
// this.slotIndex = i
|
||||
// this.slotTime = param
|
||||
let resultDate = new DatePipe('en-US').transform(param, 'shortTime')
|
||||
this.form.controls['appoinmentTime'].setValue(resultDate)
|
||||
this.date= param
|
||||
console.log(this.date,param,this.duration)
|
||||
let thirtyMinutes = this.duration * 60 * 1000; // convert 30 minutes to milliseconds
|
||||
let date1 = new Date(param);
|
||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||
console.log(date1);
|
||||
console.log(date2);
|
||||
const currentTime = new Date(); // Get the current time
|
||||
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
||||
|
||||
const rangeDate = new Date(date2);
|
||||
|
||||
const resultArray = this.slots.filter(slot => {
|
||||
const date = new Date(slot);
|
||||
return date >= rangeDate;
|
||||
});
|
||||
|
||||
const firstSlt = new Date(date1);
|
||||
const lastSlt = new Date( resultArray[0]);
|
||||
const filteredTimes = this.slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
||||
|
||||
console.log(resultArray,filteredTimes);
|
||||
let result = filteredTimes.pop();
|
||||
console.log(result);
|
||||
this.slotsResult = filteredTimes
|
||||
this.show = false;
|
||||
// this.slots.forEach(element => {
|
||||
// if(element <date2){
|
||||
// console.log(element);
|
||||
// }
|
||||
// });
|
||||
|
||||
this.slot_array.push({date:this.date,slots:filteredTimes})
|
||||
}
|
||||
|
||||
getServicesList(id,busId) {
|
||||
this.servicesList_array = []
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
this._api.getServicesListDetails(id,busId).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.servicesList_data = res.data;
|
||||
res['data'].forEach(element => {
|
||||
// tmp.push(element.service)
|
||||
element.service.forEach(e => {
|
||||
console.log(e)
|
||||
this.servicesList_array.push(e)
|
||||
this.assignService.push(e.servicesName)
|
||||
});
|
||||
});
|
||||
console.log(this.servicesList_array)
|
||||
}
|
||||
// this.getAssignedList(this.usersList.busId)
|
||||
});
|
||||
// this.assignService = this.checkedArray
|
||||
}
|
||||
serviceData(data){
|
||||
this.ServiceId = data.serviceId
|
||||
|
||||
this.duration = data.duration
|
||||
|
||||
}
|
||||
|
||||
getApiData(){
|
||||
let param ={"busId": localStorage.getItem('busId')}
|
||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
let appoinmentsList = res.data;
|
||||
let id = localStorage.getItem('user_id')
|
||||
console.log(id)
|
||||
console.log(appoinmentsList)
|
||||
let filter = appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"]
|
||||
== id})
|
||||
console.log(filter)
|
||||
filter.forEach(element => {
|
||||
this.appoinmentsIds.push( element.customer[0].id)
|
||||
});
|
||||
this.getCustomerDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
getCustomerDetails(){
|
||||
this._cus.getCustomersListDetails().subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
|
||||
this.customersList = res.data;
|
||||
|
||||
|
||||
console.log(this.customersList,this.appoinmentsIds)
|
||||
let user_role = localStorage.getItem('user_role');
|
||||
if(user_role == 'PRACTITIONER'){
|
||||
const activeIds = this.appoinmentsIds
|
||||
const serviceList = this.customersList
|
||||
console.log(activeIds,serviceList)
|
||||
|
||||
const result = serviceList.filter(({id}) => activeIds.includes(id));
|
||||
console.log(result)
|
||||
this.customersList = result
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
receivedMessageHandler(res) {
|
||||
|
||||
console.log(res)
|
||||
this.customersList.push(res.data)
|
||||
this.customerId = res.data.id
|
||||
this.form.controls['customer'].setValue( res.data.id);
|
||||
this.customerCard = 0
|
||||
}
|
||||
|
||||
receiveAutoMsgHandler(p) {
|
||||
console.log(p)
|
||||
}
|
||||
customerIdvalue(id){
|
||||
console.log(id)
|
||||
this.customerId = id
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
<div mat-dialog-content class="my-table">
|
||||
|
||||
<mat-form-field appearance="outline" *ngIf="action != 'Delete'; else elseTemplate" class="mat-pane">
|
||||
<mat-label>Name</mat-label>
|
||||
<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">
|
||||
<mat-label>Email</mat-label>
|
||||
<input type="email" 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
|
||||
@ -30,16 +32,19 @@
|
||||
<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>Address</mat-label>
|
||||
<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">
|
||||
<mat-label>State</mat-label>
|
||||
<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">
|
||||
<mat-label>City</mat-label>
|
||||
<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>
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
<input type="text" matInput placeholder="" [(ngModel)]="dob">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Languages <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.languages}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
@ -78,7 +78,7 @@
|
||||
<input type="text" matInput placeholder="Languages" [(ngModel)]="languages">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Qualification <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.qualification}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
@ -86,7 +86,7 @@
|
||||
<input type="text" matInput placeholder="Qualification" [(ngModel)]="qualification">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Designation <span style="margin-left: 3.7rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.designtion}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
@ -94,7 +94,7 @@
|
||||
<input type="text" matInput placeholder="Designation" [(ngModel)]="designtion">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Experience <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.exp}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
@ -102,7 +102,7 @@
|
||||
<input type="text" matInput placeholder="Experience" [(ngModel)]="exp">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Skills <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.skills}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
@ -112,7 +112,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Caption <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.caption}}</a>
|
||||
<mat-form-field style="width: 60%;" *ngIf="isEditable == true">
|
||||
@ -120,7 +120,7 @@
|
||||
<textarea matInput rows="3" cols="30" placeholder="Caption" [(ngModel)]="caption"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Description <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.description}}</a>
|
||||
<mat-form-field style="width: 60%;" *ngIf="isEditable == true">
|
||||
@ -178,7 +178,7 @@
|
||||
</ng-scrollbar>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab>
|
||||
<mat-tab *ngIf="userRole != 'BADMIN'">
|
||||
<ng-template mat-tab-label>
|
||||
<i class="material-icons icons-Hours"></i>
|
||||
Working Hours
|
||||
@ -200,8 +200,8 @@
|
||||
<!-- <div class="alert">
|
||||
<span class="closebtn">× sample follows customized working hours in (GMT +05:30) India Standard Time (Asia/Kolkata).</span>
|
||||
</div> -->
|
||||
<div class="timing-container mt-1">
|
||||
<div fxLayout="row wrap">
|
||||
<div class="timing-container mt-1" >
|
||||
<div fxLayout="row wrap" *ngIf="workinghours[0]['sunday']['hours'].length>0">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
<span class="dis-flex">
|
||||
@ -223,7 +223,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[1]['monday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -248,7 +248,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[2]['tuesday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -271,7 +271,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[3]['wednesday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -294,7 +294,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[4]['thursday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -317,7 +317,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[5]['friday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -340,7 +340,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timing-container">
|
||||
<div class="timing-container" *ngIf="workinghours[6]['saturday']['hours'].length>0">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
||||
<div class="timing">
|
||||
@ -393,7 +393,7 @@
|
||||
</div>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab>
|
||||
<mat-tab *ngIf="userRole != 'BADMIN'">
|
||||
<ng-template mat-tab-label>
|
||||
<i class="material-icons icons"></i> Assigned Services
|
||||
</ng-template>
|
||||
|
||||
@ -34,7 +34,23 @@ export class ConsultantSettingComponent implements OnInit {
|
||||
isEditable:any = false;
|
||||
public usersList:any = new MatTableDataSource();
|
||||
public servicesList:any = new MatTableDataSource();
|
||||
practitionerdetails: any;
|
||||
practitionerdetails: any=[
|
||||
{
|
||||
|
||||
"exp":null,
|
||||
"qualification":null,
|
||||
"days": null,
|
||||
"languages": null,
|
||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||
"dob": null,
|
||||
"designtion": null,
|
||||
"gender": null,
|
||||
"description":null,
|
||||
"skills": null,
|
||||
"caption": null,
|
||||
"isActive": "1",
|
||||
|
||||
}]
|
||||
servicesList_array: any = [];
|
||||
serviceCheckedData: number;
|
||||
checkedArray: any[];
|
||||
@ -55,12 +71,15 @@ export class ConsultantSettingComponent implements OnInit {
|
||||
id: any;
|
||||
public end_User_Url = environment.endUserUrl;
|
||||
endUserURL: any;
|
||||
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'}]
|
||||
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 )
|
||||
// this.openDialog('action','obj')
|
||||
this.registerForm = this.formBuilder.group({
|
||||
name: ['', Validators.required],
|
||||
@ -148,6 +167,8 @@ unavailability(action,obj) {
|
||||
this._con.getUsersListDetails(id).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.usersList = res.data[0];
|
||||
|
||||
localStorage.setItem('practitioner',JSON.stringify( this.usersList))
|
||||
console.log(this.usersList)
|
||||
if(this.usersList['practitionerInfos'].length==0){
|
||||
this.usersList['practitionerInfos'] =[
|
||||
@ -157,7 +178,7 @@ unavailability(action,obj) {
|
||||
"qualification":null,
|
||||
"days": null,
|
||||
"languages": null,
|
||||
"workingHours": "[{\"sunday\":{\"hours\":[{\"startTime\":\"09:30 am\",\"endTime\":\"09:30 pm\",\"day\":\"sunday\",\"value\":null}],\"breaks\":[]}},{\"monday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"09:30 pm\",\"day\":\"monday\",\"value\":null}],\"breaks\":[]}},{\"tuesday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"12:00 am\",\"day\":\"tuesday\",\"value\":null},{\"startTime\":\"01:00 pm\",\"endTime\":\"04:00 pm\",\"day\":null},{\"startTime\":\"05:00 pm\",\"endTime\":\"09:00 pm\",\"day\":null}],\"breaks\":[]}},{\"wednesday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"09:30 am\",\"day\":\"wednesday\",\"value\":null}],\"breaks\":[]}},{\"thursday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"09:30 am\",\"day\":\"thursday\",\"value\":null}],\"breaks\":[]}},{\"friday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"09:30 am\",\"day\":\"friday\",\"value\":null}],\"breaks\":[]}},{\"saturday\":{\"hours\":[{\"startTime\":\"09:00 am\",\"endTime\":\"09:30 am\",\"day\":\"saturday\",\"value\":null}],\"breaks\":[]}}]",
|
||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||
"dob": null,
|
||||
"designtion": null,
|
||||
"gender": null,
|
||||
@ -173,11 +194,14 @@ unavailability(action,obj) {
|
||||
console.log( this.practitionerdetails)
|
||||
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
||||
console.log(this.practitionerdetails)
|
||||
this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr
|
||||
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
||||
this.skills= JSON.parse(this.practitionerdetails.skills)
|
||||
this.id=this.practitionerdetails.id
|
||||
this.userName = this.usersList.userName
|
||||
this.gender=this.practitionerdetails.gender
|
||||
this.description=this.practitionerdetails.description
|
||||
this.skills= JSON.parse(this.practitionerdetails.skills)
|
||||
|
||||
this.caption = this.practitionerdetails.caption
|
||||
this.dob=this.practitionerdetails.dob
|
||||
this.exp=this.practitionerdetails.exp
|
||||
@ -185,10 +209,10 @@ unavailability(action,obj) {
|
||||
this.qualification=this.practitionerdetails.qualification
|
||||
this.designtion=this.practitionerdetails.designtion
|
||||
console.log(this.gender)
|
||||
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
||||
|
||||
// this.workinghours = this.practitionerdetails.workingHours
|
||||
console.log(this.workinghours)
|
||||
this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr
|
||||
|
||||
console.log(this.endUserURL)
|
||||
|
||||
}
|
||||
@ -340,11 +364,12 @@ unavailability(action,obj) {
|
||||
"dob": this.dob,
|
||||
"designtion": this.qualification,
|
||||
"gender": this.gender,
|
||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||
"description": this.description,
|
||||
"skills": this.skills,
|
||||
"caption": this.caption,
|
||||
"userName": this.userName,
|
||||
"userId":userid
|
||||
"practitionerId":userid
|
||||
}
|
||||
if(this.usersList['practitionerInfos'].length>0) {
|
||||
param.id = this.id
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
</h5>
|
||||
</div>
|
||||
<ng-scrollbar class="scrollHV">
|
||||
|
||||
<form [formGroup]="dynamicForm">
|
||||
<div formArrayName="filters">
|
||||
<div *ngFor="let filter of filtersFormArray.controls; let i = index;">
|
||||
@ -27,7 +28,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select1 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -40,7 +41,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select1 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -100,7 +101,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select2 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -113,7 +114,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select2 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -173,7 +174,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select3 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -186,7 +187,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select3 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -246,7 +247,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select4 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -259,7 +260,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select4 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -319,7 +320,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select5 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -332,7 +333,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select5 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -392,7 +393,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select6 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -405,7 +406,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select6 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
@ -465,7 +466,7 @@
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-select
|
||||
placeholder="Select Time"
|
||||
formControlName="startTime">
|
||||
formControlName="startTime" [disabled]="Select7 !=true">
|
||||
<mat-option
|
||||
*ngFor="let startTime of startTimes"
|
||||
[value]="startTime">
|
||||
@ -478,7 +479,7 @@
|
||||
(selectionChange)="selectedAPIChanged(i)"
|
||||
placeholder="Select Time"
|
||||
#apiField
|
||||
formControlName="endTime">
|
||||
formControlName="endTime" [disabled]="Select7 !=true">
|
||||
<mat-option
|
||||
*ngFor="let endTime of endTimes"
|
||||
[value]="endTime">
|
||||
|
||||
@ -18,8 +18,8 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
"10:30 am",
|
||||
"11:00 am",
|
||||
"11:30 am",
|
||||
"12:00 am",
|
||||
"12:30 am",
|
||||
"12:00 pm",
|
||||
"12:30 pm",
|
||||
"01:00 pm",
|
||||
"01:00 pm",
|
||||
"01:30 pm",
|
||||
@ -46,8 +46,8 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
"10:30 am",
|
||||
"11:00 am",
|
||||
"11:30 am",
|
||||
"12:00 am",
|
||||
"12:30 am",
|
||||
"12:00 pm",
|
||||
"12:30 pm",
|
||||
"01:00 pm",
|
||||
"01:00 pm",
|
||||
"01:30 pm",
|
||||
@ -98,7 +98,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
Answer: any = [];
|
||||
practitioner:any =[];
|
||||
// timing: any[] = ['09:00am','09:30am','10:00am','10:30am','11:00am','11:30am','12:00am','12:30am','01:00pm','01:00pm','01:30pm', '02:00pm', '02:30pm', '03:00pm', '03:30pm', '04:00pm', '04:30pm', '05:00pm', '05:30pm', '06:00pm', '06:30pm', '07:00pm', '07:30pm', '08:00pm','08:30pm', '09:00pm',]
|
||||
|
||||
doctor:any=[];
|
||||
constructor(private notifierService: NotifierService,
|
||||
public dialogRef: MatDialogRef<EditWorkingHoursComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data,
|
||||
@ -106,6 +106,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
) {
|
||||
var date = new Date('9:00 am');
|
||||
console.log(this.data,date)
|
||||
|
||||
|
||||
this._api.getPractitionerInfo_observable$.subscribe((res) => {
|
||||
console.log('nav list 3', res);
|
||||
@ -129,7 +130,9 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
// this.rows.splice(i, 1 );
|
||||
// }
|
||||
|
||||
ngOnInit(): void {
|
||||
ngOnInit() {
|
||||
this.doctor = JSON.parse(localStorage.getItem('practitioner'))
|
||||
console.log (this.doctor)
|
||||
this.datainputForm = this.fb.group({
|
||||
dropDownTest: "09:00am",
|
||||
dropDownTests: "09:30am",
|
||||
@ -164,7 +167,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
this.seedFiltersFormArray5();
|
||||
this.seedFiltersFormArray6();
|
||||
this.seedFiltersFormArray7();
|
||||
// setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
|
||||
let sunday ={filters :this.data[0].sunday.hours }
|
||||
if(this.data[0].sunday.hours.length>1){
|
||||
@ -209,7 +212,7 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
|
||||
this.dynamicForm7.patchValue(saturday)
|
||||
|
||||
//}, 1000);
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
|
||||
@ -462,7 +465,12 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
console.log(this.Answer);
|
||||
let param;
|
||||
if( this.practitioner.length>0){
|
||||
param ={id:this.practitioner[0].id,workingHours:JSON.stringify(this.Answer)}
|
||||
if(this.practitioner[0].hasOwnProperty('id')){
|
||||
param ={id:this.practitioner[0].id,workingHours:JSON.stringify(this.Answer)}
|
||||
}else{
|
||||
param ={practitionerId: this.doctor.id,workingHours:JSON.stringify(this.Answer)}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this._api.createPractitionerInfo(param).subscribe(res => {
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
<div class="availabilitys">
|
||||
<form novalidate #formRef="ngForm" (ngSubmit)="onSubmit(formRef.value)">
|
||||
<div class="mt-2">
|
||||
<div class="field mb-1">
|
||||
<div class="field mb-2">
|
||||
<label class="label-container">Staff</label>
|
||||
<input type="text" class="form-control mat-pane" placeholder="Staff" name="staff" ngModel #staffRef="ngModel">
|
||||
</div>
|
||||
@ -94,24 +94,33 @@
|
||||
</mat-radio-group>
|
||||
</section>
|
||||
</div> -->
|
||||
<div class="field mb-1">
|
||||
|
||||
|
||||
<div class="field mb-2">
|
||||
<label for="name-field" class="mr2">All-day Availability</label>
|
||||
<!-- <mat-slide-toggle class="toggle" (click)="toggleData()"></mat-slide-toggle> -->
|
||||
<label class="switch" >
|
||||
<!-- <label class="switch" >
|
||||
<input class="switch-input" type="checkbox" (click)="toggle()" id="bt" />
|
||||
<span class="switch-label" data-on="On" data-off="Off"></span>
|
||||
<span class="switch-handle"></span>
|
||||
</label>
|
||||
</label> -->
|
||||
<div class="onoffswitch">
|
||||
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked >
|
||||
<label class="onoffswitch-label" for="myonoffswitch" (click)="toggle()" id="bt" >
|
||||
<span class="onoffswitch-inner"></span>
|
||||
<span class="onoffswitch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field mb-1">
|
||||
<div class="field">
|
||||
<label for="name-field" class="label-container">From</label>
|
||||
<mat-form-field appearance="outline"class="mate" >
|
||||
<input matInput [matDatepicker]="picker" name="from" ngModel #pickerRef="ngModel">
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="mate date-marge" *ngIf="show">
|
||||
<mat-form-field appearance="outline" class="mates date-marge" *ngIf="show">
|
||||
<input class="time-align" type="time" matInput name="from-time" min="09:00" max="18:00" ngModel #timeRef="ngModel">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -123,7 +132,7 @@
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="mate date-marge" *ngIf="show">
|
||||
<mat-form-field appearance="outline" class="mates date-marge" *ngIf="show">
|
||||
<input class="time-align" type="time" matInput name="to-time" min="09:00" max="18:00" ngModel #timesRef="ngModel">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
.label-container{
|
||||
margin-right: 8rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
// .outline{
|
||||
// width: 18%;
|
||||
@ -28,6 +29,12 @@
|
||||
.mate{
|
||||
width: 16% !important;
|
||||
}
|
||||
.mates{
|
||||
width: 16% !important;
|
||||
::ng-deep .mat-form-field-outline {
|
||||
width: 115%!important;
|
||||
}
|
||||
}
|
||||
.date-marge{
|
||||
margin-left: 4.5rem;
|
||||
}
|
||||
@ -38,10 +45,12 @@
|
||||
.mr-8{
|
||||
margin-right: 7rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
.mr2{
|
||||
margin-right: 3rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
.cancel {
|
||||
background: #F5F5F5;
|
||||
@ -100,8 +109,8 @@
|
||||
}
|
||||
::ng-deep .mat-icon-button {
|
||||
margin-right: -3rem;
|
||||
margin-top: -12px;
|
||||
padding-top: 10px;
|
||||
// margin-top: -12px;
|
||||
// padding-top: 10px;
|
||||
}
|
||||
::ng-deep .mat-slide-toggle-bar {
|
||||
width: 50px;
|
||||
@ -116,6 +125,7 @@
|
||||
.container-to{
|
||||
margin-right: 9rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix {
|
||||
padding: 0em 0 1em 0;
|
||||
@ -146,115 +156,199 @@
|
||||
margin-left: 6rem;
|
||||
}
|
||||
.time-align{
|
||||
padding-top: 10px!important;
|
||||
padding-top: 10px !important;
|
||||
font-size: 20px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
//switch
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: block;
|
||||
// vertical-align: top;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
padding: 3px;
|
||||
margin: 0 10px 10px 0;
|
||||
// background: linear-gradient(to bottom, #eeeeee, #FFFFFF 25px);
|
||||
// background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px);
|
||||
border-radius: 18px;
|
||||
// box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
cursor: pointer;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: inherit;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
// background: #eceeef;
|
||||
border-radius: inherit;
|
||||
// box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid #4CAE4C;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label:before, .switch-label:after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -.5em;
|
||||
line-height: 1;
|
||||
-webkit-transition: inherit;
|
||||
-moz-transition: inherit;
|
||||
-o-transition: inherit;
|
||||
transition: inherit;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label:before {
|
||||
// content: attr(data-off);
|
||||
content: 'enable';
|
||||
right: 11px;
|
||||
color: #111111;
|
||||
// text-shadow: 0 1px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.switch-label:after {
|
||||
// content: attr(data-on);
|
||||
content: 'disable ';
|
||||
left: 11px;
|
||||
color: #111111;
|
||||
// text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
}
|
||||
.switch-input:checked ~ .switch-label {
|
||||
background: #FFFFFF;
|
||||
// box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.switch-input:checked ~ .switch-label:before {
|
||||
opacity: 0;
|
||||
}
|
||||
.switch-input:checked ~ .switch-label:after {
|
||||
opacity: 1;
|
||||
}
|
||||
.switch-handle {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
// background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
|
||||
background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
|
||||
border-radius: 100%;
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.switch-handle:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -6px 0 0 -6px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
// background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
.switch-input:checked ~ .switch-handle {
|
||||
left: 74px;
|
||||
box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
// .switch {
|
||||
// position: relative;
|
||||
// display: block;
|
||||
// // vertical-align: top;
|
||||
// width: 100px;
|
||||
// height: 30px;
|
||||
// padding: 3px;
|
||||
// margin: 0 10px 10px 0;
|
||||
// // background: linear-gradient(to bottom, #eeeeee, #FFFFFF 25px);
|
||||
// // background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px);
|
||||
// border-radius: 18px;
|
||||
// // box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
// cursor: pointer;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-input {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// opacity: 0;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label {
|
||||
// position: relative;
|
||||
// display: block;
|
||||
// height: inherit;
|
||||
// font-size: 10px;
|
||||
// text-transform: uppercase;
|
||||
// // background: #eceeef;
|
||||
// border-radius: inherit;
|
||||
// // box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
||||
// border: 1px solid #4CAE4C;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label:before, .switch-label:after {
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// margin-top: -.5em;
|
||||
// line-height: 1;
|
||||
// -webkit-transition: inherit;
|
||||
// -moz-transition: inherit;
|
||||
// -o-transition: inherit;
|
||||
// transition: inherit;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label:before {
|
||||
// // content: attr(data-off);
|
||||
// content: 'enable';
|
||||
// right: 11px;
|
||||
// color: #111111;
|
||||
// // text-shadow: 0 1px rgba(255, 255, 255, 0.5);
|
||||
// }
|
||||
// .switch-label:after {
|
||||
// // content: attr(data-on);
|
||||
// content: 'disable ';
|
||||
// left: 11px;
|
||||
// color: #111111;
|
||||
// // text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
||||
// opacity: 0;
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label {
|
||||
// background: #FFFFFF;
|
||||
// // box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label:before {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label:after {
|
||||
// opacity: 1;
|
||||
// }
|
||||
// .switch-handle {
|
||||
// position: absolute;
|
||||
// top: 4px;
|
||||
// left: 4px;
|
||||
// width: 28px;
|
||||
// height: 28px;
|
||||
// // background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
|
||||
// background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
|
||||
// border-radius: 100%;
|
||||
// box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
// .switch-handle:before {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// left: 50%;
|
||||
// margin: -6px 0 0 -6px;
|
||||
// width: 12px;
|
||||
// height: 12px;
|
||||
// // background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
|
||||
// background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
|
||||
// border-radius: 6px;
|
||||
// box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-handle {
|
||||
// left: 74px;
|
||||
// box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
|
||||
/* Transition
|
||||
========================== */
|
||||
.switch-label, .switch-handle {
|
||||
transition: All 0.3s ease;
|
||||
-webkit-transition: All 0.3s ease;
|
||||
-moz-transition: All 0.3s ease;
|
||||
-o-transition: All 0.3s ease;
|
||||
// /* Transition
|
||||
// ========================== */
|
||||
// .switch-label, .switch-handle {
|
||||
// transition: All 0.3s ease;
|
||||
// -webkit-transition: All 0.3s ease;
|
||||
// -moz-transition: All 0.3s ease;
|
||||
// -o-transition: All 0.3s ease;
|
||||
// }
|
||||
|
||||
.onoffswitch {
|
||||
position: relative;
|
||||
width: 135px;
|
||||
// -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
|
||||
}
|
||||
.onoffswitch-checkbox {
|
||||
display: none;
|
||||
}
|
||||
.onoffswitch-label {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
// border: 2px solid #4CAE4C;
|
||||
border-radius: 20px;
|
||||
// box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
|
||||
}
|
||||
.onoffswitch-inner {
|
||||
display: block;
|
||||
width: 200%;
|
||||
margin-left: -100%;
|
||||
// transition: margin 0.3s ease-in 0s;
|
||||
|
||||
}
|
||||
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.onoffswitch-inner:before {
|
||||
content: " Enable";
|
||||
padding-left: 10px;
|
||||
background-color: #FFFFFF; color: #4C4C4C;
|
||||
border: 1px solid #4CAE4C;
|
||||
border-radius: 50px;
|
||||
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
|
||||
// box-shadow: 0 0 10px rgb(82 81 144 / 38%);
|
||||
}
|
||||
.onoffswitch-inner:after {
|
||||
content: "Disable";
|
||||
padding-right: 10px;
|
||||
background-color: #FFFFFF; color: #4C4C4C;;
|
||||
text-align: right;
|
||||
border: 1px solid #999999;
|
||||
// border: 1px solid #DDD;
|
||||
border-radius: 50px;
|
||||
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
|
||||
// box-shadow: 0 0 10px rgb(82 81 144 / 38%);
|
||||
}
|
||||
|
||||
.onoffswitch-switch {
|
||||
display: block;
|
||||
width: 25px;
|
||||
margin: 2px;
|
||||
background: #999999;
|
||||
position: absolute; top: 0; bottom: 0;
|
||||
right: 105px;
|
||||
// border: 1px solid #999999;
|
||||
border-radius: 20px;
|
||||
transition: all 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
// .onoffswitch-switch:after {
|
||||
// display: block;
|
||||
// background: #999999!important;
|
||||
// }
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
||||
margin-left: 0;
|
||||
// border: 1px solid #999999;
|
||||
}
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||
right: 0px;
|
||||
background: #4CAE4C;
|
||||
// border: 1px solid #999999;
|
||||
|
||||
}
|
||||
@ -26,21 +26,28 @@
|
||||
</div>
|
||||
<div class="field mb-1">
|
||||
<label for="name-field" class="mr2">All-day Availability</label>
|
||||
<label class="switch" >
|
||||
<!-- <label class="switch" >
|
||||
<input class="switch-input" type="checkbox" (click)="toggle()" id="bt" />
|
||||
<span class="switch-label" data-on="On" data-off="Off"></span>
|
||||
<span class="switch-handle"></span>
|
||||
</label>
|
||||
</label> -->
|
||||
<div class="onoffswitch">
|
||||
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked >
|
||||
<label class="onoffswitch-label" for="myonoffswitch" (click)="toggle()" id="bt" >
|
||||
<span class="onoffswitch-inner"></span>
|
||||
<span class="onoffswitch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field mb-1">
|
||||
<div class="field">
|
||||
<label for="name-field" class="label-container">From</label>
|
||||
<mat-form-field appearance="outline"class="mate" >
|
||||
<input matInput [matDatepicker]="picker" name="from" ngModel #pickerRef="ngModel">
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="mate date-marge" *ngIf="show">
|
||||
<mat-form-field appearance="outline" class="mates date-marge" *ngIf="show">
|
||||
<input class="time-align" type="time" matInput name="from-time" min="09:00" max="18:00" ngModel #timeRef="ngModel">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -52,7 +59,7 @@
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" class="mate date-marge" *ngIf="show">
|
||||
<mat-form-field appearance="outline" class="mates date-marge" *ngIf="show">
|
||||
<input class="time-align" type="time" matInput name="to-time" min="09:00" max="18:00" ngModel #timesRef="ngModel">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
.label-container{
|
||||
margin-right: 8rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
// .outline{
|
||||
// width: 18%;
|
||||
@ -28,6 +29,12 @@
|
||||
.mate{
|
||||
width: 16% !important;
|
||||
}
|
||||
.mates{
|
||||
width: 16% !important;
|
||||
::ng-deep .mat-form-field-outline {
|
||||
width: 115%!important;
|
||||
}
|
||||
}
|
||||
.date-marge{
|
||||
margin-left: 4.5rem;
|
||||
}
|
||||
@ -38,10 +45,12 @@
|
||||
.mr-8{
|
||||
margin-right: 7rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
.mr2{
|
||||
margin-right: 3rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
.cancel {
|
||||
background: #F5F5F5;
|
||||
@ -100,23 +109,23 @@
|
||||
}
|
||||
::ng-deep .mat-icon-button {
|
||||
margin-right: -3rem;
|
||||
margin-top: -12px;
|
||||
padding-top: 10px;
|
||||
// margin-top: -12px;
|
||||
// padding-top: 10px;
|
||||
}
|
||||
::ng-deep .mat-slide-toggle-bar {
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
}
|
||||
// ::ng-deep .mat-slide-toggle-bar {
|
||||
// border-radius: 20px!important ;
|
||||
// width: 80px!important;
|
||||
// height: 35px!important;
|
||||
// }
|
||||
|
||||
.form-control{
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
// border: 1px solid #666;
|
||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.container-to{
|
||||
margin-right: 9rem;
|
||||
margin-left: 1.5rem;
|
||||
color: #666;
|
||||
}
|
||||
::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix {
|
||||
padding: 0em 0 1em 0;
|
||||
@ -125,7 +134,7 @@
|
||||
display: flex;
|
||||
}
|
||||
.popup-button{
|
||||
margin-top: 3rem;
|
||||
margin-top: 7rem;
|
||||
}
|
||||
.example-h2 {
|
||||
margin: 10px;
|
||||
@ -142,120 +151,199 @@
|
||||
.example-margin {
|
||||
margin: 0 10px!important;
|
||||
margin-left: 25px!important;
|
||||
color: #666;
|
||||
}
|
||||
.mat-radio{
|
||||
margin-left: 6rem;
|
||||
}
|
||||
.time-align{
|
||||
padding-top: 10px!important;
|
||||
padding-top: 10px !important;
|
||||
font-size: 20px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
//switch
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: block;
|
||||
// vertical-align: top;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
padding: 3px;
|
||||
margin: 0 10px 10px 0;
|
||||
// background: linear-gradient(to bottom, #eeeeee, #FFFFFF 25px);
|
||||
// background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px);
|
||||
border-radius: 18px;
|
||||
// box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
cursor: pointer;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: inherit;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
// background: #eceeef;
|
||||
border-radius: inherit;
|
||||
// box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid #4CAE4C;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label:before, .switch-label:after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -.5em;
|
||||
line-height: 1;
|
||||
-webkit-transition: inherit;
|
||||
-moz-transition: inherit;
|
||||
-o-transition: inherit;
|
||||
transition: inherit;
|
||||
box-sizing:content-box;
|
||||
}
|
||||
.switch-label:before {
|
||||
// content: attr(data-off);
|
||||
content: 'enable';
|
||||
right: 11px;
|
||||
color: #111111;
|
||||
// text-shadow: 0 1px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.switch-label:after {
|
||||
// content: attr(data-on);
|
||||
content: 'disable ';
|
||||
left: 11px;
|
||||
color: #111111;
|
||||
// text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
}
|
||||
.switch-input:checked ~ .switch-label {
|
||||
background: #FFFFFF;
|
||||
// box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.switch-input:checked ~ .switch-label:before {
|
||||
opacity: 0;
|
||||
}
|
||||
.switch-input:checked ~ .switch-label:after {
|
||||
opacity: 1;
|
||||
}
|
||||
.switch-handle {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
// background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
|
||||
background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
|
||||
border-radius: 100%;
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.switch-handle:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -6px 0 0 -6px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
// background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
.switch-input:checked ~ .switch-handle {
|
||||
left: 74px;
|
||||
box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
// .switch {
|
||||
// position: relative;
|
||||
// display: block;
|
||||
// // vertical-align: top;
|
||||
// width: 100px;
|
||||
// height: 30px;
|
||||
// padding: 3px;
|
||||
// margin: 0 10px 10px 0;
|
||||
// // background: linear-gradient(to bottom, #eeeeee, #FFFFFF 25px);
|
||||
// // background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px);
|
||||
// border-radius: 18px;
|
||||
// // box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
// cursor: pointer;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-input {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// opacity: 0;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label {
|
||||
// position: relative;
|
||||
// display: block;
|
||||
// height: inherit;
|
||||
// font-size: 10px;
|
||||
// text-transform: uppercase;
|
||||
// // background: #eceeef;
|
||||
// border-radius: inherit;
|
||||
// // box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
||||
// border: 1px solid #4CAE4C;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label:before, .switch-label:after {
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// margin-top: -.5em;
|
||||
// line-height: 1;
|
||||
// -webkit-transition: inherit;
|
||||
// -moz-transition: inherit;
|
||||
// -o-transition: inherit;
|
||||
// transition: inherit;
|
||||
// box-sizing:content-box;
|
||||
// }
|
||||
// .switch-label:before {
|
||||
// // content: attr(data-off);
|
||||
// content: 'enable';
|
||||
// right: 11px;
|
||||
// color: #111111;
|
||||
// // text-shadow: 0 1px rgba(255, 255, 255, 0.5);
|
||||
// }
|
||||
// .switch-label:after {
|
||||
// // content: attr(data-on);
|
||||
// content: 'disable ';
|
||||
// left: 11px;
|
||||
// color: #111111;
|
||||
// // text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
||||
// opacity: 0;
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label {
|
||||
// background: #FFFFFF;
|
||||
// // box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label:before {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-label:after {
|
||||
// opacity: 1;
|
||||
// }
|
||||
// .switch-handle {
|
||||
// position: absolute;
|
||||
// top: 4px;
|
||||
// left: 4px;
|
||||
// width: 28px;
|
||||
// height: 28px;
|
||||
// // background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
|
||||
// background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
|
||||
// border-radius: 100%;
|
||||
// box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
// .switch-handle:before {
|
||||
// content: "";
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// left: 50%;
|
||||
// margin: -6px 0 0 -6px;
|
||||
// width: 12px;
|
||||
// height: 12px;
|
||||
// // background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
|
||||
// background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
|
||||
// border-radius: 6px;
|
||||
// box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
|
||||
// }
|
||||
// .switch-input:checked ~ .switch-handle {
|
||||
// left: 74px;
|
||||
// box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
|
||||
// }
|
||||
|
||||
/* Transition
|
||||
========================== */
|
||||
.switch-label, .switch-handle {
|
||||
transition: All 0.3s ease;
|
||||
-webkit-transition: All 0.3s ease;
|
||||
-moz-transition: All 0.3s ease;
|
||||
-o-transition: All 0.3s ease;
|
||||
// /* Transition
|
||||
// ========================== */
|
||||
// .switch-label, .switch-handle {
|
||||
// transition: All 0.3s ease;
|
||||
// -webkit-transition: All 0.3s ease;
|
||||
// -moz-transition: All 0.3s ease;
|
||||
// -o-transition: All 0.3s ease;
|
||||
// }
|
||||
|
||||
.onoffswitch {
|
||||
position: relative;
|
||||
width: 135px;
|
||||
// -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
|
||||
}
|
||||
.onoffswitch-checkbox {
|
||||
display: none;
|
||||
}
|
||||
.onoffswitch-label {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
// border: 2px solid #4CAE4C;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.onoffswitch-inner {
|
||||
display: block;
|
||||
width: 200%;
|
||||
margin-left: -100%;
|
||||
// transition: margin 0.3s ease-in 0s;
|
||||
|
||||
}
|
||||
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.onoffswitch-inner:before {
|
||||
content: " Enable";
|
||||
padding-left: 10px;
|
||||
background-color: #FFFFFF; color: #4C4C4C;
|
||||
border: 1px solid #4CAE4C;
|
||||
border-radius: 50px;
|
||||
}
|
||||
.onoffswitch-inner:after {
|
||||
content: "Disable";
|
||||
padding-right: 10px;
|
||||
background-color: #FFFFFF; color: #4C4C4C;;
|
||||
text-align: right;
|
||||
border: 1px solid #999999;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.onoffswitch-switch {
|
||||
display: block;
|
||||
width: 25px;
|
||||
margin: 2px;
|
||||
background: #999999;
|
||||
position: absolute; top: 0; bottom: 0;
|
||||
right: 105px;
|
||||
// border: 1px solid #999999;
|
||||
border-radius: 20px;
|
||||
transition: all 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
// .onoffswitch-switch:after {
|
||||
// display: block;
|
||||
// background: #999999!important;
|
||||
// }
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
||||
margin-left: 0;
|
||||
// border: 1px solid #999999;
|
||||
}
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||
right: 0px;
|
||||
background: #4CAE4C;
|
||||
// border: 1px solid #999999;
|
||||
|
||||
}
|
||||
@ -80,11 +80,14 @@ export class CustomersListComponent implements OnInit {
|
||||
getCustomersList() {
|
||||
console.log('in')
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
this.recordStatus=false;
|
||||
let user_role = localStorage.getItem('user_role');
|
||||
if(user_role == 'PRACTITIONER'){
|
||||
this._app.getAppoinmentsListDetails().subscribe(res => {
|
||||
if(user_role == 'PRACTITIONER' || user_role == 'BADMIN'){
|
||||
let param ={"busId": localStorage.getItem('busId')}
|
||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.appoinmentsList = res.data;
|
||||
this.recordStatus=true;
|
||||
let id = localStorage.getItem('user_id')
|
||||
console.log(id)
|
||||
console.log(this.appoinmentsList)
|
||||
@ -94,14 +97,21 @@ export class CustomersListComponent implements OnInit {
|
||||
filter.forEach(element => {
|
||||
this.appoinmentsIds.push( element.customer[0].id)
|
||||
});
|
||||
this.getCustomerDetails()
|
||||
}
|
||||
if(this.appoinmentsList.length>0){
|
||||
this.getCustomerDetails()
|
||||
}
|
||||
|
||||
} else{
|
||||
this.isLoading = false
|
||||
this.recordStatus=true;
|
||||
}
|
||||
})
|
||||
}
|
||||
// this.getCustomerDetails()
|
||||
}
|
||||
|
||||
getCustomerDetails(){
|
||||
|
||||
this._cus.getCustomersListDetails().subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.isLoading = false
|
||||
@ -135,6 +145,7 @@ export class CustomersListComponent implements OnInit {
|
||||
|
||||
}
|
||||
else{
|
||||
this.isLoading = false
|
||||
this.customersList=[];
|
||||
this.customersListLength= null;
|
||||
this.recordStatus=true;
|
||||
|
||||
@ -23,6 +23,11 @@
|
||||
<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>
|
||||
<ng-template #elseTemplate>
|
||||
Sure to delete <b>{{local_data.servicesName}}</b>?
|
||||
</ng-template>
|
||||
|
||||
@ -40,7 +40,8 @@ ngOnInit() {
|
||||
this.form = new FormGroup({
|
||||
servicesName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
||||
duration: new FormControl('',[Validators.required]),
|
||||
description: new FormControl('',[Validators.required])
|
||||
description: new FormControl('',[Validators.required]),
|
||||
fees:new FormControl('',[Validators.required])
|
||||
});
|
||||
this.form.patchValue(this.local_data)
|
||||
}
|
||||
|
||||
@ -12,14 +12,20 @@ export class ApiServiceService {
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
constructor(private _http: HttpClient) { }
|
||||
|
||||
getServicesListDetails(): Observable<any> {
|
||||
getServicesListDetails(param): Observable<any> {
|
||||
console.log('IN')
|
||||
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",param)
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
getServicesListDetails2(): Observable<any> {
|
||||
console.log('IN')
|
||||
return this._http.post<any[]>(this.apiUrl + "getServicesDetails",{})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
}
|
||||
|
||||
addFormDetails(addParams): Observable<any> {
|
||||
return this._http.post(this.apiUrl + 'CreateService', addParams)
|
||||
// .pipe(
|
||||
|
||||
@ -34,12 +34,16 @@
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Duration </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.duration}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="fees">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Fees </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.fees}} </mat-cell>
|
||||
</ng-container>
|
||||
<!-- Description Column -->
|
||||
<ng-container matColumnDef="description">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Description </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
|
||||
@ -18,7 +18,7 @@ export class ServiceListComponent implements OnInit {
|
||||
addFormData: any;
|
||||
push: any;
|
||||
id: number;
|
||||
displayedColumns: string[] = ['serviceId','servicesName','duration','description','action'];
|
||||
displayedColumns: string[] = ['serviceId','servicesName','duration','fees','description','action'];
|
||||
serviceId: number;
|
||||
|
||||
public servicesListLength: number;
|
||||
@ -59,7 +59,9 @@ export class ServiceListComponent implements OnInit {
|
||||
|
||||
|
||||
getServicesList() {
|
||||
this._api.getServicesListDetails().subscribe(res => {
|
||||
let param ={"busId": localStorage.getItem('busId')}
|
||||
console.log(param)
|
||||
this._api.getServicesListDetails(param).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.isLoading = false;
|
||||
this.servicesList = res.data;
|
||||
@ -74,6 +76,7 @@ export class ServiceListComponent implements OnInit {
|
||||
this.recordStatus=false;
|
||||
}
|
||||
else{
|
||||
this.isLoading = false;
|
||||
this.servicesList=[];
|
||||
this.servicesListLength= null;
|
||||
this.recordStatus=true;
|
||||
@ -137,10 +140,11 @@ export class ServiceListComponent implements OnInit {
|
||||
if(result.event == 'Add'){
|
||||
console.log('add')
|
||||
let addFormData = {
|
||||
// busId: 'abc123',
|
||||
// id: row_obj.id,
|
||||
busId: localStorage.getItem('busId'),
|
||||
id: row_obj.id,
|
||||
description:row_obj.description,
|
||||
duration: parseInt(row_obj.duration),
|
||||
fees: parseInt(row_obj.fees),
|
||||
serviceId: row_obj.serviceId,
|
||||
servicesName: row_obj.servicesName
|
||||
};
|
||||
@ -151,6 +155,7 @@ export class ServiceListComponent implements OnInit {
|
||||
let updatevalue = {
|
||||
description:row_obj.description,
|
||||
serviceId: row_obj.serviceId,
|
||||
fees: parseInt(row_obj.fees),
|
||||
duration: parseInt(row_obj.duration),
|
||||
servicesName: row_obj.servicesName
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</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-select placeholder="Select Business" formControlName="businessselect" required [disabled]="disableBus ==0">
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let business of businessList" (click)="bus(business.busId)" [value]="business.busId">
|
||||
{{business.busName}}
|
||||
@ -58,12 +58,24 @@
|
||||
<mat-error *ngIf="myError('contactNo', 'minlength')"> Contact No must be at least 10 characters</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-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> -->
|
||||
|
||||
<mat-form-field appearance="outline" class="mat-pane user-mate">
|
||||
<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">
|
||||
Password length must be greater than or equal to 8 and password must contain one or more uppercase ,
|
||||
lowercase , numeric and special characters
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.get('password')?.invalid && (form.get('password')?.dirty || form.get('password')?.touched) && form.get('password')?.errors?.required">
|
||||
Password is required
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<img *ngIf="action == 'Update' && imageViewStatus != true" class="image mb-2" [src]="image_view(local_data.logo)" height="150" width="150"/>
|
||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
||||
|
||||
@ -59,4 +59,12 @@ input[type=file]::file-selector-button {
|
||||
.imgSizeValidation{
|
||||
color: red;
|
||||
font-family: ui-serif;
|
||||
}
|
||||
.user-mate{
|
||||
::ng-deep .mat-form-field-subscript-wrapper {
|
||||
position: inherit!important;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
@ -31,6 +31,7 @@ export class AddUserComponent implements OnInit {
|
||||
formData:any=[];
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
busId: any;
|
||||
disableBus: any=1;
|
||||
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder,
|
||||
public dialogRef: MatDialogRef<AddUserComponent>,
|
||||
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData,public _bus:BusinessService) {
|
||||
@ -45,6 +46,7 @@ export class AddUserComponent implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.disableBus = localStorage.getItem('go_admin')
|
||||
let userrole = localStorage.getItem('user_role')
|
||||
this.form = new FormGroup({
|
||||
businessselect: new FormControl('',[Validators.required]),
|
||||
@ -56,7 +58,10 @@ export class AddUserComponent implements OnInit {
|
||||
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
|
||||
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
|
||||
),]),
|
||||
password: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
||||
// password: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
||||
password: new FormControl('', [Validators.required,Validators.pattern(
|
||||
'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,12}$'
|
||||
)]),
|
||||
logo: new FormControl('', null),
|
||||
// confirmPassword: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
||||
createdBy:new FormControl(userrole,null),
|
||||
@ -107,10 +112,10 @@ export class AddUserComponent implements OnInit {
|
||||
console.log(this.form['value'].businessselect)
|
||||
// this.local_data.businessselect = this.local_data.busId
|
||||
console.log(localStorage.getItem('busNameID'), localStorage.getItem('go_admin'))
|
||||
if( localStorage.getItem('go_admin') =='0'){
|
||||
// if( localStorage.getItem('go_admin') =='0'){
|
||||
this.local_data.businessselect = localStorage.getItem('busNameID')
|
||||
this.form.controls['businessselect'].setValue(localStorage.getItem('busNameID'))
|
||||
}
|
||||
// }
|
||||
//localStorage.setItem('busNameID',getData.busId)
|
||||
|
||||
if(this.action == 'Update'){
|
||||
@ -154,7 +159,7 @@ export class AddUserComponent implements OnInit {
|
||||
}
|
||||
if(this.action == 'Update'){
|
||||
this.formData.append('id', tmp.id);
|
||||
this.formData.append('busId', this.busId);
|
||||
|
||||
}
|
||||
this.formData.append('busId', this.busId);
|
||||
this.formData.append('userName', tmp.userName);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<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%;">
|
||||
<!-- <mat-form-field appearance="outline" style="width:20%;margin-left: 5%;">
|
||||
<mat-label>Business</mat-label>
|
||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||
<mat-option (click)="applyFilter(null)">All</mat-option>
|
||||
@ -14,14 +14,14 @@
|
||||
</mat-select>
|
||||
|
||||
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field appearance="outline" style="width:20%;margin-left: 5%;">
|
||||
<mat-label>Role</mat-label>
|
||||
<mat-select placeholder="Select Business" formControlName="businessselect" required>
|
||||
<mat-option (click)="applyFilter(null)">All</mat-option>
|
||||
<mat-option (click)="applyFilter('SADMIN')">SADMIN</mat-option>
|
||||
<mat-option (click)="applyFilter('PRACTITIONER')"> PRACTITIONER</mat-option>
|
||||
<mat-option (click)="applyFilter('BADMIN')">BADMIN</mat-option>
|
||||
<mat-option value="All" (click)="applyFilter(null)">All</mat-option>
|
||||
<mat-option value="SADMIN" (click)="applyFilter('SADMIN')">SADMIN</mat-option>
|
||||
<mat-option value="PRACTITIONER"(click)="applyFilter('PRACTITIONER')"> PRACTITIONER</mat-option>
|
||||
<mat-option value="BADMIN" (click)="applyFilter('BADMIN')">BADMIN</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
|
||||
@ -169,7 +169,8 @@ export class UserListComponent implements OnInit {
|
||||
|
||||
}
|
||||
openDialog(action,obj) {
|
||||
// localStorage.setItem('busNameID',null)
|
||||
localStorage.setItem('busNameID',obj.busId
|
||||
)
|
||||
obj.action = action;
|
||||
const dialogRef = this.dialog.open(AddUserComponent, {
|
||||
// width: '30%',
|
||||
@ -179,6 +180,8 @@ export class UserListComponent implements OnInit {
|
||||
data:obj
|
||||
});
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
localStorage.setItem('go_admin','1')
|
||||
localStorage.setItem('busNameID',null)
|
||||
if(result != undefined){
|
||||
console.log(result)
|
||||
this.formAddUpdateAndDelete(result,result.data)
|
||||
|
||||
@ -110,7 +110,7 @@ export class SearchCategoryComponent implements OnInit {
|
||||
console.log(this.eventData)
|
||||
if(this.eventData == 'services'){
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
this._api.getServicesListDetails().subscribe(res => {
|
||||
this._api.getServicesListDetails2().subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
this.servicesList = res.data;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
<img src="assets/images/information.svg" alt="Avatar" class="img" />
|
||||
<span>Date:{{date | date:'longDate'}}</span><br />
|
||||
<span style="margin-left: 10px;">Time :{{slotTime | date:'shortTime'}}</span>
|
||||
</p> -->
|
||||
</p> -->
|
||||
<p class="param"><img src="assets/images/Languages.svg" alt="Avatar" class="img">Date : </p>
|
||||
<span class="span-text"> {{date | date:'longDate'}}</span>
|
||||
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time : </p>
|
||||
@ -102,10 +102,6 @@
|
||||
<div class="innerdivs" > <div style="margin: 1%;">
|
||||
<button *ngFor="let slot of slots;let i=index" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i,'clickedSlot':slotIndex == i } " (click)="toggleActive($event,slot,i)" >{{slot | date:'shortTime'}}</button>
|
||||
</div> </div>
|
||||
|
||||
<div class="innerdivs" >
|
||||
<button mat-raised-button mat-button-sm class="mr-1 mb-1 mt-1 btn-red" [ngStyle]="{'background':slot_array.length ==0 ? '#ccc':'#4caf50' }" [disabled]="slot_array.length ==0" (click)="submit()">PROCEED</button>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
<div>
|
||||
|
||||
@ -11,7 +11,7 @@ export class RoleMenuItemsPipe implements PipeTransform {
|
||||
// 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 != "consultant-setting" && val.state!="users" && val.state!="consultants");
|
||||
case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="users" && val.state!="consultants");
|
||||
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");
|
||||
|
||||
@ -47,7 +47,11 @@ export class LoginComponent {
|
||||
localStorage.setItem('user_token',res.token);
|
||||
localStorage.setItem('user_role',res.role);
|
||||
localStorage.setItem('email',JSON.stringify(auth))
|
||||
localStorage.setItem('user_id',res.roleId)
|
||||
localStorage.setItem('user_id',res.roleId
|
||||
);
|
||||
|
||||
localStorage.setItem('busId',res.busId)
|
||||
|
||||
this.router.navigate(['/home'])
|
||||
}
|
||||
}else{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user