This commit is contained in:
longdayi 2025-02-21 17:12:52 +08:00
commit 1a0d001d91
551 changed files with 418 additions and 170 deletions

0
.continue/prompts/coder.prompt Normal file → Executable file
View File

0
.dockerignore Normal file → Executable file
View File

0
.npmrc Normal file → Executable file
View File

0
Dockerfile Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
apps/server/src/auth/auth.guard.ts Normal file → Executable file
View File

0
apps/server/src/auth/config.ts Normal file → Executable file
View File

0
apps/server/src/auth/session.service.ts Normal file → Executable file
View File

0
apps/server/src/auth/types.ts Normal file → Executable file
View File

0
apps/server/src/auth/utils.ts Normal file → Executable file
View File

0
apps/server/src/filters/exceptions.filter.ts Normal file → Executable file
View File

0
apps/server/src/models/app-config/app-config.module.ts Normal file → Executable file
View File

0
apps/server/src/models/app-config/app-config.router.ts Normal file → Executable file
View File

View File

0
apps/server/src/models/base/base.service.ts Normal file → Executable file
View File

0
apps/server/src/models/base/base.tree.service.ts Normal file → Executable file
View File

0
apps/server/src/models/base/base.type.ts Normal file → Executable file
View File

0
apps/server/src/models/base/errorMap.prisma.ts Normal file → Executable file
View File

0
apps/server/src/models/base/row-cache.service.ts Normal file → Executable file
View File

0
apps/server/src/models/base/row-model.service.ts Normal file → Executable file
View File

0
apps/server/src/models/base/sql-builder.ts Normal file → Executable file
View File

0
apps/server/src/models/base/test.sql Normal file → Executable file
View File

0
apps/server/src/models/course/course.module.ts Normal file → Executable file
View File

0
apps/server/src/models/course/course.router.ts Normal file → Executable file
View File

0
apps/server/src/models/course/course.schema.ts Normal file → Executable file
View File

0
apps/server/src/models/course/course.service.ts Normal file → Executable file
View File

0
apps/server/src/models/course/utils.ts Normal file → Executable file
View File

View File

0
apps/server/src/models/department/utils.ts Normal file → Executable file
View File

0
apps/server/src/models/enrollment/enroll.schema.ts Normal file → Executable file
View File

0
apps/server/src/models/enrollment/enrollment.module.ts Normal file → Executable file
View File

0
apps/server/src/models/enrollment/enrollment.router.ts Normal file → Executable file
View File

View File

0
apps/server/src/models/lecture/lecture.module.ts Normal file → Executable file
View File

0
apps/server/src/models/lecture/lecture.router.ts Normal file → Executable file
View File

0
apps/server/src/models/lecture/lecture.service.ts Normal file → Executable file
View File

0
apps/server/src/models/lecture/utils.ts Normal file → Executable file
View File

0
apps/server/src/models/message/message.module.ts Normal file → Executable file
View File

0
apps/server/src/models/message/message.service.ts Normal file → Executable file
View File

0
apps/server/src/models/message/utils.ts Normal file → Executable file
View File

0
apps/server/src/models/post/utils.ts Normal file → Executable file
View File

0
apps/server/src/models/rbac/role.row.service.ts Normal file → Executable file
View File

View File

View File

View File

View File

0
apps/server/src/models/resource/resource.module.ts Normal file → Executable file
View File

0
apps/server/src/models/resource/resource.router.ts Normal file → Executable file
View File

0
apps/server/src/models/resource/resource.service.ts Normal file → Executable file
View File

0
apps/server/src/models/resource/types.ts Normal file → Executable file
View File

0
apps/server/src/models/section/section.module.ts Normal file → Executable file
View File

0
apps/server/src/models/section/section.router.ts Normal file → Executable file
View File

0
apps/server/src/models/section/section.service.ts Normal file → Executable file
View File

0
apps/server/src/models/staff/staff.row.service.ts Normal file → Executable file
View File

0
apps/server/src/models/term/term.row.service.ts Normal file → Executable file
View File

0
apps/server/src/models/term/utils.ts Normal file → Executable file
View File

0
apps/server/src/models/visit/visit.module.ts Normal file → Executable file
View File

0
apps/server/src/models/visit/visit.router.ts Normal file → Executable file
View File

0
apps/server/src/models/visit/visit.service.ts Normal file → Executable file
View File

View File

0
apps/server/src/queue/stats/stats.service.ts Normal file → Executable file
View File

0
apps/server/src/queue/worker/file.processor.ts Normal file → Executable file
View File

0
apps/server/src/socket/base/base-websocket-server.ts Normal file → Executable file
View File

0
apps/server/src/socket/collaboration/callback.ts Normal file → Executable file
View File

View File

0
apps/server/src/socket/collaboration/persistence.ts Normal file → Executable file
View File

0
apps/server/src/socket/collaboration/types.ts Normal file → Executable file
View File

0
apps/server/src/socket/collaboration/ws-shared-doc.ts Normal file → Executable file
View File

0
apps/server/src/socket/collaboration/yjs.server.ts Normal file → Executable file
View File

0
apps/server/src/socket/realtime/realtime.module.ts Normal file → Executable file
View File

0
apps/server/src/socket/realtime/realtime.server.ts Normal file → Executable file
View File

0
apps/server/src/socket/types.ts Normal file → Executable file
View File

