google calendar

This commit is contained in:
Surendiran 2023-05-12 11:56:31 +05:30
parent b72f9d7804
commit 54bd8010ce
16 changed files with 8453 additions and 12547 deletions

20420
ng-seed/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,7 @@
"dragula": "^3.7.3",
"firebase": "^8.10.0",
"font-awesome": "4.7.0",
"google-calendar": "^1.3.1",
"hammerjs": "^2.0.8",
"html2pdf.js": "^0.10.1",
"jquery": "^3.6.0",

View File

@ -596,6 +596,7 @@ export class DialogBoxComponent implements OnInit {
this._app.getServicesListDetails(userId,busId).subscribe(res => {
if (res.status == 200) {
this.servicesList_data = res.data;
console.log(this.servicesList_data)
res['data'].forEach(element => {
// tmp.push(element.service)
element.service.forEach(e => {
@ -604,21 +605,45 @@ export class DialogBoxComponent implements OnInit {
this.assignService.push(e.servicesName)
});
});
console.log(this.servicesList_array)
// if(this.serviceMapdetails[0].duration.length>0 ){
// duration = this.serviceMapdetails[0].duration[0].durationNew
// fees = this.serviceMapdetails[0].duration[0].fees
// } else{
// duration = this.serviceMapdetails[0].service[0].duration
// fees = this.serviceMapdetails[0].service[0].fees
// }
console.log(this.servicesList_array,this.form.value)
this.servicesList_array.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
this.duration = this.servicesList_array[0].duration
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']})
console.log(serviceDetails,this.local_data['ServicesMapDetail.serviceId'])
if(serviceDetails[0].duration.length>0 ){
this.duration = serviceDetails[0].duration[0].durationNew
} else{
this.duration = this.servicesList_array[0].duration
}
}
// this.getAssignedList(this.usersList.busId)
});
// this.assignService = this.checkedArray
}
serviceData(data){
serviceData(data){
this.ServiceId = data.serviceId
this.duration = data.duration
let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == data.serviceId})
console.log(serviceDetails)
if(serviceDetails[0].duration.length>0 ){
this.duration = serviceDetails[0].duration[0].durationNew
} else{
this.duration = this.servicesList_array[0].duration
}
this.clicks = 0
this.getSlots()
this.slotIndex= null
}
getApiData(){

View File

@ -24,18 +24,16 @@ export class AddSkillsComponent implements OnInit {
this.fb.control(null)
])
})
if(data.length>1){
for(let i=1;i<=data.length-1;i++){
//this.addFilterToFiltersFormArray2(i)
//this.Select2 = true;
this.addSkills()
}
}else{
}
if(data instanceof Array){
if(data.length>1){
for(let i=1;i<=data.length-1;i++){
//this.addFilterToFiltersFormArray2(i)
//this.Select2 = true;
this.addSkills()
}
}
}
this.userForm.patchValue(test)

View File

@ -134,7 +134,7 @@
<button mat-raised-button (click)="download()"><mat-icon>download</mat-icon> Download as PDF</button>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" fxLayoutAlign="end">
<button mat-raised-button>Add To Google Calander</button>
<button mat-raised-button (click)="addCalendarEvent()">Add To Google Calander</button>
</div>
</div>

View File

