From 47c7677871fe6bd295e482caa6e48f70d96f7bd2 Mon Sep 17 00:00:00 2001 From: nakaterm <104970808+nakaterm@users.noreply.github.com> Date: Sun, 28 Dec 2025 19:53:43 +0900 Subject: [PATCH 01/32] =?UTF-8?q?home=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/Home.tsx | 201 +++++++++++++++++++++----------------- 1 file changed, 111 insertions(+), 90 deletions(-) diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index 0430380..291619d 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -1,6 +1,6 @@ import { hc } from "hono/client"; import { useEffect, useState } from "react"; -import { HiOutlineCalendar, HiOutlinePlus, HiOutlineUser, HiOutlineUsers } from "react-icons/hi"; +import { LuArrowRight, LuCalendar, LuLayoutDashboard, LuPlus, LuUser, LuUsers } from "react-icons/lu"; import { NavLink } from "react-router"; import type { AppType } from "../../../server/src/main"; import Header from "../components/Header"; @@ -62,20 +62,24 @@ export default function HomePage() { return ( <> -
- {loading ? ( -
-
- +
+
+
+
+
+

ホーム

+

参加・主催しているイベントの管理

+
-
- ) : involvedProjects ? ( - - ) : ( -
- -
- )} + {loading ? ( + + ) : involvedProjects && involvedProjects.length > 0 ? ( + + ) : ( + + )} + +
{toast && (
@@ -96,111 +100,128 @@ function ProjectDashboard({ involvedProjects }: { involvedProjects: BriefProject }); return ( -
-
- {/* Hero Section */} -
-
- logo -

イツヒマ

+
+
+ +
+
-

「いつヒマ?」で日程調整しよう

- - - 新しいイベントを作成 - -
+

新規作成

+

新しい日程調整を始める

+ - {involvedProjects.length > 0 && ( -
- {/* All Projects */} -
-

- - あなたのイベント -

-
- {sortedProjects.map((project) => ( - - ))} -
-
-
- )} + {sortedProjects.map((project) => ( + + ))}
); } function ProjectCard({ project }: { project: BriefProject }) { + const formatDate = (date: Date) => { + return date.toLocaleDateString("ja-JP", { month: "short", day: "numeric" }); + }; + return ( -
-
-

{project.name}

- - {project.isHost ? ( - <> - - 主催者 - - ) : ( - <> - - 参加者 - - )} - +
+
+
+ + {project.isHost ? ( + <> + + 主催 + + ) : ( + <> + + 参加 + + )} + +

+ {project.name} +

+
-
- - - {formatDate(project.startDate.toLocaleDateString())} ~{formatDate(project.endDate.toLocaleDateString())} - +
+ +
+ {formatDate(project.startDate)} + / + {formatDate(project.endDate)} +
- +
+ + 詳細を見る + +
+ +
+
); } function EmptyState() { return ( -
-
-
- -
-

まだイベントがありません

-

イベントを作成して、日程調整を始めましょう

+
+
+
+

まだイベントがありません

+

「イベント作成」ボタンから、新しい日程調整を始めましょう。

- - イベントを作成する + + イベント作成
); } -// ---------- Utility ---------- -const formatDate = (isoDate: string) => { - const date = new Date(isoDate); - return date.toLocaleDateString("ja-JP"); -}; +function ProjectsSkeleton() { + return ( +
+ {Array.from({ length: 6 }, (_, i) => ( +
+
+
+
+
+
+
+
+
+
+
+
+
+ ))} +
+ ); +} From 8896bfc2ab5d1c5fd732e678116aae27575bfcc1 Mon Sep 17 00:00:00 2001 From: nakaterm <104970808+nakaterm@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:04:42 +0900 Subject: [PATCH 02/32] =?UTF-8?q?home=20=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/Home.tsx | 180 ++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 97 deletions(-) diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index 291619d..335e180 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -1,6 +1,6 @@ import { hc } from "hono/client"; import { useEffect, useState } from "react"; -import { LuArrowRight, LuCalendar, LuLayoutDashboard, LuPlus, LuUser, LuUsers } from "react-icons/lu"; +import { LuCalendar, LuChevronRight, LuLayoutDashboard, LuPlus, LuUser, LuUsers } from "react-icons/lu"; import { NavLink } from "react-router"; import type { AppType } from "../../../server/src/main"; import Header from "../components/Header"; @@ -64,12 +64,19 @@ export default function HomePage() { <>
-
-
+
+

ホーム

参加・主催しているイベントの管理

+ + + 新規作成 +
{loading ? ( @@ -92,36 +99,51 @@ export default function HomePage() { } function ProjectDashboard({ involvedProjects }: { involvedProjects: BriefProject[] }) { - const sortedProjects = [...involvedProjects].sort((a, b) => { - if (a.isHost !== b.isHost) { - return a.isHost ? -1 : 1; - } - return new Date(b.startDate).getTime() - new Date(a.startDate).getTime(); - }); + const hostedProjects = involvedProjects + .filter((p) => p.isHost) + .sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime()); + + const participatingProjects = involvedProjects + .filter((p) => !p.isHost) + .sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime()); return (
-
- -
- -
-

新規作成

-

新しい日程調整を始める

-
+ {hostedProjects.length > 0 && ( + } projects={hostedProjects} /> + )} + + {participatingProjects.length > 0 && ( + } + projects={participatingProjects} + /> + )} +
+ ); +} - {sortedProjects.map((project) => ( - +function ProjectSection({ title, icon, projects }: { title: string; icon: React.ReactNode; projects: BriefProject[] }) { + return ( +
+
+ {icon} +

{title}

+ + {projects.length} + +
+
+ {projects.map((project, index) => ( + ))}
-
+ ); } -function ProjectCard({ project }: { project: BriefProject }) { +function ProjectRow({ project, isLast }: { project: BriefProject; isLast: boolean }) { const formatDate = (date: Date) => { return date.toLocaleDateString("ja-JP", { month: "short", day: "numeric" }); }; @@ -129,96 +151,60 @@ function ProjectCard({ project }: { project: BriefProject }) { return ( -
-
-
- - {project.isHost ? ( - <> - - 主催 - - ) : ( - <> - - 参加 - - )} - -

- {project.name} -

-
-
- -
- -
- {formatDate(project.startDate)} - / - {formatDate(project.endDate)} -
-
-
- -
- - 詳細を見る - -
- +
+

+ {project.name} +

+
+ + + {formatDate(project.startDate)} 〜 {formatDate(project.endDate)} +
+ ); } function EmptyState() { return ( -
-
- +
+
+
-

まだイベントがありません

-

「イベント作成」ボタンから、新しい日程調整を始めましょう。

- - - イベント作成 - +

まだイベントがありません

+

右上の「新規作成」ボタンから、新しい日程調整を始めましょう。

); } function ProjectsSkeleton() { return ( -
- {Array.from({ length: 6 }, (_, i) => ( -
-
-
-
-
-
-
+
+ {[1, 2].map((section) => ( +
+
+
+
-
-
-
+
+ {[1, 2, 3].map((row, index) => ( +
+
+
+
+
+
+
+ ))}
))} From 2ab1327ba59e584d102c67022349e0b984388e19 Mon Sep 17 00:00:00 2001 From: nakaterm <104970808+nakaterm@users.noreply.github.com> Date: Mon, 29 Dec 2025 00:23:11 +0900 Subject: [PATCH 03/32] =?UTF-8?q?project=20=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/Project.tsx | 574 ++++++++++++++++++++--------------- 1 file changed, 327 insertions(+), 247 deletions(-) diff --git a/client/src/pages/Project.tsx b/client/src/pages/Project.tsx index b7230a4..a42263d 100644 --- a/client/src/pages/Project.tsx +++ b/client/src/pages/Project.tsx @@ -23,6 +23,8 @@ import { API_ENDPOINT, FRONTEND_ORIGIN } from "../utils"; const client = hc(API_ENDPOINT); +const GUIDE_URL = "https://utcode.notion.site/1e4ca5f557bc80f2b697ca7b9342dc89?pvs=4"; + export default function ProjectPage() { const { eventId } = useParams(); const navigate = useNavigate(); @@ -271,122 +273,156 @@ export default function ProjectPage() { return ( <> -
+
{loading ? ( -
- +
+
) : eventId !== undefined && !project ? ( -
-

イベントが見つかりませんでした。

- - ホームに戻る - +
+
+

イベントが見つかりませんでした。

+ + ホームに戻る + +
) : ( -
-

- {project ? `${project.name} の編集` : "イベントの作成"} -

-
-
- - trigger("name")} - /> - {errors.name &&

{errors.name.message}

} -
-
- -