Compare commits
4
Commits
@@ -74,7 +74,7 @@ const navLinks = [
|
|||||||
<BIIcon name="it-user" color="black"/>
|
<BIIcon name="it-user" color="black"/>
|
||||||
<span v-if="hasUnreadNotifications" class="notification-dot"></span>
|
<span v-if="hasUnreadNotifications" class="notification-dot"></span>
|
||||||
</span>
|
</span>
|
||||||
<span class="d-none d-lg-block">{{ user?.first_name }}</span>
|
<span class="d-none d-lg-block username">{{ user?.first_name }}</span>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
||||||
<button class="btn btn-primary btn-icon btn-full border-0" @click="logout"
|
<button class="btn btn-primary btn-icon btn-full border-0" @click="logout"
|
||||||
@@ -310,4 +310,11 @@ const navLinks = [
|
|||||||
background: #d9364f;
|
background: #d9364f;
|
||||||
border: 2px solid #ffffff;
|
border: 2px solid #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.username {
|
||||||
|
max-width: 8ch;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+74
-47
@@ -60,21 +60,37 @@ const activeReports = computed(() => reports.value.filter((report) => ['UNDER_RE
|
|||||||
const closedReports = computed(() => reports.value.filter((report) => ['RESOLVED', 'CLOSED'].includes(report.status)).length)
|
const closedReports = computed(() => reports.value.filter((report) => ['RESOLVED', 'CLOSED'].includes(report.status)).length)
|
||||||
|
|
||||||
const reportsByStatus = computed(() =>
|
const reportsByStatus = computed(() =>
|
||||||
Object.entries(statusMeta)
|
Object.entries(statusMeta)
|
||||||
.map(([status, meta]) => ({
|
.map(([status, meta]) => ({
|
||||||
status: status as ReportStatus,
|
status: status as ReportStatus,
|
||||||
label: meta.label,
|
label: meta.label,
|
||||||
tone: meta.tone,
|
tone: meta.tone,
|
||||||
total: reports.value.filter((report) => report.status === status).length
|
total: reports.value.filter((report) => report.status === status).length
|
||||||
}))
|
}))
|
||||||
.filter((item) => item.total > 0)
|
.filter((item) => item.total > 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
const recentReports = computed(() =>
|
const currentPage = ref(1)
|
||||||
[...filteredReports.value]
|
const itemsPerPage = ref(12)
|
||||||
.sort((a, b) => new Date(b.created_at || '').getTime() - new Date(a.created_at || '').getTime())
|
|
||||||
.slice(0, 12)
|
watch([search, selectedStatus, selectedCategoryId, selectedAreaId], () => {
|
||||||
)
|
currentPage.value = 1
|
||||||
|
})
|
||||||
|
|
||||||
|
const totalPages = computed(() => Math.ceil(filteredReports.value.length / itemsPerPage.value))
|
||||||
|
|
||||||
|
const paginatedReports = computed(() => {
|
||||||
|
const sorted = [...filteredReports.value].sort(
|
||||||
|
(a, b) => new Date(b.created_at || '').getTime() - new Date(a.created_at || '').getTime()
|
||||||
|
)
|
||||||
|
const start = (currentPage.value - 1) * itemsPerPage.value
|
||||||
|
const end = start + itemsPerPage.value
|
||||||
|
return sorted.slice(start, end)
|
||||||
|
})
|
||||||
|
|
||||||
|
const handlePageChange = (page: number) => {
|
||||||
|
currentPage.value = page
|
||||||
|
}
|
||||||
|
|
||||||
const formatDate = (value?: string) => {
|
const formatDate = (value?: string) => {
|
||||||
if (!value) return '-'
|
if (!value) return '-'
|
||||||
@@ -160,71 +176,82 @@ const truncate = (value?: string, max = 120) => {
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-3">
|
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-3">
|
||||||
<h2 class="h5 mb-0">Distribuzione stati</h2>
|
<h2 class="h5 mb-0">Distribuzione stati</h2>
|
||||||
<span class="text-muted small">{{ filteredReports.length }} elementi visibili</span>
|
<span class="text-muted small">{{ filteredReports.length }} elementi trovati</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive report-table-wrapper">
|
<div class="table-responsive report-table-wrapper">
|
||||||
<table class="table table-hover report-table mb-0 align-middle">
|
<table class="table table-hover report-table mb-0 align-middle">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Stato</th>
|
<th>Stato</th>
|
||||||
<th class="text-end">Totale</th>
|
<th class="text-end">Totale</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in reportsByStatus" :key="item.status">
|
<tr v-for="item in reportsByStatus" :key="item.status">
|
||||||
<td>
|
<td>
|
||||||
<span class="badge" :class="`bg-${item.tone}`">
|
<span class="badge" :class="`bg-${item.tone}`">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">{{ item.total }}</td>
|
<td class="text-end">{{ item.total }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="recentReports.length === 0" class="alert alert-info">
|
<div v-if="filteredReports.length === 0" class="alert alert-info">
|
||||||
Nessuna segnalazione trovata con filtri correnti.
|
Nessuna segnalazione trovata con filtri correnti.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="card card-bg border-0 shadow-sm">
|
<div v-else class="card card-bg border-0 shadow-sm mb-5">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<div class="table-responsive report-table-wrapper">
|
<div class="table-responsive report-table-wrapper">
|
||||||
<table class="table table-hover report-table mb-0 align-middle">
|
<table class="table table-hover report-table mb-0 align-middle">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Categoria</th>
|
<th>Categoria</th>
|
||||||
<th>Indirizzo</th>
|
<th>Indirizzo</th>
|
||||||
<th>Area</th>
|
<th>Area</th>
|
||||||
<th>Stato</th>
|
<th>Stato</th>
|
||||||
<th>Operatore</th>
|
<th>Operatore</th>
|
||||||
<th>Aggiornata</th>
|
<th>Aggiornata</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="report in recentReports" :key="report.id">
|
<tr v-for="report in paginatedReports" :key="report.id">
|
||||||
<td class="report-table-id">#{{ report.id }}</td>
|
<td class="report-table-id">#{{ report.id }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="fw-semibold">{{ report.category_name || '-' }}</div>
|
<div class="fw-semibold">{{ report.category_name || '-' }}</div>
|
||||||
<small class="text-muted">{{ truncate(report.description, 72) }}</small>
|
<small class="text-muted">{{ truncate(report.description, 72) }}</small>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ report.address || '-' }}</td>
|
<td>{{ report.address || '-' }}</td>
|
||||||
<td>{{ report.area_name || 'Non assegnata' }}</td>
|
<td>{{ report.area_name || 'Non assegnata' }}</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge" :class="`bg-${statusMeta[report.status].tone}`">
|
<span class="badge" :class="`bg-${statusMeta[report.status].tone}`">
|
||||||
{{ statusMeta[report.status].label }}
|
{{ statusMeta[report.status].label }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ report.assigned_operator_id ? `#${report.assigned_operator_id}` : '-' }}</td>
|
<td>{{ report.assigned_operator_id ? `#${report.assigned_operator_id}` : '-' }}</td>
|
||||||
<td class="text-muted text-nowrap">{{ formatDate(report.updated_at || report.created_at) }}</td>
|
<td class="text-muted text-nowrap">{{ formatDate(report.updated_at || report.created_at) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer bg-transparent d-flex flex-wrap justify-content-between align-items-center py-3" v-if="totalPages > 1">
|
||||||
|
<span class="text-muted small mb-2 mb-sm-0">Pagina {{ currentPage }} di {{ totalPages }}</span>
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
:current-page="currentPage"
|
||||||
|
:per-page="itemsPerPage"
|
||||||
|
:total-items="filteredReports.length"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+20
-42
@@ -7,37 +7,27 @@ const { getOpenDataReports } = usePublic()
|
|||||||
|
|
||||||
const currentPage = ref(1)
|
const currentPage = ref(1)
|
||||||
const perPage = ref(9)
|
const perPage = ref(9)
|
||||||
|
|
||||||
const { data: openDataResponse, pending } = await useAsyncData(
|
const { data: openDataResponse, pending } = await useAsyncData(
|
||||||
'open-data-reports',
|
'open-data-reports',
|
||||||
() => getOpenDataReports({ page: currentPage.value, per_page: perPage.value }),
|
() => getOpenDataReports({ page: 1, per_page: 200 })
|
||||||
{ watch: [currentPage] }
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const visibleReports = computed(() =>
|
const allVisibleReports = computed(() =>
|
||||||
(openDataResponse.value?.reports || []).filter((report) => isWithinBariBounds(report.latitude, report.longitude))
|
(openDataResponse.value?.reports || []).filter((report) => isWithinBariBounds(report.latitude, report.longitude))
|
||||||
)
|
)
|
||||||
|
|
||||||
const isLastPage = computed(() => {
|
const visibleReports = computed(() => {
|
||||||
if (!openDataResponse.value?.reports) return true
|
const start = (currentPage.value - 1) * perPage.value
|
||||||
return openDataResponse.value.reports.length < perPage.value
|
const end = start + perPage.value
|
||||||
|
return allVisibleReports.value.slice(start, end)
|
||||||
})
|
})
|
||||||
|
|
||||||
const nextPage = () => {
|
const handlePageChange = (page: number) => {
|
||||||
if (!isLastPage.value) currentPage.value++
|
currentPage.value = page
|
||||||
}
|
|
||||||
const prevPage = () => {
|
|
||||||
if (currentPage.value > 1) currentPage.value--
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: mapOpenDataResponse, pending: mapPending } = useAsyncData(
|
const mapVisibleReports = computed(() => allVisibleReports.value)
|
||||||
'open-data-map-reports',
|
|
||||||
() => getOpenDataReports({ page: 1, per_page: 200 }),
|
|
||||||
{ lazy: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
const mapVisibleReports = computed(() =>
|
|
||||||
(mapOpenDataResponse.value?.reports || []).filter((report) => isWithinBariBounds(report.latitude, report.longitude))
|
|
||||||
)
|
|
||||||
|
|
||||||
const currentView = ref<'grid' | 'map'>('grid')
|
const currentView = ref<'grid' | 'map'>('grid')
|
||||||
const mapContainer = ref<HTMLElement | null>(null)
|
const mapContainer = ref<HTMLElement | null>(null)
|
||||||
@@ -170,7 +160,7 @@ onBeforeUnmount(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container my-5">
|
<div class="container my-5" id="grid-start">
|
||||||
<div class="row align-items-center mb-5 pb-3 border-bottom">
|
<div class="row align-items-center mb-5 pb-3 border-bottom">
|
||||||
<div class="col-12 col-md-6 mb-3 mb-md-0 d-flex gap-2">
|
<div class="col-12 col-md-6 mb-3 mb-md-0 d-flex gap-2">
|
||||||
<button
|
<button
|
||||||
@@ -205,7 +195,7 @@ onBeforeUnmount(() => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="!pending && currentView === 'grid'">
|
<div v-show="!pending && currentView === 'grid'">
|
||||||
<div class="row" v-if="openDataResponse?.reports && openDataResponse.reports.length > 0">
|
<div class="row" v-if="allVisibleReports.length > 0">
|
||||||
<div class="col-12 col-md-6 col-lg-4 mb-4" v-for="report in visibleReports" :key="report.id">
|
<div class="col-12 col-md-6 col-lg-4 mb-4" v-for="report in visibleReports" :key="report.id">
|
||||||
<div class="card-wrapper card-space h-100">
|
<div class="card-wrapper card-space h-100">
|
||||||
<div class="card card-bg h-100 shadow-sm">
|
<div class="card card-bg h-100 shadow-sm">
|
||||||
@@ -251,32 +241,20 @@ onBeforeUnmount(() => {
|
|||||||
Nessun dato pubblico disponibile al momento.
|
Nessun dato pubblico disponibile al momento.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="pagination-wrapper justify-content-center mt-5" aria-label="Navigazione pagine open data">
|
<Pagination
|
||||||
<ul class="pagination">
|
v-if="allVisibleReports.length > 0"
|
||||||
<li class="page-item" :class="{ disabled: currentPage === 1 }">
|
:current-page="currentPage"
|
||||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true" @click.prevent="prevPage">
|
:per-page="perPage"
|
||||||
<BIIcon name="it-chevron-left" size="sm"/>
|
:total-items="allVisibleReports.length"
|
||||||
<span class="visually-hidden">Pagina precedente</span>
|
@page-change="handlePageChange"
|
||||||
</a>
|
/>
|
||||||
</li>
|
|
||||||
<li class="page-item">
|
|
||||||
<span class="page-link font-weight-semibold">Pagina {{ currentPage }}</span>
|
|
||||||
</li>
|
|
||||||
<li class="page-item" :class="{ disabled: isLastPage }">
|
|
||||||
<a class="page-link" href="#" @click.prevent="nextPage">
|
|
||||||
<span class="visually-hidden">Pagina successiva</span>
|
|
||||||
<BIIcon name="it-chevron-right" size="sm"/>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="!pending && currentView === 'map'" class="map-view-wrapper">
|
<div v-show="!pending && currentView === 'map'" class="map-view-wrapper">
|
||||||
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
|
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
|
||||||
<p class="text-muted mb-0">Mappa pubblica delle segnalazioni nell'area di Bari.</p>
|
<p class="text-muted mb-0">Mappa pubblica delle segnalazioni nell'area di Bari.</p>
|
||||||
<span class="badge bg-light text-dark border">
|
<span class="badge bg-light text-dark border">
|
||||||
<template v-if="mapPending">Caricamento...</template>
|
<template v-if="pending">Caricamento...</template>
|
||||||
<template v-else>{{ mapVisibleReports.length }} punti</template>
|
<template v-else>{{ mapVisibleReports.length }} punti</template>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+87
-42
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref, computed, onMounted } from 'vue'
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: 'auth',
|
middleware: 'auth',
|
||||||
})
|
})
|
||||||
@@ -34,6 +36,19 @@ const isFeedbackOpen = ref(false)
|
|||||||
const feedbackRating = ref(5)
|
const feedbackRating = ref(5)
|
||||||
const feedbackComment = ref('')
|
const feedbackComment = ref('')
|
||||||
const isSubmittingFeedback = ref(false)
|
const isSubmittingFeedback = ref(false)
|
||||||
|
const submittedFeedback = ref<{ rating: number; comment?: string } | null>(null)
|
||||||
|
|
||||||
|
// Carica l'eventuale feedback da local storage dopo il mount (per evitare mismatch nel SSR)
|
||||||
|
onMounted(() => {
|
||||||
|
try {
|
||||||
|
const saved = localStorage.getItem(`feedback_${reportId}`)
|
||||||
|
if (saved) {
|
||||||
|
submittedFeedback.value = JSON.parse(saved)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Errore nel recupero del feedback da local storage:', error)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const handleSendMessage = async (messageText: string, files: File[]) => {
|
const handleSendMessage = async (messageText: string, files: File[]) => {
|
||||||
isSubmittingMessage.value = true
|
isSubmittingMessage.value = true
|
||||||
@@ -51,13 +66,18 @@ const handleSendMessage = async (messageText: string, files: File[]) => {
|
|||||||
const handleSubmitFeedback = async () => {
|
const handleSubmitFeedback = async () => {
|
||||||
isSubmittingFeedback.value = true
|
isSubmittingFeedback.value = true
|
||||||
try {
|
try {
|
||||||
await addFeedback(reportId, {
|
const feedbackData = {
|
||||||
rating: feedbackRating.value,
|
rating: feedbackRating.value,
|
||||||
comment: feedbackComment.value || undefined,
|
comment: feedbackComment.value || undefined,
|
||||||
})
|
}
|
||||||
|
|
||||||
|
await addFeedback(reportId, feedbackData)
|
||||||
|
|
||||||
|
// Salva in local storage in mancanza di un endpoint dal backend
|
||||||
|
localStorage.setItem(`feedback_${reportId}`, JSON.stringify(feedbackData))
|
||||||
|
submittedFeedback.value = feedbackData
|
||||||
|
|
||||||
isFeedbackOpen.value = false
|
isFeedbackOpen.value = false
|
||||||
feedbackRating.value = 5
|
|
||||||
feedbackComment.value = ''
|
|
||||||
await refreshReport()
|
await refreshReport()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error submitting feedback:', error)
|
console.error('Error submitting feedback:', error)
|
||||||
@@ -251,50 +271,75 @@ const formatDate = (dateString: string): string => {
|
|||||||
<div v-if="canFeedback && isOwner" class="card card-bg border-0 shadow-sm mb-4">
|
<div v-if="canFeedback && isOwner" class="card card-bg border-0 shadow-sm mb-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h2 class="h6 mb-3">Valuta intervento</h2>
|
<h2 class="h6 mb-3">Valuta intervento</h2>
|
||||||
<p class="text-muted small mb-3">Lascia valutazione finale quando intervento è concluso.</p>
|
|
||||||
<button
|
|
||||||
v-if="!isFeedbackOpen"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary w-100"
|
|
||||||
@click="isFeedbackOpen = true"
|
|
||||||
>
|
|
||||||
Valuta intervento
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<template v-else>
|
<template v-if="submittedFeedback">
|
||||||
|
<div class="alert alert-success small mb-3">
|
||||||
|
Grazie! Il tuo feedback è stato inviato con successo.
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Valutazione</label>
|
<span class="d-block text-muted small mb-1">La tua valutazione</span>
|
||||||
<div class="d-flex gap-2">
|
<div class="d-flex gap-1">
|
||||||
<button v-for="n in 5" :key="n" type="button" class="btn btn-link p-0"
|
<BIIcon
|
||||||
@click="feedbackRating = n" :aria-label="`${n} stelle`">
|
v-for="n in 5"
|
||||||
<BIIcon
|
:key="n"
|
||||||
:name="n <= feedbackRating ? 'it-star-full' : 'it-star-outline'"
|
:name="n <= submittedFeedback.rating ? 'it-star-full' : 'it-star-outline'"
|
||||||
size="lg"
|
size="sm"
|
||||||
:color="n <= feedbackRating ? 'warning' : 'primary'"
|
:color="n <= submittedFeedback.rating ? 'warning' : 'primary'"
|
||||||
/>
|
/>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="submittedFeedback.comment">
|
||||||
<div class="mb-3">
|
<span class="d-block text-muted small mb-1">Il tuo commento</span>
|
||||||
<textarea
|
<p class="mb-0 small text-break">{{ submittedFeedback.comment }}</p>
|
||||||
v-model="feedbackComment"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="Commento opzionale"
|
|
||||||
rows="3"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="d-grid gap-2">
|
<template v-else>
|
||||||
<button :disabled="isSubmittingFeedback" class="btn btn-primary" type="button"
|
<p class="text-muted small mb-3">Lascia valutazione finale quando intervento è concluso.</p>
|
||||||
@click="handleSubmitFeedback">
|
<button
|
||||||
<span v-if="isSubmittingFeedback" class="spinner-border spinner-border-sm me-2"></span>
|
v-if="!isFeedbackOpen"
|
||||||
Invia
|
type="button"
|
||||||
</button>
|
class="btn btn-primary w-100"
|
||||||
<button type="button" class="btn btn-outline-secondary" @click="isFeedbackOpen = false">
|
@click="isFeedbackOpen = true"
|
||||||
Annulla
|
>
|
||||||
</button>
|
Valuta intervento
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Valutazione</label>
|
||||||
|
<div class="d-flex gap-2">
|
||||||
|
<button v-for="n in 5" :key="n" type="button" class="btn btn-link p-0"
|
||||||
|
@click="feedbackRating = n" :aria-label="`${n} stelle`">
|
||||||
|
<BIIcon
|
||||||
|
:name="n <= feedbackRating ? 'it-star-full' : 'it-star-outline'"
|
||||||
|
size="lg"
|
||||||
|
:color="n <= feedbackRating ? 'warning' : 'primary'"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<textarea
|
||||||
|
v-model="feedbackComment"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Commento opzionale"
|
||||||
|
rows="3"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-grid gap-2">
|
||||||
|
<button :disabled="isSubmittingFeedback" class="btn btn-primary" type="button"
|
||||||
|
@click="handleSubmitFeedback">
|
||||||
|
<span v-if="isSubmittingFeedback" class="spinner-border spinner-border-sm me-2"></span>
|
||||||
|
Invia
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-outline-secondary" @click="isFeedbackOpen = false">
|
||||||
|
Annulla
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user