demo changes done
This commit is contained in:
parent
14ea59ad74
commit
3254bd8ac4
Binary file not shown.
@ -154,7 +154,8 @@ 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],
|
||||||
|
|||||||
@ -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:"Consult"},{id:2,value:"Attend"},{id:1,value:"No Show"},{id:1,value:"Cancel"}]
|
Status:any = [{id:1,value:"consultant"},{id:2,value:"Booked"},{id:1,value:"No Show"},{id:1,value:"cancelled"}]
|
||||||
advanced_slot_days: any=7;
|
advanced_slot_days: any=7;
|
||||||
slotIndex: any;
|
slotIndex: any;
|
||||||
findSlotIndex: any;
|
findSlotIndex: any;
|
||||||
@ -117,11 +117,11 @@ 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.frontDeskChoosedPractiID)
|
// // console.log(this.frontDeskChoosedPractiID)
|
||||||
}
|
}
|
||||||
get f(){
|
get f(){
|
||||||
return this.form.controls;
|
return this.form.controls;
|
||||||
@ -140,7 +140,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
close() {
|
close() {
|
||||||
// console.log(this.form.value);
|
// // console.log(this.form.value);
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,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){
|
||||||
|
|
||||||
@ -177,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')
|
||||||
@ -222,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')){
|
||||||
@ -236,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+""
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -249,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
|
||||||
@ -272,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)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -283,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
|
||||||
@ -291,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 =[]
|
||||||
@ -306,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)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -323,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);
|
||||||
@ -349,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)
|
||||||
@ -360,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);
|
||||||
|
|
||||||
@ -415,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
|
||||||
@ -424,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);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -435,16 +435,16 @@ 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 == 0){
|
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();
|
||||||
}
|
}
|
||||||
if(this.slotsResult.length == 0){
|
if(this.slotsResult.length == 0){
|
||||||
console.log(this.slotsResult.length == 0)
|
// console.log(this.slotsResult.length == 0)
|
||||||
this.notifierService.notify('warning', 'Please Select Slots');
|
this.notifierService.notify('warning', 'Please Select Slots');
|
||||||
this.form.controls['appoinmentSlots'].clearValidators();
|
this.form.controls['appoinmentSlots'].clearValidators();
|
||||||
this.form.controls['appoinmentSlots'].updateValueAndValidity();
|
this.form.controls['appoinmentSlots'].updateValueAndValidity();
|
||||||
@ -454,7 +454,7 @@ export class DialogBoxComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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')){
|
||||||
@ -516,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
|
||||||
@ -538,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)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -563,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
|
||||||
@ -579,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){
|
||||||
@ -611,21 +611,21 @@ console.log(params)
|
|||||||
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;
|
||||||
@ -636,12 +636,12 @@ console.log(params)
|
|||||||
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);
|
||||||
|
|
||||||
@ -656,17 +656,17 @@ console.log(params)
|
|||||||
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);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
@ -674,18 +674,18 @@ console.log(params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
});
|
});
|
||||||
@ -697,10 +697,10 @@ console.log(params)
|
|||||||
// 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{
|
||||||
@ -714,19 +714,23 @@ console.log(params)
|
|||||||
// 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 = this.servicesList_array[0].duration
|
this.duration = serviceDetails[0].service[0].duration
|
||||||
this.fees = this.servicesList_array[0].fees
|
this.fees = serviceDetails[0].service[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()
|
||||||
@ -740,11 +744,11 @@ console.log(params)
|
|||||||
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)
|
||||||
});
|
});
|
||||||
@ -757,15 +761,15 @@ console.log(params)
|
|||||||
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
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -781,7 +785,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);
|
||||||
@ -790,10 +794,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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,10 @@
|
|||||||
<mat-select #country
|
<mat-select #country
|
||||||
name="country"
|
name="country"
|
||||||
id="country"
|
id="country"
|
||||||
formControlName="country">
|
formControlName="country" noEntriesFoundLabel="'no matching country found'">
|
||||||
<mat-option [value]="null">Select Country</mat-option>
|
<mat-option>
|
||||||
|
<ngx-mat-select-search formControlName="country"></ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
<mat-option *ngFor="let country of countries" (click)="countryname(country)" [value]="country.name"> {{ country.flag }} {{ country.name }}</mat-option>
|
<mat-option *ngFor="let country of countries" (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>
|
||||||
|
|||||||
@ -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="Fees" matInput formControlName="duration" required>
|
<input appMobileNumberPattern placeholder="Duration" matInput formControlName="duration" required>
|
||||||
<div matSuffix>
|
<div matSuffix>
|
||||||
<span><b>Mins</b></span>
|
<span><b>Mins</b></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,8 +1,41 @@
|
|||||||
<ng-scrollbar class="scrollHV">
|
<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">
|
<mat-card class="mat_height" style="background:#3abba3;color: #fff;">
|
||||||
<div fxLayout="row wrap" class="inside_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>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;">
|
||||||
|
<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>
|
||||||
@ -26,11 +59,47 @@
|
|||||||
</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">
|
<mat-card class="mat_height" style="background: cadetblue;color: #fff;">
|
||||||
|
<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;">
|
||||||
|
<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">
|
||||||
@ -56,10 +125,35 @@
|
|||||||
</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">
|
<mat-card class="mat_height" style="background: darksalmon;color: #fff;">
|
||||||
|
<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;">
|
||||||
|
<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">
|
||||||
@ -80,7 +174,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div fxLayout="row wrap">
|
<!-- <div fxLayout="row wrap">
|
||||||
|
|||||||
@ -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: 3em !important;
|
font-size: 2em !important;
|
||||||
width: unset !important;
|
width: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -324,12 +324,13 @@ messages: Object[] = [{
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
selectedDateRange: {startDate: moment.Moment, endDate: moment.Moment};
|
selectedDateRange: {startDate: moment.Moment, endDate: moment.Moment};
|
||||||
currentDate: Date;
|
currentDate: any;
|
||||||
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;
|
||||||
|
|
||||||
constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) {
|
||||||
// this.fetch((data) => { this.rows = data; });
|
// this.fetch((data) => { this.rows = data; });
|
||||||
@ -360,10 +361,29 @@ messages: Object[] = [{
|
|||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
let startDate = new DatePipe('en-US').transform(this.currentDate, 'yyyy-MM-dd')
|
this.startof30days = dates[0]
|
||||||
|
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
|
||||||
@ -391,7 +411,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.currentDate, 'yyyy-MM-dd')
|
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 user_role = localStorage.getItem('user_role')
|
let user_role = localStorage.getItem('user_role')
|
||||||
|
|||||||
@ -163,6 +163,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
@ -57,6 +57,7 @@ mat-toolbar{
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
text-align: center;
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -29,19 +29,19 @@ export class BookingSummaryComponent implements OnInit {
|
|||||||
this.logo = localStorage.getItem('logo')
|
this.logo = localStorage.getItem('logo')
|
||||||
this.busName = localStorage.getItem('busName')
|
this.busName = localStorage.getItem('busName')
|
||||||
|
|
||||||
this.end_user.bookedDetails_observable$.subscribe((res) => {
|
// this.end_user.bookedDetails_observable$.subscribe((res) => {
|
||||||
console.log('booked2', res);
|
// console.log('booked2', res);
|
||||||
|
|
||||||
if(res instanceof Array){
|
// if(res instanceof Array){
|
||||||
|
|
||||||
if(res.length == 0){
|
// if(res.length == 0){
|
||||||
this.backRedireact()
|
// 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){
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<p>
|
<p>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -208,6 +208,7 @@ 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>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -154,6 +154,7 @@ mat-toolbar{
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
text-align: center;
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -592,7 +592,7 @@ let paramsmap= {
|
|||||||
currency: 'INR',
|
currency: 'INR',
|
||||||
country: 'IND',
|
country: 'IND',
|
||||||
udf1: ''+busId+'',
|
udf1: ''+busId+'',
|
||||||
udf2: ''+window.location.origin+'/#'+URL+'/',
|
udf2: ''+window.location.origin+'/appointment/#'+URL+'/',
|
||||||
udf3: ''+cusID+'',
|
udf3: ''+cusID+'',
|
||||||
udf4: ''+appointmentId+'',
|
udf4: ''+appointmentId+'',
|
||||||
udf5: ''
|
udf5: ''
|
||||||
@ -636,9 +636,9 @@ this._cus.paymentRequest(this.form.value ).subscribe(res => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
ngOnDestroy(){
|
// ngOnDestroy(){
|
||||||
localStorage.clear();
|
// localStorage.clear();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,52 +61,7 @@
|
|||||||
<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">
|
||||||
@ -148,12 +103,56 @@
|
|||||||
</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>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@ -306,6 +306,7 @@ 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>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,7 @@ 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>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -139,6 +139,7 @@ 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>
|
||||||
© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved
|
All Rights Reserved
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|||||||
@ -270,6 +270,7 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
text-align: center;
|
||||||
background-color: #d1d1d1;
|
background-color: #d1d1d1;
|
||||||
height:50px;
|
height:50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
BIN
ng-seed/src/assets/images/money.png
Normal file
BIN
ng-seed/src/assets/images/money.png
Normal file
Binary file not shown.
|
After 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+'/#/booking/',
|
endUserUrl: window.location.origin+'/appointment/#/booking/',
|
||||||
mailUrl:window.location.origin,
|
mailUrl:window.location.origin,
|
||||||
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
payment_api_key :'4cb964d4-9ef4-4a25-8f85-a2a13f43cbba',
|
||||||
payment_mode:'LIVE',
|
payment_mode:'TEST',
|
||||||
|
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",
|
||||||
|
|||||||
@ -11,7 +11,7 @@ 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+'/#/booking/',
|
endUserUrl: window.location.origin+'/appointment/#/booking/',
|
||||||
mailUrl:window.location.origin,
|
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:'TEST',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user