Bug fix (#592)
This commit is contained in:
		
							parent
							
								
									ee24ee5518
								
							
						
					
					
						commit
						e587432894
					
				
					 1 changed files with 3 additions and 11 deletions
				
			
		
							
								
								
									
										14
									
								
								lib/slots.ts
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								lib/slots.ts
									
									
									
									
									
								
							| 
						 | 
					@ -47,16 +47,8 @@ const organizerBoundaries = (
 | 
				
			||||||
): Boundary[] => {
 | 
					): Boundary[] => {
 | 
				
			||||||
  const boundaries: Boundary[] = [];
 | 
					  const boundaries: Boundary[] = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const startDay: number = +inviteeDate
 | 
					  const startDay: number = +inviteeDate.startOf("d").add(inviteeBounds.lowerBound, "minutes").format("d");
 | 
				
			||||||
    .utc()
 | 
					  const endDay: number = +inviteeDate.startOf("d").add(inviteeBounds.upperBound, "minutes").format("d");
 | 
				
			||||||
    .startOf("day")
 | 
					 | 
				
			||||||
    .add(inviteeBounds.lowerBound, "minutes")
 | 
					 | 
				
			||||||
    .format("d");
 | 
					 | 
				
			||||||
  const endDay: number = +inviteeDate
 | 
					 | 
				
			||||||
    .utc()
 | 
					 | 
				
			||||||
    .startOf("day")
 | 
					 | 
				
			||||||
    .add(inviteeBounds.upperBound, "minutes")
 | 
					 | 
				
			||||||
    .format("d");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  workingHours.forEach((item) => {
 | 
					  workingHours.forEach((item) => {
 | 
				
			||||||
    const lowerBound: number = item.startTime - dayjs().tz(organizerTimeZone).utcOffset();
 | 
					    const lowerBound: number = item.startTime - dayjs().tz(organizerTimeZone).utcOffset();
 | 
				
			||||||
| 
						 | 
					@ -104,7 +96,7 @@ const getSlotsBetweenBoundary = (frequency: number, { lowerBound, upperBound }:
 | 
				
			||||||
    slots.push(
 | 
					    slots.push(
 | 
				
			||||||
      <Dayjs>dayjs
 | 
					      <Dayjs>dayjs
 | 
				
			||||||
        .utc()
 | 
					        .utc()
 | 
				
			||||||
        .startOf("day")
 | 
					        .startOf("d")
 | 
				
			||||||
        .add(lowerBound + minutes, "minutes")
 | 
					        .add(lowerBound + minutes, "minutes")
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue