RootGen (moved)

This commit is contained in:
Paolo Arena
2019-12-18 16:23:50 +01:00
parent 1df1965508
commit ad8f335d6c
22 changed files with 1383 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
.listaev {
color: black;
font-size: 0.75rem;
font-weight: 400;
line-height: 1.25rem;
letter-spacing: 0.03333em;
&__date {
font-weight: bold;
color: #2ba0fd;
font-size: 1rem;
}
&__title {
color: red;
font-weight: 700;
letter-spacing: 0.066em;
}
&__details {
color: black;
}
&__tdimg {
width: 150px;
height: 150px;
}
&__table {
margin: 10px;
border-radius: 1rem;
padding: 2px;
}
&__align_center_mobile {
text-align: left;
@media (max-width: 718px) {
text-align: center;
display: flex;
}
}
&__img {
padding: 0.5rem !important;
float: left;
width: 150px;
height: 150px;
border-radius: 1rem;
@media (max-width: 718px) {
// PER VERSIONE MOBILE
float: none;
text-align: center;
margin: 0 auto;
}
}
}

View File

@@ -0,0 +1,153 @@
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools'
import { func_tools } from '@src/store/Modules/toolsext'
import { CalendarStore, UserStore } from '@store'
import { CTitle } from '../../../components/CTitle/index'
import { CMyPage } from '../../../components/CMyPage/index'
import { IBookedEvent, ICalendarState, IEvents, ITodo, ITodosState, IUserState, IUserFields } from '@src/model'
import { Getter } from 'vuex-class'
import { lists } from '@src/store/Modules/lists'
import MixinUsers from '@src/mixins/mixin-users'
import MixinOperator from '@src/mixins/mixin-operator'
const namespace = 'CalendarModule'
@Component({
mixins: [MixinUsers, MixinOperator],
name: 'EventList',
components: { CTitle, CMyPage }
})
export default class Eventlist extends Vue {
public $t: any
public $q
public showpeople: boolean = false
public eventsel: IEvents = null
public showPrev = false
public numrec = 0
@Getter('getEventsBookedByIdEvent', { namespace })
public getEventsBookedByIdEvent: (state: ICalendarState, id, showall) => IBookedEvent[]
@Getter('getNumParticipants', { namespace })
public getNumParticipants: (state: ICalendarState, event: IEvents, showall) => number
public getNameSurnameByUserId(userid) {
return UserStore.getters.getNameSurnameByUserId(userid)
}
public getEventList() {
const eventsloc = []
const datenow = tools.addDays(tools.getDateNow(), -1)
let numevent = 0
CalendarStore.state.eventlist.forEach((myevent) => {
// console.log(' ciclo i = ', i, CalendarStore.state.eventlist[i])
// let dateEvent = new Date(myevent.date + ' 00:00:00')
const dateEvent = new Date(myevent.dateTimeEnd)
let add = true
if (!this.showall) {
add = CalendarStore.getters.getNumParticipants(myevent, this.showall) > 0
}
if (add) {
if (this.showPrev) {
if (dateEvent < datenow) {
eventsloc.push(myevent)
numevent++
}
} else {
if (dateEvent >= datenow) {
eventsloc.push(myevent)
numevent++
}
}
}
})
this.numrec = numevent
if (this.showPrev) {
eventsloc.reverse()
}
return eventsloc
}
public getNumEvent() {
const eventsloc = []
const datenow = tools.addDays(tools.getDateNow(), -1)
let numevent = 0
CalendarStore.state.eventlist.forEach((myevent) => {
// console.log(' ciclo i = ', i, CalendarStore.state.eventlist[i])
// let dateEvent = new Date(myevent.date + ' 00:00:00')
const dateEvent = new Date(myevent.dateTimeEnd)
let add = true
if (!this.showall) {
add = CalendarStore.getters.getNumParticipants(myevent, this.showall) > 0
}
if (add) {
if (this.showPrev) {
if (dateEvent < datenow)
numevent++
} else {
if (dateEvent >= datenow)
numevent++
}
}
})
this.numrec = numevent
return eventsloc
}
get func_tools() {
return func_tools
}
get tools() {
return tools
}
get mythis() {
return this
}
get mostra() {
return this.$route.name
}
get showall() {
return this.$route.name === 'otherpages.admin.usereventlist'
}
get gettitle() {
if (this.showall)
return this.$t('otherpages.admin.usereventlist')
else
return this.$t('otherpages.admin.eventlist')
}
get lists() {
return lists
}
public mounted() {
this.getNumEvent()
}
}

View File

