Compare commits
12 Commits
f84894b6d7
...
DEVELOPMEN
| Author | SHA1 | Date | |
|---|---|---|---|
| a4675c843d | |||
| 02d53f69ad | |||
|
|
992d01ba9b | ||
| 9f0392c9c2 | |||
| 6e54a9468b | |||
|
|
18524971f8 | ||
|
|
395de5ef88 | ||
| cc2a18c4d7 | |||
|
|
2c9f2d612b | ||
| c9d5faebb0 | |||
| 8c776a5491 | |||
| 14884f6b3a |
@@ -9,10 +9,13 @@ import Prompts from "@/app/components/prompts/Prompts";
|
|||||||
import useAgentForm from "@/app/hooks/useAgentForm";
|
import useAgentForm from "@/app/hooks/useAgentForm";
|
||||||
import Alert from "@/app/components/alerts/Alert";
|
import Alert from "@/app/components/alerts/Alert";
|
||||||
import Checkbox from "@/app/components/customCheckbox/Checkbox";
|
import Checkbox from "@/app/components/customCheckbox/Checkbox";
|
||||||
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
|
||||||
const ViewAgentPage = () => {
|
const ViewAgentPage = () => {
|
||||||
const [useVpn, setUseVpn] = useState(true);
|
const [useVpn, setUseVpn] = useState(false);
|
||||||
const [enableLoki, setEnableLoki] = useState(true);
|
const [enableLoki, setEnableLoki] = useState(false);
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -50,7 +53,7 @@ const ViewAgentPage = () => {
|
|||||||
{/* AGENT FORM */}
|
{/* AGENT FORM */}
|
||||||
<div className={createAgentStyle.headerContainer}>
|
<div className={createAgentStyle.headerContainer}>
|
||||||
<div className={createAgentStyle.headerTxt}>
|
<div className={createAgentStyle.headerTxt}>
|
||||||
<p>Agent Details</p>
|
{isMobile ? "" : <p>Agent Details</p>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={createAgentStyle.inputContainer}>
|
<div className={createAgentStyle.inputContainer}>
|
||||||
@@ -90,35 +93,51 @@ const ViewAgentPage = () => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{/* Agent endpoint */}
|
{useVpn ? (
|
||||||
<div className={createAgentStyle.inputContainer}>
|
<>
|
||||||
<div className={createAgentStyle.labelContainer}>
|
<div className={createAgentStyle.inputContainer}>
|
||||||
<p>Tailscale Device Prefix</p>
|
<div className={createAgentStyle.labelContainer}>
|
||||||
{/* <p className={createAgentStyle.required}>*</p> */}
|
<p>Tailscale Device Prefix</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="doks-onecbdev-agent"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={createAgentStyle.inputContainer}>
|
||||||
|
<div className={createAgentStyle.labelContainer}>
|
||||||
|
<p>Tailscale Port</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="6969"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<div className={createAgentStyle.agentInputContainer}>
|
||||||
|
<div className={createAgentStyle.labelContainer}>
|
||||||
|
<p>Agent Endpoint</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="e.g., http://agent-01.example.com:8080"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
</div>
|
</div>
|
||||||
<TextField
|
)}
|
||||||
placeHolder="doks-onecbdev-agent"
|
|
||||||
{...register("agentEndpoint", { required: true })}
|
|
||||||
hasError={!!errors.agentEndpoint}
|
|
||||||
/>
|
|
||||||
<Prompts show={false} />
|
|
||||||
</div>
|
|
||||||
<div className={createAgentStyle.inputContainer}>
|
|
||||||
<div className={createAgentStyle.labelContainer}>
|
|
||||||
<p>Tailscale Port</p>
|
|
||||||
{/* <p className={createAgentStyle.required}>*</p> */}
|
|
||||||
</div>
|
|
||||||
<TextField
|
|
||||||
placeHolder="6969"
|
|
||||||
{...register("agentEndpoint", { required: true })}
|
|
||||||
hasError={!!errors.agentEndpoint}
|
|
||||||
/>
|
|
||||||
<Prompts show={false} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={createAgentStyle.lokiContainer}>
|
<div className={createAgentStyle.lokiContainer}>
|
||||||
{/* Header */}
|
|
||||||
<div className={createAgentStyle.headerContainer}>
|
<div className={createAgentStyle.headerContainer}>
|
||||||
<div className={createAgentStyle.headerTxt}>
|
<div className={createAgentStyle.headerTxt}>
|
||||||
<p>Loki Integration (Optional)</p>
|
<p>Loki Integration (Optional)</p>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createAgentContainer {
|
.createAgentContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
.headerContainer {
|
.headerContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 17px;
|
gap: 50px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.headerContainer > div {
|
.headerContainer > div {
|
||||||
@@ -51,7 +50,8 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
.inputContainer {
|
.inputContainer,
|
||||||
|
.agentInputContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -66,7 +66,6 @@
|
|||||||
}
|
}
|
||||||
.labelContainer > p {
|
.labelContainer > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -80,9 +79,63 @@
|
|||||||
|
|
||||||
.lokiContainer {
|
.lokiContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
width: 548px;
|
width: 548px;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.createAgentContainer {
|
||||||
|
display: flex;
|
||||||
|
padding: 16px 16px; /*did some math 32 ang orig top*/
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 24px;
|
||||||
|
height: calc(100vh - 100px - 60px);
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.div {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.inputMainContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 0px;
|
||||||
|
/* align-self: stretch; */
|
||||||
|
}
|
||||||
|
.lokiContainer {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
align-self: stretch;
|
||||||
|
border-radius: 8px;
|
||||||
|
width: 500px;
|
||||||
|
padding: 24px 0 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.inputMainContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.lokiContainer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.inputContainer,
|
||||||
|
.agentInputContainer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.agentInputContainer {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
.headerTxt > p {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ import Prompts from "@/app/components/prompts/Prompts";
|
|||||||
import useAgentForm from "@/app/hooks/useAgentForm";
|
import useAgentForm from "@/app/hooks/useAgentForm";
|
||||||
import Alert from "@/app/components/alerts/Alert";
|
import Alert from "@/app/components/alerts/Alert";
|
||||||
import Checkbox from "@/app/components/customCheckbox/Checkbox";
|
import Checkbox from "@/app/components/customCheckbox/Checkbox";
|
||||||
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
|
||||||
const AddAgentPage = () => {
|
const AddAgentPage = () => {
|
||||||
const [useVpn, setUseVpn] = useState(false);
|
const [useVpn, setUseVpn] = useState(false);
|
||||||
const [enableLoki, setEnableLoki] = useState(false);
|
const [enableLoki, setEnableLoki] = useState(false);
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -40,7 +42,7 @@ const AddAgentPage = () => {
|
|||||||
state="add"
|
state="add"
|
||||||
requiredButtons={["title", "save"]}
|
requiredButtons={["title", "save"]}
|
||||||
/>
|
/>
|
||||||
<TopToolTip />
|
{isMobile ? "" : <TopToolTip />}
|
||||||
{/* Create agent Container */}
|
{/* Create agent Container */}
|
||||||
<form
|
<form
|
||||||
className={createAgentStyle.formContainer}
|
className={createAgentStyle.formContainer}
|
||||||
@@ -48,12 +50,11 @@ const AddAgentPage = () => {
|
|||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmit)}
|
||||||
>
|
>
|
||||||
<div className={createAgentStyle.createAgentContainer}>
|
<div className={createAgentStyle.createAgentContainer}>
|
||||||
<div className={createAgentStyle.div}></div>
|
|
||||||
<div className={createAgentStyle.inputMainContainer}>
|
<div className={createAgentStyle.inputMainContainer}>
|
||||||
{/* AGENT FORM */}
|
{/* AGENT FORM */}
|
||||||
<div className={createAgentStyle.headerContainer}>
|
<div className={createAgentStyle.headerContainer}>
|
||||||
<div className={createAgentStyle.headerTxt}>
|
<div className={createAgentStyle.headerTxt}>
|
||||||
<p>Agent Details</p>
|
{isMobile ? "" : <p>Agent Details</p>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={createAgentStyle.inputContainer}>
|
<div className={createAgentStyle.inputContainer}>
|
||||||
@@ -93,19 +94,48 @@ const AddAgentPage = () => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{/* Agent endpoint */}
|
{useVpn ? (
|
||||||
<div className={createAgentStyle.inputContainer}>
|
<>
|
||||||
<div className={createAgentStyle.labelContainer}>
|
<div className={createAgentStyle.inputContainer}>
|
||||||
<p>Agent Endpoint</p>
|
<div className={createAgentStyle.labelContainer}>
|
||||||
<p className={createAgentStyle.required}>*</p>
|
<p>Tailscale Device Prefix</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="doks-onecbdev-agent"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={createAgentStyle.inputContainer}>
|
||||||
|
<div className={createAgentStyle.labelContainer}>
|
||||||
|
<p>Tailscale Port</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="6969"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<div className={createAgentStyle.agentInputContainer}>
|
||||||
|
<div className={createAgentStyle.labelContainer}>
|
||||||
|
<p>Agent Endpoint</p>
|
||||||
|
<p className={createAgentStyle.required}>*</p>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
placeHolder="e.g., http://agent-01.example.com:8080"
|
||||||
|
{...register("agentEndpoint", { required: true })}
|
||||||
|
hasError={!!errors.agentEndpoint}
|
||||||
|
/>
|
||||||
|
<Prompts show={false} />
|
||||||
</div>
|
</div>
|
||||||
<TextField
|
)}
|
||||||
placeHolder="e.g., http://agent-01.example.com:8080"
|
|
||||||
{...register("agentEndpoint", { required: true })}
|
|
||||||
hasError={!!errors.agentEndpoint}
|
|
||||||
/>
|
|
||||||
<Prompts show={false} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={createAgentStyle.lokiContainer}>
|
<div className={createAgentStyle.lokiContainer}>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
padding-top: 48px;
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,9 +13,10 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
/* Ibalhin ni ang padding sa formcontainer maoang nasa figma */
|
/* Ibalhin ni ang padding sa formcontainer maoang nasa figma */
|
||||||
|
padding-top: 48px;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
height: calc(100vh - 100px - 48px - 110px);
|
height: calc(100vh - 100px - 5px - 110px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
@@ -31,17 +31,9 @@
|
|||||||
.headerContainer {
|
.headerContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 17px;
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.headerContainer > div {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 5px;
|
|
||||||
flex: 1 0 0;
|
|
||||||
}
|
|
||||||
.headerTxt > p {
|
.headerTxt > p {
|
||||||
/* width: 163px; */
|
/* width: 163px; */
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
@@ -52,7 +44,8 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
.inputContainer {
|
.inputContainer,
|
||||||
|
.agentInputContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -67,7 +60,6 @@
|
|||||||
}
|
}
|
||||||
.labelContainer > p {
|
.labelContainer > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -87,3 +79,56 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.createAgentContainer {
|
||||||
|
display: flex;
|
||||||
|
padding: 16px 16px; /*did some math 32 ang orig top*/
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
height: calc(100vh - 100px - 5px - 50px);
|
||||||
|
gap: 24px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.div {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.inputMainContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 0px;
|
||||||
|
/* align-self: stretch; */
|
||||||
|
}
|
||||||
|
.lokiContainer {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
align-self: stretch;
|
||||||
|
border-radius: 8px;
|
||||||
|
width: 500px;
|
||||||
|
padding: 24px 0 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.inputMainContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.lokiContainer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.inputContainer,
|
||||||
|
.agentInputContainer {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.agentInputContainer {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
.headerTxt > p {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import styles from "./styles.module.css";
|
|||||||
|
|
||||||
const Card = (props) => {
|
const Card = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer} {...props}>
|
||||||
<div className={styles.cardDetails}>
|
<div className={styles.cardDetails}>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
<p>Name</p>
|
<p>Name</p>
|
||||||
|
|||||||
@@ -117,7 +117,13 @@ const AgentsPage = () => {
|
|||||||
<MobileSearchBar />
|
<MobileSearchBar />
|
||||||
{isMobile &&
|
{isMobile &&
|
||||||
sampleData.map((data, key) => {
|
sampleData.map((data, key) => {
|
||||||
return <Card data={data} key={key} />;
|
return (
|
||||||
|
<Card
|
||||||
|
data={data}
|
||||||
|
key={key}
|
||||||
|
onClick={() => router.push(`/agents/${key}`)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
.tableContainer > table > tbody > tr > td {
|
.tableContainer > table > tbody > tr > td {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
.tableContainer > table > thead > tr > th {
|
.tableContainer > table > thead > tr > th {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
.headers > p {
|
.headers > p {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 1.25rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
.body > p {
|
.body > p {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.75rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
border: 0.5px solid #8187ff;
|
border: 0.5px solid #8187ff;
|
||||||
background: rgba(83, 89, 242, 0.25);
|
background: rgba(83, 89, 242, 0.25);
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
border: 0.5px solid #4e537e;
|
border: 0.5px solid #4e537e;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
|
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -12,20 +12,18 @@
|
|||||||
}
|
}
|
||||||
.checkbox {
|
.checkbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: var(--Basic-Forms-Checkbox-Input-Sizing-Y-SM, 10px)
|
padding: 10px 12px;
|
||||||
var(--Basic-Forms-Checkbox-Input-Sizing-X-SM, 12px);
|
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: var(--Basic-Forms-Checkbox-Gap-Between, 16px);
|
gap: 16px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
border-radius: var(--Basic-Forms-Checkbox-Border-Radius, 8px);
|
border-radius: 8px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
background: color(display-p3 0.1137 0.1176 0.1608);
|
|
||||||
}
|
}
|
||||||
.check {
|
.check {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-top: var(--Basic-Forms-Checkbox-Inline-Y, 4px);
|
padding-top: 4px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: var(--Basic-Forms-Checkbox-Inline-Gap-Between, 10px);
|
gap: 10px;
|
||||||
}
|
}
|
||||||
.hiddenCheckbox {
|
.hiddenCheckbox {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
@@ -38,29 +36,15 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: var(--Basic-Forms-Checkbox-Check-Icon-Border-Radius, 4px);
|
border-radius: 4px;
|
||||||
border: 1px solid
|
border: 1px solid #e5e7eb;
|
||||||
var(--Basic-Forms-Checkbox-Check-Icon-Border-Border-Color, #e5e7eb);
|
|
||||||
|
|
||||||
background: var(--Basic-Forms-Checkbox-Check-Icon-Background-Bg-Color, #fff);
|
background: #fff;
|
||||||
}
|
}
|
||||||
.hiddenCheckbox:checked {
|
.hiddenCheckbox:checked {
|
||||||
border-radius: var(--Basic-Forms-Checkbox-Check-Icon-Border-Radius, 4px);
|
border-radius: 4px;
|
||||||
border: 1px solid
|
border: 1px solid #0067fd;
|
||||||
var(--Basic-Forms-Checkbox-Check-Icon-Border-Border-Active-Color, #0067fd);
|
background: #0067fd;
|
||||||
border: 1px solid
|
|
||||||
var(
|
|
||||||
--Basic-Forms-Checkbox-Check-Icon-Border-Border-Active-Color,
|
|
||||||
color(display-p3 0.1451 0.3882 0.9216)
|
|
||||||
);
|
|
||||||
background: var(
|
|
||||||
--Basic-Forms-Checkbox-Check-Icon-Background-Bg-Active-Color,
|
|
||||||
#0067fd
|
|
||||||
);
|
|
||||||
background: var(
|
|
||||||
--Basic-Forms-Checkbox-Check-Icon-Background-Bg-Active-Color,
|
|
||||||
color(display-p3 0.1451 0.3882 0.9216)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
.hiddenCheckbox::after {
|
.hiddenCheckbox::after {
|
||||||
content: "";
|
content: "";
|
||||||
@@ -85,21 +69,20 @@
|
|||||||
.placeholderTxt {
|
.placeholderTxt {
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 24px; /* 150% */
|
line-height: 24px;
|
||||||
letter-spacing: 0.08px;
|
letter-spacing: 0.08px;
|
||||||
}
|
}
|
||||||
.secondaryTxt {
|
.secondaryTxt {
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
color: #697281;
|
color: #697281;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.75rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 20px; /* 142.857% */
|
line-height: 20px;
|
||||||
letter-spacing: 0.07px;
|
letter-spacing: 0.07px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
.input:focus::placeholder {
|
.input:focus::placeholder {
|
||||||
color: #4b4f6d;
|
color: #4b4f6d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
.input::placeholder {
|
.input::placeholder {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
32
frontend/src/app/components/icons/plus.jsx
Normal file
32
frontend/src/app/components/icons/plus.jsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const plus = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width={24}
|
||||||
|
height={24}
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M12 5.29199V18.7087"
|
||||||
|
stroke="#333649"
|
||||||
|
strokeWidth={2}
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M5.29102 12H18.7077"
|
||||||
|
stroke="#333649"
|
||||||
|
strokeWidth={2}
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default plus;
|
||||||
@@ -12,7 +12,7 @@ const SearchIcon = (props) => {
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M19.5527 19.5536L14.7064 14.7074M9.16822 16.7847C13.3741 16.7847 16.7837 13.3751 16.7837 9.1692C16.7837 4.96328 13.3741 1.55371 9.16822 1.55371C4.9623 1.55371 1.55273 4.96328 1.55273 9.1692C1.55273 13.3751 4.9623 16.7847 9.16822 16.7847Z"
|
d="M19.5527 19.5536L14.7064 14.7074M9.16822 16.7847C13.3741 16.7847 16.7837 13.3751 16.7837 9.1692C16.7837 4.96328 13.3741 1.55371 9.16822 1.55371C4.9623 1.55371 1.55273 4.96328 1.55273 9.1692C1.55273 13.3751 4.9623 16.7847 9.16822 16.7847Z"
|
||||||
stroke="#858699"
|
stroke="currentColor" //858699
|
||||||
strokeWidth={1.5}
|
strokeWidth={1.5}
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import styles from "./styles.module.css";
|
import styles from "./styles.module.css";
|
||||||
import SearchIcon from "../icons/search";
|
import SearchIcon from "../icons/search";
|
||||||
|
|
||||||
const MobileSearchBar = (props) => {
|
const MobileSearchBar = (props) => {
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
return (
|
return (
|
||||||
<div className={styles.searchBarContainer}>
|
<form className={`${styles.searchBarContainer} ${open ? styles.open : ""}`}>
|
||||||
<input type="text" className={styles.searchBar} />
|
<input type="text" placeholder="Search" className={styles.searchBar} />
|
||||||
<SearchIcon className={styles.searchIcon} />
|
<div
|
||||||
</div>
|
className={styles.searchBtn}
|
||||||
|
onClick={() => setOpen((open) => !open)}
|
||||||
|
>
|
||||||
|
<SearchIcon />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,68 @@
|
|||||||
.searchBarContainer {
|
.searchBarContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #31324a00;
|
||||||
|
transition: width 0.35s ease;
|
||||||
}
|
}
|
||||||
.searchBarContainer > input {
|
.searchBar:focus-within {
|
||||||
|
background: #292a36;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.open {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #31324a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchBar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 11px 12px;
|
padding: 11px 12px;
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.35s ease;
|
||||||
outline: none;
|
outline: none;
|
||||||
background-color: transparent;
|
color: #85869b;
|
||||||
color: white;
|
text-align: start;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
outline: none;
|
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
letter-spacing: -0.09px;
|
||||||
caret-color: #575bc7;
|
caret-color: #575bc7;
|
||||||
}
|
}
|
||||||
.searchIcon {
|
.searchBar::placeholder {
|
||||||
position: absolute;
|
color: #85869b;
|
||||||
left: 10;
|
text-align: start;
|
||||||
|
font-family: Inter;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
letter-spacing: -0.09px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.open > .searchBar {
|
||||||
|
opacity: 1;
|
||||||
|
transition-delay: 0.1s;
|
||||||
|
}
|
||||||
|
.searchBtn {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 10px;
|
||||||
|
transform: translateY(-40%);
|
||||||
|
cursor: pointer;
|
||||||
|
color: #858699;
|
||||||
|
}
|
||||||
|
.searchBtn:hover {
|
||||||
|
color: #959aff;
|
||||||
}
|
}
|
||||||
|
|||||||
39
frontend/src/app/components/mobileToggleTab/Toggle.jsx
Normal file
39
frontend/src/app/components/mobileToggleTab/Toggle.jsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import React from "react";
|
||||||
|
import styles from "./styles.module.css";
|
||||||
|
import MobileSearchBar from "@/app/components/mobileSearchBar/MobileSearchBar";
|
||||||
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
import PlusIcon from "../icons/plus";
|
||||||
|
|
||||||
|
const Toggle = ({ tabs = [], activeTab, onChange }) => {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.toggleContainer}>
|
||||||
|
<div className={styles.buttonToggles}>
|
||||||
|
{tabs.map((tab) => (
|
||||||
|
<button
|
||||||
|
key={tab.value}
|
||||||
|
className={`${styles.buttonStyle} ${activeTab === tab.value ? styles.active : ""}`}
|
||||||
|
onClick={() => onChange(tab.value)}
|
||||||
|
>
|
||||||
|
{tab.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{isMobile && activeTab === "permissions" && (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<div className={styles.searchBar}>
|
||||||
|
<MobileSearchBar />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<PlusIcon />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Toggle;
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
.toggleContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 950px) {
|
||||||
|
.toggleContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-self: stretch;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
.buttonToggles {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
flex: 1 0 0;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
.searchBar {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > button {
|
||||||
|
display: flex;
|
||||||
|
padding: 8px;
|
||||||
|
border: none;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: end;
|
||||||
|
gap: 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #27293b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonStyle {
|
||||||
|
display: flex;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
padding: 24px 4px 16px 4px;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 5px;
|
||||||
|
color: #85869b;
|
||||||
|
font-family: Inter;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
letter-spacing: 0.18px;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
border-bottom: 1px solid #959aff;
|
||||||
|
color: #959aff;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ import CredentialsIcon from "../icons/credentials";
|
|||||||
import AgentIcon from "../icons/agent";
|
import AgentIcon from "../icons/agent";
|
||||||
import DownloadIcon from "../icons/download";
|
import DownloadIcon from "../icons/download";
|
||||||
import useNavigations from "@/app/hooks/useNagivation";
|
import useNavigations from "@/app/hooks/useNagivation";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
const [triggerDropDown, setTriggerDropDown] = useState(false);
|
const [triggerDropDown, setTriggerDropDown] = useState(false);
|
||||||
@@ -27,11 +28,15 @@ const Navbar = () => {
|
|||||||
navToHome,
|
navToHome,
|
||||||
navToOrganization,
|
navToOrganization,
|
||||||
navToUsers,
|
navToUsers,
|
||||||
} = useNavigations();
|
} = useNavigations(setTriggerDropDown);
|
||||||
|
|
||||||
|
const pathname = usePathname();
|
||||||
|
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
return (
|
return (
|
||||||
<div className={styles.mainContainer}>
|
<div
|
||||||
|
className={`${styles.mainContainer} ${pathname.includes("/add") ? styles.onAdd : ""}`}
|
||||||
|
>
|
||||||
{/* Mobile Hamburger Button */}
|
{/* Mobile Hamburger Button */}
|
||||||
<div className={styles.mobileHamburger}>
|
<div className={styles.mobileHamburger}>
|
||||||
<div className={styles.hamburgerMenu}>
|
<div className={styles.hamburgerMenu}>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, { useState } from "react";
|
|||||||
import CreateIcon from "../../icons/create";
|
import CreateIcon from "../../icons/create";
|
||||||
import styles from "./styles.module.css";
|
import styles from "./styles.module.css";
|
||||||
import useIsMobile from "@/app/hooks/useIsMobile";
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
import SearchIcon from "../../icons/search";
|
||||||
|
|
||||||
const HeaderDropdown = ({
|
const HeaderDropdown = ({
|
||||||
setOpen,
|
setOpen,
|
||||||
@@ -30,7 +31,7 @@ const HeaderDropdown = ({
|
|||||||
</div>
|
</div>
|
||||||
{/* Search */}
|
{/* Search */}
|
||||||
<div className={styles.srchInputContainer}>
|
<div className={styles.srchInputContainer}>
|
||||||
<div className={styles.srchInputGroup}>
|
<form className={styles.srchInputGroup}>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="18"
|
width="18"
|
||||||
@@ -67,7 +68,7 @@ const HeaderDropdown = ({
|
|||||||
id=""
|
id=""
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
/>
|
/>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
background: #2d3143;
|
background: #2d3143;
|
||||||
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 4;
|
z-index: 30;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
|
background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 90px;
|
top: 80px;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
@@ -16,10 +16,9 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
.profileBadge:hover {
|
.profileBadgeButton:hover {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #21232f;
|
background: #21232f;
|
||||||
background: color(display-p3 0.1294 0.1373 0.1804);
|
|
||||||
}
|
}
|
||||||
.nameRole {
|
.nameRole {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -79,12 +78,10 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #2d3144;
|
background: #2d3144;
|
||||||
background: color(display-p3 0.1787 0.1913 0.2605);
|
|
||||||
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.25);
|
||||||
box-shadow: 0 2px 15px 0 color(display-p3 0 0 0 / 0.25);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 30;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
animation-name: dropDownAnimation;
|
animation-name: dropDownAnimation;
|
||||||
@@ -172,7 +169,7 @@
|
|||||||
gap: 16px;
|
gap: 16px;
|
||||||
background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
|
background: linear-gradient(0deg, #2d3143 0%, #191a24 100%);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 90px;
|
top: 80px;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
@@ -168,4 +168,7 @@
|
|||||||
.hamburgerMenu {
|
.hamburgerMenu {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
.onAdd {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,54 +3,30 @@ import DeleteIcon from "../icons/delete";
|
|||||||
import FileIcon from "../icons/file";
|
import FileIcon from "../icons/file";
|
||||||
import editUserStyle from "./styles.module.css";
|
import editUserStyle from "./styles.module.css";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import PlusIcon from "../icons/plus";
|
||||||
|
|
||||||
const Permissions = ({ sampleData = [] }) => {
|
const Permissions = ({ sampleData = [] }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Permissions */}
|
{/* Permissions */}
|
||||||
<div className={editUserStyle.userPermissions}>
|
<div className={editUserStyle.permissionsContainer}>
|
||||||
{/* Add permissions */}
|
<div className={editUserStyle.permissionsHeader}>
|
||||||
<div className={editUserStyle.imanginaryDiv}></div>
|
<p>Permissions</p>
|
||||||
<div className={editUserStyle.permissionsContainer}>
|
<div className={editUserStyle.svgContainer}>
|
||||||
{/* Header */}
|
{/* Button ni */}
|
||||||
<div className={editUserStyle.permissionsHeader}>
|
<button>
|
||||||
<p>Permissions</p>
|
<PlusIcon />
|
||||||
<div className={editUserStyle.svgContainer}>
|
</button>
|
||||||
<div>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width={24}
|
|
||||||
height={24}
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M12 5.29199V18.7087"
|
|
||||||
stroke="#333649"
|
|
||||||
strokeWidth={2}
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M5.29102 12H18.7077"
|
|
||||||
stroke="#333649"
|
|
||||||
strokeWidth={2}
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{sampleData.length === 0 ? (
|
{sampleData.length === 0 ? (
|
||||||
// Default Message
|
<div className={editUserStyle.permissionDefaultState}>
|
||||||
<div className={editUserStyle.permissionDefaultState}>
|
<p>No permission added yet</p>
|
||||||
<p>No permission added yet</p>
|
</div>
|
||||||
</div>
|
) : (
|
||||||
) : (
|
<div className={editUserStyle.permissionsList}>
|
||||||
// Sampple Data(static)
|
{sampleData.map((perm, index) => {
|
||||||
sampleData.map((perm, index) => {
|
|
||||||
return (
|
return (
|
||||||
<div className={editUserStyle.permissions} key={index}>
|
<div className={editUserStyle.permissions} key={index}>
|
||||||
<div className={editUserStyle.permissionsItem}>
|
<div className={editUserStyle.permissionsItem}>
|
||||||
@@ -62,9 +38,9 @@ const Permissions = ({ sampleData = [] }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})
|
})}
|
||||||
)}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,19 +1,3 @@
|
|||||||
.imanginaryDiv {
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
.userPermissions {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex: 1 0 0;
|
|
||||||
align-self: stretch;
|
|
||||||
border-radius: 6px;
|
|
||||||
height: calc(100vh - 175px);
|
|
||||||
position: relative;
|
|
||||||
overflow: auto;
|
|
||||||
scrollbar-width: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.permissionsContainer {
|
.permissionsContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
@@ -22,7 +6,6 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
background: color(display-p3 0.1138 0.1191 0.1616);
|
|
||||||
}
|
}
|
||||||
.permissionsHeader {
|
.permissionsHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -39,9 +22,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
|
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -58,27 +39,26 @@
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #27293b;
|
background: #27293b;
|
||||||
background: color(display-p3 0.1529 0.1608 0.2275);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.svgContainer > div {
|
.svgContainer > button {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
border: none;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #27293b;
|
background: #27293b;
|
||||||
background: color(display-p3 0.1529 0.1608 0.2275);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.permissionDefaultState {
|
.permissionDefaultState {
|
||||||
display: flex;
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
height: 43.813px;
|
height: 43.813px;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
align-self: stretch;
|
|
||||||
}
|
}
|
||||||
.permissionDefaultState p {
|
.permissionDefaultState p {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -88,29 +68,28 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
.permissionsList {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.permissions {
|
.permissions {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 43.813px;
|
height: 43.813px;
|
||||||
padding: 8px 16px;
|
padding: 8px 8px 8px 16px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-bottom: 0.5px solid #2e3042;
|
border-bottom: 0.5px solid #2e3042;
|
||||||
border-bottom: 0.5px solid color(display-p3 0.1831 0.189 0.2535);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.permissions:hover {
|
.permissions:hover {
|
||||||
border-bottom: 1px solid rgba(129, 135, 255, 0.25);
|
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: rgba(129, 135, 255, 0.05);
|
||||||
background: color(display-p3 0.5098 0.5294 1 / 0.05);
|
|
||||||
}
|
}
|
||||||
.permissionsItem {
|
.permissionsItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -121,7 +100,6 @@
|
|||||||
}
|
}
|
||||||
.permissionsItem > p {
|
.permissionsItem > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -151,35 +129,40 @@
|
|||||||
stroke: color(display-p3 1 1 1);
|
stroke: color(display-p3 1 1 1);
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
border: 1px solid #959aff;
|
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, #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%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.permissionDefaultState {
|
@media (max-width: 768px) {
|
||||||
display: flex;
|
.permissionsContainer {
|
||||||
height: 43.813px;
|
border-radius: 4px;
|
||||||
padding: 8px 16px;
|
padding: 0 0 24px 0;
|
||||||
justify-content: center;
|
}
|
||||||
align-items: center;
|
.permissionsHeader {
|
||||||
align-self: stretch;
|
padding: 12px 16px;
|
||||||
}
|
}
|
||||||
.permissionDefaultState p {
|
|
||||||
display: flex;
|
.permissionsHeader > p {
|
||||||
justify-content: center;
|
color: #fff;
|
||||||
align-items: center;
|
font-size: 18px;
|
||||||
gap: 12px;
|
align-self: stretch;
|
||||||
flex: 1 0 0;
|
}
|
||||||
align-self: stretch;
|
|
||||||
color: #85869b;
|
.svgContainer {
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
display: none;
|
||||||
font-family: Inter;
|
}
|
||||||
font-size: 16px;
|
.permissionDefaultState {
|
||||||
font-style: normal;
|
gap: 12px;
|
||||||
font-weight: 400;
|
align-self: stretch;
|
||||||
line-height: normal;
|
padding: 24px 16px 0 16px;
|
||||||
|
}
|
||||||
|
.permissionsList {
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
.permissions {
|
||||||
|
padding: 8px 16px;
|
||||||
|
}
|
||||||
|
.permissionDefaultState > p {
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import searchBarStyle from "./styles.module.css";
|
import searchBarStyle from "./styles.module.css";
|
||||||
|
import SearchIcon from "../icons/search";
|
||||||
|
|
||||||
const SearchBar = () => {
|
const SearchBar = () => {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
@@ -19,21 +20,7 @@ const SearchBar = () => {
|
|||||||
className={searchBarStyle.searchBtn}
|
className={searchBarStyle.searchBtn}
|
||||||
onClick={() => setOpen((open) => !open)}
|
onClick={() => setOpen((open) => !open)}
|
||||||
>
|
>
|
||||||
<svg
|
<SearchIcon />
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width={24}
|
|
||||||
height={24}
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M19.5527 19.5536L14.7064 14.7074M9.16822 16.7847C13.3741 16.7847 16.7837 13.3751 16.7837 9.1692C16.7837 4.96328 13.3741 1.55371 9.16822 1.55371C4.9623 1.55371 1.55273 4.96328 1.55273 9.1692C1.55273 13.3751 4.9623 16.7847 9.16822 16.7847Z"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth={1.5}
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 40px; /*collapse width*/
|
width: 40px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
height: auto;
|
height: auto;
|
||||||
@@ -10,18 +10,14 @@
|
|||||||
transition: width 0.35s ease;
|
transition: width 0.35s ease;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchBarContainer:focus-within {
|
.searchBarContainer:focus-within {
|
||||||
background: #292a36;
|
background: #292a36;
|
||||||
background: color(display-p3 0.1608 0.1647 0.2078);
|
|
||||||
}
|
}
|
||||||
/* When the searchbar is opened */
|
|
||||||
.open {
|
.open {
|
||||||
width: 260px;
|
width: 260px;
|
||||||
padding: 6px 6px 6px 12px;
|
padding: 6px 6px 6px 12px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border: 1px solid #31324a;
|
border: 1px solid #31324a;
|
||||||
border: 1px solid color(display-p3 0.1922 0.1961 0.2824);
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
.input {
|
.input {
|
||||||
@@ -32,9 +28,8 @@
|
|||||||
opacity: 0; /*hide input kung collapse*/
|
opacity: 0; /*hide input kung collapse*/
|
||||||
transition: opacity 0.35s ease;
|
transition: opacity 0.35s ease;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -49,10 +44,9 @@
|
|||||||
|
|
||||||
.input::placeholder {
|
.input::placeholder {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
|
||||||
text-align: start;
|
text-align: start;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -64,18 +64,14 @@
|
|||||||
.logoDescription > p:nth-child(1) {
|
.logoDescription > p:nth-child(1) {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
color: color(display-p3 1 1 1);
|
color: color(display-p3 1 1 1);
|
||||||
font-size: 15px;
|
font-size: 0.94rem;
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
.logoDescription > p:nth-child(2) {
|
.logoDescription > p:nth-child(2) {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
color: color(display-p3 0.5216 0.5255 0.6);
|
||||||
font-size: 10px;
|
font-size: 0.63rem;
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: normal;
|
|
||||||
letter-spacing: 0.05px;
|
letter-spacing: 0.05px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
@@ -91,11 +87,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
font-family: Inter;
|
font-size: 1rem;
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: normal;
|
|
||||||
border-left: 2px solid #959aff00;
|
border-left: 2px solid #959aff00;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
@@ -112,11 +104,7 @@
|
|||||||
border-left: 2px solid #959aff;
|
border-left: 2px solid #959aff;
|
||||||
background: rgba(149, 154, 255, 0.05);
|
background: rgba(149, 154, 255, 0.05);
|
||||||
color: #959aff;
|
color: #959aff;
|
||||||
font-family: Inter;
|
font-size: 1rem;
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: normal;
|
|
||||||
}
|
}
|
||||||
.active:hover path {
|
.active:hover path {
|
||||||
stroke: #969af9;
|
stroke: #969af9;
|
||||||
@@ -153,11 +141,8 @@
|
|||||||
}
|
}
|
||||||
.navFooterContainer > div > div > p {
|
.navFooterContainer > div > div > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-family: Inter;
|
font-size: 1rem;
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
|
||||||
}
|
}
|
||||||
.collapsed {
|
.collapsed {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 25px;
|
bottom: 25px;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
right: 20px;
|
right: 10px;
|
||||||
animation-name: showToast;
|
animation-name: showToast;
|
||||||
animation-duration: 0.15s;
|
animation-duration: 0.15s;
|
||||||
animation-timing-function: ease-in-out;
|
animation-timing-function: ease-in-out;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
.messageContainer p {
|
.messageContainer p {
|
||||||
color: #006929;
|
color: #006929;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -47,8 +47,12 @@ const TopHeader = (props) => {
|
|||||||
editState={editState}
|
editState={editState}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className={styles.container}>
|
<div
|
||||||
<div className={styles.title}>
|
className={`${styles.container} ${pathName.includes("/add") ? styles.column : ""}`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={`${styles.title} ${pathName.includes("/add") ? styles.fullWidth : ""}`}
|
||||||
|
>
|
||||||
{props.requiredButtons.includes("back") && (
|
{props.requiredButtons.includes("back") && (
|
||||||
<div onClick={() => router.back()}>
|
<div onClick={() => router.back()}>
|
||||||
<BackIcon />
|
<BackIcon />
|
||||||
@@ -56,7 +60,9 @@ const TopHeader = (props) => {
|
|||||||
)}
|
)}
|
||||||
<p>{props.topbarTitle}</p>
|
<p>{props.topbarTitle}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.actionBar}>
|
<div
|
||||||
|
className={`${styles.actionBar} ${pathName.includes("/add") ? styles.fullWidth : ""}`}
|
||||||
|
>
|
||||||
{props?.requiredButtons.includes("search") && (
|
{props?.requiredButtons.includes("search") && (
|
||||||
<div className={styles.searchBarContainer}>
|
<div className={styles.searchBarContainer}>
|
||||||
{!isMobile && <SearchBar />}
|
{!isMobile && <SearchBar />}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
padding: 24px;
|
padding: 24px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
background: #21232f;
|
background: #21232f;
|
||||||
transition: all 0.15s;
|
transition: all 0.15s;
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
.searchBarContainer {
|
.searchBarContainer {
|
||||||
@@ -171,7 +173,19 @@
|
|||||||
}
|
}
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
background: #21232f00;
|
background: linear-gradient(180deg, #1c1d2b 0%, #191a24 100%);
|
||||||
|
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
.column {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.fullWidth {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.fullWidth > button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import TextField from "@/app/components/fields/textfield";
|
|||||||
import Prompts from "@/app/components/prompts/Prompts";
|
import Prompts from "@/app/components/prompts/Prompts";
|
||||||
import useRoleForm from "@/app/hooks/useRolesForm";
|
import useRoleForm from "@/app/hooks/useRolesForm";
|
||||||
import Alert from "@/app/components/alerts/Alert";
|
import Alert from "@/app/components/alerts/Alert";
|
||||||
|
import useIsMobile from "@/app/hooks/useIsMobile";
|
||||||
|
|
||||||
const AddCredentialPage = () => {
|
const AddCredentialPage = () => {
|
||||||
const {
|
const {
|
||||||
@@ -18,7 +19,10 @@ const AddCredentialPage = () => {
|
|||||||
triggerAlert,
|
triggerAlert,
|
||||||
setTriggerAlert,
|
setTriggerAlert,
|
||||||
} = useRoleForm();
|
} = useRoleForm();
|
||||||
|
|
||||||
const [selectedFile, setSelectedFile] = useState(null);
|
const [selectedFile, setSelectedFile] = useState(null);
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
// Click
|
// Click
|
||||||
const handleFileChange = (e) => {
|
const handleFileChange = (e) => {
|
||||||
const file = e.target.files[0];
|
const file = e.target.files[0];
|
||||||
@@ -27,6 +31,7 @@ const AddCredentialPage = () => {
|
|||||||
console.log(file); //send this to backend later
|
console.log(file); //send this to backend later
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Drag/Drop
|
// Drag/Drop
|
||||||
const handleDrop = (e) => {
|
const handleDrop = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -39,6 +44,7 @@ const AddCredentialPage = () => {
|
|||||||
const handleDragOver = (e) => {
|
const handleDragOver = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={globalStyle.section}>
|
<div className={globalStyle.section}>
|
||||||
{triggerAlert && (
|
{triggerAlert && (
|
||||||
@@ -59,7 +65,7 @@ const AddCredentialPage = () => {
|
|||||||
/>
|
/>
|
||||||
{/* Create Crediantial Container */}
|
{/* Create Crediantial Container */}
|
||||||
<div className={createCredStyle.createCredContainer}>
|
<div className={createCredStyle.createCredContainer}>
|
||||||
<TopToolTip />
|
{isMobile ? "" : <TopToolTip />}
|
||||||
<form
|
<form
|
||||||
className={createCredStyle.inputFieldContainer}
|
className={createCredStyle.inputFieldContainer}
|
||||||
id="form"
|
id="form"
|
||||||
@@ -81,13 +87,11 @@ const AddCredentialPage = () => {
|
|||||||
<Prompts show={false} />
|
<Prompts show={false} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Upload File */}
|
|
||||||
<div className={createCredStyle.uploadFile}>
|
<div className={createCredStyle.uploadFile}>
|
||||||
{/* Label */}
|
|
||||||
<div className={createCredStyle.label}>
|
<div className={createCredStyle.label}>
|
||||||
<p>Upload File</p>
|
<p className={createCredStyle.labelTxt}>Upload File</p>
|
||||||
{/* Optional or Required */}
|
{/* Optional or Required */}
|
||||||
<p className={createCredStyle.optionalTxt}>(Optional)</p>{" "}
|
{/* <p className={createCredStyle.optionalTxt}>(Optional)</p>{" "} */}
|
||||||
</div>
|
</div>
|
||||||
{/* Upload File */}
|
{/* Upload File */}
|
||||||
<label
|
<label
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -31,7 +32,6 @@
|
|||||||
}
|
}
|
||||||
.labelTxt {
|
.labelTxt {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -60,9 +60,8 @@
|
|||||||
}
|
}
|
||||||
.label > .optionalTxt {
|
.label > .optionalTxt {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16 px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -77,22 +76,18 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px dashed #5980f1;
|
border: 2px dashed #5980f1;
|
||||||
border: 2px dashed color(display-p3 0.3804 0.4959 0.9137);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.upload:hover {
|
.upload:hover {
|
||||||
background: rgba(129, 135, 255, 0.25);
|
background: rgba(129, 135, 255, 0.25);
|
||||||
background: color(display-p3 0.5098 0.5294 1 / 0.25);
|
|
||||||
}
|
}
|
||||||
.upload:hover .chooseTxt {
|
.upload:hover .chooseTxt {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
color: color(display-p3 1 1 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chooseTxt {
|
.chooseTxt {
|
||||||
color: #5980f1;
|
color: #5980f1;
|
||||||
color: color(display-p3 0.3804 0.4959 0.9137);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -104,7 +99,6 @@
|
|||||||
|
|
||||||
.dragTxt {
|
.dragTxt {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
color: color(display-p3 0.5216 0.5255 0.6);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -113,3 +107,28 @@
|
|||||||
line-height: normal;
|
line-height: normal;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Mobile */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.createCredContainer {
|
||||||
|
padding: 32px 16px 0 16px;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputFieldContainer {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 0px;
|
||||||
|
gap: 24px;
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.projectName {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload {
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const Card = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
<p>Organization ID</p>
|
<p>Organization ID</p>
|
||||||
<p>{props?.data?.organizationId}</p>
|
<p>{props?.data?.organizationID}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.cardAction}>
|
<div className={styles.cardAction}>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
.tableContainer > table > tbody > tr > td {
|
.tableContainer > table > tbody > tr > td {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
.tableContainer > table > thead > tr > th {
|
.tableContainer > table > thead > tr > th {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ html,
|
|||||||
body {
|
body {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
font-size: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -1,36 +1,22 @@
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
const useNavigations = () => {
|
|
||||||
|
export default function useNavigations(setTriggerDropDown) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const navToHome = () => {
|
|
||||||
router.push("/home");
|
const handleNav = (path) => {
|
||||||
};
|
if (setTriggerDropDown) {
|
||||||
const navToOrganization = () => {
|
setTriggerDropDown(false);
|
||||||
router.push("/organization");
|
}
|
||||||
};
|
router.push(path);
|
||||||
const navToProject = () => {
|
|
||||||
router.push("/projects");
|
|
||||||
};
|
|
||||||
const navToUsers = () => {
|
|
||||||
router.push("/users");
|
|
||||||
};
|
|
||||||
const navToRoles = () => {
|
|
||||||
router.push("/roles");
|
|
||||||
};
|
|
||||||
const navToCredentials = () => {
|
|
||||||
router.push("/credentials");
|
|
||||||
};
|
|
||||||
const navToAgents = () => {
|
|
||||||
router.push("/agents");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
navToHome,
|
navToHome: () => handleNav("/home"),
|
||||||
navToAgents,
|
navToAgents: () => handleNav("/agents"),
|
||||||
navToCredentials,
|
navToCredentials: () => handleNav("/credentials"),
|
||||||
navToOrganization,
|
navToProject: () => handleNav("/projects"),
|
||||||
navToProject,
|
navToRoles: () => handleNav("/roles"),
|
||||||
navToRoles,
|
navToOrganization: () => handleNav("/organization"),
|
||||||
navToUsers,
|
navToUsers: () => handleNav("/users"),
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
export default useNavigations;
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 48px;
|
gap: 48px;
|
||||||
flex: 1 0 0;
|
|
||||||
|
height: calc(100vh - 170px);
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.upperToolTips {
|
.upperToolTips {
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
color: #191a24;
|
color: #191a24;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -107,7 +108,7 @@
|
|||||||
.labels > p {
|
.labels > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -115,7 +116,7 @@
|
|||||||
.labels > p span {
|
.labels > p span {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
.inputLabel > p {
|
.inputLabel > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -164,7 +165,7 @@
|
|||||||
.prompts > p {
|
.prompts > p {
|
||||||
color: #d49e3d;
|
color: #d49e3d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.85rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
.list p {
|
.list p {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.85rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
.list p:nth-child(2) {
|
.list p:nth-child(2) {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.cardAction {
|
.cardAction {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
.tableContainer > table > tbody > tr > td {
|
.tableContainer > table > tbody > tr > td {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
.tableContainer > table > thead > tr > th {
|
.tableContainer > table > thead > tr > th {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
color: color(display-p3 0.8235 0.8275 0.8784);
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
.label > p span {
|
.label > p span {
|
||||||
color: #cfb000;
|
color: #cfb000;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
.prompts > p {
|
.prompts > p {
|
||||||
color: #d49e3d;
|
color: #d49e3d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.85rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
.list p {
|
.list p {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.85rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
.list p:nth-child(2) {
|
.list p:nth-child(2) {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.cardAction {
|
.cardAction {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
.tableContainer > table > tbody > tr > td {
|
.tableContainer > table > tbody > tr > td {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
.tableContainer > table > thead > tr > th {
|
.tableContainer > table > thead > tr > th {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
color: #50d85f;
|
color: #50d85f;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
|
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
|
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
}
|
}
|
||||||
.header > div > p {
|
.header > div > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 24px;
|
font-size: 1.5rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
gap: 4px;
|
gap: 4px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 14px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
}
|
}
|
||||||
.listDetails > p {
|
.listDetails > p {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 13px;
|
font-size: 0.83rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
}
|
}
|
||||||
.listDetails > div > p {
|
.listDetails > div > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 18px;
|
font-size: 1.2rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
}
|
}
|
||||||
.listDetails > div > div > p {
|
.listDetails > div > div > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 14px;
|
font-size: 0.85rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
"liga" off,
|
"liga" off,
|
||||||
"clig" off;
|
"clig" off;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 12px;
|
font-size: 0.7rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 22px; /* 183.333% */
|
line-height: 22px; /* 183.333% */
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import variableStyles from "./variableStyles.module.css";
|
import variableStyles from "./variableStyles.module.css";
|
||||||
|
import DeleteIcon from "@/app/components/icons/delete";
|
||||||
const Settings = ({
|
const Settings = ({
|
||||||
setTriggerAddVariable,
|
setTriggerAddVariable,
|
||||||
setTriggerAddVolume,
|
setTriggerAddVolume,
|
||||||
@@ -8,7 +9,29 @@ const Settings = ({
|
|||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false);
|
const [triggerVariableDropDown, setTriggerVariableDropDown] = useState(false);
|
||||||
|
const sampleData = [
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
{ id: 1, key: "REQUEST_SERVICE_GRPC", value: "request-service:50053" },
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
key: "DatabaseSettings:ConnectionString",
|
||||||
|
value:
|
||||||
|
"mongodb://databaseAdmin:d2OIxck4DHZgOJNuk1A@129.212.210.84:27017/?authSource=admin",
|
||||||
|
},
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div {...props}>
|
<div {...props}>
|
||||||
<div className={variableStyles.variablesHeader}>
|
<div className={variableStyles.variablesHeader}>
|
||||||
@@ -111,16 +134,19 @@ const Settings = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={variableStyles.variableList}>
|
<div className={variableStyles.variableList}>
|
||||||
<div className={variableStyles.emptyVariableList}>
|
{/* <div className={variableStyles.emptyVariableList}>
|
||||||
<div>
|
<div>
|
||||||
<p>No Environment Variables added</p>
|
<p>No Environment Variables added</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
{/* <div className={variableStyles.variable}>
|
{sampleData.map((data, key) => {
|
||||||
<p>REQUEST_SERVICE_GRPC</p>
|
return (
|
||||||
<p>request-service:50053</p>
|
<div className={variableStyles.variable}>
|
||||||
<DeleteIcon />
|
<p>{data.key}</p>
|
||||||
</div> */}
|
<p>{data.value}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
border: 1px solid #4b4f6d;
|
border: 1px solid #4b4f6d;
|
||||||
resize: none;
|
resize: none;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-family: inter;
|
font-family: inter;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -98,6 +98,9 @@
|
|||||||
letter-spacing: 0.16px;
|
letter-spacing: 0.16px;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
.textarea::placeholder {
|
||||||
|
color: #85869b;
|
||||||
|
}
|
||||||
.textarea:focus {
|
.textarea:focus {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid #959aff;
|
border: 1px solid #959aff;
|
||||||
@@ -106,7 +109,7 @@
|
|||||||
.textarea:focus::placeholder {
|
.textarea:focus::placeholder {
|
||||||
color: #4b4f6d;
|
color: #4b4f6d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -128,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
.projectDetailsHeader p {
|
.projectDetailsHeader p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 20px;
|
font-size: 1.25rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -176,7 +179,7 @@
|
|||||||
.fieldsCreateNew > div > div p,
|
.fieldsCreateNew > div > div p,
|
||||||
.resourceFields > div > div p {
|
.resourceFields > div > div p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -199,7 +202,7 @@
|
|||||||
border: 1px dashed #5980f1;
|
border: 1px dashed #5980f1;
|
||||||
color: #5980f1;
|
color: #5980f1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -250,7 +253,7 @@
|
|||||||
|
|
||||||
.additionalDetailsHeader p {
|
.additionalDetailsHeader p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 20px;
|
font-size: 1.25rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -287,7 +290,7 @@
|
|||||||
}
|
}
|
||||||
.additionalDetailsFields p {
|
.additionalDetailsFields p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -321,4 +324,10 @@
|
|||||||
.resourceFields .inputGroup div {
|
.resourceFields .inputGroup div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.projectDetailsHeader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.fieldsContainerCreateNew {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
.searchInputGroup input {
|
.searchInputGroup input {
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: #acb0ff;
|
color: #acb0ff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
color: #acb0ff;
|
color: #acb0ff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -151,26 +151,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
}
|
}
|
||||||
.variable {
|
|
||||||
display: flex;
|
|
||||||
padding: 8px 0;
|
|
||||||
align-items: center;
|
|
||||||
align-self: stretch;
|
|
||||||
border-bottom: 0.5px solid #2e3042;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.variable p {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex: 1 0 0;
|
|
||||||
align-self: stretch;
|
|
||||||
color: #d2d3e1;
|
|
||||||
font-size: 15px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: normal;
|
|
||||||
letter-spacing: 0.15px;
|
|
||||||
}
|
|
||||||
.environmentVariablesContainer {
|
.environmentVariablesContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
@@ -195,23 +176,25 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
.envVariablesHeader {
|
.envVariablesHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
padding: 12px 24px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
flex-direction: column;
|
||||||
|
border-bottom: 1px solid #2c2e3f;
|
||||||
}
|
}
|
||||||
.envVariablesHeader > div {
|
.envVariablesHeader > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 12px 16px;
|
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-bottom: 1px solid #2c2e3f;
|
|
||||||
}
|
}
|
||||||
.envVariablesHeader > div p {
|
.envVariablesHeader > div p {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -219,23 +202,50 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 15px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
.variableList {
|
.variableList {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 16px 16px 16px;
|
|
||||||
|
padding: 24px 24px 0 24px;
|
||||||
|
|
||||||
|
padding-bottom: 24px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
flex: 1 0 0;
|
||||||
|
}
|
||||||
|
.variable {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.variable p {
|
||||||
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
|
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
color: #d2d3e1;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
letter-spacing: 0.15px;
|
||||||
}
|
}
|
||||||
.emptyVariableList {
|
.emptyVariableList {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 24px 16px 0 16px;
|
padding: 24px 16px 0 16px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
}
|
}
|
||||||
@@ -243,6 +253,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.emptyVariableList > div > div {
|
.emptyVariableList > div > div {
|
||||||
@@ -252,7 +263,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
}
|
}
|
||||||
.projectDetailsHeader p {
|
.projectDetailsHeader p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 20px;
|
font-size: 1.25rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
border: 1px solid #4b4f6d;
|
border: 1px solid #4b4f6d;
|
||||||
resize: none;
|
resize: none;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-family: inter;
|
font-family: inter;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -129,6 +129,9 @@
|
|||||||
letter-spacing: 0.16px;
|
letter-spacing: 0.16px;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
.textarea::placeholder {
|
||||||
|
color: #85869b;
|
||||||
|
}
|
||||||
.textarea:focus {
|
.textarea:focus {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid #959aff;
|
border: 1px solid #959aff;
|
||||||
@@ -137,7 +140,7 @@
|
|||||||
.textarea:focus::placeholder {
|
.textarea:focus::placeholder {
|
||||||
color: #4b4f6d;
|
color: #4b4f6d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -184,7 +187,7 @@
|
|||||||
.fieldsCreateNew > div > div p,
|
.fieldsCreateNew > div > div p,
|
||||||
.resourceFields > div > div p {
|
.resourceFields > div > div p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -207,7 +210,7 @@
|
|||||||
border: 1px dashed #5980f1;
|
border: 1px dashed #5980f1;
|
||||||
color: #5980f1;
|
color: #5980f1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -258,7 +261,7 @@
|
|||||||
|
|
||||||
.additionalDetailsHeader p {
|
.additionalDetailsHeader p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 20px;
|
font-size: 1.25rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -295,7 +298,7 @@
|
|||||||
}
|
}
|
||||||
.additionalDetailsFields p {
|
.additionalDetailsFields p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -329,4 +332,10 @@
|
|||||||
.resourceFields .inputGroup div {
|
.resourceFields .inputGroup div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.projectDetailsHeader {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.fieldsContainerCreateNew {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
.searchInputGroup input {
|
.searchInputGroup input {
|
||||||
color: white;
|
color: white;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: #acb0ff;
|
color: #acb0ff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
color: #acb0ff;
|
color: #acb0ff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 15px;
|
font-size: 0.9rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 18px;
|
font-size: 1.18rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 15px;
|
font-size: 0.93rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -111,34 +111,36 @@ const AddProject = () => {
|
|||||||
"services-drop-down",
|
"services-drop-down",
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
{isMobile ? (
|
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer}>
|
||||||
<MobileSearchBar />
|
<MobileSearchBar />
|
||||||
{sampleData.map((data, key) => (
|
{isMobile &&
|
||||||
|
sampleData.map((data, key) => (
|
||||||
<Card
|
<Card
|
||||||
data={data}
|
data={data}
|
||||||
key={key}
|
key={key}
|
||||||
onClick={() => router.push(`${pathName}/${data.id}`)}
|
onClick={() => router.push(`${pathName}/${data.id}`)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
|
||||||
<div className={styles.tableContainer}>
|
<div className={styles.tableContainer}>
|
||||||
<table className={styles.table}>
|
<table className={styles.table}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Version</th>
|
<th>Version</th>
|
||||||
<th>Health</th>
|
<th>Health</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th width="10%">Image</th>
|
<th width="10%">Image</th>
|
||||||
<th>Ingress</th>
|
<th>Ingress</th>
|
||||||
<th>Port</th>
|
<th>Port</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{sampleData.map((services, index) => {
|
{!isMobile &&
|
||||||
|
sampleData.map((services, index) => {
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={index}
|
key={index}
|
||||||
@@ -380,10 +382,9 @@ const AddProject = () => {
|
|||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
.list > p {
|
.list > p {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 14px;
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
.list > p:nth-child(2) {
|
.list > p:nth-child(2) {
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.cardAction {
|
.cardAction {
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
background: rgba(22, 159, 49, 0.05);
|
background: rgba(22, 159, 49, 0.05);
|
||||||
color: #179f31;
|
color: #179f31;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 12px;
|
font-size: 0.63rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
gap: 4px;
|
gap: 4px;
|
||||||
color: #179f31;
|
color: #179f31;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 10px;
|
font-size: 0.6rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
|
|
||||||
font-size: var(--table-font-size);
|
font-size: 0.8rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
background: rgba(22, 159, 49, 0.05);
|
background: rgba(22, 159, 49, 0.05);
|
||||||
color: #179f31;
|
color: #179f31;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 12px;
|
font-size: 0.65rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
gap: 4px;
|
gap: 4px;
|
||||||
color: #179f31;
|
color: #179f31;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 10px;
|
font-size: 0.65rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.cardContainer {
|
.cardContainer {
|
||||||
display: flex;
|
display: none;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
height: calc(100vh - 170px);
|
height: calc(100vh - 170px);
|
||||||
@@ -198,3 +198,11 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cardContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tableContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
.header > p {
|
.header > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 24px;
|
font-size: 1.5rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
}
|
}
|
||||||
.verticalInput p {
|
.verticalInput p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
border: 1px solid #4b4f6d;
|
border: 1px solid #4b4f6d;
|
||||||
resize: none;
|
resize: none;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-family: inter;
|
font-family: inter;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
.verticalInput textarea:focus::placeholder {
|
.verticalInput textarea:focus::placeholder {
|
||||||
color: #4b4f6d;
|
color: #4b4f6d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -112,6 +112,14 @@ const AddVariableModal = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className={styles.verticalInput}>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<p>Custom Port (Optional)</p>
|
||||||
|
</div>
|
||||||
|
<TextField placeHolder="Leave empty to use service’s default port" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
.header > p {
|
.header > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 24px;
|
font-size: 1.5rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -106,6 +106,9 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
.horizontalInput {
|
.horizontalInput {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -146,7 +149,7 @@
|
|||||||
}
|
}
|
||||||
.verticalInput p {
|
.verticalInput p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -167,7 +170,7 @@
|
|||||||
border: 1px solid #4b4f6d;
|
border: 1px solid #4b4f6d;
|
||||||
resize: none;
|
resize: none;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-family: inter;
|
font-family: inter;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -183,7 +186,7 @@
|
|||||||
.verticalInput textarea:focus::placeholder {
|
.verticalInput textarea:focus::placeholder {
|
||||||
color: #4b4f6d;
|
color: #4b4f6d;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -197,8 +200,7 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.authenticationContainer > p {
|
.authenticationContainer > p {
|
||||||
color: #85869b;
|
font-size: 1rem;
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
.header > p {
|
.header > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 24px;
|
font-size: 1.5rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
.verticalInput p {
|
.verticalInput p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
border: 1px solid #4b4f6d;
|
border: 1px solid #4b4f6d;
|
||||||
resize: none;
|
resize: none;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-family: inter;
|
font-family: inter;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
}
|
}
|
||||||
.authenticationContainer > p {
|
.authenticationContainer > p {
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-size: 16px;
|
font-size: 1rem;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import React from "react";
|
"use client";
|
||||||
|
import React, { useState } from "react";
|
||||||
import TopHeader from "@/app/components/topHeader/TopHeader";
|
import TopHeader from "@/app/components/topHeader/TopHeader";
|
||||||
import globalStyle from "../../globalStyle.module.css";
|
import globalStyle from "../../globalStyle.module.css";
|
||||||
import editRoleStyle from "./styles.module.css";
|
import editRoleStyle from "./styles.module.css";
|
||||||
import TextField from "@/app/components/fields/textfield";
|
import TextField from "@/app/components/fields/textfield";
|
||||||
import Permissions from "@/app/components/permissions/Permissions";
|
import Permissions from "@/app/components/permissions/Permissions";
|
||||||
|
import Toggle from "@/app/components/mobileToggleTab/Toggle";
|
||||||
|
|
||||||
const ViewRolePage = () => {
|
const ViewRolePage = () => {
|
||||||
const sampleData = [
|
const sampleData = [
|
||||||
@@ -22,6 +24,8 @@ const ViewRolePage = () => {
|
|||||||
{ permission: "service.delete" },
|
{ permission: "service.delete" },
|
||||||
{ permission: "service.update" },
|
{ permission: "service.update" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const [activeTab, setActiveTab] = useState("details");
|
||||||
return (
|
return (
|
||||||
<div className={globalStyle.section}>
|
<div className={globalStyle.section}>
|
||||||
<div className={globalStyle.mainContainer}>
|
<div className={globalStyle.mainContainer}>
|
||||||
@@ -32,23 +36,30 @@ const ViewRolePage = () => {
|
|||||||
state="view"
|
state="view"
|
||||||
requiredButtons={["back", "title", "edit", "download"]}
|
requiredButtons={["back", "title", "edit", "download"]}
|
||||||
/>
|
/>
|
||||||
<div className={editRoleStyle.addRoleContainer}>
|
<div className={editRoleStyle.editRoleContainer}>
|
||||||
|
{/* Mobile Toggle */}
|
||||||
|
<Toggle
|
||||||
|
activeTab={activeTab}
|
||||||
|
onChange={setActiveTab}
|
||||||
|
tabs={[
|
||||||
|
{ label: "Role Details", value: "details" },
|
||||||
|
{ label: "Permissions", value: "permissions" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
{/* Input fields Container */}
|
{/* Input fields Container */}
|
||||||
<div className={editRoleStyle.inputFieldContainer}>
|
<div className={editRoleStyle.inputFieldContainer}>
|
||||||
{/* User Details */}
|
{/* User Details */}
|
||||||
<div className={editRoleStyle.userDetails}>
|
<div
|
||||||
{/* Header */}
|
className={`${editRoleStyle.roleDetails} ${activeTab !== "details" ? editRoleStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
<div className={editRoleStyle.header}>
|
<div className={editRoleStyle.header}>
|
||||||
<div>
|
<div>
|
||||||
<p>Role Details</p>
|
<p>Role Details</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Input fields */}
|
|
||||||
<form className={editRoleStyle.fields}>
|
<form className={editRoleStyle.fields}>
|
||||||
{/* Email */}
|
|
||||||
<div className={editRoleStyle.inputMainContainer}>
|
<div className={editRoleStyle.inputMainContainer}>
|
||||||
<div className={editRoleStyle.inputContainer}>
|
<div className={editRoleStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={editRoleStyle.label}>
|
<div className={editRoleStyle.label}>
|
||||||
<p>Name</p>
|
<p>Name</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,7 +88,12 @@ const ViewRolePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Permissions */}
|
{/* Permissions */}
|
||||||
<Permissions sampleData={sampleData} />
|
<div
|
||||||
|
className={`${editRoleStyle.userPermissions} ${activeTab !== "permissions" ? editRoleStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
|
<div className={editRoleStyle.imanginaryDiv}></div>
|
||||||
|
<Permissions sampleData={sampleData} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.addRoleContainer {
|
.editRoleContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0px 144px 0px 144px;
|
padding: 0px 144px 0px 144px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.userDetails {
|
.roleDetails {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 20px 24px 48px 24px;
|
padding: 20px 24px 48px 24px;
|
||||||
@@ -23,6 +23,21 @@
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
}
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
height: calc(100vh - 175px);
|
||||||
|
position: relative;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 24px;
|
padding-bottom: 24px;
|
||||||
@@ -41,7 +56,6 @@
|
|||||||
.header > div > p {
|
.header > div > p {
|
||||||
width: 163px;
|
width: 163px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -78,7 +92,6 @@
|
|||||||
}
|
}
|
||||||
.label > p {
|
.label > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -93,6 +106,36 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imanginaryDiv {
|
@media (max-width: 950px) {
|
||||||
padding: 18px;
|
.hiddenMobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.editRoleContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
padding: 0 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0px;
|
||||||
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.roleDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
margin-top: 32x;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userPermissions {
|
||||||
|
height: calc(100vh - 295px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.roleDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import TopHeader from "@/app/components/topHeader/TopHeader";
|
import TopHeader from "@/app/components/topHeader/TopHeader";
|
||||||
import globalStyle from "../../globalStyle.module.css";
|
import globalStyle from "../../globalStyle.module.css";
|
||||||
import addRoleStyle from "./styles.module.css";
|
import addRoleStyle from "./styles.module.css";
|
||||||
@@ -7,8 +7,11 @@ import TextField from "@/app/components/fields/textfield";
|
|||||||
import Permissions from "@/app/components/permissions/Permissions";
|
import Permissions from "@/app/components/permissions/Permissions";
|
||||||
import useUserForm from "@/app/hooks/useUserForm";
|
import useUserForm from "@/app/hooks/useUserForm";
|
||||||
import Alert from "@/app/components/alerts/Alert";
|
import Alert from "@/app/components/alerts/Alert";
|
||||||
|
import Toggle from "@/app/components/mobileToggleTab/Toggle";
|
||||||
|
|
||||||
const AddRolePage = () => {
|
const AddRolePage = () => {
|
||||||
|
// Mobile
|
||||||
|
const [activeTab, setActiveTab] = useState("details");
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -36,30 +39,36 @@ const AddRolePage = () => {
|
|||||||
requiredButtons={["title", "save"]}
|
requiredButtons={["title", "save"]}
|
||||||
/>
|
/>
|
||||||
<div className={addRoleStyle.addRoleContainer}>
|
<div className={addRoleStyle.addRoleContainer}>
|
||||||
|
<Toggle
|
||||||
|
activeTab={activeTab}
|
||||||
|
onChange={setActiveTab}
|
||||||
|
tabs={[
|
||||||
|
{ label: "Role Details", value: "details" },
|
||||||
|
{ label: "Permissions", value: "permissions" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
{/* Input fields Container */}
|
{/* Input fields Container */}
|
||||||
<div className={addRoleStyle.inputFieldContainer}>
|
<div className={addRoleStyle.inputFieldContainer}>
|
||||||
{/* User Details */}
|
{/* User Details */}
|
||||||
<div className={addRoleStyle.roleDetails}>
|
<div
|
||||||
{/* Header */}
|
className={`${addRoleStyle.roleDetails} ${activeTab !== "details" ? addRoleStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
<div className={addRoleStyle.header}>
|
<div className={addRoleStyle.header}>
|
||||||
<div>
|
<div>
|
||||||
<p>Role Details</p>
|
<p>Role Details</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Input fields */}
|
{/* Ibalhin ning form na tag */}
|
||||||
<form
|
<form
|
||||||
className={addRoleStyle.fields}
|
className={addRoleStyle.fields}
|
||||||
id="form"
|
id="form"
|
||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmit)}
|
||||||
>
|
>
|
||||||
{/* Email */}
|
|
||||||
<div className={addRoleStyle.inputMainContainer}>
|
<div className={addRoleStyle.inputMainContainer}>
|
||||||
<div className={addRoleStyle.inputContainer}>
|
<div className={addRoleStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={addRoleStyle.label}>
|
<div className={addRoleStyle.label}>
|
||||||
<p>Name</p>
|
<p>Name</p>
|
||||||
</div>
|
</div>
|
||||||
{/* Input field */}
|
|
||||||
<div className={addRoleStyle.inputField}>
|
<div className={addRoleStyle.inputField}>
|
||||||
<TextField
|
<TextField
|
||||||
placeHolder="Enter name"
|
placeHolder="Enter name"
|
||||||
@@ -69,14 +78,11 @@ const AddRolePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Full Name */}
|
|
||||||
<div className={addRoleStyle.inputMainContainer}>
|
<div className={addRoleStyle.inputMainContainer}>
|
||||||
<div className={addRoleStyle.inputContainer}>
|
<div className={addRoleStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={addRoleStyle.label}>
|
<div className={addRoleStyle.label}>
|
||||||
<p>Organization ID</p>
|
<p>Organization ID</p>
|
||||||
</div>
|
</div>
|
||||||
{/* Input field */}
|
|
||||||
<div className={addRoleStyle.inputField}>
|
<div className={addRoleStyle.inputField}>
|
||||||
<TextField
|
<TextField
|
||||||
placeHolder="Enter organization ID"
|
placeHolder="Enter organization ID"
|
||||||
@@ -90,7 +96,12 @@ const AddRolePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Permissions */}
|
{/* Permissions */}
|
||||||
<Permissions />
|
<div
|
||||||
|
className={`${addRoleStyle.userPermissions} ${activeTab !== "permissions" ? addRoleStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
|
<div className={addRoleStyle.imanginaryDiv}></div>
|
||||||
|
<Permissions />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,21 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
background: color(display-p3 0.1137 0.1176 0.1608);
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
height: calc(100vh - 175px);
|
||||||
|
position: relative;
|
||||||
|
overflow: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
padding-bottom: 60px;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -42,7 +56,6 @@
|
|||||||
.header > div > p {
|
.header > div > p {
|
||||||
width: 163px;
|
width: 163px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -79,7 +92,6 @@
|
|||||||
}
|
}
|
||||||
.label > p {
|
.label > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -93,6 +105,35 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.imanginaryDiv {
|
@media (max-width: 950px) {
|
||||||
padding: 18px;
|
.hiddenMobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.addRoleContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
padding: 0 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0px;
|
||||||
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.roleDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
height: calc(100vh - 295px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.roleDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,37 +9,34 @@ import ViewIcon from "../components/icons/view";
|
|||||||
import DeleteIcon from "../components/icons/delete";
|
import DeleteIcon from "../components/icons/delete";
|
||||||
import SuccessToast from "../components/toast/success/successToast";
|
import SuccessToast from "../components/toast/success/successToast";
|
||||||
import ActionButton from "../components/actionButton/ActionButton";
|
import ActionButton from "../components/actionButton/ActionButton";
|
||||||
|
import MobileSearchBar from "../components/mobileSearchBar/MobileSearchBar";
|
||||||
|
import Card from "./role-card/Card";
|
||||||
|
|
||||||
const RolesPage = () => {
|
const RolesPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const sampleData = [
|
const sampleData = [
|
||||||
{
|
{
|
||||||
id: 1,
|
|
||||||
name: "organization-owner",
|
name: "organization-owner",
|
||||||
orgId: "67160a5ae69144ff19aafb86",
|
orgId: "67160a5ae69144ff19aafb86",
|
||||||
permissions: "35 Permissions",
|
permissions: "35 Permissions",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
|
||||||
name: "organization-owner",
|
name: "organization-owner",
|
||||||
orgId: "67160a5ae69144ff19aafb86",
|
orgId: "67160a5ae69144ff19aafb86",
|
||||||
permissions: "35 Permissions",
|
permissions: "35 Permissions",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
|
||||||
name: "organization-owner",
|
name: "organization-owner",
|
||||||
orgId: "67160a5ae69144ff19aafb86",
|
orgId: "67160a5ae69144ff19aafb86",
|
||||||
permissions: "35 Permissions",
|
permissions: "35 Permissions",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
|
||||||
name: "organization-owner",
|
name: "organization-owner",
|
||||||
orgId: "67160a5ae69144ff19aafb86",
|
orgId: "67160a5ae69144ff19aafb86",
|
||||||
permissions: "35 Permissions",
|
permissions: "35 Permissions",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
|
||||||
name: "organization-owner",
|
name: "organization-owner",
|
||||||
orgId: "67160a5ae69144ff19aafb86",
|
orgId: "67160a5ae69144ff19aafb86",
|
||||||
permissions: "35 Permissions",
|
permissions: "35 Permissions",
|
||||||
@@ -55,6 +52,21 @@ const RolesPage = () => {
|
|||||||
topbarTitle="Roles"
|
topbarTitle="Roles"
|
||||||
requiredButtons={["title", "add", "search"]}
|
requiredButtons={["title", "add", "search"]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* Mobile View */}
|
||||||
|
<div className={styles.cardContainer}>
|
||||||
|
<MobileSearchBar />
|
||||||
|
{sampleData.map((role, index) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
role={role}
|
||||||
|
key={index}
|
||||||
|
onClick={() => router.push(`/roles/${index}`)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Users Table */}
|
{/* Users Table */}
|
||||||
<div className={styles.tableContainer}>
|
<div className={styles.tableContainer}>
|
||||||
<table className={styles.table}>
|
<table className={styles.table}>
|
||||||
@@ -71,8 +83,8 @@ const RolesPage = () => {
|
|||||||
//role or user?
|
//role or user?
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={role.id}
|
key={index}
|
||||||
onClick={() => router.push(`/roles/${role.id}`)}
|
onClick={() => router.push(`/roles/${index}`)}
|
||||||
>
|
>
|
||||||
<td>{role.name}</td>
|
<td>{role.name}</td>
|
||||||
<td>{role.orgId}</td>
|
<td>{role.orgId}</td>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import DeleteIcon from "@/app/components/icons/delete";
|
import DeleteIcon from "@/app/components/icons/delete";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import styles from "./styles.module.css";
|
||||||
|
|
||||||
const Card = (props) => {
|
const Card = (props) => {
|
||||||
return (
|
return (
|
||||||
@@ -7,15 +8,15 @@ const Card = (props) => {
|
|||||||
<div className={styles.cardDetails}>
|
<div className={styles.cardDetails}>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
<p>Name</p>
|
<p>Name</p>
|
||||||
<p>{props?.user?.email}</p>
|
<p>{props?.role?.name}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
<p>Organization ID</p>
|
<p>Organization ID</p>
|
||||||
<p>{props?.user?.fullName}</p>
|
<p>{props?.role?.orgId}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.list}>
|
<div className={styles.list}>
|
||||||
<p>Permissions</p>
|
<p>Permissions</p>
|
||||||
<p>{props?.user?.createdAt}</p>
|
<p>{props?.role?.permissions}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.cardAction}>
|
<div className={styles.cardAction}>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: var(--table-font-size);
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
padding: 12px 24px;
|
padding: 12px 24px;
|
||||||
color: #eeeffd;
|
color: #eeeffd;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 13px;
|
font-size: var(--table-font-size);
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -65,15 +65,23 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile */
|
|
||||||
.cardContainer {
|
.cardContainer {
|
||||||
display: flex;
|
display: none;
|
||||||
padding: 0 16px;
|
}
|
||||||
padding-bottom: 50px;
|
|
||||||
height: calc(100vh - 170px);
|
@media (max-width: 768px) {
|
||||||
flex-direction: column;
|
.cardContainer {
|
||||||
align-items: flex-start;
|
display: flex;
|
||||||
gap: 12px;
|
padding: 0 16px;
|
||||||
align-self: stretch;
|
padding-bottom: 50px;
|
||||||
overflow: auto;
|
height: calc(100vh - 170px);
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 12px;
|
||||||
|
align-self: stretch;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.tableContainer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useState } from "react";
|
|||||||
import TextField from "@/app/components/fields/textfield";
|
import TextField from "@/app/components/fields/textfield";
|
||||||
import SelectField from "@/app/components/select/SelectField";
|
import SelectField from "@/app/components/select/SelectField";
|
||||||
import Permissions from "@/app/components/permissions/Permissions";
|
import Permissions from "@/app/components/permissions/Permissions";
|
||||||
|
import Toggle from "@/app/components/mobileToggleTab/Toggle";
|
||||||
|
|
||||||
const ViewUserPage = () => {
|
const ViewUserPage = () => {
|
||||||
const sampleData = [
|
const sampleData = [
|
||||||
@@ -26,6 +27,9 @@ const ViewUserPage = () => {
|
|||||||
{ permission: "service.update" },
|
{ permission: "service.update" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Mobile
|
||||||
|
const [activeTab, setActiveTab] = useState("details");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={globalStyle.section}>
|
<div className={globalStyle.section}>
|
||||||
<div className={globalStyle.mainContainer}>
|
<div className={globalStyle.mainContainer}>
|
||||||
@@ -36,12 +40,22 @@ const ViewUserPage = () => {
|
|||||||
state="view"
|
state="view"
|
||||||
requiredButtons={["back", "title", "edit", "download"]}
|
requiredButtons={["back", "title", "edit", "download"]}
|
||||||
/>
|
/>
|
||||||
<div className={editUserStyle.addUserContainer}>
|
<div className={editUserStyle.editUserContainer}>
|
||||||
|
{/* Mobile Toggle */}
|
||||||
|
<Toggle
|
||||||
|
activeTab={activeTab}
|
||||||
|
onChange={setActiveTab}
|
||||||
|
tabs={[
|
||||||
|
{ label: "User Details", value: "details" },
|
||||||
|
{ label: "Permissions", value: "permissions" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
{/* Input fields Container */}
|
{/* Input fields Container */}
|
||||||
<div className={editUserStyle.inputFieldContainer}>
|
<div className={editUserStyle.inputFieldContainer}>
|
||||||
{/* User Details */}
|
{/* User Details */}
|
||||||
<div className={editUserStyle.userDetails}>
|
<div
|
||||||
{/* Header */}
|
className={`${editUserStyle.userDetails} ${activeTab !== "details" ? editUserStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
<div className={editUserStyle.header}>
|
<div className={editUserStyle.header}>
|
||||||
<div>
|
<div>
|
||||||
<p>User Details</p>
|
<p>User Details</p>
|
||||||
@@ -61,10 +75,8 @@ const ViewUserPage = () => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Email */}
|
|
||||||
<div className={editUserStyle.inputMainContainer}>
|
<div className={editUserStyle.inputMainContainer}>
|
||||||
<div className={editUserStyle.inputContainer}>
|
<div className={editUserStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={editUserStyle.label}>
|
<div className={editUserStyle.label}>
|
||||||
<p>Email</p>
|
<p>Email</p>
|
||||||
{/* <p className={editUserStyle.optionalTxt}>(Optional)</p> */}
|
{/* <p className={editUserStyle.optionalTxt}>(Optional)</p> */}
|
||||||
@@ -98,7 +110,12 @@ const ViewUserPage = () => {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{/* Permissions */}
|
{/* Permissions */}
|
||||||
<Permissions sampleData={sampleData} />
|
<div
|
||||||
|
className={`${editUserStyle.userPermissions} ${activeTab !== "permissions" ? editUserStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
|
<div className={editUserStyle.imanginaryDiv}></div>
|
||||||
|
<Permissions sampleData={sampleData} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
.addUserContainer {
|
.editUserContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0px 144px 0 144px;
|
padding: 0px 144px 0 144px;
|
||||||
align-items: flex-start;
|
/* align-items: flex-start; */
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
position: relative;
|
/* position: relative; */
|
||||||
}
|
}
|
||||||
.inputFieldContainer {
|
.inputFieldContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -24,6 +24,22 @@
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
height: calc(100vh - 175px);
|
||||||
|
position: relative;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 24px;
|
padding-bottom: 24px;
|
||||||
@@ -42,7 +58,6 @@
|
|||||||
.header > div > p {
|
.header > div > p {
|
||||||
width: 163px;
|
width: 163px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -113,6 +128,37 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.imanginaryDiv {
|
|
||||||
padding: 18px;
|
@media (max-width: 950px) {
|
||||||
|
.hiddenMobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.editUserContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
padding: 0 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0px;
|
||||||
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.userDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
margin-top: 32x;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userPermissions {
|
||||||
|
height: calc(100vh - 295px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.userDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import TopHeader from "@/app/components/topHeader/TopHeader";
|
import TopHeader from "@/app/components/topHeader/TopHeader";
|
||||||
import globalStyle from "../../globalStyle.module.css";
|
import globalStyle from "../../globalStyle.module.css";
|
||||||
import addUserStyle from "./styles.module.css";
|
import addUserStyle from "./styles.module.css";
|
||||||
@@ -8,7 +8,11 @@ import SelectField from "@/app/components/select/SelectField";
|
|||||||
import Permissions from "@/app/components/permissions/Permissions";
|
import Permissions from "@/app/components/permissions/Permissions";
|
||||||
import useUserForm from "@/app/hooks/useUserForm";
|
import useUserForm from "@/app/hooks/useUserForm";
|
||||||
import Alert from "@/app/components/alerts/Alert";
|
import Alert from "@/app/components/alerts/Alert";
|
||||||
|
import Toggle from "@/app/components/mobileToggleTab/Toggle";
|
||||||
|
|
||||||
const AddUserPage = () => {
|
const AddUserPage = () => {
|
||||||
|
// Mobile
|
||||||
|
const [activeTab, setActiveTab] = useState("details");
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -36,24 +40,34 @@ const AddUserPage = () => {
|
|||||||
state="add"
|
state="add"
|
||||||
requiredButtons={["title", "save"]}
|
requiredButtons={["title", "save"]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className={addUserStyle.addUserContainer}>
|
<div className={addUserStyle.addUserContainer}>
|
||||||
{/* Input fields Container */}
|
{/* Mobile Toggle */}
|
||||||
|
<Toggle
|
||||||
|
activeTab={activeTab}
|
||||||
|
onChange={setActiveTab}
|
||||||
|
tabs={[
|
||||||
|
{ label: "User Details", value: "details" },
|
||||||
|
{ label: "Permissions", value: "permissions" },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
{/* Input fields Container */}
|
||||||
<div className={addUserStyle.inputFieldContainer}>
|
<div className={addUserStyle.inputFieldContainer}>
|
||||||
{/* User Details */}
|
{/* User Details */}
|
||||||
<div className={addUserStyle.userDetails}>
|
<div
|
||||||
{/* Header */}
|
className={`${addUserStyle.userDetails} ${activeTab !== "details" ? addUserStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
<div className={addUserStyle.header}>
|
<div className={addUserStyle.header}>
|
||||||
<div>
|
<div>
|
||||||
<p>User Details</p>
|
<p>User Details</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Input fields */}
|
{/* Ibalhin ning form na tag */}
|
||||||
<form
|
<form
|
||||||
className={addUserStyle.fields}
|
className={addUserStyle.fields}
|
||||||
id="form"
|
id="form"
|
||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmit)}
|
||||||
>
|
>
|
||||||
{/* Role and Dropdown */}
|
|
||||||
<div className={addUserStyle.roleField}>
|
<div className={addUserStyle.roleField}>
|
||||||
<p>Role</p>
|
<p>Role</p>
|
||||||
<SelectField
|
<SelectField
|
||||||
@@ -68,11 +82,9 @@ const AddUserPage = () => {
|
|||||||
{/* Email */}
|
{/* Email */}
|
||||||
<div className={addUserStyle.inputMainContainer}>
|
<div className={addUserStyle.inputMainContainer}>
|
||||||
<div className={addUserStyle.inputContainer}>
|
<div className={addUserStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={addUserStyle.label}>
|
<div className={addUserStyle.label}>
|
||||||
<p>Email</p>
|
<p>Email</p>
|
||||||
</div>
|
</div>
|
||||||
{/* Input field */}
|
|
||||||
<div className={addUserStyle.inputField}>
|
<div className={addUserStyle.inputField}>
|
||||||
<TextField
|
<TextField
|
||||||
placeHolder="Enter email"
|
placeHolder="Enter email"
|
||||||
@@ -85,11 +97,9 @@ const AddUserPage = () => {
|
|||||||
{/* Full Name */}
|
{/* Full Name */}
|
||||||
<div className={addUserStyle.inputMainContainer}>
|
<div className={addUserStyle.inputMainContainer}>
|
||||||
<div className={addUserStyle.inputContainer}>
|
<div className={addUserStyle.inputContainer}>
|
||||||
{/* Label */}
|
|
||||||
<div className={addUserStyle.label}>
|
<div className={addUserStyle.label}>
|
||||||
<p>Full Name</p>
|
<p>Full Name</p>
|
||||||
</div>
|
</div>
|
||||||
{/* Input field */}
|
|
||||||
<div className={addUserStyle.inputField}>
|
<div className={addUserStyle.inputField}>
|
||||||
<TextField
|
<TextField
|
||||||
placeHolder="Enter full name"
|
placeHolder="Enter full name"
|
||||||
@@ -103,7 +113,12 @@ const AddUserPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Permissions */}
|
{/* Permissions */}
|
||||||
<Permissions />
|
<div
|
||||||
|
className={`${addUserStyle.userPermissions} ${activeTab !== "permissions" ? addUserStyle.hiddenMobile : ""}`}
|
||||||
|
>
|
||||||
|
<div className={addUserStyle.imanginaryDiv}></div>
|
||||||
|
<Permissions />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,22 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #1d1e2a;
|
background: #1d1e2a;
|
||||||
background: color(display-p3 0.1137 0.1176 0.1608);
|
}
|
||||||
|
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
flex: 1 0 0;
|
||||||
|
align-self: stretch;
|
||||||
|
height: calc(100vh - 175px);
|
||||||
|
position: relative;
|
||||||
|
overflow: auto;
|
||||||
|
scrollbar-width: none;
|
||||||
|
padding-bottom: 60px;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -42,7 +57,6 @@
|
|||||||
.header > div > p {
|
.header > div > p {
|
||||||
width: 163px;
|
width: 163px;
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -79,7 +93,6 @@
|
|||||||
}
|
}
|
||||||
.label > p {
|
.label > p {
|
||||||
color: #d2d3e1;
|
color: #d2d3e1;
|
||||||
color: color(display-p3 0.8235 0.8275 0.8784);
|
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -100,6 +113,37 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.imanginaryDiv {
|
|
||||||
padding: 18px;
|
@media (max-width: 950px) {
|
||||||
|
.hiddenMobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.addUserContainer {
|
||||||
|
align-self: stretch;
|
||||||
|
padding: 0 16px;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0px;
|
||||||
|
}
|
||||||
|
.imanginaryDiv {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
.userPermissions {
|
||||||
|
height: calc(100vh - 295px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.userDetails {
|
||||||
|
background: none;
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
color: #85869b;
|
color: #85869b;
|
||||||
font-family: Inter;
|
font-family: Inter;
|
||||||
|
|
||||||
font-size: var(--table-font-size);
|
font-size: var(--table-font-size);
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
@@ -78,7 +77,6 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: red;
|
|
||||||
}
|
}
|
||||||
.tableContainer {
|
.tableContainer {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border-bottom: 1px solid #2c2d3d;
|
border-bottom: 1px solid #2c2d3d;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: green;
|
|
||||||
}
|
}
|
||||||
.cardDetails {
|
.cardDetails {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user