image
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
7d1300a7a4
commit
79318528df
5 changed files with 13 additions and 3 deletions
|
|
@ -118,7 +118,7 @@ export function BulkCardEditor({ images, defaultPackId, onComplete, onCancel }:
|
||||||
newData.set(imageId, {
|
newData.set(imageId, {
|
||||||
...cardData,
|
...cardData,
|
||||||
isSaved: true,
|
isSaved: true,
|
||||||
cardId: response.card.id,
|
cardId: response.card.id || undefined,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return newData
|
return newData
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useState, useRef, useEffect } from 'react'
|
import { useState, useRef } from 'react'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import { Button } from './ui/button'
|
import { Button } from './ui/button'
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './ui/card'
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './ui/card'
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ export default function CardsPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirmDelete = () => {
|
const confirmDelete = () => {
|
||||||
if (cardToDelete) {
|
if (cardToDelete && cardToDelete.id) {
|
||||||
deleteMutation.mutate(cardToDelete.id)
|
deleteMutation.mutate(cardToDelete.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ void main() async {
|
||||||
DiscountCampaignTask(getIt.get<DiscountsManager>(), database),
|
DiscountCampaignTask(getIt.get<DiscountsManager>(), database),
|
||||||
UpdateOnlineUsersTask(getIt.get<UserManager>()),
|
UpdateOnlineUsersTask(getIt.get<UserManager>()),
|
||||||
TasksSeederTask(database),
|
TasksSeederTask(database),
|
||||||
|
TestGeneratorTask(getIt.get<TestManager>(), database),
|
||||||
]).init();
|
]).init();
|
||||||
|
|
||||||
print('✅ Backend started successfully!');
|
print('✅ Backend started successfully!');
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,15 @@ class TestManager {
|
||||||
final cards = await _db.packDao.getPackCards(packId);
|
final cards = await _db.packDao.getPackCards(packId);
|
||||||
if (cards.isEmpty) return;
|
if (cards.isEmpty) return;
|
||||||
|
|
||||||
|
// Delete old generated tests for this pack
|
||||||
|
final existingTests = await _db.testDao.getTestsByPackId(packId);
|
||||||
|
final oldGeneratedTests = existingTests
|
||||||
|
.where((test) => test.version == 'generated')
|
||||||
|
.toList();
|
||||||
|
for (final oldTest in oldGeneratedTests) {
|
||||||
|
await _db.testDao.softDeleteTest(oldTest.id);
|
||||||
|
}
|
||||||
|
|
||||||
// Create creation test data
|
// Create creation test data
|
||||||
final testDataItems = cards.map((card) {
|
final testDataItems = cards.map((card) {
|
||||||
return TestDataItem(
|
return TestDataItem(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue