diff --git a/app/pages/reports/[id].vue b/app/pages/reports/[id].vue index ca9c6ba..0a116e7 100644 --- a/app/pages/reports/[id].vue +++ b/app/pages/reports/[id].vue @@ -69,6 +69,12 @@ const handleSubmitFeedback = async () => { const isOwner = computed(() => report.value?.user_id === user.value?.id) const canFeedback = computed(() => report.value?.status === 'RESOLVED') +const canChat = computed(() => { + if (!report.value) return false + const closedStatuses = ['RESOLVED', 'CLOSED', 'REJECTED'] + return !closedStatuses.includes(report.value.status) +}) + const statusMeta: Record = { OPEN: { label: 'Aperta', tone: 'info' }, UNDER_REVIEW: { label: 'In revisione', tone: 'warning' }, @@ -210,7 +216,12 @@ const formatDate = (dateString: string): string => { - + +
+ La chat è disabilitata poiché la segnalazione è in stato + {{ statusMeta[report.status]?.label || report.status }}. +
+