Merge pull request #3593 from bluewave-labs/feat/account-team-modals
feat(account): side-by-side name and password fields in Add Member modal
This commit is contained in:
2 files changed
+16
-10
No files matched your search
@@ -9,6 +9,7 @@ import { useAddTeamMemberForm } from "@/Hooks/useAddTeamMemberForm";
|
|||||||
import type { AddTeamMemberFormData } from "@/Validation/addTeamMember";
|
import type { AddTeamMemberFormData } from "@/Validation/addTeamMember";
|
||||||
import type { UserRole, User } from "@/Types/User";
|
import type { UserRole, User } from "@/Types/User";
|
||||||
import { usePost } from "@/Hooks/UseApi";
|
import { usePost } from "@/Hooks/UseApi";
|
||||||
|
import { LAYOUT } from "@/Utils/Theme/constants";
|
||||||
|
|
||||||
interface AddTeamMemberDialogProps {
|
interface AddTeamMemberDialogProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@@ -82,9 +83,10 @@ export const AddTeamMemberDialog = ({
|
|||||||
maxWidth="sm"
|
maxWidth="sm"
|
||||||
fullWidth
|
fullWidth
|
||||||
>
|
>
|
||||||
|
<Stack gap={theme.spacing(LAYOUT.XS)}>
|
||||||
<Stack
|
<Stack
|
||||||
gap={theme.spacing(4)}
|
direction="row"
|
||||||
mt={theme.spacing(4)}
|
gap={theme.spacing(LAYOUT.XS)}
|
||||||
>
|
>
|
||||||
<Controller
|
<Controller
|
||||||
name="firstName"
|
name="firstName"
|
||||||
@@ -96,7 +98,7 @@ export const AddTeamMemberDialog = ({
|
|||||||
placeholder={t("common.form.name.option.firstName.placeholder")}
|
placeholder={t("common.form.name.option.firstName.placeholder")}
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message ?? ""}
|
helperText={fieldState.error?.message ?? ""}
|
||||||
fullWidth
|
sx={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@@ -110,10 +112,11 @@ export const AddTeamMemberDialog = ({
|
|||||||
placeholder={t("common.form.name.option.lastName.placeholder")}
|
placeholder={t("common.form.name.option.lastName.placeholder")}
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message ?? ""}
|
helperText={fieldState.error?.message ?? ""}
|
||||||
fullWidth
|
sx={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
</Stack>
|
||||||
<Controller
|
<Controller
|
||||||
name="email"
|
name="email"
|
||||||
control={control}
|
control={control}
|
||||||
@@ -151,6 +154,10 @@ export const AddTeamMemberDialog = ({
|
|||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={theme.spacing(LAYOUT.XS)}
|
||||||
|
>
|
||||||
<Controller
|
<Controller
|
||||||
name="password"
|
name="password"
|
||||||
control={control}
|
control={control}
|
||||||
@@ -162,7 +169,7 @@ export const AddTeamMemberDialog = ({
|
|||||||
type="password"
|
type="password"
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message ?? ""}
|
helperText={fieldState.error?.message ?? ""}
|
||||||
fullWidth
|
sx={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@@ -177,11 +184,12 @@ export const AddTeamMemberDialog = ({
|
|||||||
type="password"
|
type="password"
|
||||||
error={!!fieldState.error}
|
error={!!fieldState.error}
|
||||||
helperText={fieldState.error?.message ?? ""}
|
helperText={fieldState.error?.message ?? ""}
|
||||||
fullWidth
|
sx={{ flex: 1 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Stack>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -9,6 +9,7 @@ import type { UserRole } from "@/Types/User";
|
|||||||
import { useInviteForm } from "@/Hooks/useInviteForm";
|
import { useInviteForm } from "@/Hooks/useInviteForm";
|
||||||
import type { InviteFormData } from "@/Validation/invite";
|
import type { InviteFormData } from "@/Validation/invite";
|
||||||
import { usePost } from "@/Hooks/UseApi";
|
import { usePost } from "@/Hooks/UseApi";
|
||||||
|
import { LAYOUT } from "@/Utils/Theme/constants";
|
||||||
|
|
||||||
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
|
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
|
||||||
|
|
||||||
@@ -95,10 +96,7 @@ export const InviteTeamMemberDialog = ({
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack gap={theme.spacing(LAYOUT.XS)}>
|
||||||
gap={theme.spacing(4)}
|
|
||||||
mt={theme.spacing(4)}
|
|
||||||
>
|
|
||||||
<Controller
|
<Controller
|
||||||
name="email"
|
name="email"
|
||||||
control={control}
|
control={control}
|
||||||
|
|||||||
Reference in new issue
Block a user