mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: invite button validation , style: workspace screen (#877)
* fix: invite button validation * style: workspace screen tab height
This commit is contained in:
parent
fb1932e309
commit
390b837561
@ -34,6 +34,7 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
|
|||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const checkEmail = watch("emails") && watch("emails").length > 0 ;
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
className="flex w-full items-center justify-center"
|
className="flex w-full items-center justify-center"
|
||||||
@ -63,7 +64,7 @@ export const InviteMembers: React.FC<Props> = ({ setStep, workspace }) => {
|
|||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
type="submit"
|
type="submit"
|
||||||
className="flex w-1/2 items-center justify-center text-center"
|
className="flex w-1/2 items-center justify-center text-center"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting || !checkEmail}
|
||||||
size="md"
|
size="md"
|
||||||
>
|
>
|
||||||
{isSubmitting ? "Inviting..." : "Continue"}
|
{isSubmitting ? "Inviting..." : "Continue"}
|
||||||
|
@ -65,10 +65,10 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid w-full place-items-center">
|
<div className="grid w-full place-items-center min-h-[490px]">
|
||||||
<Tab.Group
|
<Tab.Group
|
||||||
as="div"
|
as="div"
|
||||||
className="flex w-full max-w-xl flex-col rounded-[10px] bg-white shadow-md"
|
className="flex h-full w-full max-w-xl flex-col justify-between rounded-[10px] bg-white shadow-md"
|
||||||
>
|
>
|
||||||
<Tab.List
|
<Tab.List
|
||||||
as="div"
|
as="div"
|
||||||
@ -97,7 +97,7 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
|
|||||||
Invited Workspace
|
Invited Workspace
|
||||||
</Tab>
|
</Tab>
|
||||||
</Tab.List>
|
</Tab.List>
|
||||||
<Tab.Panels>
|
<Tab.Panels as="div" className="h-full">
|
||||||
<Tab.Panel>
|
<Tab.Panel>
|
||||||
<CreateWorkspaceForm
|
<CreateWorkspaceForm
|
||||||
onSubmit={(res) => {
|
onSubmit={(res) => {
|
||||||
@ -108,9 +108,9 @@ export const Workspace: React.FC<Props> = ({ setStep, setWorkspace }) => {
|
|||||||
setDefaultValues={setDefaultValues}
|
setDefaultValues={setDefaultValues}
|
||||||
/>
|
/>
|
||||||
</Tab.Panel>
|
</Tab.Panel>
|
||||||
<Tab.Panel>
|
<Tab.Panel className="h-full">
|
||||||
<div className="mt-6">
|
<div className="flex flex-col justify-between h-full w-full">
|
||||||
<div className="divide-y px-4 pb-8">
|
<div className="divide-y px-4 py-7">
|
||||||
{invitations && invitations.length > 0 ? (
|
{invitations && invitations.length > 0 ? (
|
||||||
invitations.map((invitation) => (
|
invitations.map((invitation) => (
|
||||||
<div key={invitation.id}>
|
<div key={invitation.id}>
|
||||||
|
@ -100,7 +100,7 @@ export const CreateWorkspaceForm: React.FC<Props> = ({
|
|||||||
onSubmit={handleSubmit(handleCreateWorkspace)}
|
onSubmit={handleSubmit(handleCreateWorkspace)}
|
||||||
>
|
>
|
||||||
<div className="flex w-full max-w-xl flex-col">
|
<div className="flex w-full max-w-xl flex-col">
|
||||||
<div className="flex flex-col rounded-[10px] bg-white shadow-md">
|
<div className="flex flex-col rounded-[10px] bg-white">
|
||||||
<div className="flex flex-col justify-between gap-3 px-4 py-7">
|
<div className="flex flex-col justify-between gap-3 px-4 py-7">
|
||||||
<div className="flex flex-col items-start justify-center gap-2.5">
|
<div className="flex flex-col items-start justify-center gap-2.5">
|
||||||
<span>Workspace name</span>
|
<span>Workspace name</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user