refactor: fix indentation
This commit is contained in:
@@ -57,7 +57,6 @@ const pageNumbers = computed(() => {
|
||||
<template>
|
||||
<nav v-if="totalPages > 1" class="d-flex justify-content-center mt-5 mb-5">
|
||||
<ul class="pagination mb-0">
|
||||
<!-- Pagina Precedente -->
|
||||
<li class="page-item" :class="{ disabled: currentPage === 1 }">
|
||||
<button
|
||||
class="page-link"
|
||||
@@ -69,7 +68,6 @@ const pageNumbers = computed(() => {
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<!-- Numeri Pagine -->
|
||||
<li v-for="page in pageNumbers" :key="`page-${page}`" class="page-item" :class="{ active: page === currentPage }">
|
||||
<template v-if="page === '...'">
|
||||
<span class="page-link">...</span>
|
||||
@@ -86,7 +84,6 @@ const pageNumbers = computed(() => {
|
||||
</template>
|
||||
</li>
|
||||
|
||||
<!-- Pagina Successiva -->
|
||||
<li class="page-item" :class="{ disabled: currentPage === totalPages }">
|
||||
<button
|
||||
class="page-link"
|
||||
@@ -100,7 +97,6 @@ const pageNumbers = computed(() => {
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- Info Pagina -->
|
||||
<div v-if="totalPages > 1" class="text-center text-muted small mt-3">
|
||||
Pagina {{ currentPage }} di {{ totalPages }} ({{ totalItems }} elementi totali)
|
||||
</div>
|
||||
|
||||
@@ -659,7 +659,7 @@ watch([() => form.value.latitude, () => form.value.longitude], ([newLat, newLng]
|
||||
.map-container {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
z-index: 1; /* Fix for Bootstrap elements overlapping map */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.address-suggestions {
|
||||
|
||||
@@ -11,7 +11,6 @@ const { data: statsRes, pending } = useAsyncData('admin-stats', () => getOvervie
|
||||
<p>Accesso di livello 1. Da qui puoi gestire le configurazioni di sistema, le categorie e moderare le segnalazioni.</p>
|
||||
</div>
|
||||
|
||||
<!-- Statistiche Globali (Mock o Reali) -->
|
||||
<div class="row mb-5" v-if="!pending && statsRes?.ok">
|
||||
<div class="col-6 col-md-3 mb-3">
|
||||
<div class="card-wrapper card-space">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick, onBeforeUnmount, computed, watch } from 'vue'
|
||||
import { computed, nextTick, onBeforeUnmount, reactive, ref, watch } from 'vue'
|
||||
import { BARI_BOUNDS, BARI_CENTER, isWithinBariBounds } from '~/utils/bari'
|
||||
|
||||
definePageMeta({
|
||||
@@ -394,7 +394,6 @@ const handleDeleteArea = async () => {
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<!-- Main view map showing all areas -->
|
||||
<div class="card mb-4 shadow-sm border-0">
|
||||
<div id="mainMap" class="rounded" style="height: 400px; width: 100%; z-index: 1;"></div>
|
||||
</div>
|
||||
@@ -442,7 +441,6 @@ const handleDeleteArea = async () => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Modale Creazione/Modifica -->
|
||||
<div v-if="isCreating" class="modal-backdrop fade show d-block" style="background: rgba(0,0,0,0.5); z-index: 1040;"></div>
|
||||
<div v-if="isCreating" class="modal fade show d-block" tabindex="-1" style="z-index: 1050;">
|
||||
<div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { reactive, ref } from 'vue'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
@@ -127,7 +127,6 @@ const formatDate = (dateStr: string) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Spostato in modo che non interrompa l'if-else dei caricamenti -->
|
||||
<div v-if="actionError" class="alert alert-danger mb-4">
|
||||
{{ actionError }}
|
||||
</div>
|
||||
@@ -140,7 +139,6 @@ const formatDate = (dateStr: string) => {
|
||||
Nessun elemento da moderare al momento.
|
||||
</div>
|
||||
|
||||
<!-- Questo v-else ora è scatenato in modo pulito solo quando i dati esistono davvero -->
|
||||
<div v-else>
|
||||
<div
|
||||
class="card mb-3 border-0"
|
||||
|
||||
@@ -97,7 +97,6 @@ const handleRegister = async () => {
|
||||
|
||||
<h2 class="h5 text-primary font-weight-bold mb-4 border-bottom pb-2">Dati Anagrafici</h2>
|
||||
|
||||
<!-- FIX LAYOUT: form-group separato da col -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12 col-md-6 mb-4 mb-md-0">
|
||||
<div class="form-group">
|
||||
@@ -136,7 +135,6 @@ const handleRegister = async () => {
|
||||
<small class="form-text text-muted">Faciliterà il contatto da parte degli operatori comunali in caso di intervento.</small>
|
||||
</div>
|
||||
|
||||
<!-- Privacy Checkbox -->
|
||||
<div class="form-check mb-4">
|
||||
<input class="form-check-input" type="checkbox" id="privacyCheck" v-model="form.privacy" required>
|
||||
<label class="form-check-label small" for="privacyCheck">
|
||||
|
||||
+38
-29
@@ -22,72 +22,79 @@ useHead({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- OBIETTIVO DEL PROGETTO -->
|
||||
<div class="container my-5 py-3">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 offset-lg-2">
|
||||
<h2 class="mb-4 font-weight-bold">Migliorare la qualità della vita in città</h2>
|
||||
<p class="lead text-muted">
|
||||
Visione nasce dall'esigenza di fornire alle amministrazioni comunali uno strumento moderno per mappare, gestire e risolvere disservizi presenti sul territorio (buche stradali, illuminazione guasta, rifiuti abbandonati).
|
||||
Visione nasce dall'esigenza di fornire alle amministrazioni comunali uno strumento moderno per mappare,
|
||||
gestire e risolvere disservizi presenti sul territorio (buche stradali, illuminazione guasta, rifiuti
|
||||
abbandonati).
|
||||
</p>
|
||||
<p>
|
||||
Il sistema non si limita a raccogliere dati, ma automatizza l'assegnazione alle squadre operative competenti tramite logiche geospaziali, traccia l'intero ciclo di vita della segnalazione e restituisce trasparenza ai cittadini tramite un portale Open Data dedicato.
|
||||
Il sistema non si limita a raccogliere dati, ma automatizza l'assegnazione alle squadre operative competenti
|
||||
tramite logiche geospaziali, traccia l'intero ciclo di vita della segnalazione e restituisce trasparenza ai
|
||||
cittadini tramite un portale Open Data dedicato.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RUOLI E FUNZIONALITÀ (Card Grid) -->
|
||||
<div class="bg-light py-5">
|
||||
<div class="container">
|
||||
<h2 class="text-center mb-5 font-weight-bold">Come funziona il sistema</h2>
|
||||
<div class="row">
|
||||
|
||||
<!-- Cittadino -->
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="card-wrapper card-space h-100">
|
||||
<div class="card card-bg h-100">
|
||||
<div class="card-body">
|
||||
<BIIcon name="it-user" size="xl" color="primary" class="mb-3" />
|
||||
<BIIcon class="mb-3" color="primary" name="it-user" size="xl"/>
|
||||
<h3 class="card-title h5 font-weight-bold">Cittadini</h3>
|
||||
<p class="card-text text-muted">
|
||||
Tramite autenticazione sicura (OTP via email o CIE), i cittadini possono inviare segnalazioni geolocalizzate complete di foto.
|
||||
Tramite autenticazione sicura (OTP via email o CIE), i cittadini possono inviare segnalazioni
|
||||
geolocalizzate complete di foto.
|
||||
<br><br>
|
||||
Per incentivare la partecipazione, è integrato un sistema di <strong>gamification</strong>: ogni segnalazione valida e risolta fa guadagnare Punti Cittadino, premiando la cittadinanza attiva. Possono inoltre chattare con gli operatori e lasciare un feedback finale.
|
||||
Per incentivare la partecipazione, è integrato un sistema di <strong>gamification</strong>: ogni
|
||||
segnalazione valida e risolta fa guadagnare Punti Cittadino, premiando la cittadinanza attiva.
|
||||
Possono inoltre chattare con gli operatori e lasciare un feedback finale.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Operatore -->
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="card-wrapper card-space h-100">
|
||||
<div class="card card-bg h-100">
|
||||
<div class="card-body">
|
||||
<BIIcon name="it-tool" size="xl" color="primary" class="mb-3" />
|
||||
<BIIcon class="mb-3" color="primary" name="it-tool" size="xl"/>
|
||||
<h3 class="card-title h5 font-weight-bold">Operatori e Squadre</h3>
|
||||
<p class="card-text text-muted">
|
||||
Il personale comunale visualizza una dashboard con le segnalazioni in ingresso. Possono prenderle in carico, comunicare con l'utente e assegnarle alle squadre di intervento sul territorio.
|
||||
Il personale comunale visualizza una dashboard con le segnalazioni in ingresso. Possono prenderle in
|
||||
carico, comunicare con l'utente e assegnarle alle squadre di intervento sul territorio.
|
||||
<br><br>
|
||||
Il sistema gestisce l'intero flusso di stato: da <em>Aperta</em> a <em>In Revisione</em>, fino a <em>In Lavorazione</em> e <em>Risolta</em>.
|
||||
Il sistema gestisce l'intero flusso di stato: da <em>Aperta</em> a <em>In Revisione</em>, fino a
|
||||
<em>In Lavorazione</em> e <em>Risolta</em>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Amministratore -->
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="card-wrapper card-space h-100">
|
||||
<div class="card card-bg h-100">
|
||||
<div class="card-body">
|
||||
<BIIcon name="it-settings" size="xl" color="primary" class="mb-3" />
|
||||
<BIIcon class="mb-3" color="primary" name="it-settings" size="xl"/>
|
||||
<h3 class="card-title h5 font-weight-bold">Amministrazione</h3>
|
||||
<p class="card-text text-muted">
|
||||
Gli amministratori hanno il controllo completo della piattaforma. Possono definire le aree urbane tramite poligoni GeoJSON, gestire i permessi degli utenti, supervisionare i feedback e moderare eventuali abusi.
|
||||
Gli amministratori hanno il controllo completo della piattaforma. Possono definire le aree urbane
|
||||
tramite poligoni GeoJSON, gestire i permessi degli utenti, supervisionare i feedback e moderare
|
||||
eventuali abusi.
|
||||
<br><br>
|
||||
Hanno inoltre accesso a statistiche avanzate per individuare le criticità sul territorio e monitorare i tempi medi di risoluzione.
|
||||
Hanno inoltre accesso a statistiche avanzate per individuare le criticità sul territorio e
|
||||
monitorare i tempi medi di risoluzione.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,44 +105,46 @@ useHead({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- STACK TECNOLOGICO E FILOSOFIA -->
|
||||
<div class="container my-5 py-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 col-lg-6 mb-4 mb-lg-0">
|
||||
<h2 class="font-weight-bold mb-4">Tecnologia e Indipendenza</h2>
|
||||
<ul class="it-list">
|
||||
<li>
|
||||
<BIIcon name="it-code-circle" color="primary" class="me-2" />
|
||||
<strong>Architettura:</strong> Frontend reattivo e multipiattaforma sviluppato in <em>Vue.js/Nuxt 3</em>. Backend ad altissime prestazioni scritto in <em>C++</em> utilizzando il framework <em>Drogon</em>.
|
||||
<BIIcon class="me-2" color="primary" name="it-code-circle"/>
|
||||
<strong>Architettura:</strong> Frontend reattivo e multipiattaforma sviluppato in <em>Vue.js/Nuxt 3</em>.
|
||||
Backend ad altissime prestazioni scritto in <em>C++</em> utilizzando il framework <em>Drogon</em>.
|
||||
</li>
|
||||
<li class="mt-3">
|
||||
<BIIcon name="it-lock" color="primary" class="me-2" />
|
||||
<BIIcon class="me-2" color="primary" name="it-lock"/>
|
||||
<strong>Sicurezza:</strong> Accesso con OTP e sistema di autorizzazione Role-Based basato su token JWT.
|
||||
</li>
|
||||
<li class="mt-3">
|
||||
<BIIcon name="it-piu" color="primary" class="me-2" />
|
||||
<strong>Open Data:</strong> Piena aderenza alle linee guida AGID sulla trasparenza, con esportazione di dati anonimizzati accessibili al pubblico.
|
||||
<BIIcon class="me-2" color="primary" name="it-piu"/>
|
||||
<strong>Open Data:</strong> Piena aderenza alle linee guida AGID sulla trasparenza, con esportazione di
|
||||
dati anonimizzati accessibili al pubblico.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-lg-5 offset-lg-1">
|
||||
<!-- Callout Ribellione Gitea -->
|
||||
<div class="callout callout-highlight callout-warning">
|
||||
<div class="callout-title">
|
||||
<BIIcon name="it-warning-circle" />
|
||||
<BIIcon name="it-warning-circle"/>
|
||||
Un approccio etico al codice sorgente
|
||||
</div>
|
||||
<p>
|
||||
In risposta alle policy sempre più aggressive delle grandi piattaforme commerciali riguardo l'addestramento non consensuale di modelli di Intelligenza Artificiale sui repository privati, lo sviluppo di questo progetto è ospitato su un'istanza <strong>self-hosted di Gitea</strong>.
|
||||
In risposta alle policy sempre più aggressive delle grandi piattaforme commerciali riguardo
|
||||
l'addestramento non consensuale di modelli di Intelligenza Artificiale sui repository privati, lo sviluppo
|
||||
di questo progetto è ospitato su un'istanza <strong>self-hosted di Gitea</strong>.
|
||||
<br><br>
|
||||
Una scelta di principio per garantire il controllo totale, la privacy e la vera sovranità sui dati e sul codice.
|
||||
Una scelta di principio per garantire il controllo totale, la privacy e la vera sovranità sui dati e sul
|
||||
codice.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CREDITI ACCADEMICI (Footer Style Callout) -->
|
||||
<div class="container mb-5 pb-5">
|
||||
<div class="card-wrapper card-space">
|
||||
<div class="card card-bg border-start border-primary border-5">
|
||||
@@ -144,7 +153,8 @@ useHead({
|
||||
<div class="col-12 col-md-8">
|
||||
<h4 class="h5 font-weight-bold text-primary mb-2">Crediti Accademici</h4>
|
||||
<p class="mb-1">
|
||||
Questo progetto è stato realizzato nell'ambito del corso di <strong>Laboratorio di Programmazione</strong> (tenuto dal Prof. Vessio).
|
||||
Questo progetto è stato realizzato nell'ambito del corso di <strong>Laboratorio di
|
||||
Programmazione</strong> (tenuto dal Prof. Vessio).
|
||||
</p>
|
||||
<p class="text-muted small mb-0">
|
||||
Università degli Studi di Bari "Aldo Moro" - Dipartimento di Informatica.
|
||||
@@ -168,7 +178,6 @@ useHead({
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Leggere correzioni stilistiche per le liste */
|
||||
.it-list {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
|
||||
@@ -6,7 +6,6 @@ useHead({
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- HERO SECTION -->
|
||||
<div class="it-hero-wrapper it-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -22,7 +21,6 @@ useHead({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENUTO PRINCIPALE -->
|
||||
<div class="container my-5 py-4">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 offset-lg-2">
|
||||
@@ -53,7 +51,6 @@ useHead({
|
||||
Gli operatori e gli amministratori di sistema si riservano il diritto di moderare, nascondere o rimuovere segnalazioni contenenti materiale inappropriato, offensivo, non pertinente o illegale. L'abuso ripetuto del sistema comporterà il ban permanente dell'account dell'utente, associato al proprio Codice Fiscale.
|
||||
</p>
|
||||
|
||||
<!-- DISCLAIMER ACCADEMICO -->
|
||||
<div class="callout callout-highlight callout-info mt-5">
|
||||
<div class="callout-title">
|
||||
<BIIcon name="it-info-circle" />
|
||||
|
||||
@@ -92,7 +92,6 @@ const getNotificationColor = (type: string): string => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- HERO -->
|
||||
<div class="bg-light border-bottom py-4 mb-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -109,18 +108,15 @@ const getNotificationColor = (type: string): string => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENUTO -->
|
||||
<div class="container mb-5">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-10 offset-lg-1">
|
||||
|
||||
<!-- FILTRI (Opzionale) -->
|
||||
<div class="d-flex gap-2 mb-4">
|
||||
<button class="btn btn-sm btn-outline-primary active">Tutti</button>
|
||||
<button class="btn btn-sm btn-outline-secondary">Solo non letti</button>
|
||||
</div>
|
||||
|
||||
<!-- LISTA NOTIFICHE -->
|
||||
<div v-if="notifications.length === 0" class="text-center py-5">
|
||||
<BIIcon name="it-bell" size="xl" color="info" class="mb-3 d-block" />
|
||||
<h6 class="text-muted">Nessuna notifica</h6>
|
||||
@@ -140,14 +136,12 @@ const getNotificationColor = (type: string): string => {
|
||||
@click="handleNotificationClick(notification)"
|
||||
>
|
||||
<div class="d-flex align-items-start gap-3">
|
||||
<!-- ICONA -->
|
||||
<div class="flex-shrink-0 mt-1">
|
||||
<div class="rounded-circle p-2" :class="`bg-${getNotificationColor(notification.type)}`" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;">
|
||||
<BIIcon :name="getNotificationIcon(notification.type)" size="sm" color="white" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENUTO -->
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex align-items-start justify-content-between">
|
||||
<div>
|
||||
@@ -162,13 +156,11 @@ const getNotificationColor = (type: string): string => {
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- INDICATORE NON LETTO -->
|
||||
<div v-if="!notification.read_at" class="flex-shrink-0">
|
||||
<span class="badge bg-primary rounded-pill">Nuovo</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AZIONI RAPIDE -->
|
||||
<div v-if="notification.report_id" class="mt-2 d-flex gap-2">
|
||||
<NuxtLink :to="`/reports/${notification.report_id}`" class="btn btn-sm btn-outline-primary">
|
||||
<BIIcon name="it-arrow-right" size="xs" class="me-1" />
|
||||
@@ -188,7 +180,6 @@ const getNotificationColor = (type: string): string => {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- PAGINATION -->
|
||||
<Pagination
|
||||
v-if="notifications.length > 0"
|
||||
:current-page="page"
|
||||
|
||||
+2
-15
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue'
|
||||
import type { Map as LeafletMap, CircleMarker, LatLngBoundsExpression } from 'leaflet'
|
||||
import type { CircleMarker, LatLngBoundsExpression, Map as LeafletMap } from 'leaflet'
|
||||
import { BARI_BOUNDS, BARI_CENTER, isWithinBariBounds } from '~/utils/bari'
|
||||
|
||||
const { getOpenDataReports } = usePublic()
|
||||
@@ -10,14 +10,13 @@ const perPage = ref(9)
|
||||
const { data: openDataResponse, pending } = await useAsyncData(
|
||||
'open-data-reports',
|
||||
() => getOpenDataReports({ page: currentPage.value, per_page: perPage.value }),
|
||||
{ watch: [currentPage] } // Nuxt will re-fetch when currentPage changes
|
||||
{ watch: [currentPage] }
|
||||
)
|
||||
|
||||
const visibleReports = computed(() =>
|
||||
(openDataResponse.value?.reports || []).filter((report) => isWithinBariBounds(report.latitude, report.longitude))
|
||||
)
|
||||
|
||||
// Pagination logic: If we receive less items than `perPage`, we are on the last page.
|
||||
const isLastPage = computed(() => {
|
||||
if (!openDataResponse.value?.reports) return true
|
||||
return openDataResponse.value.reports.length < perPage.value
|
||||
@@ -140,7 +139,6 @@ onBeforeUnmount(() => {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- HERO SECTION (Small version for internal pages) -->
|
||||
<div class="it-hero-wrapper it-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -156,13 +154,9 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
<div class="container my-5">
|
||||
|
||||
<!-- TOOLBAR: View Toggles & Export -->
|
||||
<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">
|
||||
<!-- View Toggle Buttons -->
|
||||
<button
|
||||
class="btn btn-sm"
|
||||
:class="currentView === 'grid' ? 'btn-primary' : 'btn-outline-primary'"
|
||||
@@ -181,7 +175,6 @@ onBeforeUnmount(() => {
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 text-md-end">
|
||||
<!-- Fake Export CTA (Very common in Open Data portals) -->
|
||||
<button class="btn btn-sm btn-outline-secondary" title="Scarica dataset in formato JSON">
|
||||
<BIIcon name="it-download" size="sm" class="me-1" />
|
||||
Scarica JSON
|
||||
@@ -189,18 +182,15 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LOADER -->
|
||||
<div v-if="pending" class="d-flex justify-content-center my-5 py-5">
|
||||
<div class="progress-spinner progress-spinner-active" role="status">
|
||||
<span class="visually-hidden">Caricamento in corso...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- GRID VIEW -->
|
||||
<div v-else-if="currentView === 'grid'">
|
||||
<div class="row" v-if="openDataResponse?.reports && openDataResponse.reports.length > 0">
|
||||
<div class="col-12 col-md-6 col-lg-4 mb-4" v-for="report in visibleReports" :key="report.id">
|
||||
<!-- Strict BI Card -->
|
||||
<div class="card-wrapper card-space h-100">
|
||||
<div class="card card-bg h-100 shadow-sm">
|
||||
<div class="card-body d-flex flex-column">
|
||||
@@ -245,7 +235,6 @@ onBeforeUnmount(() => {
|
||||
Nessun dato pubblico disponibile al momento.
|
||||
</div>
|
||||
|
||||
<!-- BOOTSTRAP ITALIA PAGINATION -->
|
||||
<nav class="pagination-wrapper justify-content-center mt-5" aria-label="Navigazione pagine open data">
|
||||
<ul class="pagination">
|
||||
<li class="page-item" :class="{ disabled: currentPage === 1 }">
|
||||
@@ -267,7 +256,6 @@ onBeforeUnmount(() => {
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- MAP VIEW -->
|
||||
<div v-else-if="currentView === 'map'" class="map-view-wrapper">
|
||||
<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>
|
||||
@@ -283,7 +271,6 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Ensures the cards inside the grid stretch to equal heights */
|
||||
.card-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ const { getReportDetail, getMessages, addMessage, flagMessage } = useReports()
|
||||
const { getInterventionSummary, updateReportStatus, assignTeam, getTeams, createInterventionLink, revokeInterventionLink } = useOperator()
|
||||
const { user } = useAuth()
|
||||
|
||||
// Dati principali
|
||||
const { data: reportData, refresh: refreshReport } = await useAsyncData(`op-report-${reportId}`, () => getReportDetail(reportId))
|
||||
const { data: messagesData, refresh: refreshMessages } = await useAsyncData(`op-messages-${reportId}`, () => getMessages(reportId))
|
||||
const { data: summaryData, refresh: refreshSummary } = await useAsyncData(`op-summary-${reportId}`, () => getInterventionSummary(reportId))
|
||||
@@ -81,7 +80,6 @@ const newStatus = ref<ReportStatus>('IN_PROGRESS')
|
||||
const statusNote = ref('')
|
||||
const isUpdatingStatus = ref(false)
|
||||
|
||||
// Form Assegna Squadra
|
||||
const isAssignModalOpen = ref(false)
|
||||
const selectedTeamId = ref<number | null>(null)
|
||||
const isAssigning = ref(false)
|
||||
@@ -93,7 +91,6 @@ const interventionLinkError = ref('')
|
||||
const interventionLinkSuccess = ref('')
|
||||
const isRevokeInterventionModalOpen = ref(false)
|
||||
|
||||
// Messaggi
|
||||
const isSubmittingMessage = ref(false)
|
||||
const flaggedMessageIds = ref<number[]>([])
|
||||
const isFlagMessageModalOpen = ref(false)
|
||||
@@ -526,7 +523,6 @@ const formattedInterventionLinkExpiry = computed(() =>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modale Assegnazione -->
|
||||
<div v-if="isAssignModalOpen" class="modal-backdrop fade show d-block" style="background: rgba(0,0,0,0.5); z-index: 1040;"></div>
|
||||
<div v-if="isAssignModalOpen" class="modal fade show d-block" tabindex="-1" style="z-index: 1050;">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
|
||||
@@ -6,7 +6,6 @@ useHead({
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- HERO SECTION -->
|
||||
<div class="it-hero-wrapper it-primary">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -22,7 +21,6 @@ useHead({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENUTO PRINCIPALE -->
|
||||
<div class="container my-5 py-4">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 offset-lg-2">
|
||||
|
||||
@@ -41,7 +41,6 @@ const isSubmittingFeedback = ref(false)
|
||||
const selectedMediaIndex = ref(0)
|
||||
const isGalleryOpen = ref(false)
|
||||
|
||||
// Gestione selezione file
|
||||
const handleFileSelect = (event: Event) => {
|
||||
const target = event.target as HTMLInputElement
|
||||
if (target.files) {
|
||||
@@ -49,7 +48,6 @@ const handleFileSelect = (event: Event) => {
|
||||
}
|
||||
}
|
||||
|
||||
// Invia messaggio
|
||||
const handleSendMessage = async () => {
|
||||
if (!newMessage.value.trim() && selectedFiles.value.length === 0) return
|
||||
|
||||
@@ -57,7 +55,6 @@ const handleSendMessage = async () => {
|
||||
try {
|
||||
await addMessage(reportId, { body: newMessage.value })
|
||||
|
||||
// Pulisci i campi
|
||||
newMessage.value = ''
|
||||
selectedFiles.value = []
|
||||
if (fileInput.value) fileInput.value.value = ''
|
||||
@@ -70,7 +67,6 @@ const handleSendMessage = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Invia feedback (solo se risolta)
|
||||
const handleSubmitFeedback = async () => {
|
||||
isSubmittingFeedback.value = true
|
||||
try {
|
||||
@@ -91,7 +87,6 @@ const handleSubmitFeedback = async () => {
|
||||
|
||||
const isOwner = computed(() => report.value?.user_id === user.value?.id)
|
||||
|
||||
// Valutazione solo se lo stato è specificamente "RESOLVED"
|
||||
const canFeedback = computed(() => report.value?.status === 'RESOLVED')
|
||||
|
||||
const statusMeta: Record<string, { label: string; tone: string }> = {
|
||||
|
||||
Vendored
+4
-18
@@ -6,6 +6,7 @@ export type FlagContentType = 'REPORT' | 'MESSAGE';
|
||||
export interface GeoJsonObject {
|
||||
type: string;
|
||||
coordinates: any[];
|
||||
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
@@ -19,9 +20,6 @@ export interface OkResponse {
|
||||
ok: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* USER & AUTHENTICATION
|
||||
*/
|
||||
export interface CurrentUser {
|
||||
id: number;
|
||||
first_name: string;
|
||||
@@ -54,9 +52,6 @@ export interface TokenResponse {
|
||||
expires_in_hours: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* REPORTS & MEDIA
|
||||
*/
|
||||
export interface Report {
|
||||
id: number;
|
||||
category_id: number;
|
||||
@@ -118,9 +113,6 @@ export interface Message {
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* ENTITIES (Areas, Teams, Categories, Notifications, Rewards, Moderation)
|
||||
*/
|
||||
export interface Area {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -182,9 +174,6 @@ export interface ModerationFlag {
|
||||
resolved_at?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* REQUEST BODIES
|
||||
*/
|
||||
export interface RegisterCitizenRequest {
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
@@ -216,7 +205,7 @@ export interface CreateReportRequest {
|
||||
longitude: number;
|
||||
address: string;
|
||||
description: string;
|
||||
media?: string[]; // Array of URLs if already uploaded
|
||||
media?: string[];
|
||||
}
|
||||
|
||||
export interface UpdateStatusRequest {
|
||||
@@ -233,8 +222,8 @@ export interface MessageRequest {
|
||||
}
|
||||
|
||||
export interface FeedbackRequest {
|
||||
rating: number; // 1 to 5
|
||||
comment?: string;
|
||||
rating: number;
|
||||
comment?: string;
|
||||
}
|
||||
|
||||
export interface FlagRequest {
|
||||
@@ -295,9 +284,6 @@ export interface UpdateUserRolesRequest {
|
||||
roles: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* RESPONSE BODIES
|
||||
*/
|
||||
export interface CurrentUserResponse {
|
||||
ok: boolean;
|
||||
user: CurrentUser;
|
||||
|
||||
Reference in New Issue
Block a user