diff --git a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts
index deb6951..8bdd8ea 100644
--- a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts
+++ b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts
@@ -372,6 +372,53 @@ export class DialogBoxComponent implements OnInit {
}
})
}
+
+ checkSlotDur(param:any,i:any){
+ //console.log(param,i)
+ // this.slot_array =[];
+ // debugger;
+ // event.preventDefault();
+ // this.slotIndex = i
+ // this.slotTime = param
+
+ // console.log(this.date,param)
+ let thirtyMinutes = this.duration * 60 * 1000; // convert 30 minutes to milliseconds
+ let date1 = new Date(param);
+ let date2 = new Date(date1.getTime() + thirtyMinutes);
+ // console.log(date1);
+ // console.log(date2);
+ const currentTime = new Date(); // Get the current time
+ //const filteredTimes = this.slots.filter(time => new Date(time) > date1);
+
+ const rangeDate = new Date(date2);
+
+ const resultArray = this.slots.filter(slot => {
+ const date = new Date(slot);
+ return date >= rangeDate;
+ });
+
+ const firstSlt = new Date(date1);
+ const lastSlt = new Date( resultArray[0]);
+ const filteredTimes = this.slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
+
+ // console.log(resultArray,filteredTimes);
+
+ if(filteredTimes.length>0){
+ return 1
+
+ }else{
+ return 0
+ }
+ // let result = filteredTimes.pop();
+ // console.log(result);
+ // this.slots.forEach(element => {
+ // if(element
-
+
+
diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
index 7c17ee2..546e3ab 100644
--- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
+++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts
@@ -284,6 +284,55 @@ if(this.getHours.length != 0){
this.slot_array.push({date:this.days[this.clicks],slots:filteredTimes})
}
+
+
+
+ checkSlotDur(param:any,i:any){
+ //console.log(param,i)
+ // this.slot_array =[];
+ // debugger;
+ // event.preventDefault();
+ // this.slotIndex = i
+ // this.slotTime = param
+
+ // console.log(this.date,param)
+ let thirtyMinutes = this.servicesName.duration * 60 * 1000; // convert 30 minutes to milliseconds
+ let date1 = new Date(param);
+ let date2 = new Date(date1.getTime() + thirtyMinutes);
+ // console.log(date1);
+ // console.log(date2);
+ const currentTime = new Date(); // Get the current time
+ //const filteredTimes = this.slots.filter(time => new Date(time) > date1);
+
+ const rangeDate = new Date(date2);
+
+ const resultArray = this.slots.filter(slot => {
+ const date = new Date(slot);
+ return date >= rangeDate;
+ });
+
+ const firstSlt = new Date(date1);
+ const lastSlt = new Date( resultArray[0]);
+ const filteredTimes = this.slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt);
+
+ // console.log(resultArray,filteredTimes);
+
+ if(filteredTimes.length>0){
+ return 1
+
+ }else{
+ return 0
+ }
+ // let result = filteredTimes.pop();
+ // console.log(result);
+ // this.slots.forEach(element => {
+ // if(element