Skip to content

Commit

Permalink
Merge branch 'main' into refactor_allow_managed_event_tests_parallel_…
Browse files Browse the repository at this point in the history
…runs
  • Loading branch information
keithwillcode authored Aug 21, 2024
2 parents e4e78d4 + 0b719ac commit edd299f
Show file tree
Hide file tree
Showing 140 changed files with 2,289 additions and 239 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## Mandatory Tasks (DO NOT REMOVE)

- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have added a Docs issue [here](https://github.com/calcom/docs/issues/new) if this PR makes changes that would require a [documentation change](https://docs.cal.com). If N/A, write N/A here and check the checkbox.
- [ ] I have added a Docs issue [here](https://github.com/calcom/docs/issues/new) if this PR makes changes that would require a [documentation change](https://docs.cal.com/docs). If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.

## How should this be tested?
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/publish-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
continue-on-error: true
env:
# Unique URL path for each workflow run attempt
HTML_REPORT_URL_PATH: reports/${{ github.ref_name }}/${{ github.run_id }}/${{ github.run_attempt }}
HTML_REPORT_URL_PATH: reports/${{ github.head_ref }}/${{ github.run_id }}/${{ github.run_attempt }}
BRANCH_REPORTS_DIR: reports/${{ github.head_ref }}
steps:
- name: Checkout GitHub Pages Branch
uses: actions/checkout@v4
Expand All @@ -21,6 +22,20 @@ jobs:
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Check for workflow reports
run: |
if [ -z "$(ls -A $BRANCH_REPORTS_DIR)" ]; then
echo "BRANCH_REPORTS_EXIST="false"" >> $GITHUB_ENV
else
echo "BRANCH_REPORTS_EXIST="true"" >> $GITHUB_ENV
fi
- name: Cleanup old HTML reports
if: ${{ env.BRANCH_REPORTS_EXIST == 'true' }}
timeout-minutes: 3
run: |
rm -rf $BRANCH_REPORTS_DIR
git add .
git commit -m "workflow: remove all reports for branch ${{ github.head_ref }}"
- name: Download zipped HTML report
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -68,11 +83,14 @@ jobs:
body: |
<!-- GENERATED-E2E-RESULTS -->
## E2E results are ready!
- [Attempt #${{ github.run_number }}.${{ github.run_attempt }} results](${{ steps.url.outputs.link }})
- [Workflow #${{ github.run_number }}.${{ github.run_attempt }} latest results](${{ steps.url.outputs.link }})
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body: |
- [Attempt #${{ github.run_number }}.${{ github.run_attempt }} results](${{ steps.url.outputs.link }})
<!-- GENERATED-E2E-RESULTS -->
## E2E results are ready!
- [Workflow #${{ github.run_number }}.${{ github.run_attempt }} latest results](${{ steps.url.outputs.link }})
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Currently Vercel Pro Plan is required to be able to Deploy this application with
### Elestio
[![Deploy on Elestio](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/cal.com)
[![Deploy on Elestio](https://elest.io/images/logos/deploy-to-elestio-btn.png)](https://elest.io/open-source/cal.com)
<!-- ROADMAP -->
Expand Down
13 changes: 10 additions & 3 deletions apps/api/v1/lib/validations/payment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { _PaymentModel as Payment } from "@calcom/prisma/zod";

// FIXME: Payment seems a delicate endpoint, do we need to remove anything here?
export const schemaPaymentBodyParams = Payment.omit({ id: true });
export const schemaPaymentPublic = Payment.omit({ externalId: true });
export const schemaPaymentPublic = Payment.pick({
id: true,
amount: true,
success: true,
refunded: true,
fee: true,
paymentOption: true,
currency: true,
bookingId: true,
});
1 change: 1 addition & 0 deletions apps/api/v1/lib/validations/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const schemaTeamBaseBodyParams = Team.omit({ id: true, createdAt: true })
isOrganization: true,
isPlatform: true,
smsLockState: true,
smsLockReviewedByAdmin: true,
});

const schemaTeamRequiredParams = z.object({
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/availabilities/[id]/_delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
* tags:
* - availabilities
* externalDocs:
* url: https://docs.cal.com/availability
* url: https://docs.cal.com/docs/core-features/availability
* responses:
* 201:
* description: OK, availability removed successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/availabilities/[id]/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
* tags:
* - availabilities
* externalDocs:
* url: https://docs.cal.com/availability
* url: https://docs.cal.com/docs/core-features/availability
* responses:
* 200:
* description: OK
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/availabilities/[id]/_patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
* tags:
* - availabilities
* externalDocs:
* url: https://docs.cal.com/availability
* url: https://docs.cal.com/docs/core-features/availability
* responses:
* 201:
* description: OK, availability edited successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/availabilities/_post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {
* tags:
* - availabilities
* externalDocs:
* url: https://docs.cal.com/availability
* url: https://docs.cal.com/docs/core-features/availability
* responses:
* 201:
* description: OK, availability created
Expand Down
4 changes: 2 additions & 2 deletions apps/api/v1/pages/api/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const swaggerHandler = withSwagger({
{ url: "https://api.cal.com/v1" },
],
externalDocs: {
url: "https://docs.cal.com",
description: "Find more info at our main docs: https://docs.cal.com/",
url: "https://docs.cal.com/docs",
description: "Find more info at our main docs: https://docs.cal.com/docs/",
},
info: {
title: `${pjson.name}: ${pjson.description}`,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/event-types/[id]/_delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 201:
* description: OK, eventType removed successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/event-types/[id]/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import getCalLink from "../_utils/getCalLink";
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 200:
* description: OK
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/event-types/[id]/_patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ import checkTeamEventEditPermission from "../_utils/checkTeamEventEditPermission
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 201:
* description: OK, eventType edited successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/event-types/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import getCalLink from "./_utils/getCalLink";
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 200:
* description: OK
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/event-types/_post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ import ensureOnlyMembersAsHosts from "./_utils/ensureOnlyMembersAsHosts";
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 201:
* description: OK, event type created
Expand Down
1 change: 1 addition & 0 deletions apps/api/v1/pages/api/teams/[teamId]/_patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export async function patchHandler(req: NextApiRequest) {
metadata: NonNullable<typeof data.metadata> | undefined;
} = {
...data,
smsLockReviewedByAdmin: false,
metadata: data.metadata === null ? {} : data.metadata || undefined,
};
const team = await prisma.team.update({ where: { id: teamId }, data: cloneData });
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/teams/[teamId]/event-types/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const querySchema = z.object({
* tags:
* - event-types
* externalDocs:
* url: https://docs.cal.com/core-features/event-types
* url: https://docs.cal.com/docs/core-features/event-types
* responses:
* 200:
* description: OK
Expand Down
1 change: 1 addition & 0 deletions apps/api/v1/pages/api/teams/_post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ async function postHandler(req: NextApiRequest) {
metadata: NonNullable<typeof data.metadata> | undefined;
} = {
...data,
smsLockReviewedByAdmin: false,
metadata: data.metadata === null ? {} : data.metadata || undefined,
};

Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/webhooks/[id]/_delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { schemaQueryIdAsString } from "~/lib/validations/shared/queryIdString";
* tags:
* - webhooks
* externalDocs:
* url: https://docs.cal.com/core-features/webhooks
* url: https://docs.cal.com/docs/core-features/webhooks
* responses:
* 201:
* description: OK, hook removed successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/webhooks/[id]/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { schemaWebhookReadPublic } from "~/lib/validations/webhook";
* tags:
* - webhooks
* externalDocs:
* url: https://docs.cal.com/core-features/webhooks
* url: https://docs.cal.com/docs/core-features/webhooks
* responses:
* 200:
* description: OK
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/webhooks/[id]/_patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import { schemaWebhookEditBodyParams, schemaWebhookReadPublic } from "~/lib/vali
* tags:
* - webhooks
* externalDocs:
* url: https://docs.cal.com/core-features/webhooks
* url: https://docs.cal.com/docs/core-features/webhooks
* responses:
* 201:
* description: OK, webhook edited successfully
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/webhooks/_get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { schemaWebhookReadPublic } from "~/lib/validations/webhook";
* tags:
* - webhooks
* externalDocs:
* url: https://docs.cal.com/core-features/webhooks
* url: https://docs.cal.com/docs/core-features/webhooks
* responses:
* 200:
* description: OK
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/pages/api/webhooks/_post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { schemaWebhookCreateBodyParams, schemaWebhookReadPublic } from "~/lib/va
* tags:
* - webhooks
* externalDocs:
* url: https://docs.cal.com/core-features/webhooks
* url: https://docs.cal.com/docs/core-features/webhooks
* responses:
* 201:
* description: OK, webhook created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ export class BookingField_2024_04_15 {
@ValidateNested({ each: true })
@Type(() => Source)
sources?: Source[];

@IsOptional()
@IsBoolean()
disableOnPrefill?: boolean;
}

export class RecurringEvent_2024_04_15 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class BookingField {
@Type(() => Source)
@IsOptional()
sources?: Source[];

@IsOptional()
@IsBoolean()
disableOnPrefill?: boolean;
}

class Organization {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/apps/installation/AccountsStepCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const AccountSelector: FC<AccountSelectorProps> = ({
return (
<div
className={classNames(
"hover:bg-muted flex cursor-pointer flex-row items-center gap-2 p-1",
"hover:bg-muted flex cursor-pointer flex-row items-center gap-2 p-1 transition",
(alreadyInstalled || loading) && "cursor-not-allowed",
selected && loading && "bg-muted animate-pulse"
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const EventTypeCard: FC<EventTypeCardProps> = ({
return (
<div
data-testid={`select-event-type-${id}`}
className="hover:bg-muted min-h-20 box-border flex w-full cursor-pointer select-none items-center space-x-4 px-4 py-3"
className="hover:bg-muted min-h-20 box-border flex w-full cursor-pointer select-none items-center space-x-4 px-4 py-3 transition"
onClick={() => handleSelect()}>
<input
id={`${id}`}
Expand Down
15 changes: 15 additions & 0 deletions apps/web/components/booking/BookingListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
Tooltip,
} from "@calcom/ui";

import { AddGuestsDialog } from "@components/dialog/AddGuestsDialog";
import { ChargeCardDialog } from "@components/dialog/ChargeCardDialog";
import { EditLocationDialog } from "@components/dialog/EditLocationDialog";
import { ReassignDialog } from "@components/dialog/ReassignDialog";
Expand Down Expand Up @@ -189,6 +190,14 @@ function BookingListItem(booking: BookingItemProps) {
},
icon: "map-pin" as const,
},
{
id: "add_members",
label: t("additional_guests"),
onClick: () => {
setIsOpenAddGuestsDialog(true);
},
icon: "user-plus" as const,
},
];

if (booking.eventType.schedulingType === SchedulingType.ROUND_ROBIN) {
Expand Down Expand Up @@ -256,6 +265,7 @@ function BookingListItem(booking: BookingItemProps) {
const [isOpenRescheduleDialog, setIsOpenRescheduleDialog] = useState(false);
const [isOpenReassignDialog, setIsOpenReassignDialog] = useState(false);
const [isOpenSetLocationDialog, setIsOpenLocationDialog] = useState(false);
const [isOpenAddGuestsDialog, setIsOpenAddGuestsDialog] = useState(false);
const setLocationMutation = trpc.viewer.bookings.editLocation.useMutation({
onSuccess: () => {
showToast(t("location_updated"), "success");
Expand Down Expand Up @@ -344,6 +354,11 @@ function BookingListItem(booking: BookingItemProps) {
setShowLocationModal={setIsOpenLocationDialog}
teamId={booking.eventType?.team?.id}
/>
<AddGuestsDialog
isOpenDialog={isOpenAddGuestsDialog}
setIsOpenDialog={setIsOpenAddGuestsDialog}
bookingId={booking.id}
/>
{booking.paid && booking.payment[0] && (
<ChargeCardDialog
isOpenDialog={chargeCardDialogIsOpen}
Expand Down
Loading

0 comments on commit edd299f

Please sign in to comment.