From 7ecacd06924009da8b55fc533b2f3784c9d0b68a Mon Sep 17 00:00:00 2001 From: louiscklaw Date: Tue, 13 May 2025 13:27:17 +0800 Subject: [PATCH] ``` refactor student management UI by updating create form component name and adding new edit page with translation support and form integration ``` --- 002_source/cms/src/app/dashboard/students/create/page.tsx | 4 ++-- .../src/app/dashboard/students/edit/[customerId]/_PROMPT.md | 1 - .../cms/src/app/dashboard/students/edit/[id]/_PROMPT.md | 6 ++++++ .../dashboard/students/edit/{[customerId] => [id]}/page.tsx | 5 +++-- 4 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 002_source/cms/src/app/dashboard/students/edit/[customerId]/_PROMPT.md create mode 100644 002_source/cms/src/app/dashboard/students/edit/[id]/_PROMPT.md rename 002_source/cms/src/app/dashboard/students/edit/{[customerId] => [id]}/page.tsx (93%) diff --git a/002_source/cms/src/app/dashboard/students/create/page.tsx b/002_source/cms/src/app/dashboard/students/create/page.tsx index 98b2ec9..c428fad 100644 --- a/002_source/cms/src/app/dashboard/students/create/page.tsx +++ b/002_source/cms/src/app/dashboard/students/create/page.tsx @@ -9,7 +9,7 @@ import { ArrowLeft as ArrowLeftIcon } from '@phosphor-icons/react/dist/ssr/Arrow import { config } from '@/config'; import { paths } from '@/paths'; -import { CustomerCreateForm } from '@/components/dashboard/student/student-create-form'; +import { StudentCreateForm } from '@/components/dashboard/student/student-create-form'; export const metadata = { title: `Create | Customers | Dashboard | ${config.site.name}` } satisfies Metadata; @@ -41,7 +41,7 @@ export default function Page(): React.JSX.Element { Create customer - + ); diff --git a/002_source/cms/src/app/dashboard/students/edit/[customerId]/_PROMPT.md b/002_source/cms/src/app/dashboard/students/edit/[customerId]/_PROMPT.md deleted file mode 100644 index b66946e..0000000 --- a/002_source/cms/src/app/dashboard/students/edit/[customerId]/_PROMPT.md +++ /dev/null @@ -1 +0,0 @@ -this `tsx` file is clone from elsewhere, please understand, modify and update the content of `/home/logic/_wsl_workspace/001_github_ws/lettersoup-online-ws/lettersoup-online/project/002_source/cms/src/app/dashboard/students/edit/[customerId]/page.tsx.draft` to handle `Student` record thanks, modify comments/variables/paths/functions name please \ No newline at end of file diff --git a/002_source/cms/src/app/dashboard/students/edit/[id]/_PROMPT.md b/002_source/cms/src/app/dashboard/students/edit/[id]/_PROMPT.md new file mode 100644 index 0000000..56715f1 --- /dev/null +++ b/002_source/cms/src/app/dashboard/students/edit/[id]/_PROMPT.md @@ -0,0 +1,6 @@ +this `tsx` file is clone from elsewhere, +please understand, modify and update the content of +`/home/logic/_wsl_workspace/001_github_ws/lettersoup-online-ws/lettersoup-online/project/002_source/cms/src/app/dashboard/students/edit/[customerId]/page.tsx.draft` +to handle `Student` record thanks, + +modify comments/variables/paths/functions name please diff --git a/002_source/cms/src/app/dashboard/students/edit/[customerId]/page.tsx b/002_source/cms/src/app/dashboard/students/edit/[id]/page.tsx similarity index 93% rename from 002_source/cms/src/app/dashboard/students/edit/[customerId]/page.tsx rename to 002_source/cms/src/app/dashboard/students/edit/[id]/page.tsx index 4864d14..d80d10c 100644 --- a/002_source/cms/src/app/dashboard/students/edit/[customerId]/page.tsx +++ b/002_source/cms/src/app/dashboard/students/edit/[id]/page.tsx @@ -1,6 +1,6 @@ 'use client'; -// src/app/dashboard/students/edit/[customerId]/page.tsx +// src/app/dashboard/students/edit/[customerId]/page.tsx import * as React from 'react'; import RouterLink from 'next/link'; import Box from '@mui/material/Box'; @@ -11,7 +11,8 @@ import { ArrowLeft as ArrowLeftIcon } from '@phosphor-icons/react/dist/ssr/Arrow import { useTranslation } from 'react-i18next'; import { paths } from '@/paths'; -import { CrCategoryEditForm } from '@/components/dashboard/cr/categories/cr-category-edit-form'; +// TODO: remove me +// import { CrCategoryEditForm } from '@/components/dashboard/cr/categories/cr-category-edit-form'; import { StudentEditForm } from '@/components/dashboard/student/student-edit-form'; export default function Page(): React.JSX.Element {