diff --git a/frontend/src/app/components/header/components/HeaderDetails.jsx b/frontend/src/app/components/header/components/HeaderDetails.jsx index 28d45bc..bfac617 100644 --- a/frontend/src/app/components/header/components/HeaderDetails.jsx +++ b/frontend/src/app/components/header/components/HeaderDetails.jsx @@ -1,8 +1,8 @@ "use client"; import React from "react"; -import orgStyles from "./Organization.module.css"; -import profileStyles from "./Profile.module.css"; +import orgStyle from "./organization.module.css"; +import profileStyle from "./profile.module.css"; import { useState } from "react"; @@ -24,22 +24,22 @@ const HeaderDetails = () => { return ( <> {/* Organization and Dropdown Section*/} -
-
+
+
{/* Logo */} -
-
+
+

Organization

-
+
{/* Dropdown Menu*/} {openOrgDropdown && ( -
+
{/* Organization Header and Search */} -
+
{/* Header */} -
+

Organization

-
+

Create

{
{/* Search */} -
-
+
+
{ {
{/* Select Options */} -
+
{orgList.map((org, index) => { return (
handleOrgSelect(index)} >
{ )} {/* Button */}
setOpenOrgDropdown(!openOrgDropdown)} >

Project Moonshot Inc.

@@ -188,20 +188,20 @@ const HeaderDetails = () => { {/* Profile Section */}
setOpenProfileDropdown(!openProfileDropdown)} > {/* Profile */} -
+
{/* Username and Role*/} -
-

JM Grills

-

Super Admin

+
+

JM Grills

+

Super Admin

{/* User profile*/} -
-
+
+
{ {/* Dropdown */} {openProfileDropdown && ( -
+
{/* Settings */} -
+
{/* Icon */} -
+
{

Settings

{/* Logout */} -
+
{/* Icon */} -
+
{ + const sampleData = [ + { permission: "organization.delete" }, + { permission: "user.create" }, + { permission: "user.list" }, + { permission: "user.update" }, + { permission: "robot.create" }, + { permission: "user.delete" }, + ]; return (
- + +
+ {/* Input fields Container */} +
+ {/* User Details */} +
+ {/* Header */} +
+
+

User Details

+
+
+ {/* Input fields */} +
+ {/* Role and Dropdown */} +
+
+
+

Role

+
+
+ +
+
+
+ {/* Email */} +
+
+ {/* Label */} +
+

Email

+
+ {/* Input field */} +
+ +
+
+
+ {/* Full Name */} +
+
+ {/* Label */} +
+

Full Name

+
+ {/* Input field */} +
+ +
+
+
+
+
+ + {/* Permissions */} +
+ {/* Add permissions */} +
+ {/* Header */} +
+

Permissions

+
+
+ + + + +
+
+
+ + {/* State text (static) */} + {sampleData.map((perm, index) => { + return ( +
+
+ + + + + +

{perm.permission}

+
+ +
+
+ {" "} + + + + + + + +
+
+
+ ); + })} +
+
+
+
diff --git a/frontend/src/app/users/[usersId]/styles.module.css b/frontend/src/app/users/[usersId]/styles.module.css new file mode 100644 index 0000000..e3111f7 --- /dev/null +++ b/frontend/src/app/users/[usersId]/styles.module.css @@ -0,0 +1,317 @@ +.addUserContainer { + display: flex; + padding: 36px 144px 72px 144px; + align-items: flex-start; + gap: 24px; + flex: 1 0 0; + align-self: stretch; +} +.inputFieldContainer { + display: flex; + align-items: flex-start; + gap: 24px; + flex: 1 0 0; + align-self: stretch; +} +.userDetails { + display: flex; + width: 400px; + padding: 24px 24px 48px 24px; + flex-direction: column; + align-items: flex-start; + border-radius: 6px; + background: #1d1e2a; + background: color(display-p3 0.1137 0.1176 0.1608); +} +.header { + display: flex; + padding-bottom: 24px; + align-items: flex-start; + gap: 17px; + align-self: stretch; +} +.header > div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + flex: 1 0 0; +} +.header > div > p { + width: 163px; + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: normal; +} +.fields { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 16px; + align-self: stretch; +} +.selectRoleContainer, +.inputMainContainer { + display: flex; + justify-content: center; + align-items: center; + gap: 8px; + align-self: stretch; +} +.inputContainer { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + flex: 1 0 0; +} +.label { + display: flex; + align-items: flex-start; + gap: 2px; + align-self: stretch; +} +.label > p { + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} +.inputField { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 8px; + align-self: stretch; +} +.inputField > input { + display: flex; + height: 44px; + padding: 12px 16px; + flex-direction: column; + justify-content: center; + align-items: flex-start; + background: none; + gap: 10px; + align-self: stretch; + border-radius: 6px; + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); +} +.inputField > input:hover { + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); + background: rgba(75, 79, 109, 0.05); + background: color(display-p3 0.298 0.3098 0.4196 / 0.05); +} + +.inputField input:focus { + outline: none; + border-radius: 6px; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: rgba(75, 79, 109, 0.25); + background: color(display-p3 0.298 0.3098 0.4196 / 0.25); + caret-color: #959aff; +} +.inputField input:focus::placeholder { + color: #4b4f6d; + color: color(display-p3 0.298 0.3098 0.4196); +} + +.placeholderTxt::placeholder { + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + +/* Select Role Dropdown */ +.selectField { + display: flex; + height: 44px; + padding: 12px 16px; + align-self: stretch; + background: none; + border-radius: 6px; + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); + color: #d2d3e1; + font-family: Inter; + font-size: 16px; + font-weight: 400; + appearance: none; +} + +.selectField:focus { + outline: none; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: rgba(75, 79, 109, 0.25); + background: color(display-p3 0.298 0.3098 0.4196 / 0.25); +} + +.userPermissions { + display: flex; + flex-direction: column; + align-items: flex-start; + flex: 1 0 0; + align-self: stretch; + border-radius: 6px; +} +.permissionsContainer { + display: flex; + padding: 24px; + flex-direction: column; + align-items: flex-start; + align-self: stretch; + border-radius: 6px; + background: #1d1e2a; + background: color(display-p3 0.1138 0.1191 0.1616); +} +.permissionsHeader { + display: flex; + padding-bottom: 24px; + align-items: flex-start; + gap: 17px; + align-self: stretch; +} + +.permissionsHeader > p { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + flex: 1 0 0; + + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: normal; + width: 163px; +} +.svgContainer { + display: flex; + width: 40px; + height: 40px; + flex-direction: column; + align-items: flex-end; + gap: 5px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.svgContainer > div { + display: flex; + padding: 8px; + justify-content: center; + align-items: center; + gap: 12px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.permissionDefaultState { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: center; + align-items: center; + align-self: stretch; +} +.permissionDefaultState p { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + +.permissions { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: space-between; + align-items: center; + align-self: stretch; + border-bottom: 0.5px solid #2e3042; + border-bottom: 0.5px solid color(display-p3 0.1831 0.189 0.2535); +} +.permissions:hover { + border-bottom: 1px solid rgba(129, 135, 255, 0.25); + border-bottom: 1px solid color(display-p3 0.5098 0.5294 1 / 0.25); + background: rgba(129, 135, 255, 0.05); + background: color(display-p3 0.5098 0.5294 1 / 0.05); +} +.permissionsItem { + display: flex; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; +} +.permissionsItem > p { + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} +.deleteBtn { + display: flex; + align-items: center; + align-self: stretch; +} +.deleteSvg { + display: flex; + padding: 6px; + flex-direction: column; + justify-content: center; + align-items: center; + border: 1px solid #959aff00; + color: #969af9; + aspect-ratio: 1/1; + border-radius: 100px; +} + +.deleteSvg:hover { + color: #fff; + stroke-width: 1px; + stroke: color(display-p3 1 1 1); + border-radius: 100px; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: linear-gradient(180deg, #696b95 0%, #20202d 100%); + background: linear-gradient( + 180deg, + color(display-p3 0.4118 0.4196 0.5725) 0%, + color(display-p3 0.1241 0.1265 0.1725) 100% + ); +} diff --git a/frontend/src/app/users/add/page.jsx b/frontend/src/app/users/add/page.jsx index 981a24b..4b641be 100644 --- a/frontend/src/app/users/add/page.jsx +++ b/frontend/src/app/users/add/page.jsx @@ -9,7 +9,7 @@ const page = () => {
{ {/* Input fields Container */}
{/* User Details */} -
+
+ {/* Header */} +
+
+

User Details

+
+
+ {/* Input fields */} +
+ {/* Role and Dropdown */} +
+
+
+

Role

+
+
+ +
+
+
+ {/* Email */} +
+
+ {/* Label */} +
+

Email

+
+ {/* Input field */} +
+ +
+
+
+ {/* Full Name */} +
+
+ {/* Label */} +
+

Full Name

+
+ {/* Input field */} +
+ +
+
+
+
+
+ {/* Permissions */} -
+
+ {/* Add permissions */} +
+ {/* Header */} +
+

Permissions

+
+
+ + + + +
+
+
+ + {/* State text (static) */} +
+

No permission added yet

+
+
+
diff --git a/frontend/src/app/users/add/styles.module.css b/frontend/src/app/users/add/styles.module.css index 4fa81fd..17d9d0d 100644 --- a/frontend/src/app/users/add/styles.module.css +++ b/frontend/src/app/users/add/styles.module.css @@ -1,12 +1,11 @@ .addUserContainer { - background-color: red; display: flex; + padding: 36px 144px 72px 144px; align-items: flex-start; gap: 24px; flex: 1 0 0; align-self: stretch; } - .inputFieldContainer { display: flex; align-items: flex-start; @@ -14,7 +13,6 @@ flex: 1 0 0; align-self: stretch; } - .userDetails { display: flex; width: 400px; @@ -25,6 +23,144 @@ background: #1d1e2a; background: color(display-p3 0.1137 0.1176 0.1608); } +.header { + display: flex; + padding-bottom: 24px; + align-items: flex-start; + gap: 17px; + align-self: stretch; +} +.header > div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + flex: 1 0 0; +} +.header > div > p { + width: 163px; + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: normal; +} +.fields { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 16px; + align-self: stretch; +} +.selectRoleContainer, +.inputMainContainer { + display: flex; + justify-content: center; + align-items: center; + gap: 8px; + align-self: stretch; +} +.inputContainer { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 12px; + flex: 1 0 0; +} +.label { + display: flex; + align-items: flex-start; + gap: 2px; + align-self: stretch; +} +.label > p { + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} +.inputField { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 8px; + align-self: stretch; +} +.inputField > input { + display: flex; + height: 44px; + padding: 12px 16px; + flex-direction: column; + justify-content: center; + align-items: flex-start; + background: none; + gap: 10px; + align-self: stretch; + border-radius: 6px; + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); +} +.inputField > input:hover { + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); + background: rgba(75, 79, 109, 0.05); + background: color(display-p3 0.298 0.3098 0.4196 / 0.05); +} + +.inputField input:focus { + outline: none; + border-radius: 6px; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: rgba(75, 79, 109, 0.25); + background: color(display-p3 0.298 0.3098 0.4196 / 0.25); + caret-color: #959aff; +} +.inputField input:focus::placeholder { + color: #4b4f6d; + color: color(display-p3 0.298 0.3098 0.4196); +} + +.placeholderTxt::placeholder { + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + +/* Select Role Dropdown */ +.selectField { + display: flex; + height: 44px; + padding: 12px 16px; + align-self: stretch; + background: none; + border-radius: 6px; + border: 1px solid #616583; + border: 1px solid color(display-p3 0.3843 0.3961 0.5057); + color: #d2d3e1; + font-family: Inter; + font-size: 16px; + font-weight: 400; + appearance: none; +} + +.selectField:focus { + outline: none; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: rgba(75, 79, 109, 0.25); + background: color(display-p3 0.298 0.3098 0.4196 / 0.25); +} .userPermissions { display: flex; @@ -34,3 +170,84 @@ align-self: stretch; border-radius: 6px; } +.permissionsContainer { + display: flex; + padding: 24px; + flex-direction: column; + align-items: flex-start; + align-self: stretch; + border-radius: 6px; + background: #1d1e2a; + background: color(display-p3 0.1138 0.1191 0.1616); +} +.permissionsHeader { + display: flex; + padding-bottom: 24px; + align-items: flex-start; + gap: 17px; + align-self: stretch; +} + +.permissionsHeader > p { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + flex: 1 0 0; + + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: normal; + width: 163px; +} +.svgContainer { + display: flex; + width: 40px; + height: 40px; + flex-direction: column; + align-items: flex-end; + gap: 5px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.svgContainer > div { + display: flex; + padding: 8px; + justify-content: center; + align-items: center; + gap: 12px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.permissionDefaultState { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: center; + align-items: center; + align-self: stretch; +} +.permissionDefaultState p { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +}