update mf build ok,
This commit is contained in:
@@ -18,6 +18,7 @@ import type { ListResult, RecordModel } from 'pocketbase';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { paths } from '@/paths';
|
||||
import isDevelopment from '@/lib/check-is-development';
|
||||
import { logger } from '@/lib/default-logger';
|
||||
import { pb } from '@/lib/pb';
|
||||
import { toast } from '@/components/core/toaster';
|
||||
@@ -147,6 +148,9 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
|
||||
</Card>
|
||||
</LpCategoriesSelectionProvider>
|
||||
</Stack>
|
||||
<Box sx={{ display: isDevelopment ? 'block' : 'none' }}>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ import type { ListResult, RecordModel } from 'pocketbase';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { paths } from '@/paths';
|
||||
import isDevelopment from '@/lib/check-is-development';
|
||||
import { logger } from '@/lib/default-logger';
|
||||
import { pb } from '@/lib/pb';
|
||||
import { toast } from '@/components/core/toaster';
|
||||
@@ -202,7 +203,9 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
|
||||
</Card>
|
||||
</LpQuestionsSelectionProvider>
|
||||
</Stack>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
<Box sx={{ display: isDevelopment ? 'block' : 'none' }}>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ import type { ListResult, RecordModel } from 'pocketbase';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { paths } from '@/paths';
|
||||
import isDevelopment from '@/lib/check-is-development';
|
||||
import { logger } from '@/lib/default-logger';
|
||||
import { pb } from '@/lib/pb';
|
||||
import { toast } from '@/components/core/toaster';
|
||||
@@ -148,6 +149,9 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
|
||||
</Card>
|
||||
</MfCategoriesSelectionProvider>
|
||||
</Stack>
|
||||
<Box sx={{ display: isDevelopment ? 'block' : 'none' }}>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ import { toast } from '@/components/core/toaster';
|
||||
import ErrorDisplay from '@/components/dashboard/error';
|
||||
import { defaultMfQuestion } from '@/components/dashboard/mf/questions/_constants.ts';
|
||||
import { Notifications } from '@/components/dashboard/mf/questions/notifications';
|
||||
import type { LpQuestion } from '@/components/dashboard/mf/questions/type';
|
||||
import type { MfQuestion } from '@/components/dashboard/mf/questions/type';
|
||||
import FormLoading from '@/components/loading';
|
||||
|
||||
import BasicDetailCard from './BasicDetailCard';
|
||||
@@ -39,10 +39,10 @@ export default function Page(): React.JSX.Element {
|
||||
const [showError, setShowError] = React.useState({ show: false, detail: '' });
|
||||
|
||||
//
|
||||
const [showLessonQuestion, setShowLessonQuestion] = React.useState<LpQuestion>(defaultMfQuestion);
|
||||
const [showLessonQuestion, setShowLessonQuestion] = React.useState<MfQuestion>(defaultMfQuestion);
|
||||
|
||||
function handleEditClick() {
|
||||
router.push(paths.dashboard.lp_questions.edit(showLessonQuestion.id));
|
||||
router.push(paths.dashboard.mf_questions.edit(showLessonQuestion.id));
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
@@ -89,7 +89,7 @@ export default function Page(): React.JSX.Element {
|
||||
<Link
|
||||
color="text.primary"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.lp_questions.list}
|
||||
href={paths.dashboard.mf_questions.list}
|
||||
sx={{ alignItems: 'center', display: 'inline-flex', gap: 1 }}
|
||||
variant="subtitle2"
|
||||
>
|
||||
|
@@ -34,7 +34,7 @@ export default function Page(): React.JSX.Element {
|
||||
<Link
|
||||
color="text.primary"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.lp_questions.list}
|
||||
href={paths.dashboard.mf_questions.list}
|
||||
sx={{ alignItems: 'center', display: 'inline-flex', gap: 1 }}
|
||||
variant="subtitle2"
|
||||
>
|
||||
|
@@ -34,7 +34,7 @@ export default function Page(): React.JSX.Element {
|
||||
<Link
|
||||
color="text.primary"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.lp_questions.list}
|
||||
href={paths.dashboard.mf_questions.list}
|
||||
sx={{ alignItems: 'center', display: 'inline-flex', gap: 1 }}
|
||||
variant="subtitle2"
|
||||
>
|
||||
|
@@ -18,6 +18,7 @@ import type { ListResult, RecordModel } from 'pocketbase';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { paths } from '@/paths';
|
||||
import isDevelopment from '@/lib/check-is-development';
|
||||
import { logger } from '@/lib/default-logger';
|
||||
import { pb } from '@/lib/pb';
|
||||
import { toast } from '@/components/core/toaster';
|
||||
@@ -202,7 +203,9 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element {
|
||||
</Card>
|
||||
</MfQuestionsSelectionProvider>
|
||||
</Stack>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
<Box sx={{ display: isDevelopment ? 'block' : 'none' }}>
|
||||
<pre>{JSON.stringify(f, null, 2)}</pre>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import * as React from 'react';
|
||||
import RouterLink from 'next/link';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { COL_QUIZ_MF_CATEGORIES } from '@/constants';
|
||||
import { COL_QUIZ_LP_CATEGORIES } from '@/constants';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { LoadingButton } from '@mui/lab';
|
||||
import { Avatar, Divider, MenuItem, Select } from '@mui/material';
|
||||
@@ -101,7 +101,7 @@ export function MfCategoryCreateForm(): React.JSX.Element {
|
||||
};
|
||||
|
||||
try {
|
||||
const result = await pb.collection(COL_QUIZ_MF_CATEGORIES).create(payload);
|
||||
const result = await pb.collection(COL_QUIZ_LP_CATEGORIES).create(payload);
|
||||
|
||||
logger.debug(result);
|
||||
toast.success(t('create.success'));
|
||||
|
@@ -40,7 +40,7 @@ function columns(handleDeleteClick: (testId: string) => void): ColumnDef<MfQuest
|
||||
<Link
|
||||
color="inherit"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.mf_categories.details(row.id)}
|
||||
href={paths.dashboard.mf_questions.details(row.id)}
|
||||
sx={{ whiteSpace: 'nowrap' }}
|
||||
variant="subtitle2"
|
||||
>
|
||||
@@ -163,7 +163,7 @@ function columns(handleDeleteClick: (testId: string) => void): ColumnDef<MfQuest
|
||||
//
|
||||
color="secondary"
|
||||
component={RouterLink}
|
||||
href={paths.dashboard.mf_categories.details(row.id)}
|
||||
href={paths.dashboard.mf_questions.details(row.id)}
|
||||
>
|
||||
<PencilSimpleIcon size={24} />
|
||||
</LoadingButton>
|
||||
|
Reference in New Issue
Block a user