Merge branch 'master' of bitbucket.org:venbainformationtechnology/appointments_frontend
This commit is contained in:
commit
f2eed58e5e
@ -169,6 +169,8 @@ unavailability(action,obj) {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
||||||
|
this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills)
|
||||||
|
console.log( this.practitionerdetails)
|
||||||
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']);
|
||||||
console.log(this.practitionerdetails)
|
console.log(this.practitionerdetails)
|
||||||
this.id=this.practitionerdetails.id
|
this.id=this.practitionerdetails.id
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
<span class="head">Practitioner</span>
|
<span class="head">Practitioner</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
||||||
<span>: {{serviceMapDetails.user[0].userName}}</span>
|
<span>: Dr.{{serviceMapDetails.user[0].userName}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap" style="margin-bottom: 20px;">
|
<div fxLayout="row wrap" style="margin-bottom: 20px;">
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<span class="head">Date & Time</span>
|
<span class="head">Date & Time</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
<div fxFlex.xs="75" fxFlex.sm="75" fxFlex.md="75" fxFlex.lg="75" fxFlex.xl="75">
|
||||||
<span>: {{bookingSummary.appoinmentDate | date:'fullDate'}}</span><span style="margin-left: 6px;">({{bookingSummary.appoinmentSlots | date:'shortTime'}})</span>
|
<span>: {{bookingSummary.appoinmentDate | date:'fullDate'}}</span><span style="margin-left: 6px;">({{bookingSummary.appoinmentSlots[0] | date:'shortTime'}})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap" style="margin-bottom: 20px;">
|
<div fxLayout="row wrap" style="margin-bottom: 20px;">
|
||||||
|
|||||||
@ -33,6 +33,7 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
this.end_user.summmarylist_observable$.subscribe((res) => {
|
this.end_user.summmarylist_observable$.subscribe((res) => {
|
||||||
console.log('booked2', res);
|
console.log('booked2', res);
|
||||||
this.bookingSummary = res[0]
|
this.bookingSummary = res[0]
|
||||||
|
this.bookingSummary.appoinmentSlots =JSON.parse( this.bookingSummary.appoinmentSlots)
|
||||||
|
|
||||||
// this.end_user.getcusServicesMapDetails()
|
// this.end_user.getcusServicesMapDetails()
|
||||||
let param ={id:this.bookingSummary.serviceMap}
|
let param ={id:this.bookingSummary.serviceMap}
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
|
<div fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="80" fxFlex.lg="80" fxFlex.xl="80">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Phone No" type="text" name="phone" formControlName="phoneNo" required>
|
<input matInput placeholder="Phone No" type="text" name="phone" formControlName="phoneNo" [readonly]="verifyOTP == '1'" required>
|
||||||
<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>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="sign-in-button"></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">
|
<div *ngIf="verifyOTP != '1'" fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||||
<button mat-raised-button (click)="getOTP(1)" [disabled]="myError('phoneNo', 'minlength') || myError('phoneNo', 'required')" color="primary" class="mr-1 mb-1">Get OTP</button>
|
<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>
|
</div>
|
||||||
<span *ngIf="verifyOTP == '1'"><mat-icon style="color: #4CAF50;">verified</mat-icon></span>
|
<span *ngIf="verifyOTP == '1'"><mat-icon style="color: #4CAF50;">verified</mat-icon></span>
|
||||||
@ -53,12 +53,12 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
|
||||||
<button (click)="verify(1)" mat-raised-button class="mr-1 mb-1" matTooltip="VERIFY" matTooltipPosition="below" style="background-color: #4CAF50;color:#fff;">VERIFY</button>
|
<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>
|
</div>
|
||||||
<div fxLayout="row" *ngIf="verifyOTP != '1'">
|
<div fxLayout="row" *ngIf="verifyOTP != '1'">
|
||||||
<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">{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} </button>
|
||||||
<button *ngIf="timeLeft == 0" mat-raised-button color="primary" (click)="resendOTP(1)">{{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>
|
</div>
|
||||||
|
|||||||
@ -45,11 +45,11 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
|
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
|
||||||
),]),
|
),]),
|
||||||
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
|
phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]),
|
||||||
address_1: new FormControl('', [Validators.maxLength(50)]),
|
address_1: new FormControl('', [ Validators.maxLength(50)]),
|
||||||
city: new FormControl('', [Validators.maxLength(10)]),
|
city: new FormControl('', [ Validators.maxLength(10)]),
|
||||||
state: new FormControl('', [Validators.maxLength(10)]),
|
state: new FormControl('', [ Validators.maxLength(10)]),
|
||||||
otp: new FormControl('', [Validators.maxLength(10)]),
|
otp: new FormControl('', [ Validators.maxLength(10)]),
|
||||||
pincode: new FormControl('',[Validators.maxLength(6)]),
|
pincode: new FormControl('',[ Validators.maxLength(6)]),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,17 +60,21 @@ export class CustomerInfoComponent implements OnInit {
|
|||||||
submit(){
|
submit(){
|
||||||
console.log(this.form.value)
|
console.log(this.form.value)
|
||||||
console.log('add')
|
console.log('add')
|
||||||
|
if(!this.form.valid){
|
||||||
|
return
|
||||||
|
}
|
||||||
let row_obj = this.form.value
|
let row_obj = this.form.value
|
||||||
console.log(row_obj)
|
console.log(row_obj)
|
||||||
let addFormData = {
|
let addFormData = {
|
||||||
cusName: row_obj.cusName,
|
cusName: row_obj.cusName,
|
||||||
email: row_obj.email,
|
email: row_obj.email,
|
||||||
address_1: row_obj.address_1,
|
address_1: row_obj.address_1,
|
||||||
phoneNo: row_obj.phoneNo,
|
phoneNo: this.phoneNumber.substring(3) ,
|
||||||
pincode: row_obj.pincode,
|
pincode: row_obj.pincode,
|
||||||
state: row_obj.state,
|
state: row_obj.state,
|
||||||
city: row_obj.city,
|
city: row_obj.city,
|
||||||
};
|
};
|
||||||
|
console.log(addFormData)
|
||||||
|
|
||||||
this._cus.addCusDetails(addFormData).subscribe(res => {
|
this._cus.addCusDetails(addFormData).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export class PaymentComponent implements OnInit {
|
|||||||
let time = new Date().toLocaleTimeString()
|
let time = new Date().toLocaleTimeString()
|
||||||
let params= {
|
let params= {
|
||||||
"busId": serviceDetails.busId,
|
"busId": serviceDetails.busId,
|
||||||
"cusId": URL_AS_LIST[8],
|
"cusId": URL_AS_LIST[9],
|
||||||
"appoinmentDate": slot_array[0].date,
|
"appoinmentDate": slot_array[0].date,
|
||||||
"appoinmentTime": time,
|
"appoinmentTime": time,
|
||||||
"serviceMap": serviceMap,
|
"serviceMap": serviceMap,
|
||||||
|
|||||||
@ -103,6 +103,10 @@
|
|||||||
<button *ngFor="let slot of slots;let i=index" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i,'clickedSlot':slotIndex == i } " (click)="toggleActive($event,slot,i)" >{{slot | date:'shortTime'}}</button>
|
<button *ngFor="let slot of slots;let i=index" mat-raised-button mat-button-sm class="mr-1 mt-1 hoverButton" [ngClass]="{'primary':slotIndex != i,'clickedSlot':slotIndex == i } " (click)="toggleActive($event,slot,i)" >{{slot | date:'shortTime'}}</button>
|
||||||
</div> </div>
|
</div> </div>
|
||||||
|
|
||||||
|
<div class="innerdivs" >
|
||||||
|
<button mat-raised-button mat-button-sm class="mr-1 mb-1 mt-1 btn-red" [ngStyle]="{'background':slot_array.length ==0 ? '#ccc':'#4caf50' }" [disabled]="slot_array.length ==0" (click)="submit()">PROCEED</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<div>
|
<div>
|
||||||
<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>
|
<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>
|
||||||
|
|||||||
@ -274,4 +274,9 @@ footer {
|
|||||||
float:left;
|
float:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scrollHV {
|
||||||
|
height: calc(100vh - 150px);
|
||||||
|
// zoom: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -190,6 +190,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
toggleActive(event:any,param:any,i:any){
|
toggleActive(event:any,param:any,i:any){
|
||||||
console.log(event,param,i)
|
console.log(event,param,i)
|
||||||
|
this.slot_array =[];
|
||||||
// debugger;
|
// debugger;
|
||||||
// event.preventDefault();
|
// event.preventDefault();
|
||||||
this.slotIndex = i
|
this.slotIndex = i
|
||||||
@ -224,7 +225,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.slot_array.push({date:this.date,slots:param})
|
this.slot_array.push({date:this.date,slots:filteredTimes})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,8 +233,8 @@ export class SlotBookingDetailsComponent implements OnInit {
|
|||||||
console.log( this.slot_array)
|
console.log( this.slot_array)
|
||||||
localStorage.setItem("slotData",JSON.stringify(this.slot_array))
|
localStorage.setItem("slotData",JSON.stringify(this.slot_array))
|
||||||
let URL = this.router.url;
|
let URL = this.router.url;
|
||||||
//console.log(URL)
|
console.log( JSON.parse(localStorage.getItem("slotData")))
|
||||||
this.router.navigate([URL+"/cus"])
|
this.router.navigate([URL+"/cus"])
|
||||||
}
|
}
|
||||||
checkBooked(param){
|
checkBooked(param){
|
||||||
// console.log(param, this.bookedAppointment)
|
// console.log(param, this.bookedAppointment)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user