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
8 changes: 4 additions & 4 deletions apps/web/modules/apps/components/AllApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ function CategoryTab({ selectedCategory, categories, searchText, onCategoryChang
</h2>
{leftVisible && (
<button onClick={handleLeft} className="absolute bottom-0 flex lg:left-1/2">
<div className="bg-default flex h-12 w-5 items-center justify-end">
<div className="bg-default flex h-10 w-5 items-center justify-end">
<ChevronLeftIcon className="text-subtle h-4 w-4" />
</div>
<div className="to-default flex h-12 w-5 bg-linear-to-l from-transparent" />
<div className="to-default flex h-10 w-5 bg-linear-to-l from-transparent" />
</button>
)}
<ul
Expand Down Expand Up @@ -129,8 +129,8 @@ function CategoryTab({ selectedCategory, categories, searchText, onCategoryChang
</ul>
{rightVisible && (
<button onClick={handleRight} className="absolute bottom-0 right-0 flex ">
<div className="to-default flex h-12 w-5 bg-linear-to-r from-transparent" />
<div className="bg-default flex h-12 w-5 items-center justify-end">
<div className="to-default flex h-10 w-5 bg-linear-to-r from-transparent" />
<div className="bg-default flex h-10 w-5 items-center justify-end">
<ChevronRightIcon className="text-subtle h-4 w-4" />
</div>
</button>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"form-data": "4.0.4",
"axios": "1.15.0",
"follow-redirects": "1.16.0",
"protobufjs": "7.5.5",
"jws": "4.0.1",
"jsonwebtoken": "9.0.0",
"sha.js": "2.4.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ describe("getOrderedListOfLuckyUsers Integration tests", () => {
vi.setSystemTime("2024-11-14T00:00:13Z");
});

it("should sort as per availableUsers if no other criteria like weight/priority/calibration (TODO: make it independent of availableUsers order)", async () => {
it("should sort by user id if no other criteria like weight/priority/calibration", async () => {
const [host1, host2, host3] = await Promise.all([
createHostWithBookings({
user: { email: "test-user1@example.com" },
Expand Down Expand Up @@ -475,7 +475,9 @@ describe("getOrderedListOfLuckyUsers Integration tests", () => {
routingFormResponse: null,
});

expectLuckyUsers(luckyUsers, [user2, user1, user3]);
const expectedOrder = [user1, user2, user3].sort((a, b) => a.id - b.id)

expectLuckyUsers(luckyUsers, expectedOrder);

const { users: luckyUsers2 } = await luckyUserService.getOrderedListOfLuckyUsers({
availableUsers: [user3, user1, user2],
Expand All @@ -487,7 +489,7 @@ describe("getOrderedListOfLuckyUsers Integration tests", () => {
allRRHosts: [],
routingFormResponse: null,
});
expectLuckyUsers(luckyUsers2, [user3, user1, user2]);
expectLuckyUsers(luckyUsers2, expectedOrder);
});

describe("should sort as per weights", () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/features/bookings/lib/getLuckyUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export class LuckyUserService implements ILuckyUserService {
availableUsers,
bookingsOfAvailableUsers,
organizersWithLastCreated,
eventType,
}: GetLuckyUserParams<T> & {
bookingsOfAvailableUsers: PartialBooking[];
organizersWithLastCreated: { id: number; bookings: { createdAt: Date }[] }[];
Expand Down Expand Up @@ -216,7 +217,7 @@ export class LuckyUserService implements ILuckyUserService {
const leastRecentlyBookedUser = availableUsers.sort((a, b) => {
if (userIdAndAtCreatedPair[a.id] > userIdAndAtCreatedPair[b.id]) return 1;
else if (userIdAndAtCreatedPair[a.id] < userIdAndAtCreatedPair[b.id]) return -1;
else return 0;
else return eventType.isRRWeightsEnabled ? 0 : a.id - b.id;
})[0];

return leastRecentlyBookedUser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const confirmHandler = async ({ ctx, input }: ConfirmOptions) => {
const evt: CalendarEvent = {
type: booking?.eventType?.slug as string,
title: booking.title,
description: booking.description,
description: booking.eventType?.description ?? null,
bookerUrl,
// TODO: Remove the usage of `bookingFields` in computing responses. We can do that by storing `label` with the response. Also, this would allow us to correctly show the label for a field even after the Event Type has been deleted.
...getCalEventResponses({
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34681,9 +34681,9 @@ __metadata:
languageName: node
linkType: hard

"protobufjs@npm:^7.2.5, protobufjs@npm:^7.3.0":
version: 7.4.0
resolution: "protobufjs@npm:7.4.0"
"protobufjs@npm:7.5.5":
version: 7.5.5
resolution: "protobufjs@npm:7.5.5"
dependencies:
"@protobufjs/aspromise": "npm:^1.1.2"
"@protobufjs/base64": "npm:^1.1.2"
Expand All @@ -34697,7 +34697,7 @@ __metadata:
"@protobufjs/utf8": "npm:^1.1.0"
"@types/node": "npm:>=13.7.0"
long: "npm:^5.0.0"
checksum: 10/408423506610f70858d7593632f4a6aa4f05796c90fd632be9b9252457c795acc71aa6d3b54bb7f48a890141728fee4ca3906723ccea6c202ad71f21b3879b8b
checksum: 10/048898023a38d22f5fc9a1bcf0dcce5cfbcd37fb00753bd72283720eee7e2cb6055b23957542e5bcdc136379af66203a2ddb8d8c39d11f73169bacf07885fedd
languageName: node
linkType: hard

Expand Down
Loading