issue fix
This commit is contained in:
parent
9e225059fb
commit
f0742b9b64
@ -208,7 +208,7 @@ export class DialogBoxComponent implements OnInit {
|
||||
this.local_data.customer = this.local_data.customer[0].id
|
||||
this.customerId = this.local_data.customer
|
||||
this.slotsResult =this.local_data.appoinmentSlots
|
||||
|
||||
this.local_data.appoinmentTime = new DatePipe('en-US').transform(this.local_data['appoinmentSlots'][0], 'shortTime')
|
||||
console.log(this.servicesList_array)
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<!-- <mat-card class="settings-panel" > -->
|
||||
<h5 mat-dialog-title>
|
||||
<strong>Assign Service</strong>
|
||||
<strong>{{serviceName}} Service</strong>
|
||||
<button mat-icon-button type="button" matTooltip="Close" class="button" matTooltipPosition="above" (click)="closeDialog()">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
|
||||
@ -10,9 +10,11 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
export class AssignServiceComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
local_data: any;
|
||||
serviceName: any = [];
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<AssignServiceComponent>,@Optional() @Inject(MAT_DIALOG_DATA) public data) {
|
||||
console.log(data)
|
||||
this.serviceName = data.servicesName
|
||||
this.local_data = data
|
||||
if(this.local_data.hasOwnProperty('durationNew')){
|
||||
this.local_data.duration = this.local_data.durationNew
|
||||
|
||||
@ -154,14 +154,14 @@
|
||||
<input type="text" matInput placeholder="gender" [(ngModel)]="gender" >
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div class="form-group label-container">
|
||||
<!-- <div class="form-group label-container">
|
||||
<label>Date of Birth <span style="margin-left: 3.5rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.dob}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
<mat-label>Date of Birth</mat-label>
|
||||
<input type="text" matInput placeholder="" [(ngModel)]="dob">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Languages <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.languages}}</a>
|
||||
@ -187,13 +187,21 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Experience <span style="margin-left: 4rem;">-</span></label>
|
||||
<label>Experience <span style="margin-left: 5rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.exp}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
<mat-label>Experience</mat-label>
|
||||
<input type="text" matInput placeholder="Experience" [(ngModel)]="exp">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>No of Slot Days <span style="margin-left: 2rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.slotDays}}</a>
|
||||
<mat-form-field class="example-full-width" *ngIf="isEditable == true">
|
||||
<mat-label>No of Slot Days</mat-label>
|
||||
<input type="text" matInput placeholder="Experience" [(ngModel)]="slotDays">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="form-group label-container" *ngIf="userRole != 'BADMIN'">
|
||||
<label>Skills <span style="margin-left: 4rem;">-</span></label>
|
||||
<a style="padding: 10px;" *ngIf="isEditable == false">{{practitionerdetails.skills}}</a>
|
||||
|
||||
@ -42,11 +42,12 @@ export class ConsultantSettingComponent implements OnInit {
|
||||
"days": null,
|
||||
"languages": null,
|
||||
"workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]),
|
||||
"dob": null,
|
||||
// "dob": null,
|
||||
"designtion": null,
|
||||
"gender": null,
|
||||
"description":null,
|
||||
// "skills": null,
|
||||
"skills": [],
|
||||
"slotDays":null,
|
||||
"caption": null,
|
||||
"isActive": "1",
|
||||
|
||||
@ -63,9 +64,10 @@ export class ConsultantSettingComponent implements OnInit {
|
||||
description:any=[];
|
||||
skills:any = [];
|
||||
caption:any = [];
|
||||
dob: any=[];
|
||||
// dob: any=[];
|
||||
languages: any=[];
|
||||
designtion: any=[];
|
||||
slotDays: any = [];
|
||||
exp: any=[];
|
||||
qualification: any=[];
|
||||
id: any;
|
||||
@ -167,7 +169,7 @@ edit_table(param){
|
||||
console.log('status', );
|
||||
this.isEditable = true
|
||||
// localStorage.setItem('row_item',JSON.stringify(tableArr))
|
||||
console.log( this.isEditable);
|
||||
console.log(this.isEditable);
|
||||
// this.isEditable = status;
|
||||
// this.isEditable_month = tableArr.months;
|
||||
}
|
||||
@ -230,11 +232,12 @@ unavailability(action,obj) {
|
||||
"days": null,
|
||||
"languages": null,
|
||||
"workingHours": JSON.stringify( [{"sunday":{"hours":[],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[],"breaks":[]}},{"wednesday":{"hours":[],"breaks":[]}},{"thursday":{"hours":[],"breaks":[]}},{"friday":{"hours":[],"breaks":[]}},{"saturday":{"hours":[],"breaks":[]}}]),
|
||||
"dob": null,
|
||||
// "dob": null,
|
||||
"designtion": null,
|
||||
"slotDays": null,
|
||||
"gender": null,
|
||||
"description":null,
|
||||
// "skills": null,
|
||||
"skills": [],
|
||||
"caption": null,
|
||||
"isActive": "1",
|
||||
|
||||
@ -258,6 +261,7 @@ unavailability(action,obj) {
|
||||
} );
|
||||
|
||||
}
|
||||
this.userName = this.usersList.userName
|
||||
this.practitionerdetails = this.usersList['practitionerInfos'][0]
|
||||
// this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills)
|
||||
console.log( this.practitionerdetails)
|
||||
@ -272,17 +276,19 @@ unavailability(action,obj) {
|
||||
|
||||
this.workinghours = JSON.parse(this.practitionerdetails.workingHours)
|
||||
this.skills= JSON.parse(this.practitionerdetails.skills)
|
||||
console.log(this.skills)
|
||||
this.id=this.practitionerdetails.id
|
||||
this.userName = this.usersList.userName
|
||||
this.gender=this.practitionerdetails.gender
|
||||
this.description=this.practitionerdetails.description
|
||||
|
||||
this.caption = this.practitionerdetails.caption
|
||||
this.dob=this.practitionerdetails.dob
|
||||
// this.dob=this.practitionerdetails.dob
|
||||
this.exp=this.practitionerdetails.exp
|
||||
this.languages=this.practitionerdetails.languages
|
||||
this.qualification=this.practitionerdetails.qualification
|
||||
this.designtion=this.practitionerdetails.designtion
|
||||
this.slotDays = this.practitionerdetails.slotDays
|
||||
console.log(this.gender)
|
||||
|
||||
// this.workinghours = this.practitionerdetails.workingHours
|
||||
@ -383,8 +389,10 @@ unavailability(action,obj) {
|
||||
|
||||
asignService(param,index){
|
||||
console.log(param)
|
||||
|
||||
console.log(index,this.servicesList_data)
|
||||
if(this.servicesList_data[index].duration.length>0){
|
||||
this.servicesList_data[index].duration[0].servicesName = param.servicesName
|
||||
param = this.servicesList_data[index].duration[0]
|
||||
}
|
||||
const dialogRef = this.dialog.open(AssignServiceComponent, {
|
||||
@ -469,8 +477,9 @@ unavailability(action,obj) {
|
||||
"qualification": this.qualification,
|
||||
// "fees": "800",
|
||||
"languages": this.languages,
|
||||
"dob": this.dob,
|
||||
// "dob": this.dob,
|
||||
"designtion": this.qualification,
|
||||
"slotDays": this.slotDays,
|
||||
"gender": this.gender,
|
||||
"workingHours": JSON.stringify( tmp),
|
||||
"description": this.description,
|
||||
|
||||
@ -34,6 +34,7 @@ export class DoctorProfileComponent implements OnInit {
|
||||
console.log('booked', res);
|
||||
if(res.length>0){
|
||||
this.bookedAppointment = res[0].user[0]
|
||||
localStorage.setItem('user_id',res[0].user[0].id)
|
||||
this.dp = this.apiUrl+'imageViewer?img_name='+ this.bookedAppointment.logo
|
||||
console.log(this.dp)
|
||||
this.profileDetails = this.bookedAppointment.practitionerInfos[0]
|
||||
|
||||
@ -204,7 +204,7 @@
|
||||
<span style="margin-left: 10px;">Time :{{slotTime | date:'shortTime'}}</span>
|
||||
</p> -->
|
||||
<p class="param"><img src="assets/images/Languages.svg" alt="Avatar" class="img">Date : </p>
|
||||
<span class="span-text"> {{date | date:'longDate'}}</span>
|
||||
<span class="span-text"> {{check(days) | date:'longDate'}}</span>
|
||||
<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>
|
||||
|
||||
@ -71,8 +71,13 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
console.log(URL)
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
||||
}
|
||||
|
||||
if(URL_AS_LIST[2] == 'practitioner'){
|
||||
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details'])
|
||||
}else{
|
||||
this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]])
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@ -117,23 +122,28 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
getDuration = JSON.parse(localStorage.getItem('servicedetails'))
|
||||
console.log(getDuration.duration)
|
||||
}
|
||||
|
||||
|
||||
function convertTime12to24 (time12h) {
|
||||
const [time, modifier] = time12h.split(' ');
|
||||
|
||||
let [hours, minutes] = time.split(':');
|
||||
|
||||
if (hours === '12') {
|
||||
hours = '00';
|
||||
}
|
||||
|
||||
if (modifier === 'pm') {
|
||||
hours = parseInt(hours, 10) + 12;
|
||||
}
|
||||
|
||||
return `${hours}:${minutes}`;
|
||||
}
|
||||
const [time, modifier] = time12h.split(' ');
|
||||
|
||||
let [hours, minutes] = time.split(':');
|
||||
|
||||
if (hours === '12') {
|
||||
hours = '00';
|
||||
}
|
||||
|
||||
if (modifier === 'pm') {
|
||||
hours = parseInt(hours, 10) + 12;
|
||||
}
|
||||
|
||||
return `${hours}:${minutes}`;
|
||||
}
|
||||
if(this.getHours instanceof Array){
|
||||
|
||||
|
||||
if(this.getHours.length != 0){
|
||||
|
||||
|
||||
|
||||
|
||||
console.log(convertTime12to24(this.getHours[0].startTime));
|
||||
|
||||
@ -175,6 +185,9 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
|
||||
// Output the intervals
|
||||
console.log(intervals);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//this.slots = intervals
|
||||
}
|
||||
@ -247,7 +260,7 @@ export class SlotBookingDetailsComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.slot_array.push({date:this.date,slots:filteredTimes})
|
||||
this.slot_array.push({date:this.days[this.clicks],slots:filteredTimes})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -50,11 +50,15 @@ export class LoginComponent {
|
||||
localStorage.setItem('user_id',res.roleId
|
||||
);
|
||||
|
||||
|
||||
localStorage.setItem('busId',res.busId)
|
||||
if(res.role == 'BADMIN' || res.role == 'PRACTITIONER'){
|
||||
let user_role = localStorage.getItem('user_role')
|
||||
if(res.role == 'PRACTITIONER'){
|
||||
localStorage.setItem('busNameID',res.busId)
|
||||
this.getUserDetails()
|
||||
}else{
|
||||
}else if(user_role == 'BADMIN'){
|
||||
this.router.navigate(['/services'])
|
||||
}else if(user_role != 'BADMIN' && res.role != 'PRACTITIONER'){
|
||||
this.router.navigate(['/home'])
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,16 @@ const MENUITEMS : Menu[] = [
|
||||
type: 'link',
|
||||
icon: 'explore'
|
||||
},
|
||||
{
|
||||
state: 'services',
|
||||
name: 'Services List',
|
||||
type: 'link',
|
||||
icon: 'strikethrough_s',
|
||||
// children: [
|
||||
// {state: 'services-list', name: 'Services List'},
|
||||
// // {state: 'add-user-list', name: 'Add Users '},
|
||||
// ]
|
||||
},
|
||||
{
|
||||
state: 'appoinments',
|
||||
name: 'Appoinments',
|
||||
@ -55,14 +65,25 @@ const MENUITEMS : Menu[] = [
|
||||
// {state: 'calendar-list', name: 'Calendar List'},
|
||||
// ]
|
||||
// },
|
||||
|
||||
|
||||
{
|
||||
state: 'customers',
|
||||
name: 'Customers',
|
||||
state: 'users',
|
||||
name: 'Users',
|
||||
type: 'link',
|
||||
icon: 'directions_walk',
|
||||
icon: 'person_pin',
|
||||
// children: [
|
||||
// {state: 'customers-list', name: 'Customers List'},
|
||||
// {state: 'user-list', name: 'Users List'},
|
||||
// // {state: 'add-user-list', name: 'Add Users '},
|
||||
// ]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
state: 'consultant-setting',
|
||||
name: 'Settings',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'consultants',
|
||||
@ -74,15 +95,20 @@ const MENUITEMS : Menu[] = [
|
||||
// ]
|
||||
},
|
||||
{
|
||||
state: 'users',
|
||||
name: 'Users',
|
||||
state: 'consultant-list',
|
||||
name: 'Consultant List',
|
||||
type: 'link',
|
||||
icon: 'person_pin',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'customers',
|
||||
name: 'Customers',
|
||||
type: 'link',
|
||||
icon: 'directions_walk',
|
||||
// children: [
|
||||
// {state: 'user-list', name: 'Users List'},
|
||||
// // {state: 'add-user-list', name: 'Add Users '},
|
||||
// {state: 'customers-list', name: 'Customers List'},
|
||||
// ]
|
||||
},
|
||||
},
|
||||
{
|
||||
state: 'mail-log',
|
||||
name: 'Mail',
|
||||
@ -92,28 +118,6 @@ const MENUITEMS : Menu[] = [
|
||||
// {state: 'customers-list', name: 'Customers List'},
|
||||
// ]
|
||||
},
|
||||
{
|
||||
state: 'services',
|
||||
name: 'Services List',
|
||||
type: 'link',
|
||||
icon: 'strikethrough_s',
|
||||
// children: [
|
||||
// {state: 'services-list', name: 'Services List'},
|
||||
// // {state: 'add-user-list', name: 'Add Users '},
|
||||
// ]
|
||||
},
|
||||
{
|
||||
state: 'consultant-setting',
|
||||
name: 'Settings',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
{
|
||||
state: 'consultant-list',
|
||||
name: 'Consultant List',
|
||||
type: 'link',
|
||||
icon: 'settings_system_daydream'
|
||||
},
|
||||
// {
|
||||
// state: 'business-centers',
|
||||
// name: 'Centers',
|
||||
|
||||
@ -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.3:8080/api/',
|
||||
// apiEndpoint:'http://192.168.1.8:8080/api/',
|
||||
|
||||
apiEndpoint:'https://api.venbait.in/api/',
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user