* 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 <laurisskraucis@gmail.com>
35 lines
928 B
TypeScript
35 lines
928 B
TypeScript
import type { AppFlags } from "@calcom/features/flags/config";
|
|
import { trpc } from "@calcom/trpc/react";
|
|
|
|
const initialData: AppFlags = {
|
|
organizations: false,
|
|
teams: false,
|
|
"calendar-cache": false,
|
|
"calendar-cache-serve": false,
|
|
emails: false,
|
|
insights: false,
|
|
webhooks: false,
|
|
workflows: false,
|
|
"email-verification": false,
|
|
"google-workspace-directory": false,
|
|
"disable-signup": false,
|
|
attributes: false,
|
|
"organizer-request-email-v2": false,
|
|
"delegation-credential": false,
|
|
"salesforce-crm-tasker": false,
|
|
"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) {
|
|
initialData.organizations = true;
|
|
initialData.teams = true;
|
|
}
|
|
|
|
export function useFlags(): Partial<AppFlags> {
|
|
const query = trpc.viewer.features.map.useQuery();
|
|
return query.data ?? initialData;
|
|
}
|