add
This commit is contained in:
parent
8cb8de8fa9
commit
5a5d4ec3ff
|
@ -137,6 +137,11 @@ export async function setCourseInfo({ data }: { data: Post }) {
|
||||||
id: true,
|
id: true,
|
||||||
descendant: true,
|
descendant: true,
|
||||||
},
|
},
|
||||||
|
orderBy: {
|
||||||
|
descendant: {
|
||||||
|
order: 'asc',
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const descendants = ancestries.map((ancestry) => ancestry.descendant);
|
const descendants = ancestries.map((ancestry) => ancestry.descendant);
|
||||||
const sections: SectionDto[] = descendants
|
const sections: SectionDto[] = descendants
|
||||||
|
|
|
@ -37,4 +37,5 @@ export class PostQueueService implements OnModuleInit {
|
||||||
debounce: { id: `${QueueJobType.UPDATE_POST_STATE}_${data.id}` },
|
debounce: { id: `${QueueJobType.UPDATE_POST_STATE}_${data.id}` },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,9 @@ const CourseContentForm: React.FC = () => {
|
||||||
type: PostType.SECTION,
|
type: PostType.SECTION,
|
||||||
deletedAt: null,
|
deletedAt: null,
|
||||||
},
|
},
|
||||||
|
orderBy: {
|
||||||
|
order: "asc",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!editId,
|
enabled: !!editId,
|
||||||
|
|
|
@ -58,6 +58,9 @@ export const LectureList: React.FC<LectureListProps> = ({
|
||||||
type: PostType.LECTURE,
|
type: PostType.LECTURE,
|
||||||
deletedAt: null,
|
deletedAt: null,
|
||||||
},
|
},
|
||||||
|
orderBy: {
|
||||||
|
order: "asc",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!sectionId,
|
enabled: !!sectionId,
|
||||||
|
|
Loading…
Reference in New Issue