@@ -0,0 +1,114 @@
<template>
<CMyPage title="Events" keywords="" description="" imgbackground="../../statics/images/calendario_eventi.jpg" sizes="max-height: 120px">
<div class="q-ma-sm q-pa-xs">
<div v-if="!showall" class="text-h6 bg-red text-white text-center q-pa-xs shadow-max">Lista delle tue
prenotazioni agli Eventi:
</div>
<q-space></q-space>
<q-toggle v-model="showPrev" :val="lists.MenuAction.SHOW_PREV_REC"
:label="$t('grid.showprevedit')"></q-toggle>
</div>
<div>
<q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
<thead>
<th>{{$t('cal.data')}}</th>
<th>{{$t('cal.event')}}</th>
<th v-if="!tools.isMobile()">{{$t('cal.teachertitle')}}</th>
<th v-if="showall"><span v-if="!tools.isMobile()">{{$t('cal.selnumpeople')}}</span><span v-else>{{$t('cal.selnumpeople_short')}}</span>
</th>
<th>{{$t('cal.peoplebooked')}}</th>
</thead>
<tbody>
<tr v-for="(event, index) in getEventList()" class="listaev listaev__table">
<td>
<div class="text-center text-blue">{{func_tools.getDateStr(event.dateTimeStart)}}</div>
</td>
<td :class="">
<div class="text-center boldhigh">{{ event.title }}</div>
</td>
<td v-if="!tools.isMobile()">
<div class="text-center">{{ getTeacherByUsername(event.teacher) }}
<span v-if="isValidUsername(event.teacher2)"> - {{ getTeacherByUsername(event.teacher2) }}</span>
</div>
</td>
<td v-if="showall">
<div class="text-center">{{ getNumParticipants(event, showall) }}</div>
</td>
<td class="text-center">
<q-btn v-if="getNumParticipants(event, showall) > 0"
dense
round
@click="showpeople = true; eventsel = event"
aria-label="Menu">
<q-icon name="info"/>
</q-btn>
</td>
</tr>
</tbody>
</q-markup-table>
<q-dialog v-model="showpeople">
<q-card v-if="eventsel">
<q-toolbar class="bg-primary text-white" :style="`min-width: ` + tools.myheight_dialog() + `px;`">
<q-toolbar-title>
{{ eventsel.title }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="q-pa-xs inset-shadow">
<q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
<thead>
<th>Data</th>
<th>Messaggio</th>
<th>Num</th>
<th>Azione</th>
</thead>
<tbody>
<tr v-for="(eventbook, index) in getEventsBookedByIdEvent(eventsel._id, showall)"
class="listaev listaev__table">
<td class="text-center">
<div>{{func_tools.getDateTimeShortStr(eventbook.datebooked)}}
</div>
</td>
<td class="text-center">
<strong>{{getNameSurnameByUserId(eventbook.userId)}}</strong> <span
v-if="eventbook.msgbooking"> {{ $t('sendmsg.write') }}: </span><br>
{{ eventbook.msgbooking }}
</td>
<td class="text-center">
{{eventbook.numpeople}}
</td>
<td class="text-center">
<q-btn flat round color="red" icon="fas fa-trash-alt" size="sm"
@click="tools.CancelBookingEvent(mythis, eventsel, eventbook._id, false)"></q-btn>
</td>
</tr>
</tbody>
</q-markup-table>
</q-card-section>
</q-card>
</q-dialog>
<div v-if="numrec === 0">
<div v-if="!showPrev" class="text-blue text-center q-pa-xs shadow">
Attualmente non hai nessuna Prenotazione futura.
</div>
<div v-else class="text-blue text-center q-pa-xs shadow">
Non hai nessuna Prenotazione passata.
</div>
</div>
<br>
</div>
</CMyPage>
</template>
<script lang="ts" src="eventlist.ts">
</script>
<style lang="scss" scoped>
@import './eventlist.scss';
</style>

View File

View File

@@ -0,0 +1,29 @@
import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator'
import { GlobalStore, UserStore } from '@store'
import { tools } from '../../../../../associazioneShen/src/store/Modules/tools'
import { static_data } from '../../../../../associazioneShen/src/db/static_data'
import { Screen } from 'quasar'
import { colgallery } from 'store/Modules/fieldsTable'
import { CImgText } from '../../../../../associazioneShen/src/components/CImgText/index'
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
import MixinMetaTags from '../../../../../associazioneShen/src/mixins/mixin-metatags'
import MixinBase from 'mixins/mixin-base'
@Component({
mixins: [MixinBase],
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
})
export default class Gallery extends Vue {
get getcolgallery() {
return colgallery
}
get static_data() {
return static_data
}
}

View File

@@ -0,0 +1,22 @@
<template>
<CMyPage title="Gallerie" imgbackground="../../statics/images/calendario_eventi.jpg" sizes="max-height: 120px">
<div class="q-ma-sm q-gutter-sm">
<CTitleBanner title="Gallerie"></CTitleBanner>
<CGridTableRec prop_mytable="gallery"
prop_mytitle=""
:prop_mycolumns="getcolgallery"
prop_colkey="_id"
nodataLabel="Nessuna Galleria"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
</CGridTableRec>
</div>
</CMyPage>
</template>
<script lang="ts" src="gallery.ts">
</script>
<style lang="scss" scoped>
@import 'gallery.scss';
</style>

View File

@@ -0,0 +1,6 @@
.mlvalue {
margin: 5px 5px;
font-weight: bold;
font-size: 1rem;
}

View File

@@ -0,0 +1,243 @@
import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator'
import { tools } from 'store/Modules/tools'
import { func_tools } from 'store/Modules/toolsext'
import { CTitle } from '../../../../../associazioneShen/src/components/CTitle/index'
import { CMyPage } from '../../../../../associazioneShen/src/components/CMyPage/index'
import MixinBase from 'mixins/mixin-base'
import { CalendarStore, GlobalStore, UserStore } from '@store'
import { CGridTableRec, CMyFieldDb, CTitleBanner } from '@components'
import { colnewstosent, coltemplemail, colopzemail, colmailinglist } from 'store/Modules/fieldsTable'
import { DefaultNewsState, INewsState } from 'model/index'
import translate from 'globalroutines/util'
import { getCookie } from 'utils/auth'
const namespace = 'CalendarModule'
@Component({
name: 'newsletter',
components: { CTitle, CMyPage, CGridTableRec, CTitleBanner, CMyFieldDb },
mixins: []
})
export default class Newsletter extends MixinBase {
public $t: any
public $q
public myloadingload: boolean = false
public myloading: boolean = false
public myloadingprew: boolean = false
public myloading2: boolean = false
public myloading3: boolean = false
public myloading4: boolean = false
public myloadingState: boolean = false
public myloadingImport: boolean = false
public mailinglist_imported: string = ''
public myrisimport: string = ''
public errimport: boolean = false
public okimport: boolean = false
public newsstate: INewsState = DefaultNewsState
public percsubscribed: number = 0.0
public polling = null
public tab: string = ''
public emailtextheader: string = ''
public eseguipolling: boolean = false
public async mounted() {
await this.load()
this.tab = tools.getCookie('formnews', 'check')
this.emailtextheader = this.getValDb('EMAIL_TEXT', true)
}
public async checkifpolling() {
if (this.eseguipolling) {
// Is Still sending email, so, every minutes, check the status
if (!this.polling) {
console.log('esegui POLLING....')
this.polling = setInterval(() => {
this.load()
}, 15000)
}
}
}
@Watch('$route.params.idparam')
public changetab() {
this.tab = this.$route.params.idparam
}
public async createNewsletter(minuti, loading) {
loading = true
// Crea nuovo record tra N minuti
const mynews = {
idapp: process.env.APP_ID,
label: 'Newsletter creata il ' + tools.getstrDateTimeAll(tools.getDateNow()),
activate: true,
datetoSent: tools.addMinutes(tools.getDateNow(), minuti),
templemail_str: GlobalStore.getters.gettemplemailbyId(this.getValDb('TEMPLEMAIL_ID', true))
}
await tools.createNewRecord(this, 'newstosent', mynews).then((myrecris) => {
// reload data
this.load()
loading = false
})
}
public beforeDestroy() {
clearInterval(this.polling)
}
public async load() {
console.log('load')
this.myloadingload = true
const mydata = {
locale: tools.getLocale()
}
const myris = await UserStore.actions.newsletterload(mydata)
this.newsstate = myris.newsstate
GlobalStore.state.serv_settings = myris.serv_settings
GlobalStore.state.templemail = myris.templemail
GlobalStore.state.opzemail = myris.opzemail
// console.log('newsstate')
// console.table('GlobalStore.state.serv_settings', GlobalStore.state.serv_settings)
this.percsubscribed = this.newsstate.totsubscribed / this.newsstate.totemail
if (this.newsstate.lastnewstosent)
this.eseguipolling = this.eseguipolling || this.newsstate.lastnewstosent.starting_job && !this.newsstate.lastnewstosent.finish_job
if (this.newsstate.nextnewstosent)
this.eseguipolling = this.eseguipolling || true
console.log('this.eseguipolling', this.eseguipolling)
this.myloadingload = false
this.checkifpolling()
}
public async DisableNewsletter() {
return await this.setActiveDisactiveNewsletter(false)
}
public async EnableNewsletter() {
return await this.setActiveDisactiveNewsletter(true)
}
public async setActiveDisactiveNewsletter(activate) {
let mytext = ''
const mytitle = 'Newsletter'
if (activate)
mytext = 'Procedo a far Ripartire la newsletter?'
else
mytext = 'Procedo a fermare l\'Invio della newsletter?'
this.$q.dialog({
message: mytext,
ok: {
label: translate('dialog.yes'),
push: true
},
title: mytitle,
cancel: true,
persistent: false
}).onOk(async () => {
this.myloadingState = true
const mydata = {
_id: this.newsstate.lastnewstosent._id,
locale: tools.getLocale(),
activate
}
this.newsstate = await UserStore.actions.newsletter_setactivate(mydata)
this.myloadingState = false
})
}
get emailtest() {
return this.getValDb('EMAIL_TEST', true)
}
public async sendNewsletterTest(previewonly) {
if (previewonly)
this.myloadingprew = true
else
this.myloading = true
const res = await GlobalStore.actions.sendEmailTest({previewonly})
if (res)
tools.showPositiveNotif(this.$q, 'Email di Test Inviata')
else {
tools.showNegativeNotif(this.$q, 'Email di Test Non Inviata')
}
if (previewonly)
this.myloadingprew = false
else
this.myloading = false
}
public changetabnews(value, oldval) {
console.log('changetabnews')
tools.setCookie('formnews', value)
}
get getcolnewstosent() {
return colnewstosent
}
get getcolmailinglist() {
return colmailinglist
}
get getcoltemplemail() {
return coltemplemail
}
get getcolopzemail() {
return colopzemail
}
public async importMailinglist() {
this.myloadingImport = true
this.errimport = false
this.okimport = false
const mydata = {
strdataemail: this.mailinglist_imported,
locale: tools.getLocale(),
settomailchimp: this.getValDb('MAILCHIMP_ON', true, false)
}
const res = await UserStore.actions.importemail(mydata)
let esistiti = ''
if (res.data.numalreadyexisted > 0)
esistiti = ` ${res.data.numalreadyexisted} email già esistenti`
if (res.data.numadded > 0) {
this.okimport = true
this.myrisimport = `(${res.data.numadded} / ${res.data.numtot}) email importate !` + esistiti
} else {
this.errimport = true
this.myrisimport = `Nessuna email importata (trovate ${res.data.numtot})` + esistiti
}
this.myloadingImport = false
}
get progresslabsubscribed() {
return (this.percsubscribed * 100).toFixed(0) + '%'
}
public percsent(next) {
let rec = this.newsstate.lastnewstosent
if (next)
rec = this.newsstate.nextnewstosent
let val = rec.numemail_sent / rec.numemail_tot * 100
if (val > 100)
val = 100
return val.toFixed(2)
}
}

View File

@@ -0,0 +1,543 @@
<template>
<CMyPage title="Newsletter" keywords="" description="" imgbackground="../../statics/images/calendario_eventi.jpg"
sizes="max-height: 120px">
<q-card>
<div v-show="false">
<q-tabs
v-model="tab"
dense
class="text-grey"
active-color="primary"
indicator-color="primary"
align="justify"
narrow-indicator
>
<q-tab name="settings" label="Impostazioni"></q-tab>
<q-tab name="main_settings" label="Impostaz. Primarie"></q-tab>
<q-tab name="templemail" label="Template Email"></q-tab>
<q-tab name="newnewsletter" label="Invia"></q-tab>
<q-tab name="check" label="Controlla"></q-tab>
<q-tab name="newslist" label="Già Inviate"></q-tab>
<q-tab name="mailinglist" label="Lista Contatti (MailingList)"></q-tab>
<q-tab name="events" label="Altre"></q-tab>
</q-tabs>
</div>
<q-tab-panels v-model="tab" animated @transition="changetabnews">
<q-tab-panel name="settings">
<div class="q-ma-xs q-pa-xs text-center rounded-borders q-list--bordered">
<CTitleBanner title="Impostazioni:"></CTitleBanner>
<div class="row">
<CMyFieldDb title="Altezza Logo"
mykey="HEIGHT_LOGO"
serv="true"
:type="tools.FieldType.number">
</CMyFieldDb>
<CMyFieldDb title="Titolo Discipline"
mykey="DISC_TITLE"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
</div>
<CMyFieldDb title="Testo Promozione"
mykey="TEXT_PROMO"
serv="true"
:type="tools.FieldType.html">
</CMyFieldDb>
<div class="row">
<CMyFieldDb title="Numero di Eventi da mostrare"
mykey="SHOW_LAST_N_EV"
serv="true"
:type="tools.FieldType.number">
</CMyFieldDb>
<CMyFieldDb title="Testo dopo gli Eventi"
mykey="TEXT_AFTER_EV"
serv="true"
:type="tools.FieldType.html">
</CMyFieldDb>
</div>
<div class="row">
<CMyFieldDb title="Pagina Twitter"
mykey="URL_TWITTER"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Pagina Facebook"
mykey="URL_FACEBOOK"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Pagina YouTube"
mykey="URL_YOUTUBE"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Pagina Instagram"
mykey="URL_INSTAGRAM"
:type="tools.FieldType.string">
</CMyFieldDb>
</div>
<CMyFieldDb title="Firma"
mykey="TEXT_SIGN"
serv="true"
:type="tools.FieldType.html">
</CMyFieldDb>
<CMyFieldDb title="Testo Disclaimer"
mykey="TEXT_DISCLAIMER"
serv="true"
:type="tools.FieldType.html">
</CMyFieldDb>
<CMyFieldDb title="Testo a piè pagina"
mykey="TEXT_DISC_BOTTOM"
serv="true"
:type="tools.FieldType.html">
</CMyFieldDb>
</div>
</q-tab-panel>
<q-tab-panel name="main_settings">
<div class="q-ma-xs q-pa-xs text-center rounded-borders q-list--bordered">
<CTitleBanner title="Impostazioni Server:"></CTitleBanner>
<CMyFieldDb title="Email da cui Inviare la Newsletter"
mykey="EMAIL_FROM"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Email di Reply"
mykey="EMAIL_REPLY"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Password email"
mykey="PWD_FROM"
serv="true"
:type="tools.FieldType.password">
</CMyFieldDb>
<CMyFieldDb title="Servizio SMTP Email ('gmail' per inviare email da Gmail)"
mykey="EMAIL_SERVICE_SEND"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
<CMyFieldDb title="Porta SMTP"
mykey="EMAIL_PORT"
serv="true"
:type="tools.FieldType.number">
</CMyFieldDb>
<CMyFieldDb title="Millisecondi di pausa tra una email e l'altra"
mykey="MSEC_PAUSE_SEND"
serv="true"
:type="tools.FieldType.number">
</CMyFieldDb>
</div>
</q-tab-panel>
<q-tab-panel name="events">
<CTitleBanner title="Altre Impostazioni:"></CTitleBanner>
<CMyFieldDb title="Messaggio dopo che l'utente ha Prenotato un Evento"
mykey="MSG_REPLY_AFTER_BOOKING"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
</q-tab-panel>
<q-tab-panel name="templemail">
<CTitleBanner title="Modelli Email:"></CTitleBanner>
<CGridTableRec prop_mytitle=""
prop_mytable="templemail"
:prop_mycolumns="getcoltemplemail"
:prop_colkey="db_fieldsTable.getKeyByTable('templemail')"
nodataLabel="Nessuna Email Template attualmente creata"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
>
</CGridTableRec>
</q-tab-panel>
<q-tab-panel name="newnewsletter">
<div class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
<CTitleBanner title="Test Invio Newsletter:"></CTitleBanner>
<div class="q-pa-xs q-ma-md q-gutter-md">
<q-btn v-if="tools.isDebug()" :loading="myloadingprew" rounded outline
@click="sendNewsletterTest(true)"
color="primary"
icon="fas fa-desktop">
<span class="q-px-sm">Anteprima</span>
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Carica Anteprima...
</template>
</q-btn>
<div class="text-center">
<CMyFieldDb title="Email di Test"
mykey="EMAIL_TEST"
serv="true"
:type="tools.FieldType.string">
</CMyFieldDb>
<q-btn :loading="myloading" rounded outline @click="sendNewsletterTest(false)"
color="primary"
icon="email">
<span class="q-px-sm">Invia Email di Test</span>
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Invia Email a '{{emailtest}}' in corso ...
</template>
</q-btn>
</div>
</div>
<div class="q-ma-xs q-pa-sm text-center rounded-borders q-list--bordered">
<CTitleBanner title="Invia Newsletter:"></CTitleBanner>
<div class="q-pa-xs q-ma-md q-gutter-md">
<CMyFieldDb title="Template Email da Inviare"
mykey="TEMPLEMAIL_ID"
serv="true"
:type="tools.FieldType.select"
jointable="templemail">
</CMyFieldDb>
<q-btn :loading="myloading2" rounded outline @click="createNewsletter(1, myloading2)"
color="primary"
icon="fas fa-file-alt">
<span class="q-px-sm">Crea Nuovo Invio Newsletter Schedulato tra 1 minuto</span>
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Creazione Newsletter...
</template>
</q-btn>
<br>
<q-btn :loading="myloading3" rounded outline @click="createNewsletter(10, myloading3)"
color="primary"
icon="fas fa-clock">
<span class="q-px-sm">Crea Nuovo Invio Newsletter Schedulato tra 10 minuti</span>
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Creazione Newsletter
</template>
</q-btn>
<br>
<q-btn :loading="myloading4" rounded outline
@click="createNewsletter(60*60*24, myloading4)"
color="primary"
icon="fas fa-calendar-day">
<span class="q-px-sm">Crea Nuovo Invio Newsletter Schedulato tra 1 giorno</span>
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Creazione Newsletter...
</template>
</q-btn>
</div>
</div>
<div class="q-ma-md rounded-borders q-list--bordered">
<div class="text-center">
<CTitleBanner title="Prossima Newsletter da Inviare:"></CTitleBanner>
</div>
<div v-if="newsstate.nextnewstosent"
class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
<q-card class="bg-grey-3 relative-position card-example">
<q-card-section>
<q-chip dense class="shadow-5 q-mb-md" color="orange" text-color="white"
icon="schedule">
Modello Email da Inviare: <span class="mlvalue">{{ newsstate.nextnewstosent.templemail_str }}</span>
</q-chip>
<br>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Data Schedulato: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.nextnewstosent.datetoSent) }}</span>
</q-chip>
<br>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Inizio Invio: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.nextnewstosent.datestartJob) }}</span>
</q-chip>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Fine Invio: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.nextnewstosent.datefinishJob) }}</span>
</q-chip>
<br>
<div v-if="newsstate.nextnewstosent.starting_job && !newsstate.nextnewstosent.finish_job">
<q-chip
dense class="shadow-5 q-mb-md" color="orange" text-color="white"
icon="email">
<span class="mlvalue">Invio Newsletter in Corso...</span>
</q-chip>
<br>
</div>
<div>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Ultima Email inviata: <span class="mlvalue">{{ tools.getstrTimeAll(newsstate.nextnewstosent.lastemailsent_Job) }}</span>
</q-chip>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="email">
Inviate: <span class="mlvalue">{{ newsstate.nextnewstosent.numemail_sent }} / {{ newsstate.nextnewstosent.numemail_tot }}</span>
</q-chip>
<q-circular-progress
show-value font-size="12px" :value="percsent(true)"
size="60px" :thickness="0.22" color="green"
track-color="grey-3"
class="q-ma-md"
>
<span class="mlvalue"> {{ percsent(true) }} % </span>
</q-circular-progress>
<div class="text-center">
<q-slider
v-model="newsstate.nextnewstosent.numemail_sent"
:min="0"
readonly
:max="newsstate.nextnewstosent.numemail_tot"
:step="1"
label
label-always
color="light-green"></q-slider>
</div>
</div>
<div v-if="newsstate.nextnewstosent.finish_job">
<br>
<q-chip dense class="shadow-5 q-mb-md" color="green"
text-color="white" icon="email">
<span class="mlvalue">Invio Newsletter Completato</span>
</q-chip>
</div>
</q-card-section>
<q-inner-loading id="spinner2" :showing="myloadingload">
<q-spinner-tail
color="primary"
size="4em">
</q-spinner-tail>
</q-inner-loading>
</q-card>
</div>
<div v-else>
<div>
Nessuna Newsletter attualmente è stata Schedulata
</div>
</div>
</div>
</div>
</q-tab-panel>
<q-tab-panel name="check">
<div class="q-ma-md rounded-borders q-list--bordered">
<div class="text-center">
<CTitleBanner title="Ultima Newsletter Inviata:"></CTitleBanner>
</div>
<div v-if="newsstate.lastnewstosent"
class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
<q-card class="bg-grey-3 relative-position card-example">
<q-card-section>
<q-chip dense class="shadow-5 q-mb-md" color="orange" text-color="white"
icon="schedule">
Modello Email: <span class="mlvalue">{{ newsstate.lastnewstosent.templemail_str }}</span>
</q-chip>
<div class="text-center">
</div>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Data Schedulato: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.lastnewstosent.datetoSent) }}</span>
</q-chip>
<br>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Inizio Invio: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.lastnewstosent.datestartJob) }}</span>
</q-chip>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Fine Invio: <span class="mlvalue">{{ tools.getstrDateTimeAll(newsstate.lastnewstosent.datefinishJob) }}</span>
</q-chip>
<br>
<div v-if="newsstate.lastnewstosent.activate && newsstate.lastnewstosent.starting_job && !newsstate.lastnewstosent.finish_job">
<q-chip
dense class="shadow-5 q-mb-md" color="orange" text-color="white"
icon="email">
<span class="mlvalue">Invio Newsletter in Corso...</span>
</q-chip>
<br>
</div>
<div v-if="!newsstate.lastnewstosent.activate">
<q-chip
dense class="shadow-5 q-mb-md" color="red" text-color="white"
icon="email">
<span class="mlvalue">L'invio della Newsletter è stato fermato dall'Utente.</span>
</q-chip>
<br>
</div>
<div>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="schedule">
Ultima Email inviata: <span class="mlvalue">{{ tools.getstrTimeAll(newsstate.lastnewstosent.lastemailsent_Job) }}</span>
</q-chip>
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white"
icon="email">
Inviate: <span class="mlvalue">{{ newsstate.lastnewstosent.numemail_sent }} / {{ newsstate.lastnewstosent.numemail_tot }}</span>
</q-chip>
<q-circular-progress
show-value font-size="12px" :value="percsent(false)"
size="60px" :thickness="0.5" color="green"
track-color="grey-3"
class="q-ma-md"
>
<span class="mlvalue"> {{ percsent(false) }} % </span>
</q-circular-progress>
<div class="text-center">
<q-slider
v-model="newsstate.lastnewstosent.numemail_sent"
:min="0"
readonly
:max="newsstate.lastnewstosent.numemail_tot"
:step="1"
label
label-always
color="light-green"></q-slider>
</div>
</div>
<div v-if="newsstate.lastnewstosent.finish_job">
<br>
<q-chip dense class="shadow-5 q-mb-md" color="green"
text-color="white" icon="email">
<span class="mlvalue">Invio Newsletter Completato</span>
</q-chip>
</div>
<div v-if="!newsstate.lastnewstosent.finish_job">
<q-btn v-if="newsstate.lastnewstosent.activate" :loading="myloadingState"
rounded outline
@click="DisableNewsletter" color="negative" icon="">
Ferma l'Invio della Newsletter
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Disattivazione Invio Newsletter ...
</template>
</q-btn>
<q-btn v-if="!newsstate.lastnewstosent.activate" :loading="myloadingState"
rounded outline
@click="EnableNewsletter" color="positive" icon="">
Riattiva l'Invio della Newsletter
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Riattivazione Invio Newsletter ...
</template>
</q-btn>
</div>
</q-card-section>
<q-inner-loading id="spinner2" :showing="myloading">
<q-spinner-tail
color="primary"
size="4em">
</q-spinner-tail>
</q-inner-loading>
</q-card>
</div>
</div>
</q-tab-panel>
<q-tab-panel name="newslist">
<CTitleBanner bgcolor="bg-accent" title="Lista Newsletter Inviate:"></CTitleBanner>
<CGridTableRec prop_mytitle="Newsletter"
prop_mytable="newstosent"
:prop_mycolumns="getcolnewstosent"
:prop_colkey="db_fieldsTable.getKeyByTable('newstosent')"
nodataLabel="Nessuna Newsletter attualmente creata"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
>
</CGridTableRec>
</q-tab-panel>
<q-tab-panel name="mailinglist">
<div class="q-ma-md rounded-borders q-list--bordered">
<CTitleBanner title="Lista Contatti:" bgcolor="bg-positive"></CTitleBanner>
<div class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
<q-chip dense class="shadow-5 q-mb-md" color="blue" text-color="white" icon="email">
Email Totali: <span class="mlvalue">{{ newsstate.totemail }}</span>
</q-chip>
<q-chip dense class="shadow-5 q-mb-md" color="green" text-color="white"
icon="event_available">
Email Sottoscritte: <span class="mlvalue">{{ newsstate.totsubscribed }}</span>
</q-chip>
<q-circular-progress
show-value font-size="12px" :value="percsubscribed * 100"
size="60px" :thickness="0.22" color="green"
track-color="grey-3"
class="q-ma-md"
>
<span class="mlvalue"> {{ progresslabsubscribed }} </span>
</q-circular-progress>
<q-chip dense class="shadow-5 q-mb-md" color="orange" text-color="white"
icon="">
Email Desottoscritte: <span class="mlvalue">{{ newsstate.totunsubscribed }}</span>
</q-chip>
</div>
<CGridTableRec prop_mytitle="Lista Contatti"
:prop_mytable="tools.TABMAILINGLIST"
:prop_mycolumns="getcolmailinglist"
:prop_colkey="db_fieldsTable.getKeyByTable('mailinglist')"
nodataLabel="Nessuna Lista Contatti attualmente creata"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
>
</CGridTableRec>
<CTitleBanner title="Importa lista di Email:"></CTitleBanner>
<div class="q-ma-md q-pa-sm text-center rounded-borders q-list--bordered">
<q-input v-model="mailinglist_imported"
autofocus
filled
bordered
color="blue-12"
@keyup.enter.stop
type="textarea"
>
</q-input>
<div class="q-ma-md q-pa-sm text-center">
<q-btn :loading="myloadingImport" rounded outline :disable="mailinglist_imported === ''"
@click="importMailinglist" color="primary" icon="email">
Importa
<template v-slot:loading>
<q-spinner-hourglass class="on-left"/>
Importazione Email in corso ...
</template>
</q-btn>
</div>
<transition
enter-active-class="animated fadeIn"
leave-active-class="animated fadeOut"
appear
>
<CTitleBanner v-if="errimport" bgcolor="bg-warning" :title="myrisimport"></CTitleBanner>
<CTitleBanner v-if="okimport" :title="myrisimport"></CTitleBanner>
</transition>
</div>
</div>
</q-tab-panel>
</q-tab-panels>
</q-card>
</CMyPage>
</template>
<script lang="ts" src="newsletter.ts">
</script>
<style lang="scss" scoped>
@import './newsletter.scss';
</style>

