Skip to content

Commit 8878707

Browse files
authored
Merge pull request #6 from yudha556/development
Development
2 parents a7fdfad + 94e7be0 commit 8878707

8 files changed

Lines changed: 588 additions & 9 deletions

File tree

apps/web-app/app/(app)/dashboard/components/recentProject.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export default function RecentProject() {
3434
</div>
3535

3636
<div className=" items-center justify-between grid grid-cols-3 gap-6">
37-
<Card className=" w-full">
37+
<Button
38+
onClick={() => router.push("/newProject")}
39+
variant={"outline"}
40+
className="w-full h-full p-4 cursor-pointer bg-white hover:shadow-md hover:translate-y-1 transition-all duration-200">
3841
<Empty className="py-1">
3942
<EmptyHeader>
4043
<EmptyMedia
@@ -49,17 +52,17 @@ export default function RecentProject() {
4952
</EmptyDescription>
5053
</EmptyHeader>
5154
<EmptyContent>
52-
<Button
55+
{/* <Button
5356
onClick={() => router.push("/newProject")}
5457
variant={"outline"}
5558
size={"lg"}
5659
className="cursor-pointer hover:shadow-md hover:translate-y-1"
5760
>
5861
Create Project
59-
</Button>
62+
</Button> */}
6063
</EmptyContent>
6164
</Empty>
62-
</Card>
65+
</Button>
6366

6467
<ProjectProgress />
6568
<ProjectProgress />
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
"use client";
3+
4+
import { Button } from "@workspace/ui/components/button";
5+
import { Card } from "@workspace/ui/components/card";
6+
import {
7+
DropdownMenu,
8+
DropdownMenuContent,
9+
DropdownMenuItem,
10+
DropdownMenuSeparator,
11+
DropdownMenuTrigger,
12+
} from "@workspace/ui/components/dropdown-menu";
13+
14+
import { Field, FieldLabel } from "@workspace/ui/components/field";
15+
import { Progress } from "@workspace/ui/components/progress";
16+
import {
17+
ArrowRight,
18+
Copy,
19+
Download,
20+
Ellipsis,
21+
Eye,
22+
GraduationCap,
23+
Pencil,
24+
Trash,
25+
} from "lucide-react";
26+
import { useRouter } from "next/navigation";
27+
28+
export default function ProjectProgress() {
29+
return (
30+
<Card className="flex flex-col gap-8 p-4 w-full min-h-59">
31+
<div className="w-full flex flex-row justify-between items-center">
32+
<div className="flex flex-row gap-3 items-center">
33+
<div className="flex items-center justify-center w-12 h-12 rounded-sm bg-blue-100">
34+
<GraduationCap className="size-7 text-blue-600" />
35+
</div>
36+
<div className="flex flex-col gap-1">
37+
<h1 className="font-semibold text-md">
38+
Student Research Portal
39+
</h1>
40+
<p className="text-sm text-gray-500">Web App . Education</p>
41+
</div>
42+
</div>
43+
44+
<DropdownMenu>
45+
<DropdownMenuTrigger asChild>
46+
<Button
47+
variant={"outline"}
48+
className="hover:shadow-md hover:translate-y-1 cursor-pointer"
49+
>
50+
<Ellipsis />
51+
</Button>
52+
</DropdownMenuTrigger>
53+
<DropdownMenuContent align="end" sideOffset={8} className="flex flex-col gap-1">
54+
<DropdownMenuItem>
55+
<Pencil />
56+
Edit Project
57+
</DropdownMenuItem>
58+
<DropdownMenuItem>
59+
<Eye />
60+
View Preview
61+
</DropdownMenuItem>
62+
<DropdownMenuSeparator />
63+
<DropdownMenuItem>
64+
<Copy />
65+
Duplicate
66+
</DropdownMenuItem>
67+
<DropdownMenuItem>
68+
<Download />
69+
Export PDF
70+
</DropdownMenuItem>
71+
<DropdownMenuSeparator />
72+
<DropdownMenuItem variant="destructive">
73+
<Trash />
74+
Delete
75+
</DropdownMenuItem>
76+
</DropdownMenuContent>
77+
</DropdownMenu>
78+
</div>
79+
80+
<Field className="w-full ">
81+
<FieldLabel htmlFor="progress-upload">
82+
<span>Completed</span>
83+
<span className="ml-auto">66%</span>
84+
</FieldLabel>
85+
<Progress value={66} id="progress-upload" />
86+
</Field>
87+
88+
<div className="flex flex-row justify-between items-center w-full">
89+
<p className="text-gray-500 font-semibold text-sm">Edited 5 mins ago</p>
90+
<Button variant={"link"} className="cursor-pointer text-blue-600 flex flex-row gap-2 items-center">
91+
Continue <ArrowRight className="text-blue-600 size-4" />
92+
</Button>
93+
</div>
94+
</Card>
95+
)
96+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"use client";
2+
3+
4+
import ProjectProgress from "./projectProgress";
5+
6+
export default function RecentActivity() {
7+
return (
8+
<div className="w-full gap-8 flex flex-col mt-10">
9+
<div className="flex flex-row justify-between items-center w-full">
10+
<h2 className="text-xl font-semibold">Recent Activity</h2>
11+
<p className="text-gray-500 text-sm">Showing 4 of 12 projects</p>
12+
</div>
13+
14+
<div className=" items-center justify-between grid grid-cols-3 gap-6">
15+
<ProjectProgress />
16+
<ProjectProgress />
17+
<ProjectProgress />
18+
<ProjectProgress />
19+
</div>
20+
</div>
21+
);
22+
}
Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,113 @@
1+
import { Button } from "@workspace/ui/components/button";
2+
import {
3+
InputGroup,
4+
InputGroupAddon,
5+
InputGroupInput,
6+
} from "@workspace/ui/components/input-group";
7+
import { BookOpen, LayoutTemplate, Search, Smartphone } from "lucide-react";
8+
import {
9+
Select,
10+
SelectContent,
11+
SelectGroup,
12+
SelectItem,
13+
SelectLabel,
14+
SelectTrigger,
15+
SelectValue,
16+
} from "@workspace/ui/components/select";
17+
import RecentActivity from "./components/recentActivity";
18+
119
export default function MyProject() {
2-
return (
3-
<div className="w-full flex flex-col">My Project</div>
4-
)
5-
}
20+
return (
21+
<div className="w-full flex flex-col gap-8 py-8">
22+
<div className="flex flex-row items-center gap-4">
23+
<InputGroup className="w-full max-w-sm bg-white shadow-md h-10">
24+
<InputGroupInput
25+
id="input-group-url"
26+
placeholder="Search Documents"
27+
/>
28+
<InputGroupAddon align={"inline-start"}>
29+
<Search />
30+
</InputGroupAddon>
31+
</InputGroup>
32+
33+
<p className="text-gray-500 text-sm">Project Type</p>
34+
<Button
35+
variant={"outline"}
36+
className="bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
37+
>
38+
All
39+
</Button>
40+
<Button
41+
variant={"outline"}
42+
className="flex flex-row gap-2 items-center bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
43+
>
44+
<LayoutTemplate />
45+
Web App
46+
</Button>
47+
<Button
48+
variant={"outline"}
49+
className="flex flex-row gap-2 items-center bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
50+
>
51+
<BookOpen />
52+
Research
53+
</Button>
54+
<Button
55+
variant={"outline"}
56+
className="flex flex-row gap-2 items-center bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
57+
>
58+
<Smartphone />
59+
Mobile
60+
</Button>
61+
</div>
62+
63+
<div className="flex flex-row items-center justify-between w-full">
64+
<div className="flex flex-row gap-4 items-center w-full">
65+
<p className="text-gray-500 text-sm">Status</p>
66+
<Button
67+
variant={"outline"}
68+
className="bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
69+
>
70+
Any Status
71+
</Button>
72+
<Button
73+
variant={"outline"}
74+
className="bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
75+
>
76+
Draft
77+
</Button>
78+
<Button
79+
variant={"outline"}
80+
className="bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
81+
>
82+
In Progress
83+
</Button>
84+
<Button
85+
variant={"outline"}
86+
className="bg-white text-medium px-3 rounded-xl border-gray-300 hover:shadow-md cursor-pointer hover:translate-y-1"
87+
>
88+
Generated
89+
</Button>
90+
</div>
91+
92+
<div className="flex flex-row items-center gap-3 justify-end w-full">
93+
<p className="text-sm text-gray-500">Short by</p>
94+
<Select defaultValue="lastedited">
95+
<SelectTrigger className="w-full max-w-48 bg-white shadow-md border-gray-300 cursor-pointer">
96+
<SelectValue />
97+
</SelectTrigger>
98+
<SelectContent align="start" side="bottom">
99+
<SelectGroup>
100+
<SelectLabel>Filter</SelectLabel>
101+
<SelectItem value="lastedited">Last Edited</SelectItem>
102+
<SelectItem value="1hour">1 Hour</SelectItem>
103+
<SelectItem value="1day">1 Day</SelectItem>
104+
</SelectGroup>
105+
</SelectContent>
106+
</Select>
107+
</div>
108+
</div>
109+
110+
<RecentActivity />
111+
</div>
112+
);
113+
}

apps/web-app/components/nav-main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export function NavMain({
3232
asChild
3333
isActive={item.isActive}
3434
tooltip={item.title}
35-
// Tambahkan className di sini:
3635
className="data-[active=true]:bg-white data-[active=true]:text-blue-600 data-[active=true]:shadow-md"
3736
>
3837
<a href={item.url}>

0 commit comments

Comments
 (0)