feat: Schedule restriction and booker timezone (#21452)
* init migration and fix name for team event availability toggle * show and save restriction schedule * better naming around * fix loading stored restricted schedule instead of default * add the booker timezone checkbox in the form * restriction schedule application babbbyyyy * remove logs * test * typefix * fix * fix?? * fix??? * --- * typefix * functional fix * restrictionschedule logic --1 * timezone adjustment for regular constraint * noice * test suite for restrictionSchedule * auth restrictionschedule for eventtype * remove unnecessary comments * index * type fix * add concurrent * resolve change request * fix unauth erro * type fix * schedule select extracted from select * revert * fix auth vulnerabililty * fix e22 * chore: hide restriction schedule on platform * init review feedback resolutions * fixes * fix type * multiple windows of recurring rule-same day * team feature flag * fix type err * fix type * improvements * fix test * improve * fix error propagation * fix unused var lint * cleanup and using buildDateRanges * travel schedule inclusion * address comment --------- Co-authored-by: supalarry <[email protected]>
This commit is contained in:
1 parent
3bea03f4b1
commit
e160a4add0
28 files changed
+1307
-73
No files matched your search
@@ -21,4 +21,5 @@ export type AppFlags = {
|
||||
"workflow-smtp-emails": boolean;
|
||||
"cal-video-log-in-overlay": boolean;
|
||||
"use-api-v2-for-team-slots": boolean;
|
||||
"restriction-schedule": boolean;
|
||||
};
|
||||
@@ -20,6 +20,7 @@ const initialData: AppFlags = {
|
||||
"workflow-smtp-emails": false,
|
||||
"cal-video-log-in-overlay": false,
|
||||
"use-api-v2-for-team-slots": false,
|
||||
"restriction-schedule": false,
|
||||
};
|
||||
|
||||
if (process.env.NEXT_PUBLIC_IS_E2E) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { AppFlags } from "@calcom/features/flags/config";
|
||||
import publicProcedure from "@calcom/trpc/server/procedures/publicProcedure";
|
||||
import { router } from "@calcom/trpc/server/trpc";
|
||||
|
||||
@@ -9,5 +12,16 @@ export const featureFlagRouter = router({
|
||||
const featuresRepository = new FeaturesRepository();
|
||||
return featuresRepository.getAllFeatures();
|
||||
}),
|
||||
checkTeamFeature: publicProcedure
|
||||
.input(
|
||||
z.object({
|
||||
teamId: z.number(),
|
||||
feature: z.string(),
|
||||
})
|
||||
)
|
||||
.query(async ({ input }) => {
|
||||
const featuresRepository = new FeaturesRepository();
|
||||
return featuresRepository.checkIfTeamHasFeature(input.teamId, input.feature as keyof AppFlags);
|
||||
}),
|
||||
map,
|
||||
});
|
||||
Reference in new issue
Block a user