fix: other reported issues (#11015)
* fix: weird margin top in avatar * fix: pending users are shown on booking page * fix: avatar and naming issues * fix: toast alignment and removing unneeded titles * missing changes from toast improvements * feat: empty state for teams without event types * Removing console.log
This commit is contained in:
1 parent
1bf68d50e0
commit
356117feaf
21 files changed
+102
-53
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import type { Props } from "react-select";
|
||||
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import { getOrgFullDomain } from "@calcom/features/ee/organizations/lib/orgDomains";
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { CAL_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
@@ -34,7 +36,7 @@ export const ChildrenEventTypeSelect = ({
|
||||
onChange: (value: readonly ChildrenEventType[]) => void;
|
||||
}) => {
|
||||
const { t } = useLocale();
|
||||
|
||||
const orgBranding = useOrgBranding();
|
||||
const [animationRef] = useAutoAnimate<HTMLUListElement>();
|
||||
|
||||
return (
|
||||
@@ -61,7 +63,9 @@ export const ChildrenEventTypeSelect = ({
|
||||
<Avatar
|
||||
size="mdLg"
|
||||
className="overflow-visible"
|
||||
imageSrc={`${CAL_URL}/${children.owner.username}/avatar.png`}
|
||||
imageSrc={`${orgBranding ? getOrgFullDomain(orgBranding.slug) : CAL_URL}/${
|
||||
children.owner.username
|
||||
}/avatar.png`}
|
||||
alt={children.owner.name || children.owner.email || ""}
|
||||
/>
|
||||
<div className="flex w-full flex-row justify-between">
|
||||
|
||||
@@ -117,7 +117,7 @@ export default function CreateEventTypeDialog({
|
||||
const createMutation = trpc.viewer.eventTypes.create.useMutation({
|
||||
onSuccess: async ({ eventType }) => {
|
||||
await router.replace("/event-types/" + eventType.id);
|
||||
showToast(t("event_type_created_successfully", { eventTypeTitle: eventType.title }), "success");
|
||||
showToast(t("event_type_created_successfully"), "success");
|
||||
},
|
||||
onError: (err) => {
|
||||
if (err instanceof HttpError) {
|
||||
|
||||
@@ -66,7 +66,7 @@ const DuplicateDialog = () => {
|
||||
const duplicateMutation = trpc.viewer.eventTypes.duplicate.useMutation({
|
||||
onSuccess: async ({ eventType }) => {
|
||||
await router.replace("/event-types/" + eventType.id);
|
||||
showToast(t("event_type_created_successfully", { eventTypeTitle: eventType.title }), "success");
|
||||
showToast(t("event_type_created_successfully"), "success");
|
||||
},
|
||||
onError: (err) => {
|
||||
if (err instanceof HttpError) {
|
||||
|
||||
@@ -285,7 +285,7 @@ function getProfileFromEvent(event: Event) {
|
||||
function getUsersFromEvent(event: Event) {
|
||||
const { team, hosts, owner } = event;
|
||||
if (team) {
|
||||
return (hosts || []).map(mapHostsToUsers);
|
||||
return (hosts || []).filter((host) => host.user.username).map(mapHostsToUsers);
|
||||
}
|
||||
if (!owner) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user