Upgrade to next 13.1 (#6265)
Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
c9c54db3a1
commit
d83411162d
55 files changed
+1025
-921
No files matched your search
@@ -8,18 +8,15 @@ export default function UnconfirmedBookingBadge() {
|
||||
const { t } = useLocale();
|
||||
const { data: unconfirmedBookingCount } = trpc.viewer.bookingUnconfirmedCount.useQuery();
|
||||
if (!unconfirmedBookingCount) return null;
|
||||
else
|
||||
return (
|
||||
<Link href="/bookings/unconfirmed">
|
||||
<>
|
||||
<Badge
|
||||
rounded
|
||||
title={t("unconfirmed_bookings_tooltip")}
|
||||
variant="orange"
|
||||
className="cursor-pointer hover:bg-orange-800 hover:text-orange-100">
|
||||
{unconfirmedBookingCount}
|
||||
</Badge>
|
||||
</>
|
||||
</Link>
|
||||
);
|
||||
return (
|
||||
<Link href="/bookings/unconfirmed">
|
||||
<Badge
|
||||
rounded
|
||||
title={t("unconfirmed_bookings_tooltip")}
|
||||
variant="orange"
|
||||
className="cursor-pointer hover:bg-orange-800 hover:text-orange-100">
|
||||
{unconfirmedBookingCount}
|
||||
</Badge>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
@@ -88,10 +88,11 @@ export default function TeamListItem(props: Props) {
|
||||
!isInvitee && "group hover:bg-neutral-50"
|
||||
)}>
|
||||
{!isInvitee ? (
|
||||
<Link href={"/settings/teams/" + team.id + "/profile"}>
|
||||
<a className="flex-grow cursor-pointer truncate text-sm" title={`${team.name}`}>
|
||||
{teamInfo}
|
||||
</a>
|
||||
<Link
|
||||
href={"/settings/teams/" + team.id + "/profile"}
|
||||
className="flex-grow cursor-pointer truncate text-sm"
|
||||
title={`${team.name}`}>
|
||||
{teamInfo}
|
||||
</Link>
|
||||
) : (
|
||||
teamInfo
|
||||
|
||||
@@ -263,10 +263,8 @@ const ProfileView = () => {
|
||||
)}
|
||||
</div>
|
||||
<div className="">
|
||||
<Link href={permalink} passHref={true}>
|
||||
<a target="_blank">
|
||||
<LinkIconButton Icon={Icon.FiExternalLink}>{t("preview")}</LinkIconButton>
|
||||
</a>
|
||||
<Link href={permalink} passHref={true} target="_blank">
|
||||
<LinkIconButton Icon={Icon.FiExternalLink}>{t("preview")}</LinkIconButton>
|
||||
</Link>
|
||||
<LinkIconButton
|
||||
Icon={Icon.FiLink}
|
||||
|
||||
@@ -122,13 +122,11 @@ const WorkflowListItem = (props: ItemProps) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
<Link href={`/workflows/${workflow.id}`} passHref={true}>
|
||||
<a target="_blank">
|
||||
<Button type="button" color="minimal" className="mr-4">
|
||||
<div className="hidden ltr:mr-2 rtl:ml-2 sm:block">{t("edit")}</div>
|
||||
<Icon.FiExternalLink className="-mt-[2px] h-4 w-4 stroke-2 text-gray-600" />
|
||||
</Button>
|
||||
</a>
|
||||
<Link href={`/workflows/${workflow.id}`} passHref={true} target="_blank">
|
||||
<Button type="button" color="minimal" className="mr-4">
|
||||
<div className="hidden ltr:mr-2 rtl:ml-2 sm:block">{t("edit")}</div>
|
||||
<Icon.FiExternalLink className="-mt-[2px] h-4 w-4 stroke-2 text-gray-600" />
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<Tooltip content={t("turn_off") as string}>
|
||||
|
||||
@@ -84,58 +84,56 @@ export default function WorkflowListPage({ workflows }: Props) {
|
||||
{workflows.map((workflow) => (
|
||||
<li key={workflow.id}>
|
||||
<div className="first-line:group flex w-full items-center justify-between p-4 hover:bg-neutral-50 sm:px-6">
|
||||
<Link href={"/workflows/" + workflow.id}>
|
||||
<a className="flex-grow cursor-pointer">
|
||||
<div className="rtl:space-x-reverse">
|
||||
<div
|
||||
className={classNames(
|
||||
"max-w-56 truncate text-sm font-medium leading-6 text-gray-900 md:max-w-max",
|
||||
workflow.name ? "text-gray-900" : "text-neutral-500"
|
||||
)}>
|
||||
{workflow.name
|
||||
? workflow.name
|
||||
: "Untitled (" +
|
||||
`${t(`${workflow.steps[0].action.toLowerCase()}_action`)}`
|
||||
.charAt(0)
|
||||
.toUpperCase() +
|
||||
`${t(`${workflow.steps[0].action.toLowerCase()}_action`)}`.slice(1) +
|
||||
")"}
|
||||
</div>
|
||||
<ul className="mt-2 flex flex-wrap space-x-1 sm:flex-nowrap ">
|
||||
<li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">
|
||||
<div>
|
||||
{getActionIcon(workflow.steps)}
|
||||
<Link href={"/workflows/" + workflow.id} className="flex-grow cursor-pointer">
|
||||
<div className="rtl:space-x-reverse">
|
||||
<div
|
||||
className={classNames(
|
||||
"max-w-56 truncate text-sm font-medium leading-6 text-gray-900 md:max-w-max",
|
||||
workflow.name ? "text-gray-900" : "text-neutral-500"
|
||||
)}>
|
||||
{workflow.name
|
||||
? workflow.name
|
||||
: "Untitled (" +
|
||||
`${t(`${workflow.steps[0].action.toLowerCase()}_action`)}`
|
||||
.charAt(0)
|
||||
.toUpperCase() +
|
||||
`${t(`${workflow.steps[0].action.toLowerCase()}_action`)}`.slice(1) +
|
||||
")"}
|
||||
</div>
|
||||
<ul className="mt-2 flex flex-wrap space-x-1 sm:flex-nowrap ">
|
||||
<li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">
|
||||
<div>
|
||||
{getActionIcon(workflow.steps)}
|
||||
|
||||
<span className="mr-1">{t("triggers")}</span>
|
||||
{workflow.timeUnit && workflow.time && (
|
||||
<span className="mr-1">
|
||||
{t(`${workflow.timeUnit.toLowerCase()}`, { count: workflow.time })}
|
||||
</span>
|
||||
)}
|
||||
<span>{t(`${workflow.trigger.toLowerCase()}_trigger`)}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">
|
||||
{workflow.activeOn && workflow.activeOn.length > 0 ? (
|
||||
<Tooltip
|
||||
content={workflow.activeOn.map((activeOn, key) => (
|
||||
<p key={key}>{activeOn.eventType.title}</p>
|
||||
))}>
|
||||
<div>
|
||||
<Icon.FiLink className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
|
||||
{t("active_on_event_types", { count: workflow.activeOn.length })}
|
||||
</div>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<span className="mr-1">{t("triggers")}</span>
|
||||
{workflow.timeUnit && workflow.time && (
|
||||
<span className="mr-1">
|
||||
{t(`${workflow.timeUnit.toLowerCase()}`, { count: workflow.time })}
|
||||
</span>
|
||||
)}
|
||||
<span>{t(`${workflow.trigger.toLowerCase()}_trigger`)}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">
|
||||
{workflow.activeOn && workflow.activeOn.length > 0 ? (
|
||||
<Tooltip
|
||||
content={workflow.activeOn.map((activeOn, key) => (
|
||||
<p key={key}>{activeOn.eventType.title}</p>
|
||||
))}>
|
||||
<div>
|
||||
<Icon.FiLink className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
|
||||
{t("no_active_event_types")}
|
||||
{t("active_on_event_types", { count: workflow.activeOn.length })}
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</a>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<div>
|
||||
<Icon.FiLink className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
|
||||
{t("no_active_event_types")}
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</Link>
|
||||
<div className="flex flex-shrink-0">
|
||||
<div className="hidden sm:block">
|
||||
|
||||
@@ -40,36 +40,37 @@ export function ScheduleListItem({
|
||||
<li key={schedule.id}>
|
||||
<div className="flex items-center justify-between py-5 hover:bg-neutral-50 ltr:pl-4 rtl:pr-4 sm:ltr:pl-0 sm:rtl:pr-0">
|
||||
<div className="group flex w-full items-center justify-between hover:bg-neutral-50 sm:px-6">
|
||||
<Link href={"/availability/" + schedule.id}>
|
||||
<a className="flex-grow truncate text-sm" title={schedule.name}>
|
||||
<div className="space-x-2 rtl:space-x-reverse">
|
||||
<span className="truncate font-medium text-neutral-900">{schedule.name}</span>
|
||||
{schedule.isDefault && (
|
||||
<Badge variant="success" className="text-xs">
|
||||
{t("default")}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-1 text-xs text-neutral-500">
|
||||
{schedule.availability
|
||||
.filter((availability) => !!availability.days.length)
|
||||
.map((availability) => (
|
||||
<Fragment key={availability.id}>
|
||||
{availabilityAsString(availability, {
|
||||
locale: i18n.language,
|
||||
hour12: displayOptions?.hour12,
|
||||
})}
|
||||
<br />
|
||||
</Fragment>
|
||||
))}
|
||||
{schedule.timeZone && schedule.timeZone !== displayOptions?.timeZone && (
|
||||
<p className="my-1 flex items-center first-letter:text-xs">
|
||||
<Icon.FiGlobe />
|
||||
{schedule.timeZone}
|
||||
</p>
|
||||
)}
|
||||
</p>
|
||||
</a>
|
||||
<Link
|
||||
href={"/availability/" + schedule.id}
|
||||
className="flex-grow truncate text-sm"
|
||||
title={schedule.name}>
|
||||
<div className="space-x-2 rtl:space-x-reverse">
|
||||
<span className="truncate font-medium text-neutral-900">{schedule.name}</span>
|
||||
{schedule.isDefault && (
|
||||
<Badge variant="success" className="text-xs">
|
||||
{t("default")}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-1 text-xs text-neutral-500">
|
||||
{schedule.availability
|
||||
.filter((availability) => !!availability.days.length)
|
||||
.map((availability) => (
|
||||
<Fragment key={availability.id}>
|
||||
{availabilityAsString(availability, {
|
||||
locale: i18n.language,
|
||||
hour12: displayOptions?.hour12,
|
||||
})}
|
||||
<br />
|
||||
</Fragment>
|
||||
))}
|
||||
{schedule.timeZone && schedule.timeZone !== displayOptions?.timeZone && (
|
||||
<p className="my-1 flex items-center first-letter:text-xs">
|
||||
<Icon.FiGlobe />
|
||||
{schedule.timeZone}
|
||||
</p>
|
||||
)}
|
||||
</p>
|
||||
</Link>
|
||||
</div>
|
||||
<Dropdown>
|
||||
|
||||
@@ -117,16 +117,15 @@ const useTabs = () => {
|
||||
|
||||
const BackButtonInSidebar = ({ name }: { name: string }) => {
|
||||
return (
|
||||
<Link href="/.">
|
||||
<a
|
||||
target="_self"
|
||||
className="group my-6 flex h-6 max-h-6 w-64 flex-row items-center rounded-md py-2 px-3 text-sm font-medium leading-4 text-black hover:bg-gray-100 group-hover:text-gray-700 [&[aria-current='page']]:bg-gray-200 [&[aria-current='page']]:text-gray-900"
|
||||
data-testid={`vertical-tab-${name}`}>
|
||||
<Icon.FiArrowLeft className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] md:mt-0" />
|
||||
<Skeleton title={name} as="p" className="max-w-36 min-h-4 truncate">
|
||||
{name}
|
||||
</Skeleton>
|
||||
</a>
|
||||
<Link
|
||||
href="/."
|
||||
target="_self"
|
||||
className="group my-6 flex h-6 max-h-6 w-64 flex-row items-center rounded-md py-2 px-3 text-sm font-medium leading-4 text-black hover:bg-gray-100 group-hover:text-gray-700 [&[aria-current='page']]:bg-gray-200 [&[aria-current='page']]:text-gray-900"
|
||||
data-testid={`vertical-tab-${name}`}>
|
||||
<Icon.FiArrowLeft className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] md:mt-0" />
|
||||
<Skeleton title={name} as="p" className="max-w-36 min-h-4 truncate">
|
||||
{name}
|
||||
</Skeleton>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
@@ -212,14 +211,12 @@ const SettingsSidebarContainer = ({
|
||||
<React.Fragment key={tab.href}>
|
||||
<div className={`${!tab.children?.length ? "mb-3" : ""}`}>
|
||||
<Link href={tab.href}>
|
||||
<a>
|
||||
<div className="group flex h-9 w-64 flex-row items-center rounded-md px-3 py-[10px] text-sm font-medium leading-none text-gray-600 hover:bg-gray-100 group-hover:text-gray-700 [&[aria-current='page']]:bg-gray-200 [&[aria-current='page']]:text-gray-900">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
)}
|
||||
<p className="text-sm font-medium leading-5">{t(tab.name)}</p>
|
||||
</div>
|
||||
</a>
|
||||
<div className="group flex h-9 w-64 flex-row items-center rounded-md px-3 py-[10px] text-sm font-medium leading-none text-gray-600 hover:bg-gray-100 group-hover:text-gray-700 [&[aria-current='page']]:bg-gray-200 [&[aria-current='page']]:text-gray-900">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
)}
|
||||
<p className="text-sm font-medium leading-5">{t(tab.name)}</p>
|
||||
</div>
|
||||
</Link>
|
||||
{teams &&
|
||||
teamMenuState &&
|
||||
|
||||
@@ -16,8 +16,8 @@ function AdminPasswordBanner() {
|
||||
text={t("invalid_admin_password", { user: data.user.username })}
|
||||
variant="warning"
|
||||
actions={
|
||||
<Link href="/settings/security/password">
|
||||
<a className="border-b border-b-black">{t("change_password_admin")}</a>
|
||||
<Link href="/settings/security/password" className="border-b border-b-black">
|
||||
{t("change_password_admin")}
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user