This commit is contained in:
louiscklaw
2025-04-22 01:07:18 +08:00
parent e4aee3f02f
commit 7f3f02463f
33 changed files with 62 additions and 2283 deletions

View File

@@ -13,7 +13,7 @@ import { useTranslation } from 'react-i18next';
import { PropertyItem } from '@/components/core/property-item';
import { PropertyList } from '@/components/core/property-list';
import { LpQuestion } from '@/components/dashboard/lp_questions.plan/type';
import { LpQuestion } from '@/components/dashboard/lp_questions_del/type';
export default function BasicDetailCard({
lpModel: model,

View File

@@ -10,7 +10,7 @@ import { CaretDown as CaretDownIcon } from '@phosphor-icons/react/dist/ssr/Caret
import { CheckCircle as CheckCircleIcon } from '@phosphor-icons/react/dist/ssr/CheckCircle';
import { useTranslation } from 'react-i18next';
import { LpQuestion } from '@/components/dashboard/lp_questions.plan/type';
import { LpQuestion } from '@/components/dashboard/lp_questions_del/type';
function getImageUrlFrRecord(record: LpQuestion): string {
return `http://127.0.0.1:8090/api/files/${record.collectionId}/${record.id}/${record.question_image}`;

View File

@@ -21,9 +21,9 @@ import { logger } from '@/lib/default-logger';
import { pb } from '@/lib/pb';
import { toast } from '@/components/core/toaster';
import ErrorDisplay from '@/components/dashboard/error';
import { defaultLpQuestion } from '@/components/dashboard/lp_questions.plan/_constants';
import { Notifications } from '@/components/dashboard/lp_questions.plan/notifications';
import type { LpQuestion } from '@/components/dashboard/lp_questions.plan/type';
import { defaultLpQuestion } from '@/components/dashboard/lp_questions_del/_constants';
import { Notifications } from '@/components/dashboard/lp_questions_del/notifications';
import type { LpQuestion } from '@/components/dashboard/lp_questions_del/type';
import FormLoading from '@/components/loading';
import BasicDetailCard from './BasicDetailCard';

View File

@@ -13,7 +13,7 @@ import { ArrowLeft as ArrowLeftIcon } from '@phosphor-icons/react/dist/ssr/Arrow
import { useTranslation } from 'react-i18next';
import { paths } from '@/paths';
import { LpQuestionCreateForm } from '@/components/dashboard/lp_questions.plan/lp-question-create-form';
import { LpQuestionCreateForm } from '@/components/dashboard/lp_questions_del/lp-question-create-form';
export default function Page(): React.JSX.Element {
// RULES: follow the name of page directory

View File

@@ -10,7 +10,7 @@ import { ArrowLeft as ArrowLeftIcon } from '@phosphor-icons/react/dist/ssr/Arrow
import { useTranslation } from 'react-i18next';
import { paths } from '@/paths';
import { LpQuestionEditForm } from '@/components/dashboard/lp_questions.plan/lp-question-edit-form';
import { LpQuestionEditForm } from '@/components/dashboard/lp_questions_del/lp-question-edit-form';
export default function Page(): React.JSX.Element {
const { t } = useTranslation(['lp_questions']);

View File

@@ -22,13 +22,13 @@ import { logger } from '@/lib/default-logger';
import { pb } from '@/lib/pb';
import { toast } from '@/components/core/toaster';
import ErrorDisplay from '@/components/dashboard/error';
import { defaultLpQuestion } from '@/components/dashboard/lp_questions.plan/_constants';
import { LpQuestionsFilters } from '@/components/dashboard/lp_questions.plan/lp-questions-filters';
import type { Filters } from '@/components/dashboard/lp_questions.plan/lp-questions-filters';
import { LpQuestionsPagination } from '@/components/dashboard/lp_questions.plan/lp-questions-pagination';
import { LpQuestionsSelectionProvider } from '@/components/dashboard/lp_questions.plan/lp-questions-selection-context';
import { LpQuestionsTable } from '@/components/dashboard/lp_questions.plan/lp-questions-table';
import type { LpQuestion } from '@/components/dashboard/lp_questions.plan/type';
import { defaultLpQuestion } from '@/components/dashboard/lp_questions_del/_constants';
import { LpQuestionsFilters } from '@/components/dashboard/lp_questions_del/lp-questions-filters';
import type { Filters } from '@/components/dashboard/lp_questions_del/lp-questions-filters';
import { LpQuestionsPagination } from '@/components/dashboard/lp_questions_del/lp-questions-pagination';
import { LpQuestionsSelectionProvider } from '@/components/dashboard/lp_questions_del/lp-questions-selection-context';
import { LpQuestionsTable } from '@/components/dashboard/lp_questions_del/lp-questions-table';
import type { LpQuestion } from '@/components/dashboard/lp_questions_del/type';
import FormLoading from '@/components/loading';
export default function Page({ searchParams }: PageProps): React.JSX.Element {

View File

@@ -73,7 +73,6 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
setShowError({
//
show: true,
code: error.status,
detail: JSON.stringify(error, null, 2),
});
} finally {
@@ -141,7 +140,7 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
return (
<ErrorDisplay
message={t('error.unable-to-process-request')}
code={showError.code}
code={-1}
details={showError.detail}
/>
);