feat: new org onboarding wizard (#13139)

* added layouts for moving teams step

* added admin section for org creation step

* extended org creation to also move existing teams

* wip

* wip

* wip

* further changes

* Add checkout for org in onboarding

* Fix ts errors

* Self review feedback

* Self review addressed

* Fix unit tests

* Fix ts error

* Seans feedback addressed

* feat: fix correct accounts pending

* fix: unit tests for new invite member permissions

* tests: org admin onboarding tests for existing user

* tests: Inital user self serve flow

* chore: update teamAndUserFixture to create X amount of teams

* chore: add testId to card actionButton

* test: add test-Id to continue or checkout button

* tests: add tests for migrating existing teams

* feat: match new designs

* fix: isAdminCheck

* chore: fix pricing copy

* fix: flacky tests

* Fix tests?

* More test fixes

* Check all checkboxes

* Fix type error

* Fix failing test and typescript issues

* Fix unpaid org allowing auto-add users

* Add self-serve flag

* Skip tests

---------

Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Hariom <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-03 18:53:02 +05:30
1 parent c3b1de498d
commit b3f4cfab32
49 files changed
+1813 -755

No files matched your search

+13 -5
View File
@@ -108,6 +108,7 @@ export interface BaseCardProps extends CVACardType {
href?: string;
child: ReactNode;
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
"data-testId"?: string;
};
learnMore?: {
href: string;
@@ -177,6 +178,7 @@ export function Card({
target="_blank"
rel="noreferrer"
href={mediaLink}
data-testId={actionButton?.["data-testId"]}
className="group relative my-3 flex aspect-video items-center overflow-hidden rounded">
<div className="absolute inset-0 bg-black bg-opacity-50 transition-opacity group-hover:bg-opacity-40" />
<svg
@@ -202,13 +204,18 @@ export function Card({
)}
{/* TODO: this should be CardActions https://mui.com/material-ui/api/card-actions/ */}
<div>
{variant === "basic" && (
<Button color="secondary" href={actionButton?.href} className="mt-10" EndIcon={ArrowRight}>
{variant === "basic" && actionButton && (
<div>
<Button
color="secondary"
href={actionButton?.href}
className="mt-10"
EndIcon={ArrowRight}
data-testId={actionButton["data-testId"]}>
{actionButton?.child}
</Button>
)}
</div>
</div>
)}
{variant === "SidebarCard" && (
<div className="mt-2 flex items-center justify-between">
@@ -226,6 +233,7 @@ export function Card({
<button
className="text-default hover:text-emphasis p-0 text-xs font-normal"
color="minimal"
data-testId={actionButton?.["data-testId"]}
onClick={actionButton?.onClick}>
{actionButton?.child}
</button>
@@ -52,9 +52,7 @@ export function HintsOrErrors<T extends FieldValues = FieldValues>({
<li
key={key}
data-testid="hint-error"
className={
error !== undefined ? (submitted ? "bg-yellow-200 text-red-700" : "") : "text-green-600"
}>
className={error !== undefined ? (submitted ? "text-red-500" : "") : "text-green-600"}>
{error !== undefined ? (
submitted ? (
<X size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
@@ -16,14 +16,14 @@ const RadioArea = ({ children, className, classNames: innerClassNames, ...props
return (
<div
className={classNames(
"border-subtle [&:has(input:checked)]:border-emphasis relative flex items-start rounded-md border",
"border-subtle [&:has(input:checked)]:border-emphasis relative flex items-start rounded-md border ",
className
)}>
<RadioGroupPrimitive.Item
id={id}
{...props}
className={classNames(
"hover:bg-subtle border-default focus:ring-emphasis absolute left-3 top-[0.9rem] mt-0.5 h-4 w-4 flex-shrink-0 rounded-full border focus:ring-2",
"hover:bg-subtle disabled:hover:bg-default border-default focus:ring-emphasis absolute left-3 top-[0.9rem] mt-0.5 h-4 w-4 flex-shrink-0 rounded-full border focus:ring-2 disabled:cursor-not-allowed",
props.disabled && "opacity-60"
)}>
<RadioGroupPrimitive.Indicator