mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
setting up demo data, moved portfolios
This commit is contained in:
parent
3b66d6bb31
commit
7488cabf1d
2 changed files with 59 additions and 35 deletions
|
|
@ -1,35 +0,0 @@
|
|||
import { useRouter } from "next/navigation";
|
||||
|
||||
const ModalSubmit = ({
|
||||
buttonDisabled,
|
||||
budget,
|
||||
objective,
|
||||
}: {
|
||||
buttonDisabled: boolean;
|
||||
budget: string;
|
||||
objective: string;
|
||||
}) => {
|
||||
const router = useRouter();
|
||||
function createPortfolio() {
|
||||
// TODO: This will be a server action that will create a new portfolio in the database
|
||||
// That endpoint will return a uuid which will be the new portfolio's id
|
||||
const id = "f290f1ee-6c54-4b01-90e6-d701748f0851";
|
||||
|
||||
router.push(
|
||||
`/portfolio/${id}?name=${name}&budget=${budget}&objective=${objective}`
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex justify-center rounded-md border border-transparent bg-brandtan px-4 py-2 text-sm font-medium text-grey-900 hover:bg-hovertan focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:bg-gray-300 disabled:opacity-50"
|
||||
onClick={createPortfolio}
|
||||
disabled={buttonDisabled}
|
||||
>
|
||||
Create
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default ModalSubmit;
|
||||
|
|
@ -1,3 +1,62 @@
|
|||
export default function Page() {
|
||||
// This is temp until we retrieve this data from the frontend
|
||||
// TODO: Update the objects to contains objective + any other required information
|
||||
const Portfolios = [
|
||||
{
|
||||
id: "f290f1ee-6c54-4b01-90e6-d701748f0851",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0851",
|
||||
title: "Portfolio 1",
|
||||
budget: "£500k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0852",
|
||||
title: "Portfolio 2",
|
||||
budget: "150k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0853",
|
||||
title: "Portfolio 3",
|
||||
budget: "£1m",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0854",
|
||||
title: "Portfolio 4",
|
||||
budget: "£2m",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0855",
|
||||
title: "Portfolio 5",
|
||||
budget: "£25k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0856",
|
||||
title: "Portfolio 6",
|
||||
budget: "£10k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0857",
|
||||
title: "Portfolio 7",
|
||||
budget: "£33k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0858",
|
||||
title: "Portfolio 8",
|
||||
budget: "£670k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0859",
|
||||
title: "Portfolio 9",
|
||||
budget: "£240k",
|
||||
},
|
||||
{
|
||||
id: "d290f1ee-6c54-4b01-90e6-d701748f0860",
|
||||
title: "Portfolio 10",
|
||||
budget: "93k",
|
||||
},
|
||||
];
|
||||
const demo_id = "f290f1ee-6c54-4b01-90e6-d701748f0851";
|
||||
|
||||
return <p>Hello world</p>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue