- Nuova Home Page RISO Moderna! Passo 1 - la struttura
This commit is contained in:
1495
src/components/Riso_Home_Modern/Riso_Home_Modern.scss
Normal file
1495
src/components/Riso_Home_Modern/Riso_Home_Modern.scss
Normal file
File diff suppressed because it is too large
Load Diff
588
src/components/Riso_Home_Modern/Riso_Home_Modern.ts
Normal file
588
src/components/Riso_Home_Modern/Riso_Home_Modern.ts
Normal file
@@ -0,0 +1,588 @@
|
||||
import { defineComponent, ref, computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { CRISBalanceBar } from '@src/components/CRISBalanceBar';
|
||||
|
||||
const isTest = true; // Cambia a false in produzione
|
||||
|
||||
export default defineComponent({
|
||||
name: 'RisoHomeModern',
|
||||
components: { CRISBalanceBar },
|
||||
setup() {
|
||||
const $router = useRouter();
|
||||
|
||||
// State
|
||||
const showAnnunciDialog = ref(false);
|
||||
|
||||
const selectedCircuit = ref<'provinciale' | 'italia'>('provinciale');
|
||||
const handshakesView = ref<'mine' | 'all'>('mine');
|
||||
|
||||
// Dati wallet (da collegare allo store)
|
||||
const availableBalance = ref(0); // Saldo utilizzabile (include fido)
|
||||
const realBalance = ref(0); // Saldo reale effettivo
|
||||
const trustLimit = ref(-100); // Fido concesso (negativo)
|
||||
const maxAccumulation = ref(200); // Massimo accumulo
|
||||
const receivedCount = ref(0);
|
||||
const sentCount = ref(0);
|
||||
|
||||
// Dati eventi (da collegare allo store)
|
||||
const upcomingEventsCount = ref(0);
|
||||
const recentEvents = ref<any[]>([
|
||||
// Esempio struttura:
|
||||
// { day: '15', month: 'DIC', title: 'Mercatino', location: 'Roma' }
|
||||
]);
|
||||
|
||||
// Dati attività (da collegare allo store)
|
||||
const recentTrades = ref<any[]>([
|
||||
// Esempio struttura:
|
||||
// { userInitial: 'M', description: 'Scambio completato', time: '2h fa', amount: 50 }
|
||||
]);
|
||||
|
||||
const recentConnections = ref<any[]>([
|
||||
// Esempio struttura:
|
||||
// { userInitial: 'A', name: 'Mario Rossi', time: '1 giorno fa' }
|
||||
]);
|
||||
|
||||
// Stats
|
||||
const totalMembers = ref(0);
|
||||
const totalTrades = ref(0);
|
||||
const totalEvents = ref(0);
|
||||
|
||||
const totalTransactions = ref(0);
|
||||
const uniqueMembers = ref(0);
|
||||
const lastTradeTime = ref('Mai');
|
||||
|
||||
// Organizzazioni
|
||||
const organizations = ref<any[]>([
|
||||
// Esempio struttura:
|
||||
// { initial: 'AS', name: 'Associazione Locale', membersCount: 45 }
|
||||
]);
|
||||
|
||||
// Telegram
|
||||
const telegramLinks = ref<any[]>([
|
||||
// Esempio struttura:
|
||||
// { title: 'Canale Principale', url: 'https://t.me/...', image: '/path/to/img' }
|
||||
]);
|
||||
|
||||
// Computed
|
||||
const hasEvents = computed(() => recentEvents.value.length > 0);
|
||||
const hasOrganizations = computed(() => organizations.value.length > 0);
|
||||
const hasTelegramLinks = computed(() => telegramLinks.value.length > 0);
|
||||
|
||||
// ========== METODI DA IMPLEMENTARE ==========
|
||||
|
||||
// Dialog Annunci
|
||||
const openAnnunciDialog = () => {
|
||||
showAnnunciDialog.value = true;
|
||||
// TODO: implementare logica apertura dialog
|
||||
};
|
||||
|
||||
// Navigazione Annunci
|
||||
const goToGoods = () => {
|
||||
showAnnunciDialog.value = false;
|
||||
// TODO: navigare a /goods
|
||||
// $router.push('/goods')
|
||||
};
|
||||
|
||||
const goToServices = () => {
|
||||
showAnnunciDialog.value = false;
|
||||
// TODO: navigare a /services
|
||||
// $router.push('/services')
|
||||
};
|
||||
|
||||
const goToHospitality = () => {
|
||||
showAnnunciDialog.value = false;
|
||||
// TODO: navigare a /hosps
|
||||
// $router.push('/hosps')
|
||||
};
|
||||
|
||||
const goToTransport = () => {
|
||||
showAnnunciDialog.value = false;
|
||||
// TODO: navigare a /transport (da creare?)
|
||||
// $router.push('/transport')
|
||||
};
|
||||
|
||||
// Hero Cards
|
||||
const goToWallet = () => {
|
||||
// TODO: navigare al portafoglio dettagliato
|
||||
// $router.push('/wallet')
|
||||
};
|
||||
|
||||
const goToCircuits = () => {
|
||||
// TODO: navigare ai circuiti RIS
|
||||
// $router.push('/circuits')
|
||||
};
|
||||
|
||||
const goToEvents = () => {
|
||||
// TODO: navigare alla lista eventi
|
||||
// $router.push('/events')
|
||||
};
|
||||
|
||||
const goToProfile = () => {
|
||||
// TODO: navigare al profilo utente
|
||||
// $router.push('/profile')
|
||||
};
|
||||
|
||||
// Azioni Rapide
|
||||
const sendRIS = () => {
|
||||
// TODO: aprire dialog/pagina invio RIS
|
||||
};
|
||||
|
||||
const receiveRIS = () => {
|
||||
// TODO: aprire dialog/pagina ricezione RIS
|
||||
};
|
||||
|
||||
const inviteFriend = () => {
|
||||
// TODO: aprire dialog/pagina invito amico
|
||||
};
|
||||
|
||||
const showMembers = () => {
|
||||
// TODO: navigare alla lista iscritti
|
||||
// $router.push('/members')
|
||||
};
|
||||
|
||||
// Wallet
|
||||
const refreshWallet = () => {
|
||||
// TODO: ricaricare dati wallet dallo store/API
|
||||
};
|
||||
|
||||
const goToTransactions = () => {
|
||||
// TODO: navigare alla lista transazioni
|
||||
// $router.push('/transactions')
|
||||
};
|
||||
|
||||
// Eventi
|
||||
const goToAllEvents = () => {
|
||||
// TODO: navigare a tutti gli eventi
|
||||
// $router.push('/events')
|
||||
};
|
||||
|
||||
const openEvent = (event: any) => {
|
||||
// TODO: aprire dettaglio evento
|
||||
// $router.push(`/events/${event.id}`)
|
||||
};
|
||||
|
||||
// Community
|
||||
const openTrade = (trade: any) => {
|
||||
// TODO: aprire dettaglio scambio
|
||||
};
|
||||
|
||||
const openConnection = (connection: any) => {
|
||||
// TODO: aprire profilo utente connesso
|
||||
};
|
||||
|
||||
const goToAllTrades = () => {
|
||||
// TODO: navigare a lista completa scambi
|
||||
// $router.push('/trades')
|
||||
};
|
||||
|
||||
const goToAllConnections = () => {
|
||||
// TODO: navigare a lista completa connessioni
|
||||
// $router.push('/connections')
|
||||
};
|
||||
|
||||
// Organizzazioni
|
||||
const createOrganization = () => {
|
||||
// TODO: aprire form creazione organizzazione
|
||||
};
|
||||
|
||||
const openOrganization = (org: any) => {
|
||||
// TODO: aprire dettaglio organizzazione
|
||||
// $router.push(`/groups/${org.id}`)
|
||||
};
|
||||
|
||||
const goToAllOrganizations = () => {
|
||||
// TODO: navigare a lista completa organizzazioni
|
||||
// $router.push('/groups')
|
||||
};
|
||||
|
||||
// Footer
|
||||
const openFAQ = () => {
|
||||
// TODO: navigare a FAQ
|
||||
// $router.push('/faq')
|
||||
};
|
||||
|
||||
const openGuide = () => {
|
||||
// TODO: navigare a guida
|
||||
// $router.push('/guide')
|
||||
};
|
||||
|
||||
const openInfo = () => {
|
||||
// TODO: navigare a info
|
||||
// $router.push('/info')
|
||||
};
|
||||
|
||||
const loadTestData = () => {
|
||||
if (!isTest) return;
|
||||
|
||||
// Circuito Provinciale
|
||||
circuits.value.provinciale = {
|
||||
title: 'RIS Provinciale',
|
||||
availableBalance: 50,
|
||||
realBalance: -50,
|
||||
trustLimit: -100,
|
||||
maxAccumulation: 200,
|
||||
totalTransactions: 15,
|
||||
sentCount: 8,
|
||||
receivedCount: 7,
|
||||
uniqueMembers: 12,
|
||||
lastTradeTime: '2 giorni fa',
|
||||
recentTransactions: [
|
||||
{ userInitial: 'M', description: 'Ortaggi freschi', time: '2h fa', amount: 15 },
|
||||
{
|
||||
userInitial: 'L',
|
||||
description: 'Lezione chitarra',
|
||||
time: '5h fa',
|
||||
amount: -25,
|
||||
},
|
||||
{
|
||||
userInitial: 'G',
|
||||
description: 'Riparazione bici',
|
||||
time: '1 giorno fa',
|
||||
amount: 30,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Circuito Italia
|
||||
circuits.value.italia = {
|
||||
title: 'RIS Italia',
|
||||
availableBalance: -50,
|
||||
realBalance: 150,
|
||||
trustLimit: -200,
|
||||
maxAccumulation: 400,
|
||||
totalTransactions: 8,
|
||||
sentCount: 3,
|
||||
receivedCount: 5,
|
||||
uniqueMembers: 7,
|
||||
lastTradeTime: '5 giorni fa',
|
||||
recentTransactions: [
|
||||
{
|
||||
userInitial: 'A',
|
||||
description: 'Consulenza legale',
|
||||
time: '3 giorni fa',
|
||||
amount: -80,
|
||||
},
|
||||
{
|
||||
userInitial: 'F',
|
||||
description: 'Prodotti artigianali',
|
||||
time: '4 giorni fa',
|
||||
amount: 50,
|
||||
},
|
||||
{
|
||||
userInitial: 'S',
|
||||
description: 'Corso di cucina',
|
||||
time: '5 giorni fa',
|
||||
amount: -40,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Community
|
||||
invitesSent.value = 7;
|
||||
|
||||
myHandshakes.value = [
|
||||
{ userInitial: 'M', name: 'Mario Rossi', time: '2 giorni fa' },
|
||||
{ userInitial: 'L', name: 'Laura Bianchi', time: '3 giorni fa' },
|
||||
{ userInitial: 'G', name: 'Giovanni Verdi', time: '1 settimana fa' },
|
||||
{ userInitial: 'C', name: 'Chiara Neri', time: '2 settimane fa' },
|
||||
{ userInitial: 'P', name: 'Paolo Conti', time: '3 settimane fa' },
|
||||
];
|
||||
|
||||
allHandshakes.value = [
|
||||
{
|
||||
user1Initial: 'A',
|
||||
user2Initial: 'B',
|
||||
user1Name: 'Anna',
|
||||
user2Name: 'Bruno',
|
||||
time: '1h fa',
|
||||
},
|
||||
{
|
||||
user1Initial: 'C',
|
||||
user2Initial: 'D',
|
||||
user1Name: 'Carlo',
|
||||
user2Name: 'Diana',
|
||||
time: '3h fa',
|
||||
},
|
||||
{
|
||||
user1Initial: 'E',
|
||||
user2Initial: 'F',
|
||||
user1Name: 'Elena',
|
||||
user2Name: 'Franco',
|
||||
time: '5h fa',
|
||||
},
|
||||
{
|
||||
user1Initial: 'G',
|
||||
user2Initial: 'H',
|
||||
user1Name: 'Giulia',
|
||||
user2Name: 'Hugo',
|
||||
time: '1 giorno fa',
|
||||
},
|
||||
{
|
||||
user1Initial: 'I',
|
||||
user2Initial: 'L',
|
||||
user1Name: 'Irene',
|
||||
user2Name: 'Luca',
|
||||
time: '2 giorni fa',
|
||||
},
|
||||
];
|
||||
|
||||
// Eventi test data con immagini
|
||||
upcomingEventsCount.value = 7;
|
||||
recentEvents.value = [
|
||||
{
|
||||
day: '15',
|
||||
month: 'DIC',
|
||||
title: 'Mercatino di Natale',
|
||||
location: 'Roma Centro',
|
||||
id: 1,
|
||||
image: '',
|
||||
},
|
||||
{
|
||||
day: '20',
|
||||
month: 'DIC',
|
||||
title: 'Corso di Panificazione',
|
||||
location: 'Milano',
|
||||
id: 2,
|
||||
image: '',
|
||||
},
|
||||
{
|
||||
day: '22',
|
||||
month: 'DIC',
|
||||
title: 'Scambio Semi e Piante',
|
||||
location: 'Bologna',
|
||||
id: 3,
|
||||
image: '',
|
||||
},
|
||||
{
|
||||
day: '28',
|
||||
month: 'DIC',
|
||||
title: 'Incontro Produttori Locali',
|
||||
location: 'Firenze',
|
||||
id: 4,
|
||||
image: '',
|
||||
},
|
||||
{
|
||||
day: '05',
|
||||
month: 'GEN',
|
||||
title: 'Festa della Comunità',
|
||||
location: 'Torino',
|
||||
id: 5,
|
||||
image: '',
|
||||
},
|
||||
];
|
||||
|
||||
// Scambi test data
|
||||
recentTrades.value = [
|
||||
{
|
||||
userInitial: 'M',
|
||||
description: 'Scambio ortaggi freschi',
|
||||
time: '2h fa',
|
||||
amount: 15,
|
||||
},
|
||||
{
|
||||
userInitial: 'L',
|
||||
description: 'Lezione di chitarra',
|
||||
time: '5h fa',
|
||||
amount: -25,
|
||||
},
|
||||
{
|
||||
userInitial: 'G',
|
||||
description: 'Riparazione bicicletta',
|
||||
time: '1 giorno fa',
|
||||
amount: 30,
|
||||
},
|
||||
{
|
||||
userInitial: 'A',
|
||||
description: 'Pane fatto in casa',
|
||||
time: '2 giorni fa',
|
||||
amount: -10,
|
||||
},
|
||||
{
|
||||
userInitial: 'S',
|
||||
description: 'Consulenza informatica',
|
||||
time: '3 giorni fa',
|
||||
amount: 40,
|
||||
},
|
||||
];
|
||||
|
||||
// Statistiche test data
|
||||
totalMembers.value = 342;
|
||||
totalTrades.value = 1567;
|
||||
totalEvents.value = 89;
|
||||
|
||||
// Organizzazioni test data
|
||||
organizations.value = [
|
||||
{ initial: 'AS', name: 'Associazione Scambio Locale', membersCount: 45, id: 1 },
|
||||
{ initial: 'GP', name: 'Gruppo Produttori Bio', membersCount: 32, id: 2 },
|
||||
{ initial: 'CE', name: 'Comunità Energetica', membersCount: 28, id: 3 },
|
||||
{ initial: 'RT', name: 'Rete Tempo', membersCount: 56, id: 4 },
|
||||
{ initial: 'OC', name: 'Orto Condiviso', membersCount: 23, id: 5 },
|
||||
{ initial: 'LB', name: 'La Banca del Tempo', membersCount: 41, id: 6 },
|
||||
{ initial: 'MP', name: 'Mercato Popolare', membersCount: 38, id: 7 },
|
||||
{ initial: 'CC', name: 'Casa Comune', membersCount: 19, id: 8 },
|
||||
{ initial: 'SF', name: 'Sharing Food', membersCount: 27, id: 9 },
|
||||
{ initial: 'EA', name: 'Economia Alternativa', membersCount: 34, id: 10 },
|
||||
];
|
||||
|
||||
// Telegram test data con immagini
|
||||
telegramLinks.value = [
|
||||
{
|
||||
title: 'Canale Principale RISO',
|
||||
url: 'https://t.me/riso_italia',
|
||||
image: '/images/telegram-main.jpg',
|
||||
},
|
||||
{
|
||||
title: 'Gruppo Scambi Locali',
|
||||
url: 'https://t.me/riso_scambi',
|
||||
image: '/images/telegram-scambi.jpg',
|
||||
},
|
||||
{
|
||||
title: 'Eventi e Incontri',
|
||||
url: 'https://t.me/riso_eventi',
|
||||
image: '/images/telegram-eventi.jpg',
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
// Dati circuiti
|
||||
const circuits = ref({
|
||||
provinciale: {
|
||||
availableBalance: 0,
|
||||
realBalance: 0,
|
||||
trustLimit: -100,
|
||||
maxAccumulation: 200,
|
||||
totalTransactions: 0,
|
||||
sentCount: 0,
|
||||
receivedCount: 0,
|
||||
uniqueMembers: 0,
|
||||
lastTradeTime: 'Mai',
|
||||
recentTransactions: [] as any[],
|
||||
title: 'RIS Provinciale',
|
||||
},
|
||||
italia: {
|
||||
availableBalance: 0,
|
||||
realBalance: 0,
|
||||
trustLimit: -200,
|
||||
maxAccumulation: 400,
|
||||
totalTransactions: 0,
|
||||
sentCount: 0,
|
||||
receivedCount: 0,
|
||||
uniqueMembers: 0,
|
||||
lastTradeTime: 'Mai',
|
||||
recentTransactions: [] as any[],
|
||||
title: 'RIS Italia',
|
||||
},
|
||||
});
|
||||
|
||||
// Dati community
|
||||
const invitesSent = ref(0);
|
||||
const myHandshakes = ref<any[]>([]);
|
||||
const allHandshakes = ref<any[]>([]);
|
||||
|
||||
// Circuiti overview
|
||||
const activeCircuitsCount = ref(2);
|
||||
const totalCircuitsAvailable = ref(12);
|
||||
|
||||
// Computed per circuito corrente
|
||||
const currentCircuitData = computed(() => {
|
||||
return circuits.value[selectedCircuit.value];
|
||||
});
|
||||
|
||||
// Metodi
|
||||
const openTransaction = (tx: any) => {
|
||||
// TODO: aprire dettaglio transazione
|
||||
};
|
||||
|
||||
const openHandshake = (handshake: any) => {
|
||||
// TODO: aprire dettaglio stretta di mano
|
||||
};
|
||||
|
||||
const goToAllCircuits = () => {
|
||||
// TODO: navigare a lista circuiti
|
||||
// $router.push('/circuits')
|
||||
};
|
||||
|
||||
loadTestData();
|
||||
|
||||
// ========== LIFECYCLE (da implementare) ==========
|
||||
// onMounted(() => {
|
||||
// loadWalletData()
|
||||
// loadRecentEvents()
|
||||
// loadRecentActivity()
|
||||
// loadStats()
|
||||
// loadOrganizations()
|
||||
// loadTelegramLinks()
|
||||
// })
|
||||
|
||||
return {
|
||||
// State
|
||||
showAnnunciDialog,
|
||||
|
||||
// Data
|
||||
availableBalance,
|
||||
realBalance,
|
||||
trustLimit,
|
||||
maxAccumulation,
|
||||
receivedCount,
|
||||
sentCount,
|
||||
upcomingEventsCount,
|
||||
recentEvents,
|
||||
recentTrades,
|
||||
recentConnections,
|
||||
totalMembers,
|
||||
totalTrades,
|
||||
totalEvents,
|
||||
organizations,
|
||||
telegramLinks,
|
||||
|
||||
// Computed
|
||||
hasEvents,
|
||||
hasOrganizations,
|
||||
hasTelegramLinks,
|
||||
|
||||
// Methods
|
||||
openAnnunciDialog,
|
||||
goToGoods,
|
||||
goToServices,
|
||||
goToHospitality,
|
||||
goToTransport,
|
||||
goToWallet,
|
||||
goToEvents,
|
||||
goToProfile,
|
||||
sendRIS,
|
||||
receiveRIS,
|
||||
inviteFriend,
|
||||
showMembers,
|
||||
refreshWallet,
|
||||
goToTransactions,
|
||||
goToAllEvents,
|
||||
openEvent,
|
||||
openTrade,
|
||||
openConnection,
|
||||
goToAllTrades,
|
||||
goToAllConnections,
|
||||
createOrganization,
|
||||
openOrganization,
|
||||
goToAllOrganizations,
|
||||
openFAQ,
|
||||
openGuide,
|
||||
openInfo,
|
||||
totalTransactions,
|
||||
uniqueMembers,
|
||||
lastTradeTime,
|
||||
goToCircuits,
|
||||
selectedCircuit,
|
||||
handshakesView,
|
||||
circuits,
|
||||
currentCircuitData,
|
||||
invitesSent,
|
||||
myHandshakes,
|
||||
allHandshakes,
|
||||
activeCircuitsCount,
|
||||
totalCircuitsAvailable,
|
||||
openTransaction,
|
||||
openHandshake,
|
||||
goToAllCircuits,
|
||||
};
|
||||
},
|
||||
});
|
||||
768
src/components/Riso_Home_Modern/Riso_Home_Modern.vue
Normal file
768
src/components/Riso_Home_Modern/Riso_Home_Modern.vue
Normal file
@@ -0,0 +1,768 @@
|
||||
<template>
|
||||
<div class="riso-modern-home">
|
||||
<!-- Hero Section: Card Principali -->
|
||||
<section class="hero-cards">
|
||||
<!-- Card Annunci -->
|
||||
<div
|
||||
class="hero-card gradient-primary"
|
||||
@click="openAnnunciDialog"
|
||||
>
|
||||
<q-icon
|
||||
name="campaign"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="card-title">Annunci</span>
|
||||
<span class="card-subtitle">Beni, Servizi, Ospitalità</span>
|
||||
</div>
|
||||
|
||||
<!-- Card Circuiti RIS -->
|
||||
<div
|
||||
class="hero-card gradient-success"
|
||||
@click="goToCircuits"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-coins"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="card-title">Circuiti RIS</span>
|
||||
<span class="card-subtitle">Gestisci i tuoi RIS</span>
|
||||
</div>
|
||||
|
||||
<!-- Card Eventi -->
|
||||
<div
|
||||
class="hero-card gradient-accent"
|
||||
@click="goToEvents"
|
||||
>
|
||||
<q-icon
|
||||
name="event"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="card-title">Eventi</span>
|
||||
<span class="card-subtitle">{{ upcomingEventsCount }} prossimi</span>
|
||||
</div>
|
||||
|
||||
<!-- Card Profilo -->
|
||||
<div
|
||||
class="hero-card gradient-orange"
|
||||
@click="goToProfile"
|
||||
>
|
||||
<q-icon
|
||||
name="account_circle"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="card-title">Profilo</span>
|
||||
<span class="card-subtitle">Gestisci account</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Azioni RIS -->
|
||||
<section class="ris-actions-section">
|
||||
<div class="ris-actions-grid">
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="ris-action-btn send-btn"
|
||||
icon="arrow_upward"
|
||||
label="Invia RIS"
|
||||
@click="sendRIS"
|
||||
/>
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="ris-action-btn receive-btn"
|
||||
icon="arrow_downward"
|
||||
label="Ricevi RIS"
|
||||
@click="receiveRIS"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Wallet Card Dettagliata con 2 Circuiti -->
|
||||
<section class="wallet-section">
|
||||
<div class="wallet-card">
|
||||
<div class="wallet-header">
|
||||
<h2 class="section-title-white">
|
||||
<q-icon name="fas fa-coins" />
|
||||
I Tuoi RIS - Circuiti di Scambio
|
||||
</h2>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="refresh"
|
||||
text-color="white"
|
||||
@click="refreshWallet"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Saldi Entrambi Circuiti -->
|
||||
<div class="circuits-balance-overview">
|
||||
<div class="circuit-balance-mini">
|
||||
<CRISBalanceBar
|
||||
:current-balance="circuits.provinciale.realBalance"
|
||||
:min-limit="circuits.provinciale.trustLimit"
|
||||
:max-limit="circuits.provinciale.maxAccumulation"
|
||||
:label="circuits.provinciale.title"
|
||||
/>
|
||||
</div>
|
||||
<div class="circuit-balance-mini">
|
||||
<CRISBalanceBar
|
||||
:current-balance="circuits.italia.realBalance"
|
||||
:min-limit="circuits.italia.trustLimit"
|
||||
:max-limit="circuits.italia.maxAccumulation"
|
||||
:label="circuits.italia.title"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Selettore Circuito -->
|
||||
<div class="circuit-selector">
|
||||
<q-btn-toggle
|
||||
v-model="selectedCircuit"
|
||||
dense
|
||||
no-caps
|
||||
unelevated
|
||||
rounded
|
||||
toggle-color="white"
|
||||
toggle-text-color="primary"
|
||||
:options="[
|
||||
{ label: 'RIS Provinciale', value: 'provinciale' },
|
||||
{ label: 'RIS Italia', value: 'italia' },
|
||||
]"
|
||||
class="circuit-toggle"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Statistiche transazioni del circuito selezionato -->
|
||||
<div class="wallet-transactions">
|
||||
<div class="transaction-stat total">
|
||||
<q-icon
|
||||
name="repeat"
|
||||
size="sm"
|
||||
/>
|
||||
<span class="stat-number">{{ currentCircuitData.totalTransactions }}</span>
|
||||
<span class="stat-label">Transazioni</span>
|
||||
</div>
|
||||
<div class="transaction-stat sent">
|
||||
<q-icon
|
||||
name="arrow_upward"
|
||||
size="sm"
|
||||
/>
|
||||
<span class="stat-number">{{ currentCircuitData.sentCount }}</span>
|
||||
<span class="stat-label">Inviate</span>
|
||||
</div>
|
||||
<div class="transaction-stat received">
|
||||
<q-icon
|
||||
name="arrow_downward"
|
||||
size="sm"
|
||||
/>
|
||||
<span class="stat-number">{{ currentCircuitData.receivedCount }}</span>
|
||||
<span class="stat-label">Ricevute</span>
|
||||
</div>
|
||||
<div class="transaction-stat members">
|
||||
<q-icon
|
||||
name="people"
|
||||
size="sm"
|
||||
/>
|
||||
<span class="stat-number">{{ currentCircuitData.uniqueMembers }}</span>
|
||||
<span class="stat-label">Membri coinvolti</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Saldi compatti circuito selezionato -->
|
||||
<div class="wallet-balances-compact">
|
||||
<div class="balance-row">
|
||||
<span class="balance-label-compact">Saldo:</span>
|
||||
<span class="balance-value-compact"
|
||||
>{{ currentCircuitData.realBalance }} RIS</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<CRISBalanceBar
|
||||
:current-balance="currentCircuitData.realBalance"
|
||||
:min-limit="currentCircuitData.trustLimit"
|
||||
:max-limit="currentCircuitData.maxAccumulation"
|
||||
:label="currentCircuitData.title"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Ultime 3 transazioni del circuito selezionato -->
|
||||
<div class="recent-transactions">
|
||||
<h4 class="transactions-title">Ultime Tue Transazioni</h4>
|
||||
<div class="transaction-list">
|
||||
<div
|
||||
v-for="(tx, idx) in currentCircuitData.recentTransactions.slice(0, 3)"
|
||||
:key="idx"
|
||||
class="transaction-item"
|
||||
@click="openTransaction(tx)"
|
||||
>
|
||||
<q-avatar
|
||||
size="32px"
|
||||
:color="tx.amount > 0 ? 'positive' : 'negative'"
|
||||
text-color="white"
|
||||
>
|
||||
{{ tx.userInitial }}
|
||||
</q-avatar>
|
||||
<div class="transaction-content">
|
||||
<span class="transaction-desc">{{ tx.description }}</span>
|
||||
<span class="transaction-time">{{ tx.time }}</span>
|
||||
</div>
|
||||
<span
|
||||
:class="['transaction-amount', tx.amount > 0 ? 'positive' : 'negative']"
|
||||
>
|
||||
{{ tx.amount > 0 ? '+' : '' }}{{ tx.amount }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Focus su attività di scambio -->
|
||||
<div class="wallet-activity-focus">
|
||||
<div class="activity-message">
|
||||
<q-icon
|
||||
name="swap_horiz"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="activity-text"
|
||||
>Continua a scambiare con più persone per far crescere la comunità!</span
|
||||
>
|
||||
</div>
|
||||
<div class="last-trade">
|
||||
<q-icon
|
||||
name="schedule"
|
||||
size="sm"
|
||||
/>
|
||||
<span>Ultimo scambio: {{ currentCircuitData.lastTradeTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="wallet-detail-btn"
|
||||
label="Dettaglio Transazioni"
|
||||
icon-right="arrow_forward"
|
||||
@click="goToTransactions"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Prossimi Eventi -->
|
||||
<section
|
||||
v-if="hasEvents"
|
||||
class="content-section"
|
||||
>
|
||||
<div class="section-header">
|
||||
<h2 class="section-title">
|
||||
<q-icon name="event" />
|
||||
Prossimi Eventi
|
||||
</h2>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="arrow_forward"
|
||||
@click="goToAllEvents"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="(event, idx) in recentEvents"
|
||||
:key="idx"
|
||||
class="event-card"
|
||||
@click="openEvent(event)"
|
||||
>
|
||||
<q-img
|
||||
:src="event.image || '/images/event-placeholder.png'"
|
||||
class="event-image"
|
||||
ratio="1"
|
||||
>
|
||||
<template
|
||||
v-if="!event.image"
|
||||
v-slot:error
|
||||
>
|
||||
<div class="event-image-placeholder">
|
||||
<q-icon
|
||||
name="event"
|
||||
size="2rem"
|
||||
color="grey-5"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</q-img>
|
||||
<div class="event-date">
|
||||
<span class="event-day">{{ event.day }}</span>
|
||||
<span class="event-month">{{ event.month }}</span>
|
||||
</div>
|
||||
<div class="event-info">
|
||||
<span class="event-title">{{ event.title }}</span>
|
||||
<span class="event-location">{{ event.location }}</span>
|
||||
</div>
|
||||
<q-icon name="chevron_right" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Community Actions -->
|
||||
<section class="community-actions-section">
|
||||
<h2 class="section-title">
|
||||
<q-icon name="people" />
|
||||
Community
|
||||
</h2>
|
||||
|
||||
<div class="invite-banner">
|
||||
<div class="invite-message">
|
||||
<q-icon
|
||||
name="campaign"
|
||||
size="md"
|
||||
color="positive"
|
||||
/>
|
||||
<div class="invite-text">
|
||||
<span class="invite-main"
|
||||
>Aiuta la community a crescere, parla di RISO ed invita le persone alla
|
||||
App</span
|
||||
>
|
||||
<span class="invite-count"
|
||||
>Hai già inviato <strong>{{ invitesSent }}</strong> inviti</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="community-actions-grid">
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="community-action-btn"
|
||||
icon="person_add"
|
||||
label="Invita Amici"
|
||||
color="positive"
|
||||
@click="inviteFriend"
|
||||
/>
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="community-action-btn"
|
||||
icon="list"
|
||||
label="Lista Iscritti"
|
||||
color="info"
|
||||
@click="showMembers"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Organizzazioni -->
|
||||
<section
|
||||
v-if="hasOrganizations"
|
||||
class="content-section"
|
||||
>
|
||||
<div class="section-header">
|
||||
<h2 class="section-title">
|
||||
<q-icon name="fas fa-users" />
|
||||
Organizzazioni
|
||||
</h2>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="arrow_forward"
|
||||
@click="goToAllOrganizations"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="org-scroll">
|
||||
<div
|
||||
v-for="(org, idx) in organizations.slice(0, 10)"
|
||||
:key="idx"
|
||||
class="org-card-scroll"
|
||||
@click="openOrganization(org)"
|
||||
>
|
||||
<q-avatar
|
||||
size="50px"
|
||||
color="blue-6"
|
||||
text-color="white"
|
||||
>
|
||||
{{ org.initial }}
|
||||
</q-avatar>
|
||||
<span class="org-name">{{ org.name }}</span>
|
||||
<span class="org-members">{{ org.membersCount }} membri</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Statistiche Generali -->
|
||||
<section class="stats-section">
|
||||
<h2 class="section-title-center">
|
||||
<q-icon name="analytics" />
|
||||
Statistiche RISO
|
||||
</h2>
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<q-icon
|
||||
name="people"
|
||||
color="primary"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="stat-number">{{ totalMembers }}</span>
|
||||
<span class="stat-text">Membri</span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<q-icon
|
||||
name="swap_horiz"
|
||||
color="positive"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="stat-number">{{ totalTrades }}</span>
|
||||
<span class="stat-text">Scambi</span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<q-icon
|
||||
name="event"
|
||||
color="accent"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="stat-number">{{ totalEvents }}</span>
|
||||
<span class="stat-text">Eventi</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Circuiti RIS Overview -->
|
||||
<section class="circuits-overview-section">
|
||||
<div class="section-header">
|
||||
<h2 class="section-title">
|
||||
<q-icon name="account_balance" />
|
||||
Circuiti RIS
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="circuits-cards">
|
||||
<div class="circuit-info-card">
|
||||
<q-icon
|
||||
name="check_circle"
|
||||
color="positive"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="circuit-stat-number">{{ activeCircuitsCount }}</span>
|
||||
<span class="circuit-stat-label">Circuiti Attivi</span>
|
||||
</div>
|
||||
<div class="circuit-info-card">
|
||||
<q-icon
|
||||
name="public"
|
||||
color="primary"
|
||||
size="lg"
|
||||
/>
|
||||
<span class="circuit-stat-number">{{ totalCircuitsAvailable }}</span>
|
||||
<span class="circuit-stat-label">Circuiti Disponibili</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="view-all-btn"
|
||||
label="Esplora tutti i Circuiti"
|
||||
icon-right="arrow_forward"
|
||||
color="primary"
|
||||
@click="goToAllCircuits"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<!-- Attività Community -->
|
||||
<section class="community-section">
|
||||
<!-- Strette di Mano -->
|
||||
<div class="community-card">
|
||||
<div class="community-header">
|
||||
<h3 class="community-title">
|
||||
<q-icon name="handshake" />
|
||||
Strette di Mano
|
||||
</h3>
|
||||
<q-btn-toggle
|
||||
v-model="handshakesView"
|
||||
dense
|
||||
no-caps
|
||||
unelevated
|
||||
rounded
|
||||
size="sm"
|
||||
toggle-color="primary"
|
||||
:options="[
|
||||
{ label: 'Tue', value: 'mine' },
|
||||
{ label: 'Generali', value: 'all' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="handshakesView === 'mine'"
|
||||
class="activity-list"
|
||||
>
|
||||
<div
|
||||
v-for="(handshake, idx) in myHandshakes.slice(0, 5)"
|
||||
:key="idx"
|
||||
class="activity-item"
|
||||
@click="openHandshake(handshake)"
|
||||
>
|
||||
<q-avatar
|
||||
size="40px"
|
||||
color="purple-6"
|
||||
text-color="white"
|
||||
>
|
||||
{{ handshake.userInitial }}
|
||||
</q-avatar>
|
||||
<div class="activity-content">
|
||||
<span class="activity-title">{{ handshake.name }}</span>
|
||||
<span class="activity-time">Stretta di mano {{ handshake.time }}</span>
|
||||
</div>
|
||||
<q-icon
|
||||
name="handshake"
|
||||
color="purple-6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="handshakesView === 'all'"
|
||||
class="activity-list"
|
||||
>
|
||||
<div
|
||||
v-for="(handshake, idx) in allHandshakes.slice(0, 5)"
|
||||
:key="idx"
|
||||
class="activity-item"
|
||||
@click="openHandshake(handshake)"
|
||||
>
|
||||
<div class="handshake-avatars">
|
||||
<q-avatar
|
||||
size="32px"
|
||||
color="purple-6"
|
||||
text-color="white"
|
||||
>
|
||||
{{ handshake.user1Initial }}
|
||||
</q-avatar>
|
||||
<q-avatar
|
||||
size="32px"
|
||||
color="purple-4"
|
||||
text-color="white"
|
||||
class="avatar-overlap"
|
||||
>
|
||||
{{ handshake.user2Initial }}
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div class="activity-content">
|
||||
<span class="activity-title"
|
||||
>{{ handshake.user1Name }} e {{ handshake.user2Name }}</span
|
||||
>
|
||||
<span class="activity-time">{{ handshake.time }}</span>
|
||||
</div>
|
||||
<q-icon
|
||||
name="handshake"
|
||||
color="purple-6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ultimi Scambi -->
|
||||
<div class="community-card">
|
||||
<div class="community-header">
|
||||
<h3 class="community-title">
|
||||
<q-icon name="swap_horiz" />
|
||||
Ultimi Scambi
|
||||
</h3>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="arrow_forward"
|
||||
@click="goToAllTrades"
|
||||
/>
|
||||
</div>
|
||||
<div class="activity-list">
|
||||
<div
|
||||
v-for="(trade, idx) in recentTrades.slice(0, 3)"
|
||||
:key="idx"
|
||||
class="activity-item"
|
||||
@click="openTrade(trade)"
|
||||
>
|
||||
<q-avatar
|
||||
size="40px"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
>
|
||||
{{ trade.userInitial }}
|
||||
</q-avatar>
|
||||
<div class="activity-content">
|
||||
<span class="activity-title">{{ trade.description }}</span>
|
||||
<span class="activity-time">{{ trade.time }}</span>
|
||||
</div>
|
||||
<div class="activity-amount">
|
||||
<span :class="trade.amount > 0 ? 'positive' : 'negative'">
|
||||
{{ trade.amount > 0 ? '+' : '' }}{{ trade.amount }} RIS
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Canali Telegram -->
|
||||
<section
|
||||
v-if="hasTelegramLinks"
|
||||
class="content-section"
|
||||
>
|
||||
<div class="section-header">
|
||||
<h2 class="section-title">
|
||||
<q-icon name="telegram" />
|
||||
Unisciti ai Canali
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="telegram-grid-modern">
|
||||
<a
|
||||
v-for="(link, idx) in telegramLinks.slice(0, 3)"
|
||||
:key="idx"
|
||||
:href="link.url"
|
||||
target="_blank"
|
||||
class="telegram-card-modern"
|
||||
>
|
||||
<q-img
|
||||
v-if="link.image"
|
||||
:src="link.image"
|
||||
class="telegram-card-image"
|
||||
ratio="16/9"
|
||||
>
|
||||
<div class="telegram-overlay">
|
||||
<q-icon
|
||||
name="telegram"
|
||||
size="3rem"
|
||||
color="white"
|
||||
/>
|
||||
</div>
|
||||
</q-img>
|
||||
<div
|
||||
v-else
|
||||
class="telegram-icon-wrapper"
|
||||
>
|
||||
<q-icon
|
||||
name="telegram"
|
||||
size="3rem"
|
||||
color="white"
|
||||
/>
|
||||
</div>
|
||||
<div class="telegram-content-modern">
|
||||
<span class="telegram-title">{{ link.title }}</span>
|
||||
<q-icon
|
||||
name="open_in_new"
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer Links -->
|
||||
<section class="footer-section-modern">
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="footer-btn-modern"
|
||||
icon="help_outline"
|
||||
label="FAQ"
|
||||
color="primary"
|
||||
@click="openFAQ"
|
||||
/>
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="footer-btn-modern"
|
||||
icon="school"
|
||||
label="Guida"
|
||||
color="secondary"
|
||||
@click="openGuide"
|
||||
/>
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
class="footer-btn-modern"
|
||||
icon="support_agent"
|
||||
label="Assistenza"
|
||||
color="positive"
|
||||
@click="openInfo"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<!-- Dialog Annunci -->
|
||||
<q-dialog
|
||||
v-model="showAnnunciDialog"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-card class="annunci-dialog">
|
||||
<q-card-section class="dialog-header">
|
||||
<h3 class="dialog-title">Scegli Categoria</h3>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section class="dialog-content">
|
||||
<div class="annunci-options-mobile">
|
||||
<div
|
||||
class="annuncio-option gradient-indigo"
|
||||
@click="goToGoods"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-tshirt"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="option-title">Beni</span>
|
||||
<span class="option-subtitle">Autoproduzioni, cibo</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="annuncio-option gradient-red"
|
||||
@click="goToServices"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-house-user"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="option-title">Servizi</span>
|
||||
<span class="option-subtitle">Competenze, aiuti</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="annuncio-option gradient-lime"
|
||||
@click="goToHospitality"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-bed"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="option-title">Ospitalità</span>
|
||||
<span class="option-subtitle">Ospitare viaggiatori</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="annuncio-option gradient-teal"
|
||||
@click="goToTransport"
|
||||
>
|
||||
<q-icon
|
||||
name="directions_car"
|
||||
size="2.5rem"
|
||||
/>
|
||||
<span class="option-title">Trasporti</span>
|
||||
<span class="option-subtitle">Condivisione viaggi</span>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./Riso_Home_Modern.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './Riso_Home_Modern.scss';
|
||||
</style>
|
||||
1
src/components/Riso_Home_Modern/index.ts
Normal file
1
src/components/Riso_Home_Modern/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {default as Riso_Home_Modern} from './Riso_Home_Modern.vue'
|
||||
Reference in New Issue
Block a user