slot changes and fees set dynamically
This commit is contained in:
parent
27992ff2f5
commit
77872cdd77
@ -14,8 +14,11 @@ export class AssignServiceComponent implements OnInit {
|
||||
constructor(public dialogRef: MatDialogRef<AssignServiceComponent>,@Optional() @Inject(MAT_DIALOG_DATA) public data) {
|
||||
console.log(data)
|
||||
this.local_data = data
|
||||
this.local_data.duration = this.local_data.durationNew
|
||||
if(this.local_data.hasOwnProperty('durationNew')){
|
||||
this.local_data.duration = this.local_data.durationNew
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
@ -433,7 +433,7 @@
|
||||
</div>
|
||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70">
|
||||
<div class="service-info">{{details.servicesName}}</div>
|
||||
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : 0}}</span></div>
|
||||
<div class="service-info2">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | <span class="indianSymbol">{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees}}</span></div>
|
||||
<div class="info" (click)="asignService(details,i)">+ Customize the price and duration of a service.</div>
|
||||
</div>
|
||||
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15" fxLayoutAlign="center center">
|
||||
|
||||
@ -173,12 +173,13 @@ export class EditWorkingHoursComponent implements OnInit {
|
||||
let sunday ={filters :this.data[0].sunday.hours }
|
||||
for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){
|
||||
this.addFilterToFiltersFormArray()
|
||||
this.dynamicForm.patchValue(sunday)
|
||||
}
|
||||
// if(this.data[0].sunday.hours.length>1){
|
||||
|
||||
// }
|
||||
|
||||
this.dynamicForm.patchValue(sunday)
|
||||
|
||||
// this.data[1].monday.hours.forEach(element => {
|
||||
// element.value = null
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@ ngOnInit() {
|
||||
description: new FormControl('',[Validators.required]),
|
||||
fees:new FormControl('',[Validators.required])
|
||||
});
|
||||
this.local_data.duration = JSON.stringify(this.local_data.duration)
|
||||
this.form.patchValue(this.local_data)
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,8 @@ export class UserService {
|
||||
|
||||
getUsersListDetails(): Observable<any> {
|
||||
console.log('IN')
|
||||
return this._http.get<any[]>(this.apiUrl + "getusers")
|
||||
//return this._http.post<any[]>(this.apiUrl + "getusers")
|
||||
return this._http.post(this.apiUrl + 'getusers', {})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('role', []))
|
||||
// )
|
||||
|
||||
@ -223,6 +223,10 @@ let updatevalue = { serviceId: row_obj.serviceId,
|
||||
console.log(URL+"/"+data.randStr+"/practitioner")
|
||||
this.router.navigate([URL+"/"+data.randStr+"/practitioner"])
|
||||
}else{
|
||||
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
|
||||
console.log(filter)
|
||||
localStorage.setItem('cusServiceData',JSON.stringify(filter))
|
||||
localStorage.setItem("servicedetails",JSON.stringify(data))
|
||||
this.router.navigate([URL+"/slots/list"])
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
<p class="param"><img src="assets/images/person.svg" alt="Avatar" class="img"> Practitioner </p>
|
||||
<span class="span-text">Dr. {{doctor}}</span>
|
||||
<p class="param"><img src="assets/images/information.svg" alt="Avatar" class="img"> Service </p>
|
||||
<span class="span-text"> {{servicesName.servicesName}} ({{servicesName.duration
|
||||
<span class="span-text"> {{servicesName.servicesName}} ({{serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].durationNew:serviceMapdetails[0].service[0].duration
|
||||
}} Mins)</span>
|
||||
<!-- <p class="text-color d-flex align-items-start" >
|
||||
<img src="assets/images/information.svg" alt="Avatar" class="img" />
|
||||
@ -81,7 +81,8 @@
|
||||
<p class="param"><img src="assets/images/Time-Icon.svg" alt="Avatar" class="img">Time : </p>
|
||||
<span class="span-text">{{slotTime | 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;">₹</span> {{user.practitionerInfos[0].days}}</span>
|
||||
<span class="span-text"><span class="ex" style="font-size: 17px;padding-bottom: 10px;line-height: 17px;">₹</span> {{ serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].fees:serviceMapdetails[0].service[0].fees
|
||||
}}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -51,10 +51,12 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
doctor: any=[];
|
||||
servicesName: any=[];
|
||||
user: any=[];
|
||||
serviceMapdetails:any =[]
|
||||
constructor(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){
|
||||
this.serviceMapdetails =res
|
||||
this.servicesName = res[0].service[0]
|
||||
this.user = res[0].user[0]
|
||||
this.doctor = res[0].user[0].userName
|
||||
@ -106,8 +108,13 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
// console.log(key,value1)
|
||||
// }
|
||||
});
|
||||
let getDuration = JSON.parse(localStorage.getItem('servicedetails'))
|
||||
console.log(getDuration.duration)
|
||||
let tmpdata = localStorage.getItem('servicedetails')
|
||||
let getDuration;
|
||||
if(tmpdata != null){
|
||||
getDuration = JSON.parse(localStorage.getItem('servicedetails'))
|
||||
console.log(getDuration.duration)
|
||||
}
|
||||
|
||||
|
||||
function convertTime12to24 (time12h) {
|
||||
const [time, modifier] = time12h.split(' ');
|
||||
@ -165,6 +172,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
|
||||
// Output the intervals
|
||||
console.log(intervals);
|
||||
|
||||
//this.slots = intervals
|
||||
}
|
||||
|
||||
@ -177,6 +185,10 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
let service = localStorage.getItem("servicedetails")
|
||||
let serviceDetails = JSON.parse(service)
|
||||
console.log(serviceDetails)
|
||||
this.servicesName = serviceDetails
|
||||
this.serviceMapdetails = this.serviceMapdetails.filter(arr=>{return arr.serviceId == serviceDetails.serviceId })
|
||||
|
||||
console.log( this.serviceMapdetails)
|
||||
// this.form.controls['note'].setValue('Sample')
|
||||
this.form.patchValue(this.local_data)
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vertical-menu w-100 " >
|
||||
<div class="vertical-menu w-100 " style="margin: 1rem;" >
|
||||
<!-- <button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button> -->
|
||||
|
||||
@ -10,7 +10,7 @@ export const environment = {
|
||||
// apiEndpoint:'http://192.168.1.20:8080/api/',
|
||||
// apiEndpoint:'https://api.venbait.in/api/',
|
||||
// apiEndpoint:'http://venbainfotech.com:5000/api/',
|
||||
apiEndpoint:'http://192.168.1.4:8080/api/',
|
||||
apiEndpoint:'http://192.168.1.8:8080/api/',
|
||||
// apiEndpoint:'https://api.venbait.in/api/',
|
||||
|
||||
//EndUser URL
|
||||
|
||||
Loading…
Reference in New Issue
Block a user