diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/organization/members/page.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/organization/members/page.tsx index be3a54d02..9fa6ea504 100644 --- a/src/app/dashboard/(admin)/admin/(settings)/settings/organization/members/page.tsx +++ b/src/app/dashboard/(admin)/admin/(settings)/settings/organization/members/page.tsx @@ -2,6 +2,7 @@ import { AxiosResponse } from "axios"; import { EllipsisIcon } from "lucide-react"; +import Link from "next/link"; import { useState } from "react"; import CustomButton from "~/components/common/common-button/common-button"; @@ -184,7 +185,11 @@ const Members = () => {

On the Free plan all members in a workspace are administrators. Upgrade to a paid plan to add the ability to assign or remove - administrator roles. Go to Plans + administrator roles.{" "} + + {" "} + Go to Plans +

diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/organization/roles-and-permissions/create-role/page.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/organization/roles-and-permissions/create-role/page.tsx index 0333ece7a..35330829d 100644 --- a/src/app/dashboard/(admin)/admin/(settings)/settings/organization/roles-and-permissions/create-role/page.tsx +++ b/src/app/dashboard/(admin)/admin/(settings)/settings/organization/roles-and-permissions/create-role/page.tsx @@ -137,8 +137,9 @@ function CreateNewRolePage() { handleSubmit, formState: { errors }, setValue, + trigger, } = useForm({ - mode: "onBlur", + mode: "onChange", resolver: zodResolver(roleSchema), }); @@ -207,6 +208,10 @@ function CreateNewRolePage() { } }; + const handleInputChange = (field: keyof UseFormInputs) => { + trigger(field); + }; + return (
@@ -237,17 +242,28 @@ function CreateNewRolePage() { handleInputChange("name"), + })} + className={`!w-full rounded-md border ${ + errors.name ? "border-red-500" : "border-border" + } bg-transparent px-3 py-2 shadow-sm outline-none focus:border-primary focus:ring-ring md:w-56`} /> + {errors.name && ( +

{errors.name.message}

+ )}
+
{errors.permissions && ( -

Please select valid permissions.

+

+ {errors.permissions.message} +

)}
@@ -279,9 +297,18 @@ function CreateNewRolePage() {