From cdbb2bbfa0f38c0f9aef97012c57f248aa6147bc Mon Sep 17 00:00:00 2001 From: StefanWout Date: Fri, 15 Nov 2024 17:31:55 +0000 Subject: [PATCH] changed the settings page into a table to maintain visual consistency --- .../settings/PortfolioSettings.tsx | 282 ++++++++++++------ 1 file changed, 197 insertions(+), 85 deletions(-) diff --git a/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx b/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx index 28a6f2d..5a1cee5 100644 --- a/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx +++ b/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx @@ -22,6 +22,14 @@ import { DialogTitle, DialogFooter, } from "@/app/shadcn_components/ui/dialog"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/app/shadcn_components/ui/table"; import { PortfolioStatus as PortfolioStatusOptions } from "@/app/db/schema/portfolio"; import { PortfolioGoal as PortfolioGoalOptions } from "@/app/db/schema/portfolio"; import { useSession } from "next-auth/react"; @@ -362,95 +370,192 @@ export default function PortfolioSettings({ // 4) Create the API return ( -
-
- {/* Row 1: Name */} -
- Change the Portfolio Name: -
-
- -
-
- -
-
+ //
+ //
+ // {/* Row 1: Name */} + //
+ // Change the Portfolio Name: + //
+ //
+ // + //
+ //
+ // + //
+ //
- {/* Row 2: Budget */} -
- Portfolio Budget:
- Total Budget across ALL Properties. We aim to make sure works stay within this budget. -
-
- handleNumericKeyDown(e)} - /> -
-
- -
-
+ // {/* Row 2: Budget */} + //
+ // Portfolio Budget:
+ // Total Budget across ALL Properties. We aim to make sure works stay within this budget. + //
+ //
+ // handleNumericKeyDown(e)} + // /> + //
+ //
+ // + //
+ //
- {/* Row 3: Goal */} -
- Goal:
- Adjust the overall aim of the works conducted on this portfolio. -
-
- -
-
- -
-
+ // {/* Row 3: Goal */} + //
+ // Goal:
+ // Adjust the overall aim of the works conducted on this portfolio. + //
+ //
+ // + //
+ //
+ // + //
+ //
- {/* Row 4: Status */} + // {/* Row 4: Status */} -
- Status:
- Adjust where the portfolio stands in the works pipeline. -
-
- -
-
- -
-
+ //
+ // Status:
+ // Adjust where the portfolio stands in the works pipeline. + //
+ //
+ // + //
+ //
+ // + //
+ //
- {/* Row 5: Delete */} -
-
DANGER ZONE - Permanently Delete the Entire Portfolio
-
- -
-
-
+ // {/* Row 5: Delete */} + //
+ //
DANGER ZONE - Permanently Delete the Entire Portfolio
+ //
+ // + //
+ //
+ //
- {/* Delete portfolio modal */} + // {/* Delete portfolio modal */} + // + // + // Are you sure? + //

+ // To confirm, please type the name of the portfolio ( + // {portfolioSettingsData.name}) + //

+ // setDeleteConfirmationByName(e.target.value)} + // placeholder="Type portfolio name" + // /> + // + // + // + // + //
+ //
+ //
+ +
+
+ + + + + Rename the Portfolio:

Permanently change the name of your portfolio

+
+ + + + + + +
+ + + Change the Portfolio Budget:

The total budget across ALL properties. Works aim to stay within this budget

+
+ + handleNumericKeyDown(e)}/> + + + + +
+ + + Change the Portfolio Goal:

Adjust the overall aim of the works conducted on this portfolio

+
+ + + + + + +
+ + + Change the Status of the Portfolio:

Adjust where the portfolio stands in the works pipeline

+
+ + + + + + +
+
+
+
+
+ + Danger Zone: + + + + Delete the Portfolio:

Permanently delete the portfolio and all property data assigned to this portfolio

+
+ + + +
+
+
Are you sure? @@ -480,7 +585,14 @@ export default function PortfolioSettings({ - -
+ +
+
+ ); + + } + + + \ No newline at end of file