Implement local browser caching for shared groups and UI improvements
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m10s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m10s
This commit is contained in:
parent
42ed0d275b
commit
7af0935657
37 changed files with 6141 additions and 411 deletions
|
|
@ -33,10 +33,11 @@ export async function getDeckWithCards(deckId: string) {
|
|||
export async function createDeckFromImport(
|
||||
classId: string,
|
||||
data: FlashcardImportData,
|
||||
overrideName?: string
|
||||
overrideName?: string,
|
||||
groupId?: string | null
|
||||
) {
|
||||
const maxOrder = await prisma.deck.aggregate({
|
||||
where: { classId },
|
||||
where: { classId, groupId: groupId || null },
|
||||
_max: { sortOrder: true },
|
||||
});
|
||||
const sortOrder = (maxOrder._max.sortOrder ?? -1) + 1;
|
||||
|
|
@ -44,6 +45,7 @@ export async function createDeckFromImport(
|
|||
return prisma.deck.create({
|
||||
data: {
|
||||
classId,
|
||||
groupId: groupId || null,
|
||||
name: overrideName || data.deckName,
|
||||
description: data.description,
|
||||
sortOrder,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue