- aggiornata la grafica della Home di RISO
- Profilo Completition - Email Verificata - Invita un Amico (invio di email)
This commit is contained in:
@@ -1,191 +1,448 @@
|
||||
<template>
|
||||
<CMyPage img="" :title="$t('otherpages.admin.userpanel')" keywords="" :description="$t('otherpages.admin.userpanel')">
|
||||
|
||||
<q-btn color="green" label="Esporta Lista Email" @click="exportListaEmail"></q-btn>
|
||||
<br>
|
||||
|
||||
<div v-if="myuser.username" class="q-ma-sm row bordo_stondato" style="min-width: 300px; ">
|
||||
|
||||
<div class="row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="notifdirtype" :options="listnotiftype" label="Tipo" emit-value map-options>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="notifidtype" :options="listnotifid" label="Notifica" emit-value map-options>
|
||||
</q-select>
|
||||
<CMyPage
|
||||
img=""
|
||||
:title="$t('otherpages.admin.userpanel')"
|
||||
keywords=""
|
||||
:description="$t('otherpages.admin.userpanel')"
|
||||
>
|
||||
<div class="user-panel-container">
|
||||
<!-- Export Button -->
|
||||
<div class="export-section">
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
color="positive"
|
||||
icon="download"
|
||||
label="Esporta Lista Email"
|
||||
@click="exportListaEmail"
|
||||
no-caps
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Search Section -->
|
||||
<div class="search-section">
|
||||
<q-input
|
||||
v-model="title" label="Titolo"
|
||||
style="width: 300px;"></q-input>
|
||||
<q-input
|
||||
v-model="mynotif" label="Notifica da Inviare"
|
||||
input-class="myinput-area"
|
||||
style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<br>
|
||||
<q-btn class="centermydiv q-ma-sm" color="green" :label="`Invia Notifica a ` + myuser.username" @click="sendNotifToUser"></q-btn>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="myuser.username && tools.isManager()"
|
||||
class="q-ma-sm row bordo_stondato" style="min-width: 300px; ">
|
||||
|
||||
<div class="row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="notifdirtypeTest" :options="listnotiftypeTest" label="Tipo" emit-value map-options>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="notifidtypeTest" :options="listnotifidTest" label="Notifica" emit-value map-options>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<q-input
|
||||
v-model="title" label="Titolo TEST"
|
||||
style="width: 300px;"></q-input>
|
||||
<q-input
|
||||
v-model="mynotif" label="Notifica TEST da Inviare"
|
||||
input-class="myinput-area"
|
||||
style="width: 300px;"></q-input>
|
||||
</div>
|
||||
<br>
|
||||
<q-btn class="centermydiv q-ma-sm" color="green" :label="`Invia Notifica TEST a ` + myuser.username" @click="sendNotifToUserTest"></q-btn>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<CCopyBtn title="Copia Dati" :texttocopy="risultato"></CCopyBtn>-->
|
||||
|
||||
<div v-html="risultato"></div>
|
||||
|
||||
<div
|
||||
class="row justify-center vertical-middle">
|
||||
|
||||
<div class="q-mr-sm full-width">
|
||||
<q-input
|
||||
v-model="search" filled dense type="search" debounce="500"
|
||||
label="Cerca"
|
||||
|
||||
v-on:keyup.enter="doSearch"
|
||||
v-model="search"
|
||||
outlined
|
||||
dense
|
||||
type="search"
|
||||
debounce="500"
|
||||
label="Cerca utente"
|
||||
@keyup.enter="doSearch"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn dense label="" color="primary" @click="doSearch" icon="search"></q-btn>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
rounded
|
||||
color="primary"
|
||||
icon="search"
|
||||
@click="doSearch"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<q-space></q-space>
|
||||
<q-select
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-model="colVisib"
|
||||
rounded
|
||||
outlined
|
||||
multiple
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$t('grid.columns')"
|
||||
emit-value
|
||||
map-options
|
||||
:options="mycolumns"
|
||||
option-value="name"
|
||||
@update:model-value="changeCol">
|
||||
|
||||
</q-select>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="myuser.username">
|
||||
username cercato: <em>"{{ search }}"</em><br>
|
||||
<br>
|
||||
|
||||
<div v-if="myuser.verified_by_aportador">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green text-white"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<span class="mybanner">
|
||||
Verificato da {{ myuser.aportador_solidario }}<br>
|
||||
</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<span class="mybanner">
|
||||
NON Verificato da {{ myuser.aportador_solidario }}<br>
|
||||
</span>
|
||||
</q-banner>
|
||||
v-model="colVisib"
|
||||
outlined
|
||||
dense
|
||||
multiple
|
||||
options-dense
|
||||
:display-value="$t('grid.columns')"
|
||||
emit-value
|
||||
map-options
|
||||
:options="mycolumns"
|
||||
option-value="name"
|
||||
@update:model-value="changeCol"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="myuser.reported" class="mybanner">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center;"
|
||||
>
|
||||
<em style="font-weight: bold">{{ t('db.reporteduser', {date_report: tools.getstrDateTimeShort(myuser.date_report)}) }}<br>
|
||||
da: {{ myuser.username_who_report }}<br>
|
||||
</em>
|
||||
</q-banner>
|
||||
|
||||
<q-btn color="green" :label="`Sblocca ` + myuser.username" @click="tools.unblockUser($q, getMyUsername(), myuser.username)"></q-btn>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn color="red" :label="`Segnala Utente ` + myuser.username" @click="tools.reportUser($q, getMyUsername(), myuser.username)"></q-btn>
|
||||
</div>
|
||||
|
||||
|
||||
<CKeyAndValue mykey="Username:" :myvalue="myuser.username"></CKeyAndValue>
|
||||
|
||||
<div v-if="!!myuser.profile">
|
||||
<CKeyAndValue mykey="Email:" :myvalue="myuser.email"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="versione:" :myvalue="myuser.profile.version"></CKeyAndValue>
|
||||
<div class="q-ml-xs bg-blue text-white text-h6">
|
||||
<q-banner
|
||||
dense
|
||||
rounded class="bg-blue text-white"
|
||||
style="text-align: center;">
|
||||
<span class="mybanner">Telegram<br></span>
|
||||
</q-banner>
|
||||
|
||||
<CKeyAndValue mykey="Username Telegram:" :myvalue="myuser.profile.username_telegram"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Telegram ID:" :myvalue="myuser.profile.teleg_id"></CKeyAndValue>
|
||||
<span v-if="myuser.profile.firstname_telegram">
|
||||
<CKeyAndValue mykey="Nome e Cognome Telegram:" :myvalue="myuser.profile.firstname_telegram + ` ` + myuser.profile.lastname_telegram"></CKeyAndValue>
|
||||
</span>
|
||||
<!-- User Info Section -->
|
||||
<div
|
||||
v-if="myuser.username"
|
||||
class="user-info-section"
|
||||
>
|
||||
<!-- Search Result Header -->
|
||||
<div class="search-result-header">
|
||||
<q-icon
|
||||
name="person"
|
||||
size="20px"
|
||||
color="primary"
|
||||
/>
|
||||
<span class="username-searched">{{ search }}</span>
|
||||
</div>
|
||||
<CKeyAndValue mykey="Invitato da:" :myvalue="myuser.aportador_solidario"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Online il:" :mydate="myuser.lasttimeonline"></CKeyAndValue>
|
||||
|
||||
<CKeyAndValue mykey="Provincia:" :myvalue="myuser.profile.resid_province"></CKeyAndValue>
|
||||
<!-- Status Banners -->
|
||||
<div class="status-banners">
|
||||
<!-- Verification Status -->
|
||||
<div
|
||||
v-if="myuser.verified_by_aportador"
|
||||
class="status-card verified"
|
||||
>
|
||||
<q-icon
|
||||
name="verified"
|
||||
size="24px"
|
||||
/>
|
||||
<div class="status-content">
|
||||
<div class="status-title">Verificato</div>
|
||||
<div class="status-subtitle">da {{ myuser.aportador_solidario }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CKeyAndValue mykey="Città di Nascita:" :myvalue="myuser.profile.born_city"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Data di Nascita:" :mydate="myuser.profile.dateofbirth"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Biografia:" :myvalue="myuser.profile.biografia"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Note:" :myvalue="myuser.profile.note"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Da Contattare:" :myvalue="myuser.profile.da_contattare"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="Facilitatore:" :myvalue="tools.isBitActive(myuser.perm, shared_consts.Permissions.Facilitatore.value)"></CKeyAndValue>
|
||||
<CKeyAndValue mykey="qualifica:" :myvalue="myuser.profile.qualifica"></CKeyAndValue>
|
||||
<div
|
||||
v-else
|
||||
class="status-card not-verified"
|
||||
>
|
||||
<q-icon
|
||||
name="pending"
|
||||
size="24px"
|
||||
/>
|
||||
<div class="status-content">
|
||||
<div class="status-title">Non Verificato</div>
|
||||
<div class="status-subtitle">da {{ myuser.aportador_solidario }}</div>
|
||||
</div>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
rounded
|
||||
color="positive"
|
||||
icon="check"
|
||||
label="Verifica"
|
||||
@click="tools.verifyUser($q, getMyUsername(), myuser.username)"
|
||||
no-caps
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Report Status -->
|
||||
<div
|
||||
v-if="myuser.reported"
|
||||
class="status-card reported"
|
||||
>
|
||||
<q-icon
|
||||
name="report"
|
||||
size="24px"
|
||||
/>
|
||||
<div class="status-content">
|
||||
<div class="status-title">Utente Segnalato</div>
|
||||
<div class="status-subtitle">
|
||||
{{
|
||||
t('db.reporteduser', {
|
||||
date_report: tools.getstrDateTimeShort(myuser.date_report),
|
||||
})
|
||||
}}
|
||||
<br />da: {{ myuser.username_who_report }}
|
||||
</div>
|
||||
</div>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
rounded
|
||||
color="positive"
|
||||
icon="lock_open"
|
||||
label="Sblocca"
|
||||
@click="tools.unblockUser($q, getMyUsername(), myuser.username)"
|
||||
no-caps
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else
|
||||
class="action-btn-wrapper"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
rounded
|
||||
color="negative"
|
||||
icon="report"
|
||||
:label="`Segnala ${myuser.username}`"
|
||||
@click="tools.reportUser($q, getMyUsername(), myuser.username)"
|
||||
no-caps
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User Details -->
|
||||
<div class="user-details-card">
|
||||
<div class="section-header">
|
||||
<q-icon
|
||||
name="info"
|
||||
size="20px"
|
||||
/>
|
||||
<span>Informazioni Generali</span>
|
||||
</div>
|
||||
|
||||
<CKeyAndValue
|
||||
mykey="Username"
|
||||
:myvalue="myuser.username"
|
||||
/>
|
||||
|
||||
<template v-if="myuser.profile">
|
||||
<CKeyAndValue
|
||||
mykey="Email"
|
||||
:myvalue="myuser.email"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Versione"
|
||||
:myvalue="myuser.profile.version"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Invitato da"
|
||||
:myvalue="myuser.aportador_solidario"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Online il"
|
||||
:mydate="myuser.lasttimeonline"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Telegram Section -->
|
||||
<div
|
||||
v-if="myuser.profile"
|
||||
class="user-details-card telegram-section"
|
||||
>
|
||||
<div class="section-header telegram-header">
|
||||
<q-icon
|
||||
name="fab fa-telegram"
|
||||
size="20px"
|
||||
/>
|
||||
<span>Telegram</span>
|
||||
</div>
|
||||
|
||||
<CKeyAndValue
|
||||
mykey="Username"
|
||||
:myvalue="myuser.profile.username_telegram"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="ID"
|
||||
:myvalue="myuser.profile.teleg_id"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
v-if="myuser.profile.firstname_telegram"
|
||||
mykey="Nome Completo"
|
||||
:myvalue="`${myuser.profile.firstname_telegram} ${myuser.profile.lastname_telegram}`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Personal Info Section -->
|
||||
<div
|
||||
v-if="myuser.profile"
|
||||
class="user-details-card"
|
||||
>
|
||||
<div class="section-header">
|
||||
<q-icon
|
||||
name="location_on"
|
||||
size="20px"
|
||||
/>
|
||||
<span>Dati Personali</span>
|
||||
</div>
|
||||
|
||||
<CKeyAndValue
|
||||
mykey="Provincia"
|
||||
:myvalue="myuser.profile.resid_province"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Città di Nascita"
|
||||
:myvalue="myuser.profile.born_city"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Data di Nascita"
|
||||
:mydate="myuser.profile.dateofbirth"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Biografia"
|
||||
:myvalue="myuser.profile.biografia"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Saltato Circuito Prov"
|
||||
:myvalue="myuser.profile.noCircuit"
|
||||
:show-set-button="true"
|
||||
:on-set-value="userStore.savenoCircuit"
|
||||
:valuetoSet="false"
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Reset No Circuito"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Saltato Circuito Ita"
|
||||
:myvalue="myuser.profile.noCircIta"
|
||||
:show-set-button="true"
|
||||
:on-set-value="userStore.savenoCircIta"
|
||||
:valuetoSet="false"
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Reset No Circuito ITA"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Note"
|
||||
:myvalue="myuser.profile.note"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Da Contattare"
|
||||
:myvalue="myuser.profile.da_contattare"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Facilitatore"
|
||||
:myvalue="
|
||||
tools.isBitActive(myuser.perm, shared_consts.Permissions.Facilitatore.value)
|
||||
"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Qualifica"
|
||||
:myvalue="myuser.profile.qualifica"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Notification Section -->
|
||||
<div class="notification-section">
|
||||
<div class="section-header">
|
||||
<q-icon
|
||||
name="notifications"
|
||||
size="20px"
|
||||
/>
|
||||
<span>Invia Notifica</span>
|
||||
</div>
|
||||
|
||||
<div class="notification-form">
|
||||
<div class="form-row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
dense
|
||||
v-model="notifdirtype"
|
||||
:options="listnotiftype"
|
||||
label="Tipo"
|
||||
emit-value
|
||||
map-options
|
||||
/>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
dense
|
||||
v-model="notifidtype"
|
||||
:options="listnotifid"
|
||||
label="Notifica"
|
||||
emit-value
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
v-model="title"
|
||||
outlined
|
||||
dense
|
||||
label="Titolo"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
v-model="mynotif"
|
||||
outlined
|
||||
dense
|
||||
type="textarea"
|
||||
label="Testo notifica"
|
||||
rows="3"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
color="positive"
|
||||
icon="send"
|
||||
:label="`Invia a ${myuser.username}`"
|
||||
@click="sendNotifToUser"
|
||||
no-caps
|
||||
class="full-width"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test Notification Section (Manager only) -->
|
||||
<div
|
||||
v-if="tools.isManager()"
|
||||
class="notification-section test-section"
|
||||
>
|
||||
<div class="section-header test-header">
|
||||
<q-icon
|
||||
name="bug_report"
|
||||
size="20px"
|
||||
/>
|
||||
<span>Notifica TEST</span>
|
||||
</div>
|
||||
|
||||
<div class="notification-form">
|
||||
<div class="form-row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
dense
|
||||
v-model="notifdirtypeTest"
|
||||
:options="listnotiftypeTest"
|
||||
label="Tipo"
|
||||
emit-value
|
||||
map-options
|
||||
/>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
dense
|
||||
v-model="notifidtypeTest"
|
||||
:options="listnotifidTest"
|
||||
label="Notifica"
|
||||
emit-value
|
||||
map-options
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
v-model="title"
|
||||
outlined
|
||||
dense
|
||||
label="Titolo TEST"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
v-model="mynotif"
|
||||
outlined
|
||||
dense
|
||||
type="textarea"
|
||||
label="Testo notifica TEST"
|
||||
rows="3"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
rounded
|
||||
color="warning"
|
||||
icon="send"
|
||||
:label="`Invia TEST a ${myuser.username}`"
|
||||
@click="sendNotifToUserTest"
|
||||
no-caps
|
||||
class="full-width"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Results HTML -->
|
||||
<div
|
||||
v-if="risultato"
|
||||
class="results-section"
|
||||
v-html="risultato"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./userPanel.ts">
|
||||
import { useUserStore } from 'app/src/store/index.js';
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './userPanel.scss';
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user