-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf1f106
commit 254d485
Showing
2 changed files
with
87 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use client"; | ||
|
||
import dayjs from "dayjs"; | ||
import { Api } from "@/core/trpc"; | ||
import { PageLayout } from "@/designSystem/layouts/Page.layout"; | ||
import { Typography, Card } from "antd"; | ||
const { Title, Paragraph, Text } = Typography; | ||
|
||
export default function ProjectDetailsComponent({ projectId }) { | ||
console.log("calleeedd", projectId); | ||
const { data: project } = Api.project.findUnique.useQuery({ | ||
where: { id: projectId }, | ||
include: { user: true }, | ||
}); | ||
|
||
return ( | ||
<PageLayout layout="narrow"> | ||
{project && ( | ||
<Card title="Project Overview"> | ||
<Title level={4}>{project.name}</Title> | ||
<Text>Description: {project.description}</Text> | ||
<br /> | ||
<Text>Overview: {project.overview}</Text> | ||
<br /> | ||
<Text>Time Estimate: {project.timeEstimate?.toString()} hours</Text> | ||
<br /> | ||
<Text>Budget Buffer: ${project.budgetBuffer?.toString()}</Text> | ||
<br /> | ||
<Text>Profit Margin: {project.profitMargin?.toString()}%</Text> | ||
<br /> | ||
<Text> | ||
Date Created: {dayjs(project.dateCreated).format("MMMM D, YYYY")} | ||
</Text> | ||
<br /> | ||
<Text> | ||
Date Updated: {dayjs(project.dateUpdated).format("MMMM D, YYYY")} | ||
</Text> | ||
<br /> | ||
</Card> | ||
)} | ||
</PageLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters