From dfbd66b1babc001c72f6fe4097ac37d6463055e7 Mon Sep 17 00:00:00 2001 From: Justfemi Date: Mon, 29 Jul 2024 09:32:46 +0100 Subject: [PATCH 1/5] feat:added-role-creation-success-modal --- .../modals/role-creation-success/index.tsx | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/components/common/modals/role-creation-success/index.tsx diff --git a/src/components/common/modals/role-creation-success/index.tsx b/src/components/common/modals/role-creation-success/index.tsx new file mode 100644 index 000000000..7d7b2fa89 --- /dev/null +++ b/src/components/common/modals/role-creation-success/index.tsx @@ -0,0 +1,54 @@ +"use client"; + +import CustomButton from "~/components/common/common-button/common-button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "~/components/ui/dialog"; + +interface ModalProperties { + show: boolean; + onClose: () => void; +} + +const RoleCreationSuccessModal: React.FC = ({ + show, + onClose, +}) => { + return ( + <> + + + + +

+ Create Role +

+
+ +
+ {/* Put checkmark image here */} +

Success

+

You have created a new role successfully

+
+
+ + Continue + +
+
+
+
+
+ + ); +}; + +export default RoleCreationSuccessModal; From aa29fdc63d50e3d193ca7386d5289ae2a64cdff5 Mon Sep 17 00:00:00 2001 From: Justfemi Date: Mon, 29 Jul 2024 17:08:39 +0100 Subject: [PATCH 2/5] ch:modified roles-and-permission-page for new design update --- .../roles-and-permissions/page.tsx | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/app/dashboard/(user-dashboard)/settings/organization/roles-and-permissions/page.tsx b/src/app/dashboard/(user-dashboard)/settings/organization/roles-and-permissions/page.tsx index 830c1018f..2873b0226 100644 --- a/src/app/dashboard/(user-dashboard)/settings/organization/roles-and-permissions/page.tsx +++ b/src/app/dashboard/(user-dashboard)/settings/organization/roles-and-permissions/page.tsx @@ -17,11 +17,11 @@ type Permission = { }; const rolesData: Role[] = [ - { id: 1, name: "Guest", description: "Read-only access" }, - { id: 2, name: "User", description: "Read, write, update" }, - { id: 3, name: "Manager", description: "Read, write, approve" }, - { id: 4, name: "Project Lead", description: "Manage, coordinate, oversee" }, - { id: 5, name: "Administrator", description: "Full access, control" }, + { id: 1, name: "Administrator", description: "Full access, control" }, + { id: 2, name: "Guest", description: "Read-only access" }, + { id: 3, name: "User", description: "Read, write, update" }, + { id: 4, name: "Manager", description: "Read, write, approve" }, + { id: 5, name: "Project Lead", description: "Manage, coordinate, oversee" }, ]; const permissionsData: { [key: number]: Permission[] } = { @@ -90,33 +90,33 @@ const RolesAndPermission = () => { }; return ( -
-
-
+
+
+

Roles

-
    +
      {rolesData.map((role) => (
    • handleRoleClick(role.id)} > -
      {role.name}
      -
      {role.name} +

      {role.description} -

      +

    • ))}
-
+
{ + Create roles
-
-
-

+
+
+

Permissions

@@ -135,7 +135,7 @@ const RolesAndPermission = () => {

{selectedRoleId === undefined ? ( -
+

No list to show

@@ -145,13 +145,10 @@ const RolesAndPermission = () => {
) : (
-

- Transactions Permission -

{permissions.map((permission, index) => (
{permission.name} @@ -167,7 +164,7 @@ const RolesAndPermission = () => {
))} -
+
From 2687390074f316fc795c2efeaf5fb1a6298b4118 Mon Sep 17 00:00:00 2001 From: Justfemi Date: Mon, 29 Jul 2024 17:18:46 +0100 Subject: [PATCH 3/5] ch:modified roles-and-permission-page for new design update --- src/components/common/modals/role-creation/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/modals/role-creation/index.tsx b/src/components/common/modals/role-creation/index.tsx index 2759b6bdd..110a52d6a 100644 --- a/src/components/common/modals/role-creation/index.tsx +++ b/src/components/common/modals/role-creation/index.tsx @@ -36,7 +36,7 @@ const RoleCreationModal: React.FC = ({ show, onClose }) => {
@@ -45,7 +45,7 @@ const RoleCreationModal: React.FC = ({ show, onClose }) => {