View File

View File

@@ -0,0 +1,48 @@
import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator'
import { GlobalStore, UserStore } from '@store'
import { tools } from '../../../store/Modules/tools'
import { toolsext } from '../../../store/Modules/toolsext'
import { static_data } from '../../../db/static_data'
import { Screen } from 'quasar'
import { colmypage } from '@src/store/Modules/fieldsTable'
import { CImgText } from '../../../components/CImgText/index'
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
import MixinMetaTags from '../../../mixins/mixin-metatags'
import MixinBase from '@src/mixins/mixin-base'
@Component({
mixins: [MixinBase],
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
})
export default class Pages extends MixinMetaTags {
public pagination = {
sortBy: 'name',
descending: false,
page: 2,
rowsPerPage: 5
// rowsNumber: xx if getting data from a server
}
public selected = []
public dataPages = []
get getcolmypage() {
return colmypage
}
public meta() {
return tools.metafunc(this)
}
get getdataPages() {
return GlobalStore.state.mypage
}
get static_data() {
return static_data
}
}

View File

@@ -0,0 +1,27 @@
<template>
<CMyPage title="Pagine" imgbackground="../../statics/images/calendario_eventi.jpg" sizes="max-height: 120px">
<span>{{ setmeta({
title: 'Pagine',
description: "",
keywords: '' } ) }}
</span>
<div class="q-ma-sm q-gutter-sm q-pa-xs">
<CTitleBanner title="Pagine"></CTitleBanner>
<CGridTableRec prop_mytable="mypage"
prop_mytitle="Lista Pagine"
:prop_mycolumns="getcolmypage"
prop_colkey="title"
nodataLabel="Nessuna Pagina"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
</CGridTableRec>
</div>
</CMyPage>
</template>
<script lang="ts" src="./pages.ts">
</script>
<style lang="scss" scoped>
@import 'pages.scss';
</style>

