feature: Doctor Feedback Mode

This commit is contained in:
voltsrage
2026-06-20 14:32:51 +08:00
parent ebd53f2df6
commit 584d1edd58
17 changed files with 1385 additions and 11 deletions
@@ -0,0 +1,16 @@
import { computed } from 'vue'
import { useFeedbackStore } from '@/stores/feedback'
export function useFeedback(alertId) {
const store = useFeedbackStore()
const feedback = computed(() => store.getFeedback(alertId))
const hasRating = computed(() => !!feedback.value)
const rating = computed(() => feedback.value?.rating ?? null)
function rate(alertType, severity, ratingValue, notes = '') {
store.addFeedback(alertId, alertType, severity, ratingValue, notes)
}
return { feedback, hasRating, rating, rate }
}