mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: bugs & improvements (#3189)
* fix: workspace invitation modal form values reset * fix: profile sidebar avatar letter
This commit is contained in:
parent
0a41eff435
commit
aceee7d2e2
@ -89,8 +89,8 @@ export const ProfileSidebar = () => {
|
|||||||
className="h-full w-full rounded object-cover"
|
className="h-full w-full rounded object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex h-[52px] w-[52px] items-center justify-center rounded bg-custom-background-90 text-custom-text-100">
|
<div className="flex h-[52px] w-[52px] items-center justify-center rounded bg-custom-background-90 text-custom-text-100 capitalize">
|
||||||
{userProjectsData.user_data.display_name?.[0]}
|
{userProjectsData.user_data.first_name?.[0]}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@ -149,8 +149,8 @@ export const ProfileSidebar = () => {
|
|||||||
completedIssuePercentage <= 35
|
completedIssuePercentage <= 35
|
||||||
? "bg-red-500/10 text-red-500"
|
? "bg-red-500/10 text-red-500"
|
||||||
: completedIssuePercentage <= 70
|
: completedIssuePercentage <= 70
|
||||||
? "bg-yellow-500/10 text-yellow-500"
|
? "bg-yellow-500/10 text-yellow-500"
|
||||||
: "bg-green-500/10 text-green-500"
|
: "bg-green-500/10 text-green-500"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{completedIssuePercentage}%
|
{completedIssuePercentage}%
|
||||||
|
@ -68,6 +68,12 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
|
|||||||
append({ email: "", role: 15 });
|
append({ email: "", role: 15 });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onSubmitForm = async (data: FormValues) => {
|
||||||
|
await onSubmit(data)?.then(() => {
|
||||||
|
reset(defaultValues);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (fields.length === 0) append([{ email: "", role: 15 }]);
|
if (fields.length === 0) append([{ email: "", role: 15 }]);
|
||||||
}, [fields, append]);
|
}, [fields, append]);
|
||||||
@ -100,7 +106,7 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
|
|||||||
>
|
>
|
||||||
<Dialog.Panel className="relative translate-y-0 transform rounded-lg bg-custom-background-100 p-5 text-left opacity-100 shadow-custom-shadow-md transition-all sm:w-full sm:max-w-2xl sm:scale-100">
|
<Dialog.Panel className="relative translate-y-0 transform rounded-lg bg-custom-background-100 p-5 text-left opacity-100 shadow-custom-shadow-md transition-all sm:w-full sm:max-w-2xl sm:scale-100">
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmitForm)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.code === "Enter") e.preventDefault();
|
if (e.code === "Enter") e.preventDefault();
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user