Compare commits
No commits in common. "2cc34d957b6cb65be3c8bc6c11f0d4e866ebdee4" and "d01df0cc2f1131510de56afa31ee8676b8d62fec" have entirely different histories.
2cc34d957b
...
d01df0cc2f
Binary file not shown.
15
ng-seed/package-lock.json
generated
15
ng-seed/package-lock.json
generated
@ -9904,21 +9904,6 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ngx-mat-select-search": {
|
|
||||||
"version": "3.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ngx-mat-select-search/-/ngx-mat-select-search-3.3.1.tgz",
|
|
||||||
"integrity": "sha512-U8CnG0ER/Z4WLcvucvzurBHg+WY3Dfr7HCwqSWv3nKG95dXrWCdCG1y34/uCRvv/CPwi7NoS1EoBXA/CNYuCNw==",
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^1.9.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ngx-perfect-scrollbar": {
|
"ngx-perfect-scrollbar": {
|
||||||
"version": "10.1.0",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ngx-perfect-scrollbar/-/ngx-perfect-scrollbar-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ngx-perfect-scrollbar/-/ngx-perfect-scrollbar-10.1.0.tgz",
|
||||||
|
|||||||
@ -56,7 +56,6 @@
|
|||||||
"ngx-bootstrap": "^10.2.0",
|
"ngx-bootstrap": "^10.2.0",
|
||||||
"ngx-color-picker": "^11.0.0",
|
"ngx-color-picker": "^11.0.0",
|
||||||
"ngx-daterangepicker-material": "^5.0.1",
|
"ngx-daterangepicker-material": "^5.0.1",
|
||||||
"ngx-mat-select-search": "^3.3.1",
|
|
||||||
"ngx-perfect-scrollbar": "10.1.0",
|
"ngx-perfect-scrollbar": "10.1.0",
|
||||||
"ngx-scrollbar": "^7.5.6",
|
"ngx-scrollbar": "^7.5.6",
|
||||||
"ngx-sortablejs": "^3.1.4",
|
"ngx-sortablejs": "^3.1.4",
|
||||||
|
|||||||
@ -14,8 +14,8 @@ export class AuthGuard implements CanActivate, CanActivateChild {
|
|||||||
if(token != '' && token != undefined && token != null){
|
if(token != '' && token != undefined && token != null){
|
||||||
return true
|
return true
|
||||||
}else{
|
}else{
|
||||||
|
alert("else");
|
||||||
this.router.navigate(['page']);
|
this.router.navigate(['authentication/login']);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,8 +16,6 @@ export class AppComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(window.location.href)
|
|
||||||
console.log(window.location.pathname)
|
|
||||||
console.log(window.location.origin)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,8 +154,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
|||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: TokenInterceptor,
|
useClass: TokenInterceptor,
|
||||||
multi: true
|
multi: true
|
||||||
},
|
},{provide: LocationStrategy, useClass: HashLocationStrategy}
|
||||||
{provide: LocationStrategy, useClass: HashLocationStrategy}
|
|
||||||
],
|
],
|
||||||
entryComponents: [],
|
entryComponents: [],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
</ng-container> -->
|
</ng-container> -->
|
||||||
<ng-container matColumnDef="paymentStatus">
|
<ng-container matColumnDef="paymentStatus">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Payment Status </th>
|
<th mat-header-cell *matHeaderCellDef class="font-color mat-mob"> Payment Status </th>
|
||||||
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{'positive' :row.paymentStatus == 0,'cancelStatus' : row.paymentStatus == 1}"> <b>{{row.paymentStatus == 0 ? 'Paid' : 'Not Paid'}}</b></td>
|
<td mat-cell *matCellDef="let row" class="element-spc" [ngClass]="{'positive' :row.paymentStatus == 1,'cancelStatus' : row.paymentStatus == 0}"> <b>{{row.paymentStatus == 1 ? 'Paid' : 'Not Paid'}}</b></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="paymentMode">
|
<ng-container matColumnDef="paymentMode">
|
||||||
|
|||||||
@ -9,8 +9,7 @@ import { environment } from 'environments/environment';
|
|||||||
import Swal from 'sweetalert2';
|
import Swal from 'sweetalert2';
|
||||||
import { AppointmentsService } from '../appointments-service/appointments.service';
|
import { AppointmentsService } from '../appointments-service/appointments.service';
|
||||||
import { DialogBoxComponent } from '../dialog-box/dialog-box.component';
|
import { DialogBoxComponent } from '../dialog-box/dialog-box.component';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { DashboardService } from 'app/dashboard/dashboard.service';
|
|
||||||
export interface UsersData {
|
export interface UsersData {
|
||||||
busId: number;
|
busId: number;
|
||||||
appoinmentTime: string;
|
appoinmentTime: string;
|
||||||
@ -60,20 +59,9 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
consultants: any = [];
|
consultants: any = [];
|
||||||
selectPractitioner:any = [];
|
selectPractitioner:any = [];
|
||||||
user_role: any=[];
|
user_role: any=[];
|
||||||
constructor(private router: Router,private notifierService: NotifierService,public dialog: MatDialog, public _app:AppointmentsService,public _dash:DashboardService) {
|
constructor(private router: Router,private notifierService: NotifierService,public dialog: MatDialog, public _app:AppointmentsService) { }
|
||||||
|
|
||||||
let go_appointment = localStorage.getItem('go_appointment')
|
|
||||||
console.log(go_appointment)
|
|
||||||
if(go_appointment == '0'){
|
|
||||||
let dataVal = localStorage.getItem('go_appointment_data')
|
|
||||||
console.log(dataVal)
|
|
||||||
this.openDialog('Update',JSON.parse(dataVal))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit(): void {
|
||||||
|
|
||||||
|
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
this.user_role = localStorage.getItem('user_role');
|
this.user_role = localStorage.getItem('user_role');
|
||||||
if(this.user_role != 'FRONTDESK'){
|
if(this.user_role != 'FRONTDESK'){
|
||||||
@ -281,8 +269,6 @@ export class AppoinmentsListComponent implements OnInit {
|
|||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
if(result.data == 0){
|
if(result.data == 0){
|
||||||
localStorage.removeItem('go_appointment_data')
|
|
||||||
localStorage.setItem('go_appointment','1')
|
|
||||||
if(this.user_role != 'FRONTDESK'){
|
if(this.user_role != 'FRONTDESK'){
|
||||||
let param ={"busId":localStorage.getItem('busId'),"userId":localStorage.getItem('user_id')}
|
let param ={"busId":localStorage.getItem('busId'),"userId":localStorage.getItem('user_id')}
|
||||||
console.log(param)
|
console.log(param)
|
||||||
|
|||||||
@ -7,17 +7,20 @@
|
|||||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||||
<mat-label>Name</mat-label>
|
<mat-label>Name</mat-label>
|
||||||
<input placeholder="Name" formControlName="name" matInput>
|
<input placeholder="Name" formControlName="name" matInput>
|
||||||
<mat-error *ngIf="myError('name', 'required')">Name is required</mat-error>
|
<!-- <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>
|
||||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||||
<mat-label>Email</mat-label>
|
<mat-label>Email</mat-label>
|
||||||
<input type="email" placeholder="Email" formControlName="email" matInput >
|
<input type="email" placeholder="Email" formControlName="email" matInput >
|
||||||
<!-- <mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
<!-- <mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||||
Please enter a valid email address
|
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-error> -->
|
||||||
<mat-error *ngIf="myError('email', 'required')">Email is required</mat-error>
|
</mat-form-field>
|
||||||
<mat-error *ngIf="myError('email', 'email')">Invalid email format</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field appearance="outline" class="card-mat-pane">
|
<mat-form-field appearance="outline" class="card-mat-pane">
|
||||||
<mat-label>Phone</mat-label>
|
<mat-label>Phone</mat-label>
|
||||||
<input placeholder="Mobile No" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput formControlName="phoneNo">
|
<input placeholder="Mobile No" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput formControlName="phoneNo">
|
||||||
@ -30,7 +33,7 @@
|
|||||||
<div class="popup-button">
|
<div class="popup-button">
|
||||||
<!-- <span class="buttons cancel" (click)="close()">Cancel</span> -->
|
<!-- <span class="buttons cancel" (click)="close()">Cancel</span> -->
|
||||||
<button type="button"class="buttons cancel" (click)="close()" >Cancel</button>
|
<button type="button"class="buttons cancel" (click)="close()" >Cancel</button>
|
||||||
<button type="submit"class="buttons add" [disabled]="submitDisabled">Save</button>
|
<button type="submit"class="buttons add">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -11,19 +11,15 @@ import { CustomersService } from 'app/appoinment/customers/customers-service/cus
|
|||||||
export class AppointmentAddcustomerComponent implements OnInit {
|
export class AppointmentAddcustomerComponent implements OnInit {
|
||||||
form: FormGroup;
|
form: FormGroup;
|
||||||
@Output() childButtonEvent = new EventEmitter();
|
@Output() childButtonEvent = new EventEmitter();
|
||||||
submitDisabled: boolean = true;
|
|
||||||
constructor(public _app:AppointmentsService,public _cus:CustomersService) { }
|
constructor(public _app:AppointmentsService,public _cus:CustomersService) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
name: new FormControl('', [Validators.required]),
|
name: new FormControl('', [Validators.required]),
|
||||||
email: new FormControl('', [Validators.required, Validators.email]),
|
email: new FormControl('', [Validators.required]),
|
||||||
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10), Validators.maxLength(10)]),
|
phoneNo: new FormControl('', [Validators.required,Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
});
|
|
||||||
|
|
||||||
this.form.valueChanges.subscribe(() => {
|
|
||||||
this.submitDisabled = !this.form.valid;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public myError = (controlName: string, errorName: string) =>{
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!-- <mat-card class="settings-panel" > -->
|
<!-- <mat-card class="settings-panel" > -->
|
||||||
<h5 mat-dialog-title> <strong>{{action}} Appoinment</strong>
|
<h5 mat-dialog-title> <strong>{{action}} Appoinment</strong>
|
||||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="closeDialog()"
|
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="close()"
|
||||||
><mat-icon>close</mat-icon></button></h5>
|
><mat-icon>close</mat-icon></button></h5>
|
||||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||||
<ng-scrollbar class="scrollHV">
|
<ng-scrollbar class="scrollHV">
|
||||||
@ -147,24 +147,20 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<div style="margin-top: 5px;margin-bottom: 15px;">
|
<div style="margin-top: 5px;margin-bottom: 15px;">
|
||||||
<div><mat-label>Payment Status</mat-label></div>
|
|
||||||
<mat-radio-group aria-label="Select an option" formControlName="paymentStatus" required>
|
<mat-radio-group aria-label="Select an option" formControlName="paymentStatus" required>
|
||||||
<mat-radio-button value="0">Paid</mat-radio-button>
|
<mat-radio-button value="1">Paid</mat-radio-button>
|
||||||
<mat-radio-button value="1" style="margin-left: 10px;">Not Paid</mat-radio-button>
|
<mat-radio-button value="0" style="margin-left: 10px;">Not Paid</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
<mat-error *ngIf="form.get('paymentStatus').hasError('required')">Payment status is required</mat-error>
|
|
||||||
<!-- <mat-error *ngIf="paymentStatus.hasError('invalidValue')">Please choose any other</mat-error> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-form-field appearance="outline" class="mat-pane" *ngIf="form.get('paymentStatus').value == 0">
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="form.get('paymentStatus').value == 1">
|
||||||
<mat-label>Payment Mode</mat-label>
|
<mat-label>Payment Mode</mat-label>
|
||||||
<mat-select placeholder="Select Payment Mode" formControlName="paymentMode" required>
|
<mat-select placeholder="Select Payment Mode" formControlName="paymentMode" required>
|
||||||
<mat-option value="Cash">Cash</mat-option>
|
<mat-option value="Cash">Cash</mat-option>
|
||||||
<mat-option value="UPI">UPI</mat-option>
|
<mat-option value="UPI">UPI</mat-option>
|
||||||
<mat-option value="Card">Card</mat-option>
|
<mat-option value="Card">Card</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="form.get('paymentMode').hasError('required')">Payment mode is required</mat-error>
|
</mat-form-field>
|
||||||
</mat-form-field>
|
|
||||||
<!-- <div class="notes">
|
<!-- <div class="notes">
|
||||||
<input type="checkbox" id="scales" name="scales" checked>
|
<input type="checkbox" id="scales" name="scales" checked>
|
||||||
<label for="scales">Send notifications for customer</label>
|
<label for="scales">Send notifications for customer</label>
|
||||||
|
|||||||
@ -103,7 +103,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
ServiceId: any;
|
ServiceId: any;
|
||||||
user_role: string;
|
user_role: string;
|
||||||
consultants: any = [];
|
consultants: any = [];
|
||||||
Status:any = [{id:1,value:"consultant"},{id:2,value:"Booked"},{id:1,value:"No Show"},{id:1,value:"cancelled"}]
|
Status:any = [{id:1,value:"Consult"},{id:2,value:"Attend"},{id:1,value:"No Show"},{id:1,value:"Cancel"}]
|
||||||
advanced_slot_days: any=7;
|
advanced_slot_days: any=7;
|
||||||
slotIndex: any;
|
slotIndex: any;
|
||||||
findSlotIndex: any;
|
findSlotIndex: any;
|
||||||
@ -117,19 +117,17 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
|
constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService,
|
||||||
public dialogRef: MatDialogRef<DialogBoxComponent>,public _api:ConsultantService, public _con:ConsultantService,
|
public dialogRef: MatDialogRef<DialogBoxComponent>,public _api:ConsultantService, public _con:ConsultantService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) {
|
@Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) {
|
||||||
// // console.log(data);
|
console.log(data);
|
||||||
this.local_data = {...data};
|
this.local_data = {...data};
|
||||||
this.action = this.local_data.action;
|
this.action = this.local_data.action;
|
||||||
this.frontDeskChoosedPractiID = this.local_data['ServicesMapDetail.userId']
|
this.frontDeskChoosedPractiID = this.local_data['ServicesMapDetail.userId']
|
||||||
console.log(this.local_data)
|
console.log(this.frontDeskChoosedPractiID)
|
||||||
}
|
}
|
||||||
get f(){
|
get f(){
|
||||||
return this.form.controls;
|
return this.form.controls;
|
||||||
}
|
}
|
||||||
|
|
||||||
closeDialog(){
|
closeDialog(){
|
||||||
localStorage.removeItem('go_appointment_data')
|
|
||||||
localStorage.setItem('go_appointment','1')
|
|
||||||
this.dialogRef.close({event:'Cancel'});
|
this.dialogRef.close({event:'Cancel'});
|
||||||
}
|
}
|
||||||
onSelectFile(event) {
|
onSelectFile(event) {
|
||||||
@ -141,7 +139,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
close() {
|
||||||
|
// console.log(this.form.value);
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
// toggle() {
|
// toggle() {
|
||||||
// this.show = !this.show;
|
// this.show = !this.show;
|
||||||
@ -156,16 +157,16 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
let advanceDays = localStorage.getItem('advanced_slot_days')
|
let advanceDays = localStorage.getItem('advanced_slot_days')
|
||||||
// // console.log(this.advanced_slot_days,advanceDays)
|
console.log(this.advanced_slot_days,advanceDays)
|
||||||
if(advanceDays == 'null' || advanceDays == null){
|
if(advanceDays == 'null' || advanceDays == null){
|
||||||
this.advanced_slot_days = 7
|
this.advanced_slot_days = 7
|
||||||
// // console.log(this.advanced_slot_days)
|
console.log(this.advanced_slot_days)
|
||||||
}else{
|
}else{
|
||||||
this.advanced_slot_days = parseInt(localStorage.getItem('advanced_slot_days'))-1
|
this.advanced_slot_days = parseInt(localStorage.getItem('advanced_slot_days'))-1
|
||||||
// // console.log(this.advanced_slot_days)
|
console.log(this.advanced_slot_days)
|
||||||
}
|
}
|
||||||
// this._app.customerlist_observable$.subscribe((res) => {
|
// this._app.customerlist_observable$.subscribe((res) => {
|
||||||
// // console.log('cus', res);
|
// console.log('cus', res);
|
||||||
|
|
||||||
// if(res){
|
// if(res){
|
||||||
|
|
||||||
@ -176,17 +177,17 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
this.user_role = localStorage.getItem('user_role');
|
this.user_role = localStorage.getItem('user_role');
|
||||||
let tmp=[]
|
let tmp=[]
|
||||||
// // console.log(this.advanced_slot_days)
|
console.log(this.advanced_slot_days)
|
||||||
for(let i=0;i<=this.advanced_slot_days;i++){
|
for(let i=0;i<=this.advanced_slot_days;i++){
|
||||||
var someDate = new Date();
|
var someDate = new Date();
|
||||||
someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
|
someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
|
||||||
var dateFormated = someDate.toISOString().substr(0,10);
|
var dateFormated = someDate.toISOString().substr(0,10);
|
||||||
// // console.log(dateFormated);
|
console.log(dateFormated);
|
||||||
tmp.push(dateFormated)
|
tmp.push(dateFormated)
|
||||||
}
|
}
|
||||||
// // console.log(tmp)
|
console.log(tmp)
|
||||||
this.days= tmp
|
this.days= tmp
|
||||||
// // console.log(this.days)
|
console.log(this.days)
|
||||||
|
|
||||||
if(this.user_role != 'FRONTDESK'){
|
if(this.user_role != 'FRONTDESK'){
|
||||||
let userId = localStorage.getItem('user_id')
|
let userId = localStorage.getItem('user_id')
|
||||||
@ -221,7 +222,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
fees: new FormControl('',null),
|
fees: new FormControl('',null),
|
||||||
appoinmentSlots: new FormControl(''),
|
appoinmentSlots: new FormControl(''),
|
||||||
});
|
});
|
||||||
// // console.log(this.local_data, this.selects)
|
console.log(this.local_data, this.selects)
|
||||||
// this.findSlotIndex = this.local_data.appoinmentSlots
|
// this.findSlotIndex = this.local_data.appoinmentSlots
|
||||||
// this.local_data.forEach(element => {
|
// this.local_data.forEach(element => {
|
||||||
if(this.local_data.hasOwnProperty('action')){
|
if(this.local_data.hasOwnProperty('action')){
|
||||||
@ -235,7 +236,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
this.customerId = this.local_data.customer
|
this.customerId = this.local_data.customer
|
||||||
this.slotsResult =this.local_data.appoinmentSlots
|
this.slotsResult =this.local_data.appoinmentSlots
|
||||||
this.local_data.appoinmentTime = new DatePipe('en-US').transform(this.local_data['appoinmentSlots'][0], 'shortTime')
|
this.local_data.appoinmentTime = new DatePipe('en-US').transform(this.local_data['appoinmentSlots'][0], 'shortTime')
|
||||||
// // console.log(this.servicesList_array)
|
console.log(this.servicesList_array)
|
||||||
this.local_data.paymentStatus = ""+this.local_data.paymentStatus+""
|
this.local_data.paymentStatus = ""+this.local_data.paymentStatus+""
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -248,10 +249,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
|
|
||||||
let id = localStorage.getItem('user_id')
|
let id = localStorage.getItem('user_id')
|
||||||
// // console.log(id)
|
console.log(id)
|
||||||
this._con.getUsersListDetails(id).subscribe(res => {
|
this._con.getUsersListDetails(id).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// // console.log(res)
|
console.log(res)
|
||||||
|
|
||||||
this.userData = res.data[0]
|
this.userData = res.data[0]
|
||||||
this.form.controls['busname'].setValue( this.userData.BusinessDetails[0].busName
|
this.form.controls['busname'].setValue( this.userData.BusinessDetails[0].busName
|
||||||
@ -271,10 +272,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
let findAppointmentDate = this.local_data.appoinmentDate
|
let findAppointmentDate = this.local_data.appoinmentDate
|
||||||
this.days.forEach(element => {
|
this.days.forEach(element => {
|
||||||
// // console.log(element)
|
console.log(element)
|
||||||
if(element == findAppointmentDate){
|
if(element == findAppointmentDate){
|
||||||
this.days.indexOf(element)
|
this.days.indexOf(element)
|
||||||
// // console.log(this.days.indexOf(element))
|
console.log(this.days.indexOf(element))
|
||||||
this.clicks = this.days.indexOf(element)
|
this.clicks = this.days.indexOf(element)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -282,7 +283,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
let options:any = { weekday: 'long'};
|
let options:any = { weekday: 'long'};
|
||||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||||
var formatDate = prnDt.split(" ")
|
var formatDate = prnDt.split(" ")
|
||||||
// // console.log(formatDate)
|
console.log(formatDate)
|
||||||
|
|
||||||
this.dayName = formatDate[0]
|
this.dayName = formatDate[0]
|
||||||
let userId
|
let userId
|
||||||
@ -290,14 +291,14 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
userId = localStorage.getItem('user_id')
|
userId = localStorage.getItem('user_id')
|
||||||
}else{
|
}else{
|
||||||
userId = frontDeskPractiUserid
|
userId = frontDeskPractiUserid
|
||||||
// // console.log(frontDeskPractiUserid)
|
console.log(frontDeskPractiUserid)
|
||||||
}
|
}
|
||||||
// // console.log(userId)
|
console.log(userId)
|
||||||
let params ={"id":userId ,"day": this.dayName ,"addcount": this.clicks}
|
let params ={"id":userId ,"day": this.dayName ,"addcount": this.clicks}
|
||||||
|
|
||||||
this.end_user.getSlots(params).subscribe(res => {
|
this.end_user.getSlots(params).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// // console.log(res)
|
console.log(res)
|
||||||
let data = res['data'];
|
let data = res['data'];
|
||||||
this.slots = data
|
this.slots = data
|
||||||
let len =[]
|
let len =[]
|
||||||
@ -305,12 +306,12 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
len.push( element.length)
|
len.push( element.length)
|
||||||
})
|
})
|
||||||
// // console.log(len)
|
console.log(len)
|
||||||
// this.slots.forEach(element => {
|
// this.slots.forEach(element => {
|
||||||
// // console.log(element)
|
// console.log(element)
|
||||||
// if(element == this.findSlotIndex[0]){
|
// if(element == this.findSlotIndex[0]){
|
||||||
// this.slots.indexOf(element)
|
// this.slots.indexOf(element)
|
||||||
// // console.log(this.slots.indexOf(element))
|
// console.log(this.slots.indexOf(element))
|
||||||
// this.slotIndex = this.slots.indexOf(element)
|
// this.slotIndex = this.slots.indexOf(element)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -322,15 +323,15 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
getCosultantList() {
|
getCosultantList() {
|
||||||
let param ={"busId": localStorage.getItem('busId')}
|
let param ={"busId": localStorage.getItem('busId')}
|
||||||
// // console.log(param)
|
console.log(param)
|
||||||
this._app.getCosultantListDetails(param).subscribe(res => {
|
this._app.getCosultantListDetails(param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// // console.log(res.data)
|
console.log(res.data)
|
||||||
let consultantsList = res.data;
|
let consultantsList = res.data;
|
||||||
this.consultants = consultantsList.filter(val => val.role == 'PRACTITIONER')
|
this.consultants = consultantsList.filter(val => val.role == 'PRACTITIONER')
|
||||||
// // console.log(this.consultants)
|
console.log(this.consultants)
|
||||||
if(this.user_role == 'FRONTDESK'){
|
if(this.user_role == 'FRONTDESK'){
|
||||||
// // console.log(this.local_data['ServicesMapDetail.userId'])
|
console.log(this.local_data['ServicesMapDetail.userId'])
|
||||||
this.practiId = this.local_data['ServicesMapDetail.userId']
|
this.practiId = this.local_data['ServicesMapDetail.userId']
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.form.controls['practitioner'].setValue(this.practiId);
|
this.form.controls['practitioner'].setValue(this.practiId);
|
||||||
@ -348,7 +349,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getConsultServices(selectedPractititoner){
|
getConsultServices(selectedPractititoner){
|
||||||
// // console.log(selectedPractititoner)
|
console.log(selectedPractititoner)
|
||||||
let userId = selectedPractititoner.id
|
let userId = selectedPractititoner.id
|
||||||
let busId = localStorage.getItem('busId')
|
let busId = localStorage.getItem('busId')
|
||||||
this.getServicesList(userId, busId)
|
this.getServicesList(userId, busId)
|
||||||
@ -359,47 +360,47 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
getPractitionerDetails(userId){
|
getPractitionerDetails(userId){
|
||||||
// let id = localStorage.getItem('user_id')
|
// let id = localStorage.getItem('user_id')
|
||||||
// // console.log(userId)
|
console.log(userId)
|
||||||
this.frontDeskChoosedPractiID = userId
|
this.frontDeskChoosedPractiID = userId
|
||||||
this._app.getPractitionerData(userId).subscribe(res => {
|
this._app.getPractitionerData(userId).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// // console.log(res)
|
console.log(res)
|
||||||
let usersList = res.data[0];
|
let usersList = res.data[0];
|
||||||
localStorage.setItem('practitioner',JSON.stringify(usersList))
|
localStorage.setItem('practitioner',JSON.stringify(usersList))
|
||||||
// // console.log(usersList)
|
console.log(usersList)
|
||||||
let dataDays = usersList['practitionerInfos'][0].days
|
let dataDays = usersList['practitionerInfos'][0].days
|
||||||
localStorage.setItem('advanced_slot_days',dataDays)
|
localStorage.setItem('advanced_slot_days',dataDays)
|
||||||
this.advanced_slot_days = dataDays
|
this.advanced_slot_days = dataDays
|
||||||
// // console.log(this.advanced_slot_days)
|
console.log(this.advanced_slot_days)
|
||||||
let tmp=[]
|
let tmp=[]
|
||||||
// // console.log(this.advanced_slot_days)
|
console.log(this.advanced_slot_days)
|
||||||
for(let i=0;i<=this.advanced_slot_days;i++){
|
for(let i=0;i<=this.advanced_slot_days;i++){
|
||||||
var someDate = new Date();
|
var someDate = new Date();
|
||||||
someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
|
someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days
|
||||||
var dateFormated = someDate.toISOString().substr(0,10);
|
var dateFormated = someDate.toISOString().substr(0,10);
|
||||||
// // console.log(dateFormated);
|
console.log(dateFormated);
|
||||||
tmp.push(dateFormated)
|
tmp.push(dateFormated)
|
||||||
}
|
}
|
||||||
// // console.log(tmp)
|
console.log(tmp)
|
||||||
this.days= tmp
|
this.days= tmp
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSlotDur(param:any,i:any,slots){
|
checkSlotDur(param:any,i:any,slots){
|
||||||
//// console.log(param,i)
|
//console.log(param,i)
|
||||||
// this.slot_array =[];
|
// this.slot_array =[];
|
||||||
// debugger;
|
// debugger;
|
||||||
// event.preventDefault();
|
// event.preventDefault();
|
||||||
// this.slotIndex = i
|
// this.slotIndex = i
|
||||||
// this.slotTime = param
|
// this.slotTime = param
|
||||||
|
|
||||||
// // console.log(this.date,param)
|
// console.log(this.date,param)
|
||||||
let thirtyMinutes = this.duration * 60000; // convert 30 minutes to milliseconds
|
let thirtyMinutes = this.duration * 60000; // convert 30 minutes to milliseconds
|
||||||
let date1 = new Date(param);
|
let date1 = new Date(param);
|
||||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||||
// // console.log(date1);
|
// console.log(date1);
|
||||||
// // console.log(date2);
|
// console.log(date2);
|
||||||
const currentTime = new Date(); // Get the current time
|
const currentTime = new Date(); // Get the current time
|
||||||
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
||||||
|
|
||||||
@ -414,7 +415,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
const lastSlt = new Date( resultArray[0]);
|
const lastSlt = new Date( resultArray[0]);
|
||||||
const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
||||||
|
|
||||||
// // console.log(resultArray,filteredTimes);
|
// console.log(resultArray,filteredTimes);
|
||||||
|
|
||||||
if(filteredTimes.length>0){
|
if(filteredTimes.length>0){
|
||||||
return 1
|
return 1
|
||||||
@ -423,10 +424,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
// let result = filteredTimes.pop();
|
// let result = filteredTimes.pop();
|
||||||
// // console.log(result);
|
// console.log(result);
|
||||||
// this.slots.forEach(element => {
|
// this.slots.forEach(element => {
|
||||||
// if(element <date2){
|
// if(element <date2){
|
||||||
// // console.log(element);
|
// console.log(element);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -434,10 +435,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submit(){
|
submit(){
|
||||||
// console.log(this.form.value,this.slotsResult,this.days[this.clicks]);
|
console.log(this.form.value,this.slotsResult,this.days[this.clicks]);
|
||||||
// if(this.slotsResult == undefined){
|
// if(this.slotsResult == undefined){
|
||||||
// }
|
// }
|
||||||
if(this.form.value.paymentStatus == 1){
|
if(this.form.value.paymentStatus == 0){
|
||||||
console.log('paymentmode')
|
console.log('paymentmode')
|
||||||
this.form.controls['paymentMode'].clearValidators();
|
this.form.controls['paymentMode'].clearValidators();
|
||||||
this.form.controls['paymentMode'].updateValueAndValidity();
|
this.form.controls['paymentMode'].updateValueAndValidity();
|
||||||
@ -449,12 +450,11 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
this.form.controls['appoinmentSlots'].updateValueAndValidity();
|
this.form.controls['appoinmentSlots'].updateValueAndValidity();
|
||||||
}else {
|
}else {
|
||||||
if (!this.form.valid) {
|
if (!this.form.valid) {
|
||||||
this.notifierService.notify('warning', 'Please Fill all the Fields');
|
return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isSubmitting = true;
|
this.isSubmitting = true;
|
||||||
// console.log(this.form.value,this.slotsResult,this.days[this.clicks]);
|
console.log(this.form.value,this.slotsResult,this.days[this.clicks]);
|
||||||
let userId
|
let userId
|
||||||
if(this.user_role != 'FRONTDESK'){
|
if(this.user_role != 'FRONTDESK'){
|
||||||
userId = localStorage.getItem('user_id')
|
userId = localStorage.getItem('user_id')
|
||||||
@ -490,7 +490,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
paramsData.id =this.local_data.id
|
paramsData.id =this.local_data.id
|
||||||
paramsData.status =this.form.value.status
|
paramsData.status =this.form.value.status
|
||||||
}
|
}
|
||||||
// console.log(paramsData)
|
console.log(paramsData)
|
||||||
this._app.addFormDetails(paramsData).subscribe(res => {
|
this._app.addFormDetails(paramsData).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
if(this.local_data.hasOwnProperty('action')){
|
if(this.local_data.hasOwnProperty('action')){
|
||||||
@ -502,8 +502,6 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}else{
|
}else{
|
||||||
this.notifierService.notify('success', 'Appointment Added Successfully');
|
this.notifierService.notify('success', 'Appointment Added Successfully');
|
||||||
}
|
}
|
||||||
localStorage.removeItem('go_appointment_data')
|
|
||||||
localStorage.setItem('go_appointment','1')
|
|
||||||
let param = {data:0,response:res}
|
let param = {data:0,response:res}
|
||||||
this.dialogRef.close(param);
|
this.dialogRef.close(param);
|
||||||
this.isSubmitting = false;
|
this.isSubmitting = false;
|
||||||
@ -518,18 +516,18 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
|
|
||||||
goToSlotBooking(i){
|
goToSlotBooking(i){
|
||||||
|
|
||||||
// console.log(i)
|
console.log(i)
|
||||||
// this.days[]
|
// this.days[]
|
||||||
if(this.clicks <this.advanced_slot_days){
|
if(this.clicks <this.advanced_slot_days){
|
||||||
this.clicks += 1;
|
this.clicks += 1;
|
||||||
}
|
}
|
||||||
// console.log( this.clicks)
|
console.log( this.clicks)
|
||||||
// console.log(this.days,this.days[ this.clicks], this.clicks)
|
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||||
|
|
||||||
let options:any = { weekday: 'long'};
|
let options:any = { weekday: 'long'};
|
||||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||||
var formatDate = prnDt.split(" ")
|
var formatDate = prnDt.split(" ")
|
||||||
// console.log(formatDate)
|
console.log(formatDate)
|
||||||
|
|
||||||
this.dayName = formatDate[0]
|
this.dayName = formatDate[0]
|
||||||
let userId
|
let userId
|
||||||
@ -540,17 +538,17 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
||||||
// console.log(params)
|
console.log(params)
|
||||||
this.end_user.getSlots(params).subscribe(res => {
|
this.end_user.getSlots(params).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// console.log(res)
|
console.log(res)
|
||||||
let data = res['data'];
|
let data = res['data'];
|
||||||
this.slots = data
|
this.slots = data
|
||||||
// this.slots.forEach(element => {
|
// this.slots.forEach(element => {
|
||||||
// // console.log(element)
|
// console.log(element)
|
||||||
// if(element == this.findSlotIndex[0]){
|
// if(element == this.findSlotIndex[0]){
|
||||||
// this.slots.indexOf(element)
|
// this.slots.indexOf(element)
|
||||||
// // console.log(this.slots.indexOf(element))
|
// console.log(this.slots.indexOf(element))
|
||||||
// this.slotIndex = this.slots.indexOf(element)
|
// this.slotIndex = this.slots.indexOf(element)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -565,13 +563,13 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
if(this.clicks >0){
|
if(this.clicks >0){
|
||||||
this.clicks -= 1;
|
this.clicks -= 1;
|
||||||
}
|
}
|
||||||
// console.log( this.clicks)
|
console.log( this.clicks)
|
||||||
// console.log(this.days,this.days[ this.clicks], this.clicks)
|
console.log(this.days,this.days[ this.clicks], this.clicks)
|
||||||
|
|
||||||
let options:any = { weekday: 'long'};
|
let options:any = { weekday: 'long'};
|
||||||
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options);
|
||||||
var formatDate = prnDt.split(" ")
|
var formatDate = prnDt.split(" ")
|
||||||
// console.log(formatDate)
|
console.log(formatDate)
|
||||||
|
|
||||||
this.dayName = formatDate[0]
|
this.dayName = formatDate[0]
|
||||||
let userId
|
let userId
|
||||||
@ -581,15 +579,15 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
userId = this.frontDeskChoosedPractiID
|
userId = this.frontDeskChoosedPractiID
|
||||||
}
|
}
|
||||||
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
let params ={"id":userId , "day": this.dayName , "addcount": this.clicks}
|
||||||
// console.log(params)
|
console.log(params)
|
||||||
this.end_user.getSlots(params).subscribe(res => {
|
this.end_user.getSlots(params).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// console.log(res)
|
console.log(res)
|
||||||
let data = res['data'];
|
let data = res['data'];
|
||||||
this.slots = data
|
this.slots = data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log( this.clicks)
|
console.log( this.clicks)
|
||||||
this.form.controls['appoinmentDate'].setValue(this.days[ this.clicks])
|
this.form.controls['appoinmentDate'].setValue(this.days[ this.clicks])
|
||||||
}
|
}
|
||||||
check(param){
|
check(param){
|
||||||
@ -613,21 +611,21 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
let params ={"id": userId,'addcount':0}
|
let params ={"id": userId,'addcount':0}
|
||||||
this._app.getSlots(params).subscribe((res:any) => {
|
this._app.getSlots(params).subscribe((res:any) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
// console.log(res)
|
console.log(res)
|
||||||
let data = res['data'];
|
let data = res['data'];
|
||||||
this.slots = data
|
this.slots = data
|
||||||
let len =[];
|
let len =[];
|
||||||
this.slots.forEach(element => {
|
this.slots.forEach(element => {
|
||||||
len.push( element.length)
|
len.push( element.length)
|
||||||
})
|
})
|
||||||
// console.log(len)
|
console.log(len)
|
||||||
this.slotslength = len.reduce((a, b) => a + b, 0)
|
this.slotslength = len.reduce((a, b) => a + b, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleActive(event:any,param:any,i:any,slots,j){
|
toggleActive(event:any,param:any,i:any,slots,j){
|
||||||
// console.log(event,param,i)
|
console.log(event,param,i)
|
||||||
this.slot_array =[];
|
this.slot_array =[];
|
||||||
this.slotIndex_group=j
|
this.slotIndex_group=j
|
||||||
// debugger;
|
// debugger;
|
||||||
@ -638,12 +636,12 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
this.form.controls['appoinmentTime'].setValue(resultDate)
|
this.form.controls['appoinmentTime'].setValue(resultDate)
|
||||||
this.date= param
|
this.date= param
|
||||||
|
|
||||||
// console.log(this.date,param,this.duration, this.ServiceId)
|
console.log(this.date,param,this.duration, this.ServiceId)
|
||||||
let thirtyMinutes = this.duration*60000; // convert 30 minutes to milliseconds
|
let thirtyMinutes = this.duration*60000; // convert 30 minutes to milliseconds
|
||||||
let date1 = new Date(param);
|
let date1 = new Date(param);
|
||||||
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
let date2 = new Date(date1.getTime() + thirtyMinutes);
|
||||||
// console.log(date1);
|
console.log(date1);
|
||||||
// console.log(date2,thirtyMinutes);
|
console.log(date2,thirtyMinutes);
|
||||||
const currentTime = new Date(); // Get the current time
|
const currentTime = new Date(); // Get the current time
|
||||||
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
//const filteredTimes = this.slots.filter(time => new Date(time) > date1);
|
||||||
|
|
||||||
@ -658,17 +656,17 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
const lastSlt = new Date( resultArray[0]);
|
const lastSlt = new Date( resultArray[0]);
|
||||||
const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
|
||||||
|
|
||||||
// console.log(resultArray,filteredTimes);
|
console.log(resultArray,filteredTimes);
|
||||||
// if(filteredTimes.length > 1){
|
// if(filteredTimes.length > 1){
|
||||||
// let result = filteredTimes.pop();
|
// let result = filteredTimes.pop();
|
||||||
// // console.log(result);
|
// console.log(result);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.slotsResult = filteredTimes
|
this.slotsResult = filteredTimes
|
||||||
// this.show = false;
|
// this.show = false;
|
||||||
// this.slots.forEach(element => {
|
// this.slots.forEach(element => {
|
||||||
// if(element <date2){
|
// if(element <date2){
|
||||||
// // console.log(element);
|
// console.log(element);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -676,18 +674,18 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getServicesList(id,busId) {
|
getServicesList(id,busId) {
|
||||||
// console.log(id,busId)
|
console.log(id,busId)
|
||||||
this.servicesList_array = []
|
this.servicesList_array = []
|
||||||
let userId = parseInt(id)
|
let userId = parseInt(id)
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
this._app.getServicesListDetails(userId,busId).subscribe(res => {
|
this._app.getServicesListDetails(userId,busId).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.servicesList_data = res.data;
|
this.servicesList_data = res.data;
|
||||||
// console.log(this.servicesList_data)
|
console.log(this.servicesList_data)
|
||||||
res['data'].forEach(element => {
|
res['data'].forEach(element => {
|
||||||
// tmp.push(element.service)
|
// tmp.push(element.service)
|
||||||
element.service.forEach(e => {
|
element.service.forEach(e => {
|
||||||
// console.log(e)
|
console.log(e)
|
||||||
this.servicesList_array.push(e)
|
this.servicesList_array.push(e)
|
||||||
this.assignService.push(e.servicesName)
|
this.assignService.push(e.servicesName)
|
||||||
});
|
});
|
||||||
@ -699,10 +697,10 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
// duration = this.serviceMapdetails[0].service[0].duration
|
// duration = this.serviceMapdetails[0].service[0].duration
|
||||||
// fees = this.serviceMapdetails[0].service[0].fees
|
// fees = this.serviceMapdetails[0].service[0].fees
|
||||||
// }
|
// }
|
||||||
// console.log(this.servicesList_array,this.form.value)
|
console.log(this.servicesList_array,this.form.value)
|
||||||
this.servicesList_array.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
|
this.servicesList_array.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
|
||||||
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
|
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
|
||||||
// console.log(serviceDetails,this.local_data['ServicesMapDetail.serviceId'])
|
console.log(serviceDetails,this.local_data['ServicesMapDetail.serviceId'])
|
||||||
if(serviceDetails[0].duration.length>0 ){
|
if(serviceDetails[0].duration.length>0 ){
|
||||||
this.duration = serviceDetails[0].duration[0].durationNew
|
this.duration = serviceDetails[0].duration[0].durationNew
|
||||||
} else{
|
} else{
|
||||||
@ -716,23 +714,19 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
// this.assignService = this.checkedArray
|
// this.assignService = this.checkedArray
|
||||||
}
|
}
|
||||||
serviceData(data){
|
serviceData(data){
|
||||||
// console.log(data)
|
console.log(data)
|
||||||
this.ServiceId = data.serviceId
|
this.ServiceId = data.serviceId
|
||||||
this.duration = data.duration
|
this.duration = data.duration
|
||||||
this.fees =[];
|
|
||||||
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == data.serviceId})
|
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == data.serviceId})
|
||||||
// console.log(serviceDetails)
|
console.log(serviceDetails)
|
||||||
if(serviceDetails[0].duration.length>0 ){
|
if(serviceDetails[0].duration.length>0 ){
|
||||||
this.duration = serviceDetails[0].duration[0].durationNew
|
this.duration = serviceDetails[0].duration[0].durationNew
|
||||||
this.fees = serviceDetails[0].duration[0].fees
|
this.fees = serviceDetails[0].duration[0].fees
|
||||||
// console.log(this.fees)
|
|
||||||
} else{
|
} else{
|
||||||
this.duration = serviceDetails[0].service[0].duration
|
this.duration = this.servicesList_array[0].duration
|
||||||
this.fees = serviceDetails[0].service[0].fees
|
this.fees = this.servicesList_array[0].fees
|
||||||
// console.log(this.fees)
|
|
||||||
}
|
}
|
||||||
// console.log(this.fees)
|
|
||||||
// this.form.controls['fees'].setValue([])
|
|
||||||
this.form.controls['fees'].setValue(this.fees)
|
this.form.controls['fees'].setValue(this.fees)
|
||||||
this.clicks = 0
|
this.clicks = 0
|
||||||
this.getSlots()
|
this.getSlots()
|
||||||
@ -746,11 +740,11 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
let appoinmentsList = res.data;
|
let appoinmentsList = res.data;
|
||||||
let id = localStorage.getItem('user_id')
|
let id = localStorage.getItem('user_id')
|
||||||
// console.log(id)
|
console.log(id)
|
||||||
// console.log(appoinmentsList)
|
console.log(appoinmentsList)
|
||||||
let filter = appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"]
|
let filter = appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"]
|
||||||
== id})
|
== id})
|
||||||
// console.log(filter)
|
console.log(filter)
|
||||||
filter.forEach(element => {
|
filter.forEach(element => {
|
||||||
this.appoinmentsIds.push( element.customer[0].id)
|
this.appoinmentsIds.push( element.customer[0].id)
|
||||||
});
|
});
|
||||||
@ -763,15 +757,15 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
this._cus.getCustomersListDetails(param).subscribe(res => {
|
this._cus.getCustomersListDetails(param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.customersList = res.data;
|
this.customersList = res.data;
|
||||||
// console.log(this.customersList,this.appoinmentsIds)
|
console.log(this.customersList,this.appoinmentsIds)
|
||||||
let user_role = localStorage.getItem('user_role');
|
let user_role = localStorage.getItem('user_role');
|
||||||
if(user_role == 'PRACTITIONER'){
|
if(user_role == 'PRACTITIONER'){
|
||||||
const activeIds = this.appoinmentsIds
|
const activeIds = this.appoinmentsIds
|
||||||
const serviceList = this.customersList
|
const serviceList = this.customersList
|
||||||
// console.log(activeIds,serviceList)
|
console.log(activeIds,serviceList)
|
||||||
|
|
||||||
const result = serviceList.filter(({id}) => activeIds.includes(id));
|
const result = serviceList.filter(({id}) => activeIds.includes(id));
|
||||||
// console.log(result)
|
console.log(result)
|
||||||
this.customersList = result
|
this.customersList = result
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -787,7 +781,7 @@ receivedMessageHandler(res){
|
|||||||
if(res == 0){
|
if(res == 0){
|
||||||
this.customerCard = 0
|
this.customerCard = 0
|
||||||
}else{
|
}else{
|
||||||
// console.log(res)
|
console.log(res)
|
||||||
this.customersList.push(res.data)
|
this.customersList.push(res.data)
|
||||||
this.customerId = res.data.id
|
this.customerId = res.data.id
|
||||||
this.form.controls['customer'].setValue( res.data.id);
|
this.form.controls['customer'].setValue( res.data.id);
|
||||||
@ -796,10 +790,10 @@ receivedMessageHandler(res){
|
|||||||
}
|
}
|
||||||
|
|
||||||
receiveAutoMsgHandler(p) {
|
receiveAutoMsgHandler(p) {
|
||||||
// console.log(p)
|
console.log(p)
|
||||||
}
|
}
|
||||||
customerIdvalue(id){
|
customerIdvalue(id){
|
||||||
// console.log(id)
|
console.log(id)
|
||||||
this.customerId = id
|
this.customerId = id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,10 +21,10 @@
|
|||||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||||
Please enter a valid email address
|
Please enter a valid email address
|
||||||
</mat-error>
|
</mat-error>
|
||||||
<mat-error *ngIf="myError('email', 'required')">Email is required</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">
|
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
||||||
Email is required
|
Email is required
|
||||||
</mat-error> -->
|
</mat-error>
|
||||||
<mat-error *ngIf="form.get('email').errors?.usernameTaken && form.get('email').dirty">
|
<mat-error *ngIf="form.get('email').errors?.usernameTaken && form.get('email').dirty">
|
||||||
Email already exists...
|
Email already exists...
|
||||||
</mat-error>
|
</mat-error>
|
||||||
@ -49,14 +49,12 @@
|
|||||||
<mat-select #country
|
<mat-select #country
|
||||||
name="country"
|
name="country"
|
||||||
id="country"
|
id="country"
|
||||||
formControlName="country" noEntriesFoundLabel="'no matching country found'" #singleSelect>
|
formControlName="country">
|
||||||
<mat-option>
|
<mat-option [value]="null">Select Country</mat-option>
|
||||||
<ngx-mat-select-search [formControl]="countrySearchCtrl" placeholderLabel="Search Country"></ngx-mat-select-search>
|
<mat-option *ngFor="let country of countries" (click)="countryname(country)" [value]="country.name"> {{ country.flag }} {{ country.name }}</mat-option>
|
||||||
</mat-option>
|
|
||||||
<mat-option *ngFor="let country of filteredCountries | async" (click)="countryname(country)" [value]="country.name"> {{ country.flag }} {{ country.name }}</mat-option>
|
|
||||||
<mat-option value="invalid">Invalid option</mat-option>
|
<mat-option value="invalid">Invalid option</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="form.get('country').hasError('required')">Country is required</mat-error>
|
<mat-error *ngIf="myError('country', 'required')">Country is required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field appearance="outline" class="mat-pane" *ngIf="action != 'Delete'; else elseTemplate" >
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="action != 'Delete'; else elseTemplate" >
|
||||||
@ -64,29 +62,24 @@
|
|||||||
<mat-select #state
|
<mat-select #state
|
||||||
name="state"
|
name="state"
|
||||||
id="state"
|
id="state"
|
||||||
formControlName="state" #singleSelect required>
|
formControlName="state">
|
||||||
<mat-option>
|
<mat-option [value]="null">-- Select Your State --</mat-option>
|
||||||
<ngx-mat-select-search [formControl]="stateSearchCtrl" placeholderLabel="Search State"></ngx-mat-select-search>
|
<mat-option *ngFor="let state of states" (click)="statename(state)" [value]="state.name"> {{ state.name }}</mat-option>
|
||||||
</mat-option>
|
|
||||||
<!-- <mat-option [value]="null">-- Select Your State --</mat-option> -->
|
|
||||||
<mat-option *ngFor="let state of filteredStates | async" (click)="statename(state)" [value]="state.name"> {{ state.name }}</mat-option>
|
|
||||||
<mat-option value="invalid">Invalid option</mat-option>
|
<mat-option value="invalid">Invalid option</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="form.get('state').hasError('required')">Country is required</mat-error>
|
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" class="mat-pane" *ngIf="action != 'Delete'; else elseTemplate" >
|
<mat-form-field appearance="outline" class="mat-pane" *ngIf="action != 'Delete'; else elseTemplate" >
|
||||||
<mat-label>City</mat-label>
|
<mat-label>City</mat-label>
|
||||||
<mat-select #city
|
<mat-select #city
|
||||||
name="city"
|
name="city"
|
||||||
id="city"
|
id="city"
|
||||||
formControlName="city" #singleSelect required>
|
formControlName="city">
|
||||||
<mat-option>
|
<mat-option [value]="null">-- Select Your City --</mat-option>
|
||||||
<ngx-mat-select-search [formControl]="citySearchCtrl" placeholderLabel="Search City"></ngx-mat-select-search>
|
<mat-option *ngFor="let city of cities" (click)="cityname(city)" [value]="city.name"> {{ city.name }}</mat-option>
|
||||||
</mat-option>
|
|
||||||
<mat-option *ngFor="let city of filteredCities | async" (click)="cityname(city)" [value]="city.name"> {{ city.name }}</mat-option>
|
|
||||||
<mat-option value="invalid">Invalid option</mat-option>
|
<mat-option value="invalid">Invalid option</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="form.get('city').hasError('required')">Country is required</mat-error>
|
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
|
||||||
</mat-form-field>
|
</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>State</mat-label>
|
<mat-label>State</mat-label>
|
||||||
@ -102,7 +95,7 @@
|
|||||||
</mat-form-field> -->
|
</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>Type Of Currency</mat-label>
|
<mat-label>Type Of Currency</mat-label>
|
||||||
<input placeholder="Type Of Currency" matInput [(ngModel)]="local_data.currency" formControlName="currency" readonly>
|
<input placeholder="Type Of Currency" matInput [(ngModel)]="local_data.currency" formControlName="currency">
|
||||||
<mat-error *ngIf="myError('currency', 'required')">currency is required</mat-error>
|
<mat-error *ngIf="myError('currency', 'required')">currency is required</mat-error>
|
||||||
<!-- <mat-error *ngIf="myError('currency', 'maxlength')">Limit exceed</mat-error> -->
|
<!-- <mat-error *ngIf="myError('currency', 'maxlength')">Limit exceed</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -117,10 +110,6 @@
|
|||||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
||||||
<input type='file'accept="image/*" data-max-size="2048" style="width: 50%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
<input type='file'accept="image/*" data-max-size="2048" style="width: 50%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
||||||
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
||||||
<!-- Add mat-error for logo -->
|
|
||||||
<mat-error *ngIf="form.get('logo').hasError('required')">Logo is required</mat-error>
|
|
||||||
<mat-error *ngIf="form.get('logo').hasError('maxSizeExceeded')">File size exceeds 2MB</mat-error>
|
|
||||||
<!-- Add more error conditions if needed -->
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" fxLayoutAlign="start end">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" fxLayoutAlign="start end">
|
||||||
<mat-checkbox *ngIf="action != 'Update'" class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
<mat-checkbox *ngIf="action != 'Update'" class="example-margin mt-2" formControlName="admin_checked" (change)="showOptions($event)">Add Admin</mat-checkbox>
|
||||||
|
|||||||
@ -81,7 +81,7 @@ input[type=file]::file-selector-button {
|
|||||||
border: 7px solid #16c1a636;
|
border: 7px solid #16c1a636;
|
||||||
}
|
}
|
||||||
.imgSizeValidation{
|
.imgSizeValidation{
|
||||||
color: blue;
|
color: red;
|
||||||
font-family: Didact Gothic, sans serif;
|
font-family: Didact Gothic, sans serif;
|
||||||
}
|
}
|
||||||
.mat-green:disabled {
|
.mat-green:disabled {
|
||||||
|
|||||||
@ -9,26 +9,10 @@ import { NotifierService } from 'angular-notifier';
|
|||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
import { map } from 'rxjs/internal/operators/map';
|
import { map } from 'rxjs/internal/operators/map';
|
||||||
import { Country, State, City } from 'country-state-city';
|
import { Country, State, City } from 'country-state-city';
|
||||||
import { ReplaySubject, Subject } from 'rxjs';
|
|
||||||
import { MatSelect } from '@angular/material/select';
|
|
||||||
import { take, takeUntil } from 'rxjs/operators';
|
|
||||||
export interface UsersData {
|
export interface UsersData {
|
||||||
name: string;
|
name: string;
|
||||||
id: number;
|
id: number;
|
||||||
}
|
}
|
||||||
export interface countriesName {
|
|
||||||
name: string;
|
|
||||||
isoCode: string;
|
|
||||||
}
|
|
||||||
export interface statesName {
|
|
||||||
name: string;
|
|
||||||
stateCode: string;
|
|
||||||
}
|
|
||||||
export interface cityName {
|
|
||||||
name: string;
|
|
||||||
cityCode: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-business',
|
selector: 'app-add-business',
|
||||||
@ -59,15 +43,7 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
currentFileUpload: any;
|
currentFileUpload: any;
|
||||||
countryevent:any=[];
|
countryevent:any=[];
|
||||||
isSubmitting: boolean = false;
|
isSubmitting: boolean = false;
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
public countrySearchCtrl: FormControl = new FormControl();
|
|
||||||
public filteredCountries: ReplaySubject<countriesName[]> = new ReplaySubject<countriesName[]>(1);
|
|
||||||
public stateSearchCtrl: FormControl = new FormControl();
|
|
||||||
public filteredStates: ReplaySubject<statesName[]> = new ReplaySubject<statesName[]>(1);
|
|
||||||
public citySearchCtrl: FormControl = new FormControl();
|
|
||||||
public filteredCities: ReplaySubject<cityName[]> = new ReplaySubject<cityName[]>(1);
|
|
||||||
protected _onDestroy = new Subject<void>();
|
|
||||||
@ViewChild('singleSelect') singleSelect: MatSelect;
|
|
||||||
constructor(private http: HttpClient,private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder,
|
constructor(private http: HttpClient,private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder,
|
||||||
public dialogRef: MatDialogRef<AddBusinessComponent>,
|
public dialogRef: MatDialogRef<AddBusinessComponent>,
|
||||||
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData) {
|
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData) {
|
||||||
@ -76,10 +52,6 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
console.log(this.local_data)
|
console.log(this.local_data)
|
||||||
this.action = this.local_data.action;
|
this.action = this.local_data.action;
|
||||||
this.formData= new FormData();
|
this.formData= new FormData();
|
||||||
console.log(this.action)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
get f(){
|
get f(){
|
||||||
return this.form.controls;
|
return this.form.controls;
|
||||||
@ -170,33 +142,16 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.countries)
|
let valData;
|
||||||
// this.filteredCountryList.next(this.countries.slice());
|
if(this.action == 'Add'){
|
||||||
|
valData= [this.validateUsernameAvailability.bind(this)]
|
||||||
this.filteredCountries.next(this.countries.slice());
|
}else{
|
||||||
|
valData = null
|
||||||
// listen for search field value changes
|
}
|
||||||
this.countrySearchCtrl.valueChanges
|
|
||||||
.pipe(takeUntil(this._onDestroy))
|
|
||||||
.subscribe(() => {
|
|
||||||
this.filterCountries();
|
|
||||||
});
|
|
||||||
// if(this.countries.length != 0){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// let valData;
|
|
||||||
// if(this.action == 'Add'){
|
|
||||||
// valData= [this.validateUsernameAvailability.bind(this)]
|
|
||||||
// }else{
|
|
||||||
// valData = null
|
|
||||||
// }
|
|
||||||
let valData = [this.validateUsernameAvailability.bind(this)]
|
|
||||||
let userrole = localStorage.getItem('user_role')
|
let userrole = localStorage.getItem('user_role')
|
||||||
this.form = new FormGroup({
|
this.form = new FormGroup({
|
||||||
admin_checked: new FormControl('',null),
|
admin_checked: new FormControl('',null),
|
||||||
logo: new FormControl('', [Validators.required]),
|
logo: new FormControl('', null),
|
||||||
busName: new FormControl('', [Validators.required]),
|
busName: new FormControl('', [Validators.required]),
|
||||||
address: new FormControl('', [Validators.required, Validators.maxLength(100)]),
|
address: new FormControl('', [Validators.required, Validators.maxLength(100)]),
|
||||||
city: new FormControl('', [Validators.required]),
|
city: new FormControl('', [Validators.required]),
|
||||||
@ -261,7 +216,6 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
this.form.patchValue(this.local_data)
|
this.form.patchValue(this.local_data)
|
||||||
// this.filterList()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public myError = (controlName: string, errorName: string) =>{
|
public myError = (controlName: string, errorName: string) =>{
|
||||||
@ -272,24 +226,13 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
return this.http.get<any[]>(this.apiUrl + "businessDetailList")
|
return this.http.get<any[]>(this.apiUrl + "businessDetailList")
|
||||||
.pipe(
|
.pipe(
|
||||||
map((response:any) => {
|
map((response:any) => {
|
||||||
let apiList
|
|
||||||
if(this.action == 'Add'){
|
console.log(response)
|
||||||
console.log('add')
|
let response1 = response.data
|
||||||
apiList = response.data
|
|
||||||
}else{
|
|
||||||
console.log('edit',this.local_data.busId)
|
|
||||||
let listData = response.data
|
|
||||||
const newArray = listData.filter(item => item.busId !== this.local_data.busId);
|
|
||||||
console.log(newArray)
|
|
||||||
apiList = newArray
|
|
||||||
}
|
|
||||||
|
|
||||||
// console.log(response)
|
|
||||||
let response1 = apiList
|
|
||||||
let tmp=[];
|
let tmp=[];
|
||||||
if(response1 instanceof Array){
|
if(response1 instanceof Array){
|
||||||
|
|
||||||
apiList.forEach(element => {
|
response.data.forEach(element => {
|
||||||
tmp.push(element.email)
|
tmp.push(element.email)
|
||||||
});
|
});
|
||||||
console.log(tmp,`${control.value}`);
|
console.log(tmp,`${control.value}`);
|
||||||
@ -306,15 +249,9 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
let tmp = this.form.value
|
let tmp = this.form.value
|
||||||
tmp.id = this.local_data.id
|
tmp.id = this.local_data.id
|
||||||
console.log(tmp,this.form)
|
console.log(tmp,this.form)
|
||||||
if(this.action == 'Update'){
|
|
||||||
this.form.controls['admin_checked'].clearValidators();
|
|
||||||
this.form.controls['admin_checked'].updateValueAndValidity();
|
|
||||||
|
|
||||||
console.log(this.form.value)
|
|
||||||
}
|
|
||||||
if (!this.form.valid) {
|
if (!this.form.valid) {
|
||||||
console.log("check")
|
console.log("check")
|
||||||
this.notifierService.notify('warning', 'Please fill all the fields');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.isSubmitting = true
|
this.isSubmitting = true
|
||||||
@ -352,20 +289,9 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
this.countryevent = country
|
this.countryevent = country
|
||||||
this.states = State.getStatesOfCountry(country.isoCode);
|
this.states = State.getStatesOfCountry(country.isoCode);
|
||||||
console.log(country)
|
console.log(country)
|
||||||
console.log(this.states)
|
|
||||||
this.filteredStates.next(this.states.slice());
|
|
||||||
this.stateSearchCtrl.valueChanges
|
|
||||||
.pipe(takeUntil(this._onDestroy))
|
|
||||||
.subscribe(() => {
|
|
||||||
this.filterStates();
|
|
||||||
});
|
|
||||||
this.form.controls['currency'].setValue(country.currency)
|
this.form.controls['currency'].setValue(country.currency)
|
||||||
|
|
||||||
this.selectedCountry = country;
|
this.selectedCountry = country;
|
||||||
// if(this.action == 'Update'){
|
|
||||||
this.form.controls['state'].setValue('')
|
|
||||||
this.form.controls['city'].setValue('')
|
|
||||||
// }
|
|
||||||
this.cities = this.selectedState = this.selectedCity = null;
|
this.cities = this.selectedState = this.selectedCity = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,15 +299,8 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
// console.log($event,$event.value)
|
// console.log($event,$event.value)
|
||||||
this.cities = City.getCitiesOfState( this.countryevent.isoCode, state.isoCode)
|
this.cities = City.getCitiesOfState( this.countryevent.isoCode, state.isoCode)
|
||||||
console.log(this.cities)
|
console.log(this.cities)
|
||||||
this.filteredCities.next(this.cities.slice());
|
this.selectedState = state;
|
||||||
this.citySearchCtrl.valueChanges
|
|
||||||
.pipe(takeUntil(this._onDestroy))
|
|
||||||
.subscribe(() => {
|
|
||||||
this.filterCity();
|
|
||||||
});
|
|
||||||
this.selectedState = state;
|
|
||||||
// this.selectedCity = null;
|
// this.selectedCity = null;
|
||||||
this.form.controls['city'].setValue('')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cityname(city){
|
cityname(city){
|
||||||
@ -389,103 +308,4 @@ export class AddBusinessComponent implements OnInit {
|
|||||||
this.selectedCity = city
|
this.selectedCity = city
|
||||||
}
|
}
|
||||||
|
|
||||||
// filterList() {
|
|
||||||
// console.log(this.countries)
|
|
||||||
// this.countrySearchCtrl.valueChanges.pipe().subscribe(()=>{
|
|
||||||
// this.applyFilter(this.countrySearchCtrl.value,this.filteredCountryList,this.countries,'name')
|
|
||||||
// })
|
|
||||||
// this.stateSearchCtrl.valueChanges.pipe().subscribe(()=>{
|
|
||||||
// this.applyFilter(this.stateSearchCtrl.value,this.filteredStateList,this.states.name,'name')
|
|
||||||
// })
|
|
||||||
// // this.branchFilterCtrl.valueChanges.pipe().subscribe(()=>{
|
|
||||||
// // this.applyFilter(this.branchFilterCtrl.value,this.filteredBranchList,this.lenderBranchList,'branch_name')
|
|
||||||
// // })
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// applyFilter(filtered_text,filter_list,raw_list,obj_name) {
|
|
||||||
// if (!raw_list) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// // get the search keyword
|
|
||||||
// let search = filtered_text;
|
|
||||||
// if (!search) {
|
|
||||||
// filter_list.next(raw_list.slice());
|
|
||||||
// return;
|
|
||||||
// } else {
|
|
||||||
// search = search.toLowerCase();
|
|
||||||
// }
|
|
||||||
// // filter the banks
|
|
||||||
// filter_list.next(
|
|
||||||
// raw_list.filter(bank => bank[obj_name].toLowerCase().indexOf(search) > -1)
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the initial value after the filteredCountries are loaded initially
|
|
||||||
*/
|
|
||||||
protected setInitialValue() {
|
|
||||||
this.filteredCountries.pipe(take(1),takeUntil(this._onDestroy)).subscribe(() => {
|
|
||||||
this.singleSelect.compareWith = (a:countriesName, b: countriesName) => a && b && a.isoCode === b.isoCode;
|
|
||||||
});
|
|
||||||
this.filteredStates.pipe(take(1),takeUntil(this._onDestroy)).subscribe(() => {
|
|
||||||
this.singleSelect.compareWith = (a:statesName, b: statesName) => a && b && a.stateCode === b.stateCode;
|
|
||||||
});
|
|
||||||
this.filteredCities.pipe(take(1),takeUntil(this._onDestroy)).subscribe(() => {
|
|
||||||
this.singleSelect.compareWith = (a:cityName, b: cityName) => a && b && a.cityCode === b.cityCode;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
protected filterCountries() {
|
|
||||||
if (!this.countries) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// get the search keyword
|
|
||||||
let search = this.countrySearchCtrl.value;
|
|
||||||
if (!search) {
|
|
||||||
this.filteredCountries.next(this.countries.slice());
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
search = search.toLowerCase();
|
|
||||||
}
|
|
||||||
// filter the banks
|
|
||||||
this.filteredCountries.next(this.countries.filter(val => val.name.toLowerCase().indexOf(search) > -1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected filterStates(){
|
|
||||||
if (!this.states) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// get the search keyword
|
|
||||||
let search = this.stateSearchCtrl.value;
|
|
||||||
if (!search) {
|
|
||||||
this.filteredStates.next(this.states.slice());
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
search = search.toLowerCase();
|
|
||||||
}
|
|
||||||
// filter the banks
|
|
||||||
this.filteredStates.next(this.states.filter(val => val.name.toLowerCase().indexOf(search) > -1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected filterCity(){
|
|
||||||
if (!this.cities) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// get the search keyword
|
|
||||||
let search = this.citySearchCtrl.value;
|
|
||||||
if (!search) {
|
|
||||||
this.filteredCities.next(this.cities.slice());
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
search = search.toLowerCase();
|
|
||||||
}
|
|
||||||
// filter the banks
|
|
||||||
this.filteredCities.next(this.cities.filter(val => val.name.toLowerCase().indexOf(search) > -1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,13 +101,10 @@
|
|||||||
</mat-expansion-panel> -->
|
</mat-expansion-panel> -->
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
|
|
||||||
<!-- Show "No Data Available" or "No matching data found" text -->
|
<mat-card-content *ngIf="recordStatus">
|
||||||
<mat-card-content *ngIf="recordStatus && businessListSource.filteredData.length === 0">
|
<h5 align="center" style="font-weight: bold;
|
||||||
<h5 align="center" style="font-weight: bold; color: brown;">No Data Available</h5>
|
color: brown;">No Data Available</h5>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-content *ngIf="!recordStatus && businessListSource.filteredData.length === 0">
|
|
||||||
<h5 align="center" style="font-weight: bold; color: brown;">No matching data found</h5>
|
|
||||||
</mat-card-content>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -54,11 +54,6 @@ export class BusinessListComponent implements OnInit {
|
|||||||
filterValue = filterValue.trim(); // Remove whitespace
|
filterValue = filterValue.trim(); // Remove whitespace
|
||||||
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
|
||||||
this.businessListSource.filter = filterValue;
|
this.businessListSource.filter = filterValue;
|
||||||
this.checkRecordStatus();
|
|
||||||
}
|
|
||||||
|
|
||||||
checkRecordStatus() {
|
|
||||||
this.recordStatus = this.businessListSource.filteredData.length === 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isactive(value: any) {
|
isactive(value: any) {
|
||||||
@ -132,7 +127,6 @@ export class BusinessListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
console.log(this.businessListSource)
|
console.log(this.businessListSource)
|
||||||
// this.recordStatus=false;
|
// this.recordStatus=false;
|
||||||
this.checkRecordStatus();
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
@ -140,7 +134,6 @@ export class BusinessListComponent implements OnInit {
|
|||||||
this.businessList=[];
|
this.businessList=[];
|
||||||
this.businessListLength= null;
|
this.businessListLength= null;
|
||||||
this.recordStatus=true;
|
this.recordStatus=true;
|
||||||
this.checkRecordStatus();
|
|
||||||
}
|
}
|
||||||
}, error => this.isLoading = false);
|
}, error => this.isLoading = false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,8 +10,6 @@ import { DemoMaterialModule } from 'app/shared/demo.module';
|
|||||||
import { NgScrollbarModule } from 'ngx-scrollbar';
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
||||||
import { AddBusinessComponent } from './add-business/add-business.component';
|
import { AddBusinessComponent } from './add-business/add-business.component';
|
||||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
|
|
||||||
const customNotifierOptions: NotifierOptions = {
|
const customNotifierOptions: NotifierOptions = {
|
||||||
@ -62,7 +60,6 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
ReactiveFormsModule,
|
|
||||||
DemoMaterialModule,
|
DemoMaterialModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
BusinessRoutingModule,
|
BusinessRoutingModule,
|
||||||
@ -71,7 +68,6 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
ScrollingModule,
|
ScrollingModule,
|
||||||
NgScrollbarModule,
|
NgScrollbarModule,
|
||||||
NotifierModule.withConfig(customNotifierOptions),
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
NgxMatSelectSearchModule
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class BusinessModule { }
|
export class BusinessModule { }
|
||||||
|
|||||||
@ -7,14 +7,12 @@
|
|||||||
<div mat-dialog-content class="my-table">
|
<div mat-dialog-content class="my-table">
|
||||||
|
|
||||||
<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>Name</mat-label>
|
|
||||||
<input placeholder=" Name" matInput formControlName="cusName">
|
<input placeholder=" Name" matInput formControlName="cusName">
|
||||||
<mat-error *ngIf="myError('cusName', 'required')">Name is required</mat-error>
|
<mat-error *ngIf="myError('cusName', 'required')">Name is required</mat-error>
|
||||||
<mat-error *ngIf="myError('cusName', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('cusName', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</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>Email</mat-label>
|
|
||||||
<input type="email" placeholder=" Email" matInput [(ngModel)]="local_data.email" formControlName="email">
|
<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)">
|
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||||
Please enter a valid email address
|
Please enter a valid email address
|
||||||
@ -25,34 +23,29 @@
|
|||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</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>Mobile No</mat-label>
|
<input placeholder=" Mobile No" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
|
||||||
<input placeholder="Mobile No" type="text" appMobileNumberPattern maxlength="10" minlength="10" matInput [(ngModel)]="local_data.phoneNo" formControlName="phoneNo">
|
|
||||||
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
|
<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', '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', 'minlength')"> Contact No must be at least 10 characters</mat-error>
|
||||||
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</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>Address</mat-label>
|
<input placeholder=" Address" matInput [(ngModel)]="local_data.address_1" formControlName="address_1">
|
||||||
<input placeholder="Address" matInput [(ngModel)]="local_data.address_1" formControlName="address_1">
|
|
||||||
<mat-error *ngIf="myError('address_1', 'required')">Address is required</mat-error>
|
<mat-error *ngIf="myError('address_1', 'required')">Address is required</mat-error>
|
||||||
<mat-error *ngIf="myError('address_1', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('address_1', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</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>State</mat-label>
|
<input placeholder=" State" matInput [(ngModel)]="local_data.state" formControlName="state">
|
||||||
<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', 'required')">State is required</mat-error>
|
||||||
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</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>City</mat-label>
|
<input placeholder=" City" matInput [(ngModel)]="local_data.city" formControlName="city">
|
||||||
<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', 'required')">City is required</mat-error>
|
||||||
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</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>Pincode</mat-label>
|
<input placeholder=" Pincode" matInput [(ngModel)]="local_data.pincode" formControlName="pincode">
|
||||||
<input placeholder="Pincode" matInput [(ngModel)]="local_data.pincode" formControlName="pincode">
|
|
||||||
<mat-error *ngIf="myError('pincode', 'required')">Pincode is required</mat-error>
|
<mat-error *ngIf="myError('pincode', 'required')">Pincode is required</mat-error>
|
||||||
<mat-error *ngIf="myError('pincode', 'maxlength')">Limit exceed</mat-error>
|
<mat-error *ngIf="myError('pincode', 'maxlength')">Limit exceed</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</mat-form-field> -->
|
</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>Duration</mat-label>
|
<mat-label>Duration</mat-label>
|
||||||
<input appMobileNumberPattern placeholder="Duration" matInput formControlName="duration" required>
|
<input appMobileNumberPattern placeholder="Fees" matInput formControlName="duration" required>
|
||||||
<div matSuffix>
|
<div matSuffix>
|
||||||
<span><b>Mins</b></span>
|
<span><b>Mins</b></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -56,10 +56,9 @@
|
|||||||
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
|
||||||
Please enter a valid email address
|
Please enter a valid email address
|
||||||
</mat-error>
|
</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">
|
||||||
<!-- <mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
|
|
||||||
Email is required
|
Email is required
|
||||||
</mat-error> -->
|
</mat-error>
|
||||||
<mat-error *ngIf="form.get('email').errors?.usernameTaken && form.get('email').dirty">
|
<mat-error *ngIf="form.get('email').errors?.usernameTaken && form.get('email').dirty">
|
||||||
Email already exists...
|
Email already exists...
|
||||||
</mat-error>
|
</mat-error>
|
||||||
@ -96,10 +95,6 @@
|
|||||||
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
<img *ngIf="imageViewStatus == true" class="image mb-2" [src]="url" height="150" width="150"><br/>
|
||||||
<input type='file'accept="image/*" data-max-size="2048" style="width: 33%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
<input type='file'accept="image/*" data-max-size="2048" style="width: 33%;" (change)="onSelectFile($event)" formControlName="logo"><br>
|
||||||
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
<span *ngIf="imageViewStatus != true" class="imgSizeValidation">Upload Below 2MB <br> Supported File (jpg,jpeg and png)</span>
|
||||||
<!-- Add mat-error for logo -->
|
|
||||||
<mat-error *ngIf="form.get('logo').hasError('required')">Logo is required</mat-error>
|
|
||||||
<mat-error *ngIf="form.get('logo').hasError('maxSizeExceeded')">File size exceeds 2MB</mat-error>
|
|
||||||
<!-- Add more error conditions if needed -->
|
|
||||||
<!-- <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">
|
||||||
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
<input placeholder="ConfirmPassword" matInput formControlName="confirmPassword">
|
||||||
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
<mat-error *ngIf="myError('confirmPassword', 'required')">confirmPassword is required</mat-error>
|
||||||
|
|||||||
@ -57,7 +57,7 @@ input[type=file]::file-selector-button {
|
|||||||
border: 7px solid #16c1a636;
|
border: 7px solid #16c1a636;
|
||||||
}
|
}
|
||||||
.imgSizeValidation{
|
.imgSizeValidation{
|
||||||
color: blue;
|
color: red;
|
||||||
font-family: Didact Gothic, sans serif;
|
font-family: Didact Gothic, sans serif;
|
||||||
}
|
}
|
||||||
.user-mate{
|
.user-mate{
|
||||||
|
|||||||
@ -58,13 +58,12 @@ export class AddUserComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// let valData;
|
let valData;
|
||||||
// if(this.action == 'Add'){
|
if(this.action == 'Add'){
|
||||||
// valData= [this.validateUsernameAvailability.bind(this)]
|
valData= [this.validateUsernameAvailability.bind(this)]
|
||||||
// }else{
|
}else{
|
||||||
// valData = null
|
valData = null
|
||||||
// }
|
}
|
||||||
let valData = [this.validateUsernameAvailability.bind(this)]
|
|
||||||
this.hide = true;
|
this.hide = true;
|
||||||
this.disableBus = localStorage.getItem('go_admin')
|
this.disableBus = localStorage.getItem('go_admin')
|
||||||
this.userrole = localStorage.getItem('user_role')
|
this.userrole = localStorage.getItem('user_role')
|
||||||
@ -82,7 +81,7 @@ export class AddUserComponent implements OnInit {
|
|||||||
password: new FormControl('', [Validators.required,Validators.pattern(
|
password: new FormControl('', [Validators.required,Validators.pattern(
|
||||||
'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,16}$'
|
'^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,16}$'
|
||||||
)]),
|
)]),
|
||||||
logo: new FormControl('', [Validators.required]),
|
logo: new FormControl('', null),
|
||||||
// confirmPassword: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
// confirmPassword: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
||||||
createdBy:new FormControl(this.userrole,null),
|
createdBy:new FormControl(this.userrole,null),
|
||||||
});
|
});
|
||||||
@ -124,7 +123,7 @@ export class AddUserComponent implements OnInit {
|
|||||||
// console.log(this.action,this.local_data)
|
// console.log(this.action,this.local_data)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
validateUsernameAvailability(control: FormControl) {
|
validateUsernameAvailability(control: FormControl) {
|
||||||
let userRole = localStorage.getItem('user_role')
|
let userRole = localStorage.getItem('user_role')
|
||||||
@ -137,31 +136,20 @@ export class AddUserComponent implements OnInit {
|
|||||||
return this.http.post<any[]>(this.apiUrl + "getusers",param)
|
return this.http.post<any[]>(this.apiUrl + "getusers",param)
|
||||||
.pipe(
|
.pipe(
|
||||||
map((response:any) => {
|
map((response:any) => {
|
||||||
console.log(response)
|
|
||||||
let apiList
|
|
||||||
if(this.action == 'Add'){
|
|
||||||
console.log('add')
|
|
||||||
apiList = response.data
|
|
||||||
}else{
|
|
||||||
console.log('edit',this.local_data.id)
|
|
||||||
let listData = response.data
|
|
||||||
const newArray = listData.filter(item => item.id !== this.local_data.id);
|
|
||||||
console.log(newArray)
|
|
||||||
apiList = newArray
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(response)
|
console.log(response)
|
||||||
let response1 = apiList
|
let response1 = response.data
|
||||||
let tmp=[];
|
let tmp=[];
|
||||||
if(response1 instanceof Array){
|
if(response1 instanceof Array){
|
||||||
apiList.forEach(element => {
|
|
||||||
tmp.push(element.email)
|
response.data.forEach(element => {
|
||||||
});
|
tmp.push(element.email)
|
||||||
console.log(tmp,`${control.value}`);
|
});
|
||||||
return !tmp.includes(`${control.value}`) ? null : { usernameTaken: true };
|
console.log(tmp,`${control.value}`);
|
||||||
}else{
|
return !tmp.includes(`${control.value}`) ? null : { usernameTaken: true };
|
||||||
return null
|
}else{
|
||||||
}
|
return null
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -231,7 +219,6 @@ export class AddUserComponent implements OnInit {
|
|||||||
this.form.controls['password'].updateValueAndValidity();
|
this.form.controls['password'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
if (!this.form.valid) {
|
if (!this.form.valid) {
|
||||||
this.notifierService.notify('warning', 'Please fill all the fields');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.isSubmitting = true
|
this.isSubmitting = true
|
||||||
|
|||||||
@ -149,12 +149,10 @@
|
|||||||
</mat-expansion-panel> -->
|
</mat-expansion-panel> -->
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
|
|
||||||
<mat-card-content *ngIf="recordStatus && usersList.filteredData.length === 0">
|
<mat-card-content *ngIf="recordStatus">
|
||||||
<h5 align="center" style="font-weight: bold; color: brown;">No Data Available</h5>
|
<h5 align="center" style="font-weight: bold;
|
||||||
</mat-card-content>
|
color: brown;">No Data Available</h5>
|
||||||
<mat-card-content *ngIf="!recordStatus && usersList.filteredData.length === 0">
|
</mat-card-content>
|
||||||
<h5 align="center" style="font-weight: bold; color: brown;">No matching data found</h5>
|
|
||||||
</mat-card-content>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -97,12 +97,7 @@ export class UserListComponent implements OnInit {
|
|||||||
this.usersList.filter = filterValue;
|
this.usersList.filter = filterValue;
|
||||||
console.log(this.usersList)
|
console.log(this.usersList)
|
||||||
|
|
||||||
this.checkRecordStatus();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
checkRecordStatus() {
|
|
||||||
this.recordStatus = this.usersList.filteredData.length === 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
isactive(value: any) {
|
isactive(value: any) {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
|
|||||||
@ -1,41 +1,8 @@
|
|||||||
<ng-scrollbar class="scrollHV" *ngIf="user_role != 'PRACTITIONER'">
|
<ng-scrollbar class="scrollHV">
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
<mat-card class="mat_height" style="background:#3abba3;color: #fff;">
|
<mat-card class="mat_height">
|
||||||
<mat-card-content style="padding: 0;">
|
<div fxLayout="row wrap" class="inside_height">
|
||||||
<div fxLayout="row wrap" style="padding: 10px;">
|
|
||||||
<div fxFlex.xs="13" fxFlex.sm="13" fxFlex.md="13" fxFlex.lg="13" fxFlex.xl="13" class="p-gap">
|
|
||||||
<mat-icon>calendar_today</mat-icon>
|
|
||||||
</div>
|
|
||||||
<div fxFlex.xs="87" fxFlex.sm="87" fxFlex.md="87" fxFlex.lg="87" fxFlex.xl="87" class="p-gap">
|
|
||||||
<h5 style="margin: 0;">Appointment</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div fxLayout="row" style="padding: 10px;color: #3abba3;background-color: #fff;">
|
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" fxLayoutAlign="center center" class="p-gap" style=" border-right: 1px solid rgba(0, 0, 0, 0.12);display: block !important;">
|
|
||||||
<div class="card-block text-center">
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<h2>{{count.today_appoinments_count}}</h2>
|
|
||||||
<p class="text-muted">Today</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" fxLayoutAlign="center center" class="p-gap">
|
|
||||||
<div class="card-block text-center">
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<h2>{{count.monthly_appoinments_count}}</h2>
|
|
||||||
<p class="text-muted">Monthly</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-card-content>
|
|
||||||
<!-- <div fxLayout="row wrap" class="inside_height">
|
|
||||||
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-blue icon-tp">
|
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-blue icon-tp">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<mat-icon>calendar_today</mat-icon>
|
<mat-icon>calendar_today</mat-icon>
|
||||||
@ -59,47 +26,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
<mat-card class="mat_height" style="background: cadetblue;color: #fff;">
|
<mat-card class="mat_height">
|
||||||
<mat-card-content style="padding: 0;">
|
|
||||||
<div fxLayout="row wrap" class="" style="padding: 10px;">
|
|
||||||
<div fxFlex.xs="13" fxFlex.sm="13" fxFlex.md="13" fxFlex.lg="13" fxFlex.xl="13" class="p-gap">
|
|
||||||
<!-- <mat-icon class="mat-icon-size" aria-hidden="true">money</mat-icon> -->
|
|
||||||
<img src="assets/images/money.png" style="height: 32px !important;max-width: 32px !important;">
|
|
||||||
</div>
|
|
||||||
<div fxFlex.xs="87" fxFlex.sm="87" fxFlex.md="87" fxFlex.lg="87" fxFlex.xl="87" class="p-gap">
|
|
||||||
<h5 style="margin: 0;">Revenue</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div fxLayout="row" style="padding: 10px;color: cadetblue;background-color: #fff;">
|
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" fxLayoutAlign="center center" class="p-gap" style=" border-right: 1px solid rgba(0, 0, 0, 0.12);display: block !important;">
|
|
||||||
<div class="card-block text-center">
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<h2>{{count.today_earning_count | currency:currency:true:'2.0'}}</h2>
|
|
||||||
<p class="text-muted">Today</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" fxLayoutAlign="center center" class="p-gap">
|
|
||||||
<div class="card-block text-center">
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<h2>{{count.monthly_earning_count | currency:currency:true:'2.0'}}</h2>
|
|
||||||
<p class="text-muted">Monthly</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-card-content>
|
|
||||||
</mat-card>
|
|
||||||
<!-- <mat-card class="mat_height">
|
|
||||||
<div fxLayout="row wrap" class="inside_height">
|
<div fxLayout="row wrap" class="inside_height">
|
||||||
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-green icon-tp">
|
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-green icon-tp">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@ -125,35 +56,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card> -->
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
<mat-card class="mat_height" style="background: darksalmon;color: #fff;">
|
<mat-card class="mat_height">
|
||||||
<mat-card-content style="padding: 0;">
|
|
||||||
<div fxLayout="row wrap" style="padding: 10px;">
|
|
||||||
<div fxFlex.xs="13" fxFlex.sm="13" fxFlex.md="13" fxFlex.lg="13" fxFlex.xl="13" class="p-gap">
|
|
||||||
<mat-icon>supervisor_account</mat-icon>
|
|
||||||
</div>
|
|
||||||
<div fxFlex.xs="87" fxFlex.sm="87" fxFlex.md="87" fxFlex.lg="87" fxFlex.xl="87" class="p-gap">
|
|
||||||
<h5 style="margin: 0;">Customer</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div fxLayout="row" style="padding: 10px;color: darksalmon;background-color: #fff;">
|
|
||||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center" class="p-gap" style="display: block !important;">
|
|
||||||
<div class="card-block text-center">
|
|
||||||
<div class="row">
|
|
||||||
<div>
|
|
||||||
<h2>{{count.customer_count}}</h2>
|
|
||||||
<p class="text-muted">Total</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</mat-card-content>
|
|
||||||
</mat-card>
|
|
||||||
<!-- <mat-card class="mat_height">
|
|
||||||
<div fxLayout="row wrap" class="inside_height">
|
<div fxLayout="row wrap" class="inside_height">
|
||||||
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-red icon-tp">
|
<div fxFlex.gt-sm="50%" fxLayoutAlign="center center" fxFlex="100" class="m-gap p-gap mb-0 grad-red icon-tp">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@ -174,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card> -->
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div fxLayout="row wrap">
|
<!-- <div fxLayout="row wrap">
|
||||||
@ -390,74 +296,168 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
</ng-scrollbar>
|
|
||||||
<!-- <ng-scrollbar class="scrollHV" *ngIf="user_role == 'PRACTITIONER'"> -->
|
|
||||||
<section *ngIf="user_role == 'PRACTITIONER'" >
|
<!-- <section>
|
||||||
<h3>Appointments</h3>
|
<h3>Appointments</h3>
|
||||||
|
|
||||||
<div class="services-grid">
|
<div class="services-grid">
|
||||||
|
|
||||||
<div class="service service2">
|
<div class="service service2">
|
||||||
<h4>Today</h4>
|
<i class="ti-light-bulb"></i>
|
||||||
<ng-scrollbar class="scrollHV service" *ngIf="user_role == 'PRACTITIONER'">
|
<mat-card>
|
||||||
<mat-card *ngFor="let appoinment of appoinmentsListToday; index as i;" (click)="goToBookedAppointment(appoinment)">
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap">
|
||||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
<div>Gopi</div>
|
||||||
|
<div>7896541230</div>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
|
||||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
|
||||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap">
|
||||||
<div style="text-align: end;margin-right: 7px">{{appoinment.status}}</div>
|
<div>30/12/2023, 3:00pm</div>
|
||||||
<div style="text-align: start;margin-right: 7px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
<div>Status</div>
|
||||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ng-scrollbar>
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="service service2">
|
<div class="service service2">
|
||||||
<h4>Tomorrow</h4>
|
<i class="ti-light-bulb"></i>
|
||||||
<ng-scrollbar class="scrollHV service" >
|
<mat-card>
|
||||||
<mat-card *ngFor="let appoinment of appoinmentsListTomorrow; index as i;" (click)="goToBookedAppointment(appoinment)">
|
<div>
|
||||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
<p>hello</p>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
</div>
|
||||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
</mat-card>
|
||||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
<mat-card>
|
||||||
</div>
|
<div>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
<p>hello</p>
|
||||||
<div style="text-align: end;margin-right: 7px">{{appoinment.status}}</div>
|
</div>
|
||||||
<div style="text-align: start;margin-right: 7px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
</mat-card>
|
||||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
<mat-card>
|
||||||
</div>
|
<div>
|
||||||
</div>
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ng-scrollbar>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="service service2">
|
<div class="service service3">
|
||||||
|
<i class="ti-money"></i>
|
||||||
<h4>Later</h4>
|
<mat-card>
|
||||||
<ng-scrollbar class="scrollHV service">
|
<div>
|
||||||
<mat-card *ngFor="let appoinment of appoinmentsListLater; index as i;" (click)="goToBookedAppointment(appoinment)">
|
<p>hello</p>
|
||||||
<div fxLayout="row wrap" style="padding-top: 8px;padding-bottom: 8px;">
|
</div>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
</mat-card>
|
||||||
<div style="text-align: start;margin-left: 10px"><span > {{appoinment.customer[0].cusName}}</span></div>
|
<mat-card>
|
||||||
<div style="text-align: start;margin-left: 10px">{{appoinment.customer[0].phoneNo}}</div>
|
<div>
|
||||||
</div>
|
<p>hello</p>
|
||||||
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
</div>
|
||||||
<div style="text-align: end;margin-right: 3px">{{appoinment.status}}</div>
|
</mat-card>
|
||||||
<div style="text-align: start;"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}</b></span></div>
|
<mat-card>
|
||||||
<!-- <div style="text-align: start;margin-left: 10px"> <span ><b>{{appoinment.appoinmentSlots[0] | date:'h:mm a'}}</b></span></div> -->
|
<div>
|
||||||
</div>
|
<p>hello</p>
|
||||||
</div>
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<p>hello</p>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ng-scrollbar>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section> -->
|
||||||
|
|
||||||
<!-- </ng-scrollbar> -->
|
</ng-scrollbar>
|
||||||
@ -544,7 +544,7 @@ mat-icon{
|
|||||||
height: unset !important;
|
height: unset !important;
|
||||||
// width: 0px !important;
|
// width: 0px !important;
|
||||||
align-self: center !important;
|
align-self: center !important;
|
||||||
font-size: 2em !important;
|
font-size: 3em !important;
|
||||||
width: unset !important;
|
width: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,9 +669,9 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.service {
|
.service {
|
||||||
background: #f1f1f1;
|
background: #fff;
|
||||||
margin: 10px;
|
margin: 20px;
|
||||||
// padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
-webkit-box-flex: 1;
|
-webkit-box-flex: 1;
|
||||||
@ -765,10 +765,5 @@ h3 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
section mat-card{
|
|
||||||
background: linear-gradient(58deg, #009688, #673ab7);
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 4px 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@ import { MatIconRegistry } from '@angular/material/icon';
|
|||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { CurrencyPipe, DatePipe } from '@angular/common';
|
import { CurrencyPipe, DatePipe } from '@angular/common';
|
||||||
import { AppointmentsService } from 'app/appoinment/appoinments/appointments-service/appointments.service';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard',
|
selector: 'app-dashboard',
|
||||||
templateUrl: './dashboard.component.html',
|
templateUrl: './dashboard.component.html',
|
||||||
@ -15,7 +13,7 @@ import { Router } from '@angular/router';
|
|||||||
})
|
})
|
||||||
export class DashboardComponent {
|
export class DashboardComponent {
|
||||||
private currencyPipe1:CurrencyPipe
|
private currencyPipe1:CurrencyPipe
|
||||||
|
|
||||||
public single: any[];
|
public single: any[];
|
||||||
public multi: any[];
|
public multi: any[];
|
||||||
public showXAxis = true;
|
public showXAxis = true;
|
||||||
@ -326,20 +324,14 @@ messages: Object[] = [{
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
selectedDateRange: {startDate: moment.Moment, endDate: moment.Moment};
|
selectedDateRange: {startDate: moment.Moment, endDate: moment.Moment};
|
||||||
currentDate: any;
|
currentDate: Date;
|
||||||
lineChart: any = [];
|
lineChart: any = [];
|
||||||
user_role: any;
|
user_role: any;
|
||||||
currency: any = 'INR';
|
currency: any = 'INR';
|
||||||
countAndRevenue: boolean = false;
|
countAndRevenue: boolean = false;
|
||||||
currencyHtmlCode: any;
|
currencyHtmlCode: any;
|
||||||
startof30days: any;
|
|
||||||
|
|
||||||
appoinmentsList:any =[];
|
constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
||||||
appointmentListLength:any =[]
|
|
||||||
appoinmentsListToday:any=[];
|
|
||||||
appoinmentsListTomorrow:any =[];
|
|
||||||
appoinmentsListLater:any =[];
|
|
||||||
constructor(private router:Router,public _app:AppointmentsService,private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
|
||||||
// this.fetch((data) => { this.rows = data; });
|
// this.fetch((data) => { this.rows = data; });
|
||||||
Object.assign(this, {single, multi})
|
Object.assign(this, {single, multi})
|
||||||
this.matIconRegistry.addSvgIcon(
|
this.matIconRegistry.addSvgIcon(
|
||||||
@ -362,36 +354,16 @@ messages: Object[] = [{
|
|||||||
let user_role = localStorage.getItem('user_role')
|
let user_role = localStorage.getItem('user_role')
|
||||||
let param
|
let param
|
||||||
if(user_role == 'PRACTITIONER'){
|
if(user_role == 'PRACTITIONER'){
|
||||||
this.getAppoinmentsList()
|
|
||||||
param = {'user_id':localStorage.getItem('user_id'),'busId':localStorage.getItem('busId')}
|
param = {'user_id':localStorage.getItem('user_id'),'busId':localStorage.getItem('busId')}
|
||||||
}else{
|
}else{
|
||||||
param = {'busId':localStorage.getItem('busId')}
|
param = {'busId':localStorage.getItem('busId')}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getCount(param)
|
this.getCount(param)
|
||||||
|
|
||||||
// Get the current date
|
|
||||||
this.currentDate = new Date();
|
|
||||||
|
|
||||||
// Create an array to store the dates
|
|
||||||
const dates: Date[] = [];
|
|
||||||
|
|
||||||
// Loop through the last 30 days
|
|
||||||
for (let i = 30; i >= 0; i--) {
|
|
||||||
const date = new Date();
|
|
||||||
date.setDate(this.currentDate.getDate() - i);
|
|
||||||
dates.push(date);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output the dates
|
|
||||||
console.log(dates);
|
|
||||||
|
|
||||||
|
|
||||||
//Start Line Chart
|
//Start Line Chart
|
||||||
// this.currentDate = new Date();
|
this.currentDate = new Date();
|
||||||
this.startof30days = dates[0]
|
let startDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
||||||
console.log(this.startof30days,this.currentDate)
|
|
||||||
let startDate = new DatePipe('en-US').transform(this.startof30days, 'yyyy-MM-dd')
|
|
||||||
let EndDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
let EndDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
||||||
console.log(startDate,EndDate);
|
console.log(startDate,EndDate);
|
||||||
let lineParams
|
let lineParams
|
||||||
@ -419,7 +391,7 @@ messages: Object[] = [{
|
|||||||
this.count = res['data']
|
this.count = res['data']
|
||||||
|
|
||||||
this.currentDate = new Date();
|
this.currentDate = new Date();
|
||||||
let startDate = new DatePipe('en-US').transform(this.startof30days, 'yyyy-MM-dd')
|
let startDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
||||||
let EndDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
let EndDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
||||||
console.log(startDate,EndDate);
|
console.log(startDate,EndDate);
|
||||||
let user_role = localStorage.getItem('user_role')
|
let user_role = localStorage.getItem('user_role')
|
||||||
@ -649,7 +621,7 @@ messages: Object[] = [{
|
|||||||
|
|
||||||
//Start Line Chart
|
//Start Line Chart
|
||||||
let lineParams
|
let lineParams
|
||||||
if(user_role != 'PRACTITIONER'){
|
if(user_role == 'BIZADMIN'){
|
||||||
lineParams = {'busId':localStorage.getItem('busId'),'fromDate':startDate,'toDate':EndDate}
|
lineParams = {'busId':localStorage.getItem('busId'),'fromDate':startDate,'toDate':EndDate}
|
||||||
}
|
}
|
||||||
this.getLineChartData(lineParams)
|
this.getLineChartData(lineParams)
|
||||||
@ -680,71 +652,4 @@ messages: Object[] = [{
|
|||||||
|
|
||||||
return spanElement.innerHTML;
|
return spanElement.innerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getAppoinmentsList() {
|
|
||||||
this.appoinmentsList=[]
|
|
||||||
let user_role = localStorage.getItem('user_role');
|
|
||||||
let param = {"busId": localStorage.getItem('busId'),"userId":localStorage.getItem('user_id')}
|
|
||||||
console.log(param)
|
|
||||||
this._app.getAppoinmentsListDetails(param).subscribe(res => {
|
|
||||||
|
|
||||||
if (res.status == 200) {
|
|
||||||
|
|
||||||
this.appoinmentsList = res.data;
|
|
||||||
this.appoinmentsList.forEach(element => {
|
|
||||||
console.log(element)
|
|
||||||
element.appoinmentSlots = JSON.parse(element.appoinmentSlots)
|
|
||||||
});
|
|
||||||
var startDate:any = new Date();
|
|
||||||
startDate = startDate.toISOString().slice(0, 10);
|
|
||||||
this.appoinmentsList.forEach(element => {
|
|
||||||
|
|
||||||
if(element.appoinmentDate == startDate){
|
|
||||||
this.appoinmentsListToday.push(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
// this.appoinmentsListToday = this.appoinmentsList.filter(val => val.appoinmentDate == startDate )
|
|
||||||
// this.appoinmentsList = appoinmentsListToday
|
|
||||||
localStorage.setItem('busId', res.data[0].busId
|
|
||||||
)
|
|
||||||
var startDate1:any = new Date();
|
|
||||||
startDate1.setDate(startDate1.getDate() + 1);
|
|
||||||
let Tomorrow = startDate1.toISOString().slice(0, 10)
|
|
||||||
console.log(Tomorrow)
|
|
||||||
this.appoinmentsList.forEach(element => {
|
|
||||||
|
|
||||||
if(element.appoinmentDate == Tomorrow){
|
|
||||||
this.appoinmentsListTomorrow.push(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
this.appoinmentsList.forEach(element => {
|
|
||||||
|
|
||||||
if(element.appoinmentDate != Tomorrow && element.appoinmentDate != startDate ){
|
|
||||||
this.appoinmentsListLater.push(element)
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
console.log(this.appoinmentsListLater)
|
|
||||||
|
|
||||||
// this.appoinmentsListTomorrow= this.appoinmentsList.filter(val => val.appoinmentDate == Yesterday )
|
|
||||||
this.appointmentListLength = res.data.length;
|
|
||||||
console.log(this.appointmentListLength)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
goToBookedAppointment(params){
|
|
||||||
console.log(params)
|
|
||||||
localStorage.setItem('go_appointment','0');
|
|
||||||
localStorage.setItem('go_appointment_data',JSON.stringify(params))
|
|
||||||
// this._dash.passAppointmentDetails.next(params)
|
|
||||||
this.router.navigate(['/appointments'])
|
|
||||||
// this.router.navigate(['/appointments', params])
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,17 +1,13 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DashboardService {
|
export class DashboardService {
|
||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
|
||||||
public passAppointmentDetails:BehaviorSubject<any> = new BehaviorSubject<any>([]);
|
|
||||||
public passAppointmentDetails_observable$ = this.passAppointmentDetails.asObservable();
|
|
||||||
|
|
||||||
constructor(private _http: HttpClient) { }
|
constructor(private _http: HttpClient) { }
|
||||||
// generateotp(email): Observable<any> {
|
// generateotp(email): Observable<any> {
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<div style=" text-align: center;">
|
<div style=" text-align: center;">
|
||||||
|
|
||||||
<h3 >Your appointment has been successfully Booked.</h3>
|
<h3 >Your appointment has been successfully Booked On.</h3>
|
||||||
|
|
||||||
<p style="color:rgb(13, 218, 13)">
|
<p style="color:rgb(13, 218, 13)">
|
||||||
Thank You..! Your order status is {{resPayment.response_message}}.
|
Thank You..! Your order status is {{resPayment.response_message}}.
|
||||||
@ -163,6 +163,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
@ -57,7 +57,6 @@ mat-toolbar{
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import { Router } from '@angular/router';
|
|||||||
import * as html2pdf from 'html2pdf.js'
|
import * as html2pdf from 'html2pdf.js'
|
||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { local } from 'd3';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -29,26 +28,20 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
constructor(public end_user:EndUserService,private router:Router,) {
|
constructor(public end_user:EndUserService,private router:Router,) {
|
||||||
this.logo = localStorage.getItem('logo')
|
this.logo = localStorage.getItem('logo')
|
||||||
this.busName = localStorage.getItem('busName')
|
this.busName = localStorage.getItem('busName')
|
||||||
let clickSummaryDetails = localStorage.getItem('goToFirstFirst')
|
|
||||||
if(clickSummaryDetails == '1'){
|
|
||||||
this.backRedireact()
|
|
||||||
} else{
|
|
||||||
localStorage.setItem('goToFirstFirst','1')
|
|
||||||
}
|
|
||||||
|
|
||||||
// this.end_user.bookedDetails_observable$.subscribe((res) => {
|
|
||||||
// console.log('booked2', res);
|
|
||||||
|
|
||||||
// if(res instanceof Array){
|
this.end_user.bookedDetails_observable$.subscribe((res) => {
|
||||||
|
console.log('booked2', res);
|
||||||
|
|
||||||
// if(res.length == 0){
|
if(res instanceof Array){
|
||||||
// this.backRedireact()
|
|
||||||
// }
|
if(res.length == 0){
|
||||||
|
// this.backRedireact()
|
||||||
|
}
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// })
|
})
|
||||||
this.end_user.summmarylist_observable$.subscribe((res) => {
|
this.end_user.summmarylist_observable$.subscribe((res) => {
|
||||||
console.log('booked', res);
|
console.log('booked', res);
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
@ -108,14 +101,14 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
// console.log(res)
|
// console.log(res)
|
||||||
// let serviceMap = res['data'][0].id
|
// let serviceMap = res['data'][0].id
|
||||||
// let time = new Date().toLocaleTimeString()
|
// let time = new Date().toLocaleTimeString()
|
||||||
// let param= {
|
// let param= {
|
||||||
// "busId": serviceDetails.busId,
|
// "busId": serviceDetails.busId,
|
||||||
// "cusId": appointmentId,
|
// "cusId": cusID,
|
||||||
// "appoinmentDate": slot_array[0].date,
|
// "appoinmentDate": slot_array[0].date,
|
||||||
// "userId": serviceDetails.userId,
|
// "userId": serviceDetails.userId,
|
||||||
// "appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
// "appoinmentSlots": JSON.stringify(slot_array[0].slots)
|
||||||
// //"servicemap" :this.bookedAppointment_servicemap
|
// //"servicemap" :this.bookedAppointment_servicemap
|
||||||
// }
|
// }
|
||||||
let param =paramPay
|
let param =paramPay
|
||||||
console.log(param)
|
console.log(param)
|
||||||
|
|
||||||
@ -234,7 +227,6 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
Summaryhide(){
|
Summaryhide(){
|
||||||
this.summary = true;
|
this.summary = true;
|
||||||
localStorage.setItem('goToFirstFirst','1')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
download(){
|
download(){
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,6 @@ mat-toolbar{
|
|||||||
background-color: #f7f8f5 !important;
|
background-color: #f7f8f5 !important;
|
||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -286,7 +286,7 @@
|
|||||||
</ng-scrollbar>
|
</ng-scrollbar>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,6 @@ mat-toolbar{
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -68,8 +68,7 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
localStorage.setItem('goToFirstFirst','0')
|
|
||||||
console.log(localStorage.getItem('goToFirstFirst'))
|
|
||||||
if (performance.navigation.type === 1) {
|
if (performance.navigation.type === 1) {
|
||||||
console.log(0)
|
console.log(0)
|
||||||
// This condition checks if the page is refreshed
|
// This condition checks if the page is refreshed
|
||||||
@ -476,7 +475,7 @@ this.paymentform = payment;
|
|||||||
|
|
||||||
|
|
||||||
onclickfun(){
|
onclickfun(){
|
||||||
|
|
||||||
if(this.verifyOTP == 0){
|
if(this.verifyOTP == 0){
|
||||||
this.getOTP(1)
|
this.getOTP(1)
|
||||||
}
|
}
|
||||||
@ -593,7 +592,7 @@ let paramsmap= {
|
|||||||
currency: 'INR',
|
currency: 'INR',
|
||||||
country: 'IND',
|
country: 'IND',
|
||||||
udf1: ''+busId+'',
|
udf1: ''+busId+'',
|
||||||
udf2: ''+window.location.origin+'/appointment/#'+URL+'/',
|
udf2: ''+window.location.origin+'/#'+URL+'/',
|
||||||
udf3: ''+cusID+'',
|
udf3: ''+cusID+'',
|
||||||
udf4: ''+appointmentId+'',
|
udf4: ''+appointmentId+'',
|
||||||
udf5: ''
|
udf5: ''
|
||||||
@ -637,9 +636,9 @@ this._cus.paymentRequest(this.form.value ).subscribe(res => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
// ngOnDestroy(){
|
ngOnDestroy(){
|
||||||
// localStorage.clear();
|
localStorage.clear();
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,52 @@
|
|||||||
<div class="doctor-profile">
|
<div class="doctor-profile">
|
||||||
|
|
||||||
<div fxLayout="row wrap">
|
<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="doctor_info">
|
||||||
|
<div class="images">
|
||||||
|
<img src="{{dp}}" width="100" class="rounded-circle">
|
||||||
|
</div>
|
||||||
|
<div class="heading">
|
||||||
|
<h3>{{bookedAppointment.userName}}</h3>
|
||||||
|
<a>{{bookedAppointment.practitionerInfos[0].designtion}}</a><br />
|
||||||
|
<button mat-raised-button (click)="goToSlotBooking()" style="background-color: #e7c953;">Book Appointment</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="doctor_info">
|
||||||
|
<h4>PERSONAL INFO</h4>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<span class="pr-1">Phone :</span>
|
||||||
|
<span> {{bookedAppointment.contactNo}}</span>
|
||||||
|
</li>
|
||||||
|
<!-- <li>
|
||||||
|
<span class="pr-1">Office :</span>
|
||||||
|
<span> {{bookedAppointment.contactNo}}</span>
|
||||||
|
</li> -->
|
||||||
|
<li>
|
||||||
|
<span class="pr-1">Email:</span>
|
||||||
|
<span> {{bookedAppointment.email}} </span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="pr-1">Social :</span>
|
||||||
|
<div class="social-icons">
|
||||||
|
<a href="#" title="facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
|
||||||
|
<a href="#" title="twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
|
||||||
|
<a href="#" title="google"><i class="fa fa-google" aria-hidden="true"></i></a>
|
||||||
|
<a href="#" title="youtube"><i class="fa fa-skype" aria-hidden="true"></i></a>
|
||||||
|
<a href="#" title="linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
|
||||||
|
<a href="#" title="printrest"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="last-of-type ">
|
||||||
|
<div class="emergency-case ">
|
||||||
|
<h2>EMERGENCY CASES</h2>
|
||||||
|
<div>(225) 679-9399</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70" class="m-gap p-gap" >
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70" class="m-gap p-gap" >
|
||||||
<div class="padding-lt">
|
<div class="padding-lt">
|
||||||
<div class="elementor-container">
|
<div class="elementor-container">
|
||||||
@ -103,56 +148,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30" class="m-gap p-gap" >
|
|
||||||
<div class="doctor_info">
|
|
||||||
<div class="images">
|
|
||||||
<img src="{{dp}}" width="100" class="rounded-circle">
|
|
||||||
</div>
|
|
||||||
<div class="heading">
|
|
||||||
<h3>{{bookedAppointment.userName}}</h3>
|
|
||||||
<a>{{bookedAppointment.practitionerInfos[0].designtion}}</a>
|
|
||||||
<span>{{bookedAppointment.contactNo}}</span><br>
|
|
||||||
<span>{{bookedAppointment.email}}</span><br />
|
|
||||||
<button mat-raised-button (click)="goToSlotBooking()" style="background-color: #e7c953;margin-top: 20px;">Book Appointment</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="doctor_info">
|
|
||||||
<h4>PERSONAL INFO</h4>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<span class="pr-1">Phone :</span>
|
|
||||||
<span> {{bookedAppointment.contactNo}}</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<span class="pr-1">Email:</span>
|
|
||||||
<span> {{bookedAppointment.email}} </span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<span class="pr-1">Social :</span>
|
|
||||||
<div class="social-icons">
|
|
||||||
<a href="#" title="facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" title="twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" title="google"><i class="fa fa-google" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" title="youtube"><i class="fa fa-skype" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" title="linkedin"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
|
|
||||||
<a href="#" title="printrest"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="last-of-type ">
|
|
||||||
<div class="emergency-case ">
|
|
||||||
<h2>EMERGENCY CASES</h2>
|
|
||||||
<div>(225) 679-9399</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-scrollbar>
|
</ng-scrollbar>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@ -306,7 +306,6 @@ mat-toolbar{
|
|||||||
color:#fff;
|
color:#fff;
|
||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,6 @@ mat-toolbar{
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,6 @@ mat-toolbar{
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -234,7 +234,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
All Rights Reserved
|
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -270,7 +270,6 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <button class="mt-2 mb-1" [disabled]="!loginForm.valid" mat-raised-button color="primary" mat-button>Sign In</button> -->
|
<!-- <button class="mt-2 mb-1" [disabled]="!loginForm.valid" mat-raised-button color="primary" mat-button>Sign In</button> -->
|
||||||
<button class="mt-2 mb-1" mat-raised-button color="primary" [disabled]="!loginForm.valid || isFormEmpty()" mat-button>Sign In</button>
|
<button class="mt-2 mb-1" mat-raised-button color="primary" mat-button>Sign In</button>
|
||||||
<a class="mat-text-warn mb-0" (click)="openForgot()">Forgot password?</a>
|
<a class="mat-text-warn mb-0" (click)="openForgot()">Forgot password?</a>
|
||||||
<!-- <p class="mb-0">Don't have an account? <a [routerLink]="['/authentication/register']" class="mat-text-primary">Register Here</a></p> -->
|
<!-- <p class="mb-0">Don't have an account? <a [routerLink]="['/authentication/register']" class="mat-text-primary">Register Here</a></p> -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -97,7 +97,7 @@ export class LoginComponent {
|
|||||||
this.router.navigate(['/services'])
|
this.router.navigate(['/services'])
|
||||||
}
|
}
|
||||||
} else{
|
} else{
|
||||||
this.router.navigate(['/services'])
|
this.router.navigate(['/services'])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -122,8 +122,6 @@ export class LoginComponent {
|
|||||||
}
|
}
|
||||||
this.router.navigate(['/home'])
|
this.router.navigate(['/home'])
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
this.notifierService.notify('warning', res.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -147,12 +145,6 @@ export class LoginComponent {
|
|||||||
this.router.navigate(['authentication/forgot-password'])
|
this.router.navigate(['authentication/forgot-password'])
|
||||||
// this.router.navigate(['/home'])
|
// this.router.navigate(['/home'])
|
||||||
}
|
}
|
||||||
|
|
||||||
isFormEmpty(): boolean {
|
|
||||||
const email = this.loginForm.get('email').value;
|
|
||||||
const password = this.loginForm.get('password').value;
|
|
||||||
return !email && !password;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.5 KiB |
@ -7,10 +7,10 @@ export const environment = {
|
|||||||
apiEndpoint:'https://dev.venbait.in/appointments/api/',
|
apiEndpoint:'https://dev.venbait.in/appointments/api/',
|
||||||
|
|
||||||
//EndUser URL
|
//EndUser URL
|
||||||
endUserUrl: window.location.origin+'/appointment/#/booking/',
|
endUserUrl: window.location.origin+'/#/booking/',
|
||||||
mailUrl:window.location.origin+'/appointment',
|
mailUrl:window.location.origin,
|
||||||
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
||||||
payment_mode:'TEST',
|
payment_mode:'LIVE',
|
||||||
|
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export const environment = {
|
|||||||
production: false,
|
production: false,
|
||||||
environmentName: 'Testing Environment',//Localhost Environment.
|
environmentName: 'Testing Environment',//Localhost Environment.
|
||||||
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
||||||
// apiEndpoint:'http://192.168.1.29:8080/api/',
|
// apiEndpoint:'http://192.168.1.32:8080/api/',
|
||||||
apiEndpoint:'https://dev.venbait.in/appointments/api/',
|
apiEndpoint:'https://dev.venbait.in/appointments/api/',
|
||||||
|
|
||||||
//EndUser URL
|
//EndUser URL
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user