View File

@@ -0,0 +1,21 @@
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import { CGridTableRec } from '@components'
import { CMyPage } from '../../../components/CMyPage/index'
import { fieldsTable, func } from '@src/store/Modules/fieldsTable'
@Component({
components: { CGridTableRec, CMyPage }
})
export default class TablesList extends Vue {
get db_fieldsTable() {
return fieldsTable
}
get gettablesList() {
return func.gettablesList()
}
}

View File

@@ -0,0 +1,16 @@
<template>
<CMyPage img="" :title="$t('otherpages.admin.userlist')" keywords="" description="">
<CGridTableRec :prop_mytitle="$t('otherpages.admin.tableslist')"
nodataLabel="Nessun Dato"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
:tablesList="gettablesList">
</CGridTableRec>
</CMyPage>
</template>
<script lang="ts" src="./tablesList.ts">
</script>
<style lang="scss" scoped>
@import './tablesList.scss';
</style>

View File

View File

@@ -0,0 +1,27 @@
import Vue from 'vue'
import { Component, Prop } from 'vue-property-decorator'
import { GlobalStore, UserStore } from '@store'
import { tools } from '../../../store/Modules/tools'
import { toolsext } from '../../../store/Modules/toolsext'
import { static_data } from '../../../db/static_data'
import { Screen } from 'quasar'
import { colmypage } from '../../../store/Modules/fieldsTable'
import { CImgText } from '../../../components/CImgText/index'
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
import MixinBase from '../../../mixins/mixin-base'
import { IMyPage } from '../../../model/GlobalStore'
import Api from '@api'
@Component({
mixins: [MixinBase],
components: { CImgText, CCard, CMyPage, CTitleBanner }
})
export default class Uploader extends Vue {
get static_data() {
return static_data
}
}

