diff --git a/002_source/cms/src/app/dashboard/lp/categories/edit/[cat_id]/_PROMPT.md b/002_source/cms/src/app/dashboard/lp/categories/edit/[cat_id]/_PROMPT.md deleted file mode 100644 index abf4465..0000000 --- a/002_source/cms/src/app/dashboard/lp/categories/edit/[cat_id]/_PROMPT.md +++ /dev/null @@ -1,11 +0,0 @@ -# task - -## instruction - -with reference to `/home/logic/_wsl_workspace/001_github_ws/lettersoup-online-ws/lettersoup-online/project/002_source/cms/src/app/_helloworld/page.tsx` - -with reference to `/home/logic/_wsl_workspace/001_github_ws/lettersoup-online-ws/lettersoup-online/project/002_source/cms/src/app/dashboard/lesson_types/edit/[typeId]/page.tsx` - -please modify `/home/logic/_wsl_workspace/001_github_ws/lettersoup-online-ws/lettersoup-online/project/002_source/cms/src/app/dashboard/lesson_categories/edit/page.tsx` - -please draft a tsx for showing error to user thanks, diff --git a/002_source/cms/src/app/dashboard/vocabularies/create/page.tsx b/002_source/cms/src/app/dashboard/vocabularies/create/page.tsx index 74bd3dc..2bedea9 100644 --- a/002_source/cms/src/app/dashboard/vocabularies/create/page.tsx +++ b/002_source/cms/src/app/dashboard/vocabularies/create/page.tsx @@ -1,3 +1,4 @@ +// src/app/dashboard/vocabularies/create/page.tsx 'use client'; import * as React from 'react'; @@ -34,11 +35,11 @@ export default function Page(): React.JSX.Element { variant="subtitle2" > - {t('title',)} + {t('title')}
- {t('create.title', )} + {t('create.title')}
diff --git a/002_source/cms/src/components/dashboard/connective/lesson-category-create-form.tsx b/002_source/cms/src/components/dashboard/connective/lesson-category-create-form.tsx index 7744b52..c98d471 100644 --- a/002_source/cms/src/components/dashboard/connective/lesson-category-create-form.tsx +++ b/002_source/cms/src/components/dashboard/connective/lesson-category-create-form.tsx @@ -121,12 +121,22 @@ export function LessonCategoryCreateForm(): React.JSX.Element {
- } spacing={4}> + } + spacing={4} + > - {t('create.typeInformation', NS_DEFAULT)} - + {t('create.basic')} + - + - - {t('create.avatar', NS_DEFAULT)} - {t('create.avatarRequirements', NS_DEFAULT)} + + {t('create.avatar')} + {t('create.avatarRequirements')} - + - + ( - - {t('create.name', NS_DEFAULT)} + + {t('create.name')} {errors.name ? {errors.name.message} : null} )} /> - + ( - + Email address - + {errors.email ? {errors.email.message} : null} )} /> - + ( - + Phone number {errors.phone ? {errors.phone.message} : null} @@ -206,12 +245,18 @@ export function LessonCategoryCreateForm(): React.JSX.Element { )} /> - + ( - + Company {errors.company ? {errors.company.message} : null} @@ -222,35 +267,56 @@ export function LessonCategoryCreateForm(): React.JSX.Element { - {t('create.detail-information', NS_DEFAULT)} - - + {t('create.detail-information')} + + ( - - {t('create.description', NS_DEFAULT)} + + {t('create.description')} - + )} /> - + ( - - {t('create.remarks', NS_DEFAULT)} + + {t('create.remarks')} - + )} @@ -261,12 +327,21 @@ export function LessonCategoryCreateForm(): React.JSX.Element { - - - {t('create.createButton', NS_DEFAULT)} + + {t('create.createButton')} diff --git a/002_source/cms/src/components/dashboard/lesson_category/lesson-category-create-form.tsx b/002_source/cms/src/components/dashboard/lesson_category/lesson-category-create-form.tsx index 7744b52..64cb5b7 100644 --- a/002_source/cms/src/components/dashboard/lesson_category/lesson-category-create-form.tsx +++ b/002_source/cms/src/components/dashboard/lesson_category/lesson-category-create-form.tsx @@ -75,8 +75,6 @@ export function LessonCategoryCreateForm(): React.JSX.Element { const router = useRouter(); const { t } = useTranslation(['common', 'lesson_category']); - const NS_DEFAULT = { ns: 'lesson_category' }; - const [isCreating, setIsCreating] = React.useState(false); const { @@ -121,12 +119,22 @@ export function LessonCategoryCreateForm(): React.JSX.Element { - } spacing={4}> + } + spacing={4} + > - {t('create.typeInformation', NS_DEFAULT)} - + {t('create.basic')} + - + - - {t('create.avatar', NS_DEFAULT)} - {t('create.avatarRequirements', NS_DEFAULT)} + + {t('create.avatar')} + {t('create.avatarRequirements')} - + - + ( - - {t('create.name', NS_DEFAULT)} + + {t('create.name')} {errors.name ? {errors.name.message} : null} )} /> - + ( - + Email address - + {errors.email ? {errors.email.message} : null} )} /> - + ( - + Phone number {errors.phone ? {errors.phone.message} : null} @@ -206,12 +243,18 @@ export function LessonCategoryCreateForm(): React.JSX.Element { )} /> - + ( - + Company {errors.company ? {errors.company.message} : null} @@ -222,35 +265,56 @@ export function LessonCategoryCreateForm(): React.JSX.Element { - {t('create.detail-information', NS_DEFAULT)} - - + {t('create.detail-information')} + + ( - - {t('create.description', NS_DEFAULT)} + + {t('create.description')} - + )} /> - + ( - - {t('create.remarks', NS_DEFAULT)} + + {t('create.remarks')} - + )} @@ -261,12 +325,21 @@ export function LessonCategoryCreateForm(): React.JSX.Element { - - - {t('create.createButton', NS_DEFAULT)} + + {t('create.createButton')} diff --git a/002_source/cms/src/components/dashboard/lesson_type/lesson-type-create-form.tsx b/002_source/cms/src/components/dashboard/lesson_type/lesson-type-create-form.tsx index 0baa7ef..d5f9dd4 100644 --- a/002_source/cms/src/components/dashboard/lesson_type/lesson-type-create-form.tsx +++ b/002_source/cms/src/components/dashboard/lesson_type/lesson-type-create-form.tsx @@ -113,12 +113,22 @@ export function LessonTypeCreateForm(): React.JSX.Element { - } spacing={4}> + } + spacing={4} + > - {t('dashboard.lessonTypes.create.typeInformation')} - + {t('create.basic')} + - + - + {t('dashboard.lessonTypes.create.avatar')} {t('dashboard.lessonTypes.create.avatarRequirements')} - + - + ( - + {t('dashboard.lessonTypes.create.name')} {errors.name ? {errors.name.message} : null} @@ -156,12 +180,18 @@ export function LessonTypeCreateForm(): React.JSX.Element { )} /> - + ( - + {t('dashboard.lessonTypes.create.type')} {errors.type ? {errors.type.message} : null} @@ -169,12 +199,18 @@ export function LessonTypeCreateForm(): React.JSX.Element { )} /> - + ( - + {t('dashboard.lessonTypes.create.position')} - + ( - + {t('dashboard.lessonTypes.create.visibleToUser')}