Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export class FloatingButton extends HTMLElement {
constructor() {
super();
const dataset = this.dataset as FloatingButtonDataset;
const buttonText = dataset["buttonText"];
const buttonPosition = dataset["buttonPosition"];
const buttonColor = dataset["buttonColor"];
const buttonTextColor = dataset["buttonTextColor"];
const buttonText = dataset.buttonText;
const buttonPosition = dataset.buttonPosition;
const buttonColor = dataset.buttonColor;
const buttonTextColor = dataset.buttonTextColor;

//TODO: Logic is duplicated over HTML generation and attribute change, keep it at one place
const buttonHtml = `<style>${window.Cal.__css}</style> ${getFloatingButtonHtml({
Expand Down
10 changes: 5 additions & 5 deletions packages/embeds/embed-core/src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1018,11 +1018,11 @@ class CalApi {
el = existingEl as FloatingButton;
}
const dataset = el.dataset;
dataset["buttonText"] = buttonText;
dataset["hideButtonIcon"] = `${hideButtonIcon}`;
dataset["buttonPosition"] = `${buttonPosition}`;
dataset["buttonColor"] = `${buttonColor}`;
dataset["buttonTextColor"] = `${buttonTextColor}`;
dataset.buttonText = buttonText;
dataset.hideButtonIcon = `${hideButtonIcon}`;
dataset.buttonPosition = `${buttonPosition}`;
dataset.buttonColor = `${buttonColor}`;
dataset.buttonTextColor = `${buttonTextColor}`;
}

async modal({
Expand Down
1 change: 1 addition & 0 deletions packages/lib/CalendarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ export default abstract class BaseCalendarService implements Calendar {
const dtstartProperty = vevent.getFirstProperty("dtstart");
const tzidFromDtstart = dtstartProperty ? (dtstartProperty as any).jCal[1].tzid : undefined;
const dtstart: { [key: string]: string } | undefined = vevent?.getFirstPropertyValue("dtstart");
// biome-ignore lint/complexity/useLiteralKeys: accessing dynamic property from ICAL.js object
const timezone = dtstart ? dtstart["timezone"] : undefined;
// We check if the dtstart timezone is in UTC which is actually represented by Z instead, but not recognized as that in ICAL.js as UTC
const isUTC = timezone === "Z";
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/dayjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const weekdayToWeekIndex = (weekday: WeekDays | string | number | undefin
* @returns Time Zone name
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getTimeZone = (date: Dayjs): string => (date as any)["$x"]["$timezone"];
export const getTimeZone = (date: Dayjs): string => (date as any).$x.$timezone;

/**
* Verify if timeZone has Daylight Saving Time (DST).
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/getBooking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function getBooking(prisma: PrismaClient, uid: string) {
if (booking) {
// @NOTE: had to do this because Server side cant return [Object objects]
// probably fixable with json.stringify -> json.parse
booking["startTime"] = (booking?.startTime as Date)?.toISOString() as unknown as Date;
booking.startTime = (booking?.startTime as Date)?.toISOString() as unknown as Date;
}

return booking;
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/server/checkCfTurnstileToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function checkCfTurnstileToken({ token, remoteIp }: { token?: strin

const data = await result.json();

if (!data["success"]) {
if (!data.success) {
throw new HttpError({ statusCode: 401, message: INVALID_CLOUDFLARE_TOKEN_ERROR });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ describe.skip("editLocation.handler", () => {
],
},
],
// biome-ignore lint/complexity/useLiteralKeys: app keys contain hyphens
apps: [TestData.apps["zoom"], TestData.apps["google-meet"]],
};

Expand Down
18 changes: 9 additions & 9 deletions packages/trpc/server/routers/viewer/bookings/get.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,16 @@ export async function getBookings({
eb
.case()
.when("Booking.status", "=", "cancelled")
.then(BookingStatus["CANCELLED"])
.then(BookingStatus.CANCELLED)
.when("Booking.status", "=", "accepted")
.then(BookingStatus["ACCEPTED"])
.then(BookingStatus.ACCEPTED)
.when("Booking.status", "=", "rejected")
.then(BookingStatus["REJECTED"])
.then(BookingStatus.REJECTED)
.when("Booking.status", "=", "pending")
.then(BookingStatus["PENDING"])
.then(BookingStatus.PENDING)
.when("Booking.status", "=", "awaiting_host")
.then(BookingStatus["AWAITING_HOST"])
.else(BookingStatus["PENDING"])
.then(BookingStatus.AWAITING_HOST)
.else(BookingStatus.PENDING)
.end(), // End of CASE expression
"varchar"
)
Expand Down Expand Up @@ -539,11 +539,11 @@ export async function getBookings({
eb
.case()
.when("EventType.schedulingType", "=", "roundRobin")
.then(SchedulingType["ROUND_ROBIN"])
.then(SchedulingType.ROUND_ROBIN)
.when("EventType.schedulingType", "=", "collective")
.then(SchedulingType["COLLECTIVE"])
.then(SchedulingType.COLLECTIVE)
.when("EventType.schedulingType", "=", "managed")
.then(SchedulingType["MANAGED"])
.then(SchedulingType.MANAGED)
.else(null)
.end(),
"varchar" // Or 'text' - use the actual SQL data type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getMeetingInformationHandler = async ({ ctx: _ctx, input }: GetMeet
const { roomName } = input;

try {
const dailyVideoAdapterImport = VideoApiAdapterMap["dailyvideo"];
const dailyVideoAdapterImport = VideoApiAdapterMap.dailyvideo;
if (!dailyVideoAdapterImport) {
throw new TRPCError({
code: "BAD_REQUEST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["pkce_required"],
message: OAUTH_ERROR_REASONS.pkce_required,
})
);

Expand All @@ -108,7 +108,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);

Expand All @@ -131,7 +131,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputMD5 })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);

Expand All @@ -148,7 +148,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputPlain })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);

Expand Down Expand Up @@ -266,7 +266,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);

Expand All @@ -290,7 +290,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input })).rejects.toThrow(
new TRPCError({
code: "UNAUTHORIZED",
message: OAUTH_ERROR_REASONS["client_not_found"],
message: OAUTH_ERROR_REASONS.client_not_found,
})
);

Expand Down Expand Up @@ -349,7 +349,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputInvalid })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);

Expand All @@ -366,7 +366,7 @@ describe("generateAuthCodeHandler", () => {
await expect(generateAuthCodeHandler({ ctx: mockCtx, input: inputPlain })).rejects.toThrow(
new TRPCError({
code: "BAD_REQUEST",
message: OAUTH_ERROR_REASONS["invalid_code_challenge_method"],
message: OAUTH_ERROR_REASONS.invalid_code_challenge_method,
})
);
});
Expand Down
Loading