
* WIP, WIP, WIP, WIP * Adds missing types * Type fixes for useSlots * Type fixes * Fixes periodType 500 error when updating * Adds missing dayjs plugin and type fixes * An attempt was made to fix tests * Save work in progress * Added UTC overflow to days * Update lib/availability.ts Co-authored-by: Alex Johansson <alexander@n1s.se> * No more magic numbers * Fixed slots.test & added getWorkingHours.test * Tests pass, simpler logic, profit? * Timezone shifting! * Forgot to unskip tests * Updated the user page * Added American seed user, some fixes * tmp fix so to continue testing availability * Removed timeZone parameter, fix defaultValue auto-scroll Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Alex Johansson <alexander@n1s.se>
18 lines
475 B
TypeScript
18 lines
475 B
TypeScript
export type TimeRange = {
|
|
start: Date;
|
|
end: Date;
|
|
};
|
|
|
|
export type Schedule = TimeRange[][];
|
|
|
|
/**
|
|
* ```text
|
|
* Ensure startTime and endTime in minutes since midnight; serialized to UTC by using the organizer timeZone, either by using the schedule timeZone or the user timeZone.
|
|
* @see lib/availability.ts getWorkingHours(timeZone: string, availability: Availability[])
|
|
* ```
|
|
*/
|
|
export type WorkingHours = {
|
|
days: number[];
|
|
startTime: number;
|
|
endTime: number;
|
|
};
|