From 2e772b204486ed314555073e05e7eb4d108de968 Mon Sep 17 00:00:00 2001
From: Laux Dev <2201104208@student.buksu.edu.ph>
Date: Fri, 27 Feb 2026 16:07:07 +0800
Subject: [PATCH] convert to components
---
.../app/components/fields/styles.module.css | 37 +++++++++++++++
.../src/app/components/fields/textfield.jsx | 9 ++++
frontend/src/app/components/icons/close.jsx | 31 +++++++++++++
.../toast/success/styles.module.css | 35 +++++++++++++++
.../components/toast/success/successToast.jsx | 45 +++++++++++++++++++
.../app/components/topHeader/TopHeader.jsx | 10 ++---
frontend/src/app/globals.css | 4 +-
frontend/src/app/organization/add/page.jsx | 3 +-
.../app/organization/add/styles.module.css | 3 +-
frontend/src/app/organization/page.jsx | 2 +
frontend/src/app/projects/page.jsx | 2 +
.../AddServicesModal/AddServicesModal.jsx | 28 ++----------
.../projects/view/add-from-scratch/page.jsx | 36 +++++++--------
.../AddConfigMap/AddConfigMapModal.jsx | 1 +
.../AddConfigMap/styles.module.css | 0
.../AddVariableModal/AddVariableModal.jsx | 45 +++++++++++++++++++
.../AddVariableModal/styles.module.css | 0
.../AddVolumes/AddVolumeModal.jsx | 0
.../AddVolumes/styles.module.css | 0
frontend/src/app/projects/view/page.jsx | 1 +
20 files changed, 236 insertions(+), 56 deletions(-)
create mode 100644 frontend/src/app/components/fields/styles.module.css
create mode 100644 frontend/src/app/components/fields/textfield.jsx
create mode 100644 frontend/src/app/components/icons/close.jsx
create mode 100644 frontend/src/app/components/toast/success/styles.module.css
create mode 100644 frontend/src/app/components/toast/success/successToast.jsx
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddConfigMap/AddConfigMapModal.jsx
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddConfigMap/styles.module.css
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddVariableModal/AddVariableModal.jsx
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddVariableModal/styles.module.css
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddVolumes/AddVolumeModal.jsx
create mode 100644 frontend/src/app/projects/view/add-from-scratch/variableModals/AddVolumes/styles.module.css
diff --git a/frontend/src/app/components/fields/styles.module.css b/frontend/src/app/components/fields/styles.module.css
new file mode 100644
index 0000000..d385586
--- /dev/null
+++ b/frontend/src/app/components/fields/styles.module.css
@@ -0,0 +1,37 @@
+.input {
+ display: flex;
+ padding: 12px;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ gap: 10px;
+ width: 100%;
+ align-self: stretch;
+ border-radius: 6px;
+ border: 1px solid #616583;
+ background-color: transparent;
+ color: white;
+ font-family: Inter;
+ font-size: 16px;
+ outline: none;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+ caret-color: #575bc7;
+}
+.input:focus {
+ border-radius: 6px;
+ border: 1px solid #a8aac1;
+ background: rgba(75, 79, 109, 0.25);
+}
+.input:hover {
+ background: rgba(75, 79, 109, 0.25);
+}
+.input::placeholder {
+ color: #85869b;
+ font-family: Inter;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+}
diff --git a/frontend/src/app/components/fields/textfield.jsx b/frontend/src/app/components/fields/textfield.jsx
new file mode 100644
index 0000000..f1e6275
--- /dev/null
+++ b/frontend/src/app/components/fields/textfield.jsx
@@ -0,0 +1,9 @@
+import React from "react";
+import styles from "./styles.module.css";
+const TextField = ({ placeHolder }) => {
+ return (
+
+ );
+};
+
+export default TextField;
diff --git a/frontend/src/app/components/icons/close.jsx b/frontend/src/app/components/icons/close.jsx
new file mode 100644
index 0000000..f8b28d4
--- /dev/null
+++ b/frontend/src/app/components/icons/close.jsx
@@ -0,0 +1,31 @@
+import React from "react";
+
+const CloseIcon = (props) => {
+ return (
+
+ );
+};
+
+export default CloseIcon;
diff --git a/frontend/src/app/components/toast/success/styles.module.css b/frontend/src/app/components/toast/success/styles.module.css
new file mode 100644
index 0000000..9456a16
--- /dev/null
+++ b/frontend/src/app/components/toast/success/styles.module.css
@@ -0,0 +1,35 @@
+.toastContainer {
+ display: flex;
+ padding: 14px 10px 14px 16px;
+ align-items: center;
+ gap: 16px;
+ border-radius: 10px;
+ border: 1px solid #a6facc;
+ background: #eefdf3;
+ position: absolute;
+ bottom: 25px;
+ z-index: 11;
+ right: 20px;
+}
+.messageContainer {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+}
+.iconContainer {
+ display: flex;
+ padding: 4px;
+ justify-content: center;
+ align-items: center;
+ gap: 10px;
+ border-radius: 100px;
+ background: #a6facc;
+}
+.messageContainer p {
+ color: #006929;
+ font-family: Inter;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+}
diff --git a/frontend/src/app/components/toast/success/successToast.jsx b/frontend/src/app/components/toast/success/successToast.jsx
new file mode 100644
index 0000000..3899184
--- /dev/null
+++ b/frontend/src/app/components/toast/success/successToast.jsx
@@ -0,0 +1,45 @@
+import React from "react";
+import styles from "./styles.module.css";
+const SuccessToast = ({ message }) => {
+ return (
+
+ );
+};
+
+export default SuccessToast;
diff --git a/frontend/src/app/components/topHeader/TopHeader.jsx b/frontend/src/app/components/topHeader/TopHeader.jsx
index d1235bd..af3d355 100644
--- a/frontend/src/app/components/topHeader/TopHeader.jsx
+++ b/frontend/src/app/components/topHeader/TopHeader.jsx
@@ -1,19 +1,22 @@
"use client";
import React, { useState } from "react";
import styles from "./styles.module.css";
-import { usePathname, useRouter } from "next/navigation";
+import { usePathname, useRouter, useParams } from "next/navigation";
const TopHeader = (props) => {
const [triggerDropDownMenu, setTriggerDropDownMenu] = useState(false);
const pathName = usePathname();
const router = useRouter();
+ const params = useParams();
const handleNavigateToAdd = () => {
router.push(`${pathName}/add`);
};
return (
- {pathName.includes("/view") && props.state === "view" && (
+ {((pathName.includes("/view") && props.state === "view") ||
+ params.usersId ||
+ params.roleId) && (
router.back()}>