@ -3,6 +3,9 @@ import { EndUserService } from '../end-user.service';
import { Router } from '@angular/router';
import * as html2pdf from 'html2pdf.js'
import { environment } from 'environments/environment';
import { format } from 'date-fns';
@Component({
selector: 'app-booking-summary',
@ -101,4 +104,45 @@ html2pdf().from(element).set(opt).save();
image_view(image){
return this.apiUrl+'imageViewer?img_name='+image;
}
dateConvertFormat(start){
// const dateString = start;
// const timeString = ;
// const dateTimeString = `${dateString} ${timeString}`;
// const dateTimeString = start
// const parsedDate = parse(dateTimeString, 'dd MMM yyyy h:mma', new Date());
// const adjustedDate = addHours(parsedDate, 4); // Adjust to UTC if necessary
// const timestamp = format(adjustedDate, 'yyyyMMdd\'T\'HHmmss\'Z\'');
// const dateString = start;
// const date = new Date(dateString);
// const zonedDate:any = utcToZonedTime(date, 'GMT+05:30');
// const timestamp = format(zonedDate, 'yyyyMMdd\'T\'HHmmss\'Z\'');
const date = new Date(start);
const isoString = date.toISOString();
console.log(isoString); // Output: 20230511T123000Z
return isoString.replace(/[^a-z0-9, ]/gi, '')
}
addCalendarEvent(){
console.log(this.bookingSummary['appoinmentSlots'][0])
let appoiDateStart = this.bookingSummary['appoinmentSlots'][0]
let appoiDateEnd = this.bookingSummary['appoinmentSlots'][this.bookingSummary['appoinmentSlots'].length-1]
// this.dateConvertFormat(appoiDateStart)
let calendarUrl = 'https://calendar.google.com/calendar/u/0/r/eventedit?text='
let companyName = this.busName
let brandUrl = this.serviceMapDetails.service[0].servicesName
let cusMail = this.customerBookingDetails.email
let practitioner = 'Appointment-with-Dr.'+this.serviceMapDetails.user[0].userName
let addEvent = calendarUrl+practitioner+'&'+'&dates='+this.dateConvertFormat(appoiDateStart)+'/'+this.dateConvertFormat(appoiDateEnd)+'&location='+companyName+'&details='+brandUrl+'&add='+cusMail
console.log(addEvent);
window.open(addEvent, "_blank");
}
}

View File

@ -1,7 +1,7 @@
<mat-toolbar>
<div fxLayout="row wrap" style="padding:15px 0px;">
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
<button (click)="bookedDetails()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<button (click)="backClicked()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<mat-icon>keyboard_backspace</mat-icon>
</button>
</div>
@ -13,146 +13,130 @@
</div>
</mat-toolbar>
<ng-scrollbar class="scrollHV">
<div class="container mt-1">
<mat-card class="pad radius" *ngIf="bookedDetails.length != 0">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<h5 class="heading"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner</h5>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<p class="bookedDetails">Dr. {{bookedDetails.doctor}}</p>
</div>
</div>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<h5 class="heading"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service</h5>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<p class="bookedDetails">{{bookedDetails.service}} ({{bookedDetails.duration}}Mins)</p>
</div>
</div>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<h5 class="heading"><img src="assets/images/Languages.svg" alt="Avatar" class="img"> Date</h5>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<p class="bookedDetails">{{bookedDetails.date | date:'longDate'}}</p>
</div>
</div>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<h5 class="heading"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img"> Slot Time</h5>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<p class="bookedDetails">{{bookedDetails.time | date:'shortTime'}}</p>
</div>
</div>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20" fxLayoutAlign="center center">
<div fxLayout="row wrap" fxLayoutAlign="center center">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<h5 class="heading"><img src="assets/images/Location.svg" alt="Avatar" class="img"> Fees</h5>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" fxLayoutAlign="center center">
<p class="bookedDetails"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">&#x20b9;</span> {{bookedDetails.amount}}</p>
</div>
</div>
</div>
</div>
</mat-card>
<div fxLayout="row wrap" fxLayoutAlign="center">
<div class="column mat-width" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
<mat-card class="p-2 radius">
<h2 class="base-border">Customer Information</h2>
<form [formGroup]="form" (ngSubmit)="submit()">
<div fxLayout="column" fxLayoutAlign="start stretch">
<mat-form-field style="width: 100%">
<input matInput placeholder="Name" type="text" name="cusName" formControlName="cusName" required>
<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 style="width: 100%">
<input matInput placeholder="E Mail" type="email" name="email" formControlName="email" required>
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
Please enter a valid email address
</mat-error>
<!-- <mat-error *ngIf="myError('email', 'required')">email is required</mat-error> -->
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
Email is required
</mat-error>
</mat-form-field>
<div [ngSwitch]="otpData">
<div fxLayout="row">
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 100%">
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" name="phone" formControlName="phoneNo" [readonly]="noChangeNo == '1'" required>
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<div id="sign-in-button"></div>
</div>
<div id="sign-in-button"></div>
<div *ngIf="verifyOTP != '1'" fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<button mat-raised-button type="button" (click)="getOTP(1)" [disabled]="myError('phoneNo', 'minlength') || myError('phoneNo', 'required')" color="primary" class="mr-1 mb-1">Get OTP</button>
</div>
<span *ngIf="verifyOTP == '1'"><mat-icon style="color: #4CAF50;">verified</mat-icon></span>
</div>
<div *ngSwitchCase="1">
<div fxLayout="row" *ngIf="verifyOTP != '1'">
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 100%">
<input matInput placeholder="Enter OTP" formControlName="otp" type="text" maxlength="6">
</mat-form-field>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<button type="button" (click)="verify(1)" mat-raised-button class="mr-1 mb-1" matTooltip="VERIFY" matTooltipPosition="below" style="background-color: #4CAF50;color:#fff;">VERIFY</button>
</div>
</div>
<div fxLayout="row" *ngIf="verifyOTP != '1'">
<button type="button" *ngIf="timeLeft != 0" mat-raised-button color="primary">{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
<button type="button" *ngIf="timeLeft == 0" mat-raised-button color="primary" (click)="resendOTP(1)">{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
</div>
</div>
</div>
<mat-form-field style="width: 100%">
<input matInput placeholder="Address" type="text" name="address" formControlName="address_1">
<mat-error *ngIf="myError('address_1', 'required')">Address is required</mat-error>
<mat-error *ngIf="myError('address_1', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="State" type="text" name="state" formControlName="state">
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="City" type="text" name="city" formControlName="city">
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="Pincode" type="text" name="pincode" formControlName="pincode">
<mat-error *ngIf="myError('pincode', 'required')">City is required</mat-error>
<mat-error *ngIf="myError('pincode', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<button class="mat-green" type="submit" mat-raised-button>Submit</button>
</div>
</form>
</mat-card>
</div>
</div>
</div>
<div class="container mt-1">
<mat-card class="card-mat">
<h2 class="base-border">Customer Information</h2>
<form [formGroup]="form" (ngSubmit)="submit()">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="64" fxFlex.lg="64" fxFlex.xl="64" class="p-gap" fxLayoutAlign="center center">
<div fxLayout="row wrap">
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Name" type="text" name="cusName" formControlName="cusName" required>
<mat-error *ngIf="myError('cusName', 'required')">Name is required</mat-error>
<mat-error *ngIf="myError('cusName', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="E Mail" type="email" name="email" formControlName="email" required>
<mat-error *ngIf="!form.get('email')?.errors?.required && (form.get('email')?.errors?.pattern)">
Please enter a valid email address
</mat-error>
<!-- <mat-error *ngIf="myError('email', 'required')">email is required</mat-error> -->
<mat-error *ngIf="form.get('email')?.invalid && (form.get('email')?.dirty || form.get('email')?.touched) && form.get('email')?.errors?.required">
Email is required
</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<div [ngSwitch]="otpData">
<div fxLayout="row">
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 100%">
<input matInput type="text" appMobileNumberPattern maxlength="10" minlength="10" placeholder="Phone No" name="phone" formControlName="phoneNo" [readonly]="noChangeNo == '1'" required>
<mat-error *ngIf="myError('phoneNo', 'required')">Contact No is required</mat-error>
<mat-error *ngIf="myError('phoneNo', 'pattern')">Invalid Contact No </mat-error>
<mat-error *ngIf="myError('phoneNo', 'minlength')"> Contact No must be at least 10 characters</mat-error>
<mat-error *ngIf="myError('phoneNo', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
<div id="sign-in-button"></div>
<div *ngIf="verifyOTP != '1'" fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<button mat-raised-button type="button" (click)="getOTP(1)" [disabled]="myError('phoneNo', 'minlength') || myError('phoneNo', 'required')" color="primary" class="mr-1 mb-1">Get OTP</button>
</div>
<span *ngIf="verifyOTP == '1'"><mat-icon style="color: #4CAF50;">verified</mat-icon></span>
</div>
</div>
<!-- <div *ngSwitchCase="1">
<div fxLayout="row" *ngIf="verifyOTP != '1'">
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
<mat-form-field style="width: 80%">
<input matInput placeholder="Enter OTP" formControlName="otp" type="text" maxlength="6">
</mat-form-field>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<button type="button" (click)="verify(1)" mat-raised-button class="mr-1 mb-1" matTooltip="VERIFY" matTooltipPosition="below" style="background-color: #4CAF50;color:#fff;">VERIFY</button>
</div>
</div>
<div fxLayout="row" *ngIf="verifyOTP != '1'">
<button type="button" *ngIf="timeLeft != 0" mat-raised-button color="primary">{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
<button type="button" *ngIf="timeLeft == 0" mat-raised-button color="primary" (click)="resendOTP(1)">{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
</div>
</div> -->
</div>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%">
<input matInput placeholder="Address" type="text" name="address" formControlName="address_1">
<mat-error *ngIf="myError('address_1', 'required')">Address is required</mat-error>
<mat-error *ngIf="myError('address_1', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%" class="mb-1">
<input matInput placeholder="State" type="text" name="state" formControlName="state">
<mat-error *ngIf="myError('state', 'required')">State is required</mat-error>
<mat-error *ngIf="myError('state', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%" class="mb-1">
<input matInput placeholder="City" type="text" name="city" formControlName="city">
<mat-error *ngIf="myError('city', 'required')">City is required</mat-error>
<mat-error *ngIf="myError('city', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="p-gap" fxLayoutAlign="center center">
<mat-form-field style="width: 80%" class="mb-1">
<input matInput placeholder="Pincode" type="text" name="pincode" formControlName="pincode">
<mat-error *ngIf="myError('pincode', 'required')">City is required</mat-error>
<mat-error *ngIf="myError('pincode', 'maxlength')">Limit exceed</mat-error>
</mat-form-field>
</div>
</div>
</div>
<div style="border: 1px solid #ccc;" fxFlex.md="1"></div>
<div fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="35" fxFlex.lg="35" fxFlex.xl="35" class="p-gap">
<div class="card-mat">
<!-- <p class="param"><img src="assets/images/Location.svg" alt="Avatar" class="img">Business </p>
<span class="span-text">{{busName}}</span> -->
<p class="param"><img src="assets/images/person.svg" alt="Avatar" class="img">Practitioner </p>
<span class="span-text">Dr. {{bookedDetails.doctor}}</span>
<p class="param"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service </p>
<span class="span-text"> {{bookedDetails.service}} ({{bookedDetails.duration}}Mins)</span>
<p class="param"><img src="assets/images/Languages.svg" alt="Avatar" class="img">Date </p>
<span class="span-text"> {{bookedDetails.date | date:'longDate'}}</span>
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time </p>
<span class="span-text">{{bookedDetails.time | date:'shortTime'}}</span>
<p class="param"><img src="assets/images/Location.svg" alt="Avatar" class="img">Amount </p>
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">&#x20b9;</span> {{bookedDetails.amount}}</span>
<!-- <div>
<hr>
<button mat-raised-button mat-button-sm class="mr-1 mb-1 mt-1 btn-red" [ngStyle]="{'background':slot_array.length ==0 ? '#ccc':'#4caf50' }" [disabled]="slot_array.length ==0" (click)="submit()">PROCEED</button>
</div> -->
</div>
</div>
</div>
<div style="text-align: end;" >
<button class="mat-green" type="submit" mat-raised-button>Submit</button>
</div>
</form>
</mat-card>
</div>
</ng-scrollbar>
<footer>
<p>
@ -173,4 +157,8 @@
<!-- </div>
</form>
</div>
-->
-->

View File

@ -105,8 +105,40 @@ mat-toolbar{
color: #959595;
font-size: 16px;
}
.mt-1 {
margin-top: 4rem !important;
}
.base-border:after {
content: '';
display: inline-block;
width: 7px;
position: absolute;
height: calc(100% + 16px);
background: red;
left: -22px !important;
top: 0px;
bottom: 0;
}
.img{
width: 20px;
// margin-right: 1.5rem;
vertical-align: top !important;
margin-right: 1.5rem;
// vertical-align: top !important;
}
.card-mat{
// max-width: 100%;
min-width: -webkit-fill-available;
padding: 1rem !important;
}
.param{
font-size: 14px;
font-weight: 600;
// margin-left: 2rem;
margin-bottom: 8px;
}
.span-text{
font-size: 14px;
font-weight: 500;
margin-left: 2.8rem;
color: #7a7a7a;
}

View File

@ -9,7 +9,7 @@ import { MatDialog } from '@angular/material/dialog';
import { OptVerifyComponent } from './opt-verify/opt-verify.component';
import { event } from 'jquery';
import { environment } from 'environments/environment';
import {Location} from '@angular/common';
var config = {
apiKey: "AIzaSyBVPQ6C7cg5l8I-o7WSmmXdioMa4C0ZKNM",
@ -40,7 +40,7 @@ export class CustomerInfoComponent implements OnInit {
private apiUrl = environment.apiEndpoint;
logo: any;
bookedDetails: any = [];
constructor(public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
constructor(private _location: Location,public dialog: MatDialog,private router: Router,private formBuilder: FormBuilder,public _cus:EndUserService, private ngZone: NgZone) {
this._cus.bookedDetails_observable$.subscribe((res) => {
console.log('booked2', res);
this.bookedDetails = res
@ -158,27 +158,29 @@ export class CustomerInfoComponent implements OnInit {
}
});
}
backRedireact(){
let URL = this.router.url;
console.log(URL)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
backClicked() {
this._location.back();
}
// backRedireact(){
// let URL = this.router.url;
// console.log(URL)
// let URL_AS_LIST = URL.split('/');
// console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'practitioner'){
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
console.log('practitioner')
}else{
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
console.log('Business')
}
}
// if(URL_AS_LIST[2] == 'practitioner'){
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
// console.log('practitioner')
// }else{
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
// console.log('Business')
// }
// }
@HostListener('window:popstate', ['$event'])
onPopState(event) {
console.log('Back button pressed');
this.backRedireact()
}
// @HostListener('window:popstate', ['$event'])
// onPopState(event) {
// console.log('Back button pressed');
// this.backRedireact()
// }
image_view(image){
return this.apiUrl+'imageViewer?img_name='+image;

View File

@ -45,7 +45,7 @@
<mat-toolbar>
<div fxLayout="row wrap" style="padding:15px 0px;">
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
<button *ngIf="backRouting != 'details'" (click)="backRedireact()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<button *ngIf="backRouting != 'details'" (click)="backClicked()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<mat-icon>keyboard_backspace</mat-icon>
</button>
</div>

View File

@ -3,6 +3,7 @@ import { Router } from '@angular/router';
import { EndUserService } from '../end-user.service';
import { environment } from 'environments/environment';
import { NgxSpinnerService } from 'ngx-spinner';
import { Location } from '@angular/common'
@Component({
selector: 'app-doctor-profile',
@ -20,7 +21,7 @@ export class DoctorProfileComponent implements OnInit {
ServicesMapDetailsList:any=[];
backRouting: any = [];
logo: any;
constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
constructor( private _location: Location,private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
// this.spinner.show()
let URL = this.router.url;
console.log(URL)
@ -154,19 +155,23 @@ export class DoctorProfileComponent implements OnInit {
})
}
backRedireact(){
let URL = this.router.url;
console.log(URL)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
// backRedireact(){
// let URL = this.router.url;
// console.log(URL)
// let URL_AS_LIST = URL.split('/');
// console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'practitioner'){
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
console.log('practitioner')
}else{
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
console.log('Business')
}
// if(URL_AS_LIST[2] == 'practitioner'){
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
// console.log('practitioner')
// }else{
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
// console.log('Business')
// }
// }
backClicked() {
this._location.back();
}

View File

@ -3,7 +3,7 @@
<mat-toolbar>
<div fxLayout="row wrap" style="padding:15px 0px;">
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
<button *ngIf="backRouting != undefined" (click)="backRedireact()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<button *ngIf="backRouting != undefined" (click)="backClicked()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<mat-icon>keyboard_backspace</mat-icon>
</button>
</div>

View File

@ -7,6 +7,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
import Swal from 'sweetalert2';
import { EndUserService } from '../end-user.service';
import { environment } from 'environments/environment';
import { Location } from '@angular/common'
@Component({
selector: 'app-service-list',
@ -30,7 +31,7 @@ export class ServiceListComponent implements OnInit {
full_data: any=[];
backRouting: any = [];
private apiUrl = environment.apiEndpoint;
constructor(private spinner:NgxSpinnerService,public _api:EndUserService, public dialog: MatDialog,public enduser:EndUserService, private router: Router,) {
constructor(private _location: Location,private spinner:NgxSpinnerService,public _api:EndUserService, public dialog: MatDialog,public enduser:EndUserService, private router: Router,) {
let URL = this.router.url;
console.log(URL)
let URL_AS_LIST = URL.split('/');
@ -240,25 +241,30 @@ let updatevalue = { serviceId: row_obj.serviceId,
}
backRedireact(){
let URL = this.router.url;
console.log(URL)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
// backRedireact(){
// let URL = this.router.url;
// console.log(URL)
// let URL_AS_LIST = URL.split('/');
// console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'practitioner'){
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
console.log('practitioner')
}else{
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
console.log('Business')
}
}
// if(URL_AS_LIST[2] == 'practitioner'){
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
// console.log('practitioner')
// }else{
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
// console.log('Business')
// }
// }
@HostListener('window:popstate', ['$event'])
onPopState(event) {
console.log('Back button pressed');
this.backRedireact()
// @HostListener('window:popstate', ['$event'])
// onPopState(event) {
// console.log('Back button pressed');
// this.backRedireact()
// }
backClicked() {
this._location.back();
}
image_view(image){

View File

@ -46,7 +46,7 @@
<mat-toolbar>
<div fxLayout="row wrap" style="padding:15px 0px;">
<div fxFlex.xs="10" fxFlex.sm="10" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" fxLayoutAlign="start center">
<button (click)="backRedireact()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<button (click)="backClicked()" mat-icon-button class="backStyle" aria-label="Example icon button with a home icon">
<mat-icon>keyboard_backspace</mat-icon>
</button>
</div>

View File

@ -5,7 +5,7 @@ import { Router } from '@angular/router';
import * as moment from 'moment';
import { EndUserService } from '../end-user.service';
import { environment } from 'environments/environment';
import { Location } from '@angular/common'
@Component({
selector: 'app-slot-booking-details',
@ -59,7 +59,7 @@ export class SlotBookingDetailsComponent implements OnInit {
logo: any;
private apiUrl = environment.apiEndpoint;
constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
constructor(private _location: Location,private router:Router,private datepipe:DatePipe,public end_user:EndUserService) {
this.end_user.appointmentBooked_observable$.subscribe((res) => {
console.log('booked', res);
if(res.length>0){
@ -410,26 +410,31 @@ if(this.getHours.length != 0){
}
backRedireact(){
let URL = this.router.url;
console.log(URL)
let URL_AS_LIST = URL.split('/');
console.log(URL_AS_LIST);
// backRedireact(){
// let URL = this.router.url;
// console.log(URL)
// let URL_AS_LIST = URL.split('/');
// console.log(URL_AS_LIST);
if(URL_AS_LIST[2] == 'practitioner'){
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
console.log('practitioner')
}else{
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
console.log('Business')
}
}
// if(URL_AS_LIST[2] == 'practitioner'){
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
// console.log('practitioner')
// }else{
// this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
// console.log('Business')
// }
// }
@HostListener('window:popstate', ['$event'])
onPopState(event) {
console.log('Back button pressed');
this.backRedireact()
}
// @HostListener('window:popstate', ['$event'])
// onPopState(event) {
// console.log('Back button pressed');
// this.backRedireact()
// }
backClicked() {
this._location.back();
}
image_view(image){
return this.apiUrl+'imageViewer?img_name='+image;