View File

@@ -0,0 +1,40 @@
<template>
<div class="q-pa-md">
<div class="q-gutter-sm row items-start">
<q-uploader
label="Galleria Home"
accept=".jpg, image/*"
:url="tools.geturlupload()+`/gallery_home`"
:headers="tools.getheaders()"
max-file-size=2000000
multiple
style="max-width: 300px"
></q-uploader>
<q-uploader
label="Immagini"
accept=".jpg, image/*"
:url="tools.geturlupload()+`/img`"
:headers="tools.getheaders()"
max-file-size=1000000
multiple
style="max-width: 300px"
></q-uploader>
<q-uploader
label="Invia PDF"
accept=".pdf"
:url="tools.geturlupload()+`/pdf`"
:headers="tools.getheaders()"
multiple
style="max-width: 300px"
></q-uploader>
</div>
</div>
</template>
<script lang="ts" src="./uploader.ts">
</script>
<style lang="scss" scoped>
@import 'uploader';
</style>

View File

@@ -0,0 +1 @@
export {default as usersList} from './usersList.vue'

View File

@@ -0,0 +1,17 @@
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import { CGridTableRec } from '@components'
import { CMyPage } from '../../../components/CMyPage/index'
import { fieldsTable } from '@src/store/Modules/fieldsTable'
@Component({
components: { CGridTableRec, CMyPage }
})
export default class UsersList extends Vue {
get db_fieldsTable() {
return fieldsTable
}
}

View File

@@ -0,0 +1,18 @@
<template>
<CMyPage img="" :title="$t('otherpages.admin.userlist')" keywords="" description="Lista Utenti">
<CGridTableRec prop_mytable="users"
prop_mytitle="Lista Utenti"
:prop_mycolumns="db_fieldsTable.colTableUsers"
prop_colkey="userId"
nodataLabel="Nessun Utente"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
</CGridTableRec>
</CMyPage>
</template>
<script lang="ts" src="./usersList.ts">
</script>
<style lang="scss" scoped>
@import './usersList.scss';
</style>