Compare commits

...

2 Commits

Author SHA1 Message Date
Alan 5e3cdda008 merge with remote main 2023-06-29 15:50:53 -07:00
Sagar Singh Negi 1fe8c8cb66 fix: [CAL-1959] Removed duplicate value warnings on starting dev server(#1959) 2023-06-17 16:17:23 +05:30
17 changed files with 57 additions and 68 deletions

View File

@ -30,7 +30,7 @@ const Member = ({ member, teamName }: { member: MemberType; teamName: string | n
alt={member.name || ""}
imageSrc={WEBAPP_URL + "/" + member.username + "/avatar.png"}
/>
<section className="mt-2 line-clamp-4 w-full space-y-1">
<section className="line-clamp-4 mt-2 w-full space-y-1">
<p className="text-default font-medium">{member.name}</p>
<div className="text-subtle line-clamp-3 overflow-ellipsis text-sm font-normal">
{!isBioEmpty ? (

View File

@ -192,7 +192,7 @@ export default function Availability() {
<Skeleton
as={Label}
htmlFor="hiddenSwitch"
className="mt-2 cursor-pointer self-center pe-2"
className="pe-2 mt-2 cursor-pointer self-center"
loadingClassName="me-4">
{t("set_to_default")}
</Skeleton>

View File

@ -728,7 +728,7 @@ const EventTypeListHeading = ({
{profile?.name || ""}
</Link>
{membershipCount && teamId && (
<span className="text-subtle relative -top-px me-2 ms-2 text-xs">
<span className="text-subtle me-2 ms-2 relative -top-px text-xs">
<Link href={`/settings/teams/${teamId}/members`}>
<Badge variant="gray">
<Users className="-mt-px mr-1 inline h-3 w-3" />

View File

@ -127,10 +127,9 @@
"seat_options_doesnt_support_confirmation": "Seats option doesn't support confirmation requirement",
"team_upgrade_seats_details": "Of the {{memberCount}} members in your team, {{unpaidCount}} seat(s) are unpaid. At ${{seatPrice}}/month per seat the estimated total cost of your membership is ${{totalCost}}/month.",
"team_upgrade_banner_description": "Thank you for trialing our new team plan. We noticed your team \"{{teamName}}\" needs to be upgraded.",
"team_upgrade_banner_action": "Upgrade here",
"upgrade_banner_action": "Upgrade here",
"team_upgraded_successfully": "Your team was upgraded successfully!",
"org_upgrade_banner_description": "Thank you for trialing our Organization plan. We noticed your Organization \"{{teamName}}\" needs to be upgraded.",
"org_upgrade_banner_action": "Upgrade here",
"org_upgraded_successfully": "Your Organization was upgraded successfully!",
"use_link_to_reset_password": "Use the link below to reset your password",
"hey_there": "Hey there,",
@ -241,7 +240,6 @@
"forgot": "Forgot?",
"done": "Done",
"all_done": "All done!",
"all_apps": "All",
"all": "All",
"yours": "Yours",
"available_apps": "Available Apps",
@ -306,7 +304,6 @@
"success": "Success",
"failed": "Failed",
"password_has_been_reset_login": "Your password has been reset. You can now login with your newly created password.",
"bookerlayout_title": "Layout",
"layout": "Layout",
"bookerlayout_default_title": "Default view",
"bookerlayout_description": "You can select multiple and your bookers can switch views.",
@ -554,8 +551,6 @@
"members": "Members",
"organization_members": "Organization members",
"member": "Member",
"number_member_one": "{{count}} member",
"number_member_other": "{{count}} members",
"owner": "Owner",
"admin": "Admin",
"administrator_user": "Administrator user",
@ -1478,7 +1473,7 @@
"team_name_taken": "This name is already taken",
"must_enter_team_name": "Must enter a team name",
"team_url_required": "Must enter a team URL",
"team_url_taken": "This URL is already taken",
"url_taken": "This URL is already taken",
"team_publish": "Publish team",
"number_sms_notifications": "Phone number (SMS notifications)",
"attendee_email_variable": "Attendee email",
@ -1869,7 +1864,6 @@
"organization_banner_title": "Manage organizations with multiple teams",
"set_up_your_organization": "Set up your organization",
"organizations_description": "Organizations are shared environments where teams can create shared event types, apps, workflows and more.",
"organization_url_taken": "This URL is already taken",
"must_enter_organization_name": "Must enter an organization name",
"must_enter_organization_admin_email": "Must enter your organization email address",
"admin_email": "Your organization email address",

View File

@ -6,18 +6,7 @@ import type { TApiKeys } from "@calcom/ee/api-keys/components/ApiKeyListItem";
import LicenseRequired from "@calcom/ee/common/components/LicenseRequired";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
Button,
DatePicker,
DialogFooter,
Form,
Select,
showToast,
Switch,
TextField,
Tooltip,
SelectField,
} from "@calcom/ui";
import { Button, DialogFooter, Form, showToast, Switch, TextField, Tooltip, SelectField } from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
export default function ApiKeyDialogForm({
@ -42,7 +31,9 @@ export default function ApiKeyDialogForm({
});
type Option = { value: Date | null | undefined; label: string };
const [apiKey, setApiKey] = useState("");
const [expiryDate,setExpiryDate]=useState<Date|null|undefined>(()=>(defaultValues?.expiresAt || dayjs().add(30, "day").toDate()))
const [expiryDate, setExpiryDate] = useState<Date | null | undefined>(
() => defaultValues?.expiresAt || dayjs().add(30, "day").toDate()
);
const [successfulNewApiKeyModal, setSuccessfulNewApiKeyModal] = useState(false);
const [apiKeyDetails, setApiKeyDetails] = useState({
expiresAt: null as Date | null,
@ -59,7 +50,7 @@ export default function ApiKeyDialogForm({
});
const watchNeverExpires = form.watch("neverExpires");
let expiresAtOptions: Option[] = [
const expiresAtOptions: Option[] = [
{
label: t("seven_days"),
value: dayjs().add(7, "day").toDate(),
@ -182,35 +173,39 @@ export default function ApiKeyDialogForm({
<Controller
name="expiresAt"
render={({ field: { onChange, value } }) => {
const defaultValue = expiresAtOptions[1]
return(
<SelectField
styles={{
singleValue: (baseStyles) => ({
...baseStyles,
fontSize: "14px",
}),
option: (baseStyles) => ({
...baseStyles,
fontSize: "14px",
}),
}}
isDisabled={watchNeverExpires || !!defaultValues}
containerClassName="data-testid-field-type"
options={expiresAtOptions}
onChange={(option) => {
if (!option) {
return;
}
onChange(option.value);
setExpiryDate(option.value)
}}
defaultValue={defaultValue}
/>
)}}
const defaultValue = expiresAtOptions[1];
return (
<SelectField
styles={{
singleValue: (baseStyles) => ({
...baseStyles,
fontSize: "14px",
}),
option: (baseStyles) => ({
...baseStyles,
fontSize: "14px",
}),
}}
isDisabled={watchNeverExpires || !!defaultValues}
containerClassName="data-testid-field-type"
options={expiresAtOptions}
onChange={(option) => {
if (!option) {
return;
}
onChange(option.value);
setExpiryDate(option.value);
}}
defaultValue={defaultValue}
/>
);
}}
/>
<span className="text-subtle text-xs mt-2">{t("api_key_expires_on") }<span className="font-bold"> {dayjs(expiryDate).format('DD-MM-YYYY')}</span></span>
<span className="text-subtle mt-2 text-xs">
{t("api_key_expires_on")}
<span className="font-bold"> {dayjs(expiryDate).format("DD-MM-YYYY")}</span>
</span>
</div>
)}

View File

@ -177,7 +177,7 @@ export const CreateANewOrganizationForm = () => {
message: t("email_already_used"),
});
} else if (err.message === "organization_url_taken") {
newOrganizationFormMethods.setError("slug", { type: "custom", message: t("organization_url_taken") });
newOrganizationFormMethods.setError("slug", { type: "custom", message: t("url_taken") });
} else {
setServerErrorMessage(err.message);
}

View File

@ -31,7 +31,7 @@ export function OrgUpgradeBanner() {
onClick={() => {
publishTeamMutation.mutate();
}}>
{t("org_upgrade_banner_action")}
{t("upgrade_banner_action")}
</button>
}
/>

View File

@ -44,7 +44,7 @@ export const CreateANewTeamForm = () => {
},
onError: (err) => {
if (err.message === "team_url_taken") {
newTeamFormMethods.setError("slug", { type: "custom", message: t("team_url_taken") });
newTeamFormMethods.setError("slug", { type: "custom", message: t("url_taken") });
} else {
setServerErrorMessage(err.message);
}

View File

@ -283,7 +283,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
)}
/>
{props.token && (
<div className="flex">
<div className="flex">
<Button
type="button"
color="minimal"
@ -295,8 +295,8 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
data-testid="edit-invite-link-button">
{t("edit_invite_link")}
</Button>
</div>
)}
</div>
)}
</div>
<DialogFooter showDivider>
<div className="flex w-full flex-col items-end gap-2 md:flex-row md:items-center md:justify-between">

View File

@ -31,7 +31,7 @@ export function TeamsUpgradeBanner() {
onClick={() => {
publishTeamMutation.mutate({ teamId: membership.team.id });
}}>
{t("team_upgrade_banner_action")}
{t("upgrade_banner_action")}
</button>
}
/>

View File

@ -74,7 +74,7 @@ export default function EmptyScreen(props: { isFilteredView: boolean }) {
</div>
<div className="max-w-[420px] text-center">
<h2 className="text-semibold font-cal mt-6 text-xl dark:text-gray-300">{t("workflows")}</h2>
<p className="text-default mt-3 line-clamp-2 text-sm font-normal leading-6 dark:text-gray-300">
<p className="text-default line-clamp-2 mt-3 text-sm font-normal leading-6 dark:text-gray-300">
{t("no_workflows_description")}
</p>
<div className="mt-8 ">

View File

@ -46,7 +46,7 @@ export const CheckedTeamSelect = ({
key={option.value}
className={`flex px-3 py-2 ${index === value.length - 1 ? "" : "border-subtle border-b"}`}>
<Avatar size="sm" imageSrc={option.avatar} alt={option.label} />
<p className="text-emphasis my-auto ms-3 text-sm">{option.label}</p>
<p className="text-emphasis ms-3 my-auto text-sm">{option.label}</p>
<X
onClick={() => props.onChange(value.filter((item) => item.value !== option.value))}
className="my-auto ml-auto h-4 w-4"

View File

@ -542,7 +542,7 @@ export const FormBuilder = function FormBuilder({
/>
</Form>
</div>
<DialogFooter className="relative rounded px-8 pb-8 mt-5" showDivider>
<DialogFooter className="relative mt-5 rounded px-8 pb-8" showDivider>
<DialogClose color="secondary">{t("cancel")}</DialogClose>
<Button data-testid="field-add-save" type="submit" form="form-builder">
{isFieldEditMode ? t("save") : t("add")}

View File

@ -51,7 +51,7 @@ export const BookerLayoutSelector = ({
return (
<>
<Label className="mb-0">{title ? title : t("bookerlayout_title")}</Label>
<Label className="mb-0">{title ? title : t("layout")}</Label>
<p className="text-subtle max-w-full break-words py-1 text-sm">
{description ? description : t("bookerlayout_description")}
</p>

View File

@ -73,7 +73,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
: t("category_apps", {
category:
(selectedCategory && selectedCategory[0].toUpperCase() + selectedCategory.slice(1)) ||
t("all_apps"),
t("all"),
})}
</h2>
{leftVisible && (
@ -96,7 +96,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
selectedCategory === null ? "bg-emphasis text-default" : "bg-muted text-emphasis",
"hover:bg-emphasis min-w-max rounded-md px-4 py-2.5 text-sm font-medium hover:cursor-pointer"
)}>
{t("all_apps")}
{t("all")}
</li>
{categories.map((cat, pos) => (
<li

View File

@ -233,7 +233,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
<>
{variant === "fab" ? (
<>
<EndIcon className="-mr-1 me-2 ms-2 hidden h-5 w-5 md:inline" />
<EndIcon className="me-2 ms-2 -mr-1 hidden h-5 w-5 md:inline" />
<Plus className="inline h-6 w-6 md:hidden" />
</>
) : (

View File

@ -21,7 +21,7 @@ export function ButtonGroup({ children, combined = false, containerProps }: Prop
"flex",
!combined
? "space-x-2 rtl:space-x-reverse"
: "ltr:[&>*:first-child]:ml-0 ltr:[&>*:first-child]:rounded-l-md ltr:[&>*:first-child]:border-l rtl:[&>*:first-child]:rounded-r-md rtl:[&>*:first-child]:border-r ltr:[&>*:last-child]:rounded-r-md rtl:[&>*:last-child]:rounded-l-md [&>a]:-ml-[1px] hover:[&>a]:z-[1] [&>button]:-ml-[1px] hover:[&>button]:z-[1] [&_a]:rounded-none [&_button]:rounded-none",
: "[&_a]:rounded-none ltr:[&>*:first-child]:ml-0 ltr:[&>*:first-child]:rounded-l-md ltr:[&>*:first-child]:border-l rtl:[&>*:first-child]:rounded-r-md rtl:[&>*:first-child]:border-r ltr:[&>*:last-child]:rounded-r-md rtl:[&>*:last-child]:rounded-l-md [&>a]:-ml-[1px] hover:[&>a]:z-[1] [&>button]:-ml-[1px] hover:[&>button]:z-[1] [&_button]:rounded-none",
containerProps?.className
)}>
{children}