Files
salvato.newfreeplanet/src/rootgen/admin/userPanel/userPanel.vue
paoloar77 ce20daed6d Notification with Service Workers now is working!
When a Notification arrives, it save into the IndexDb,
then in Vue.js call a polling to check in the db if there is a different record count.
If is different then call a get to update the notification.
2022-08-07 02:01:20 +02:00

151 lines
4.7 KiB
Vue
Executable File

<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 rounded outlined v-model="notifdirtype" :options="listnotiftype" label="Tipo" emit-value map-options>
</q-select>
<q-select rounded outlined v-model="notifidtype" :options="listnotifid" label="Notifica" emit-value map-options>
</q-select>
</div>
<div class="row">
<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>
<!--<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"
>
<template v-slot:after>
<q-btn dense label="" color="primary" @click="doSearch" icon="search"></q-btn>
</template>
</q-input>
</div>
<q-space></q-space>
<q-select
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>
</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') }}<br>
da: {{ myuser.username_who_report }}<br>
in Data: {{ tools.getstrshortDateTime(myuser.date_report) }} </em>
</q-banner>
</div>
<CKeyAndValue mykey="Username:" :myvalue="myuser.username"></CKeyAndValue>
<div v-if="!!myuser.profile">
<CKeyAndValue mykey="Email:" :myvalue="myuser.email"></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>
</div>
<CKeyAndValue mykey="Invitato da:" :myvalue="myuser.aportador_solidario"></CKeyAndValue>
<CKeyAndValue mykey="Online il:" :mydate="myuser.lasttimeonline"></CKeyAndValue>
<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="qualifica:" :myvalue="myuser.profile.qualifica"></CKeyAndValue>
</div>
</div>
<br>
</CMyPage>
</template>
<script lang="ts" src="./userPanel.ts">
</script>
<style lang="scss" scoped>
@import './userPanel.scss';
</style>