mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
6a77df402d
This commit introduces the ability to clear quiz results and delete quizzes directly from the backoffice. It includes new routes, controllers, modals for user confirmation, and updates to translations. The `QuizRepository` now supports dedicated methods for clearing results and deleting quizzes along with error handling. Related database migrations and front-end adjustments are also included.
18 lines
495 B
JavaScript
18 lines
495 B
JavaScript
import {Controller} from '@hotwired/stimulus';
|
|
import * as bootstrap from 'bootstrap'
|
|
|
|
export default class extends Controller {
|
|
connect() {
|
|
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
|
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
|
}
|
|
|
|
clearQuiz() {
|
|
new bootstrap.Modal('#clearQuizModal').show();
|
|
}
|
|
|
|
deleteQuiz() {
|
|
new bootstrap.Modal('#deleteQuizModal').show();
|
|
}
|
|
}
|