0
apps/server/src/socket/websocket.module.ts Normal file → Executable file
View File

0
apps/server/src/socket/websocket.service.ts Normal file → Executable file
View File

0
apps/server/src/tasks/init/gendev.service.ts Normal file → Executable file
View File

0
apps/server/src/tasks/init/utils.ts Normal file → Executable file
View File

0
apps/server/src/trpc/types.ts Normal file → Executable file
View File

0
apps/server/src/trpc/utils.ts Normal file → Executable file
View File

0
apps/server/src/upload/tus.service.ts Normal file → Executable file
View File

0
apps/server/src/upload/types.ts Normal file → Executable file
View File

0
apps/server/src/upload/upload.controller.ts Normal file → Executable file
View File

0
apps/server/src/upload/upload.module.ts Normal file → Executable file
View File

0
apps/server/src/upload/utils.ts Normal file → Executable file
View File

0
apps/server/src/utils/event-bus.ts Normal file → Executable file
View File

0
apps/server/src/utils/file.ts Normal file → Executable file
View File

0
apps/server/src/utils/minio/minio.module.ts Normal file → Executable file
View File

0
apps/server/src/utils/minio/minio.service.ts Normal file → Executable file
View File

0
apps/server/src/utils/redis/redis.service.ts Normal file → Executable file
View File

0
apps/server/src/utils/redis/utils.ts Normal file → Executable file
View File

0
apps/server/src/validation/index.ts Normal file → Executable file
View File

0
apps/web/src/app/admin/base-setting/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/admin/layout.tsx Normal file → Executable file
View File

0
apps/web/src/app/denied.tsx Normal file → Executable file
View File

0
apps/web/src/app/login.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/course/detail/page.tsx Normal file → Executable file
View File

View File

@ -0,0 +1,7 @@
export function coursePreviewAllmsg() {
return (
<div className="min-h-screen">
helloword
</div>
)
}

View File

@ -0,0 +1,7 @@
export function CoursePreview(){
return(
<div className="min-h-screen">
helloword
</div>
)
}

View File

View File

View File

@ -1,7 +1,8 @@
import { Checkbox, Divider, Radio, Space } from "antd"; import { Checkbox, Divider, Radio, Space , Spin} from 'antd';
import { categories, levels } from "../mockData"; import { categories, levels } from '../mockData';
import { api } from "@nice/client"; import { TaxonomySlug, TermDto } from '@nice/common';
import { TaxonomySlug } from "@nice/common"; import { GetTaxonomyProps, useGetTaxonomy } from '@web/src/hooks/useGetTaxonomy';
import { useMemo } from 'react';
interface FilterSectionProps { interface FilterSectionProps {
selectedCategory: string; selectedCategory: string;
@ -16,47 +17,65 @@ export default function FilterSection({
onCategoryChange, onCategoryChange,
onLevelChange, onLevelChange,
}: FilterSectionProps) { }: FilterSectionProps) {
const { data: levels, isLoading } = api.term.findMany.useQuery({ const gateGory : GetTaxonomyProps = useGetTaxonomy({
where: { type: TaxonomySlug.CATEGORY,
taxonomy: { })
slug: TaxonomySlug.LEVEL, const levels : GetTaxonomyProps = useGetTaxonomy({
}, type: TaxonomySlug.LEVEL,
}, })
}); return (
// const { data } = api.term; <div className="bg-white p-6 rounded-lg shadow-sm space-y-6">
return ( <div>
<div className="bg-white p-6 rounded-lg shadow-sm space-y-6"> <h3 className="text-lg font-medium mb-4"></h3>
<div> <Radio.Group
<h3 className="text-lg font-medium mb-4"></h3> value={selectedCategory}
<Radio.Group onChange={(e) => onCategoryChange(e.target.value)}
value={selectedCategory} className="flex flex-col space-y-3"
onChange={(e) => onCategoryChange(e.target.value)} >
className="flex flex-col space-y-3"> {
<Radio value=""></Radio> gateGory.isLoading?
{categories.map((category) => ( (<Spin/>)
<Radio key={category} value={category}> :
{category} (
</Radio> <>
))} <Radio value=""></Radio>
</Radio.Group> {gateGory.categories.map(category => (
</div> <Radio key={category} value={category}>
{category}
</Radio>
))}
</>)
}
</Radio.Group>
</div>
<Divider className="my-6" /> <Divider className="my-6" />
<div> <div>
<h3 className="text-lg font-medium mb-4"></h3> <h3 className="text-lg font-medium mb-4"></h3>
<Radio.Group <Radio.Group
value={selectedLevel} value={selectedLevel}
onChange={(e) => onLevelChange(e.target.value)} onChange={(e) => onLevelChange(e.target.value)}
className="flex flex-col space-y-3"> className="flex flex-col space-y-3"
<Radio value=""></Radio> >
{levels?.map((level) => ( {
<Radio key={level.id} value={level.id}> levels.isLoading ?
{level.name} (<Spin/>)
</Radio> :
))} (
</Radio.Group> <>
</div> <Radio value=""></Radio>
</div> {levels.categories.map(level => (
); <Radio key={level} value={level}>
{level}
</Radio>
))}
</>)
}
</Radio.Group>
</div>
</div>
);
} }

Some files were not shown because too many files have changed in this diff Show More