fix Registrazione data

fix linkref
fix controllo login
fix pagination CGridTableRec
added CstatusReg e Cstatus
This commit is contained in:
Paolo Arena
2020-01-21 01:38:28 +01:00
parent 7104f7d1e0
commit 415c431270
20 changed files with 233 additions and 19 deletions

View File

@@ -0,0 +1,15 @@
.zoom_data{
font-size:1rem;
}
.title {
font-weight: bold;
}
.id_conf{
font-weight: normal;
}
.note{
font-style: italic;
}

View File

@@ -0,0 +1,30 @@
import { Component, Prop, Watch } from 'vue-property-decorator'
import { INotData } from '../../model/index'
import { tools } from '../../store/Modules/tools'
import { NotevoleStore } from '@store'
import MixinBase from '@src/mixins/mixin-base'
import { validationMixin } from 'vuelidate'
import { validations } from '../CSignUpNotevole/CSignUp-validate'
import { CTitleBanner } from '@components'
import { CCardState } from '../CCardState'
import { UserStore } from '../../store/Modules'
import { GlobalStore } from '../../store'
@Component({
name: 'CStatusReg',
components: { CTitleBanner, CCardState }
})
export default class CNextZoom extends MixinBase {
public $t
get listacalzoom() {
return GlobalStore.state.calzoom
}
get nextconf() {
if (!!this.listacalzoom) {
return tools.getstrTime(this.listacalzoom[0].date_start)
}
}
}

View File

@@ -0,0 +1,52 @@
<template>
<div>
<div>
<CTitleBanner class="q-pa-xs" :title="$t('pages.nextzoom')" bgcolor="bg-primary" clcolor="text-white"
mystyle="" myclass="myshad" canopen="true">
<div class="flex flex-center">
<div class="column animazione">
<transition-group name="fade" mode="out-in"
appear
enter-active-class="animazione fadeIn"
leave-active-class="animazione fadeOut">
<div>
Mancano: {{ nextconf }}
</div>
<q-item v-for="(confer, index) in listacalzoom" :key="confer._id" class="q-mb-xs animated" v-ripple>
<q-item-section avatar>
<q-avatar v-if="tools.geticon(confer.lang)" :class="tools.geticon(confer.lang)" size="xs">
</q-avatar>
<q-avatar v-else color="primary" text-color="white" class="text-center">
{{ tools.capitalize(confer.lang) }}
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label class="title">{{ confer.title }} </q-item-label>
<q-item-label class="id_conf">ID: {{ confer.id_conf_zoom }} </q-item-label>
<q-item-label class="note">ID: {{ confer.note }} </q-item-label>
</q-item-section>
<q-item-section side>
<q-item-label class="zoom_data">{{ tools.getstrDateMonthTimeShort(confer.date_start) }}</q-item-label>
<!--<q-item-label class="zoom_data">{{ tools.getstrTime(confer.date_end) }}</q-item-label>-->
</q-item-section>
</q-item>
</transition-group>
</div>
</div>
</CTitleBanner>
</div>
</div>
</template>
<script lang="ts" src="./CNextZoom.ts">
</script>
<style lang="scss" scoped>
@import './CNextZoom.scss';
</style>

View File

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

View File

@@ -124,20 +124,6 @@ export default class CStatusReg extends MixinBase {
return 0
}
public geticon(reg) {
if (reg.profile.nationality === 'IT')
return 'fa-flag-it'
else if (reg.profile.nationality === 'ES')
return 'fa-flag-es'
else if (reg.profile.nationality === 'US')
return 'fa-flag-us'
else if ((reg.profile.nationality === 'GB') || (reg.profile.nationality === 'UK'))
return 'fa-flag-gb'
else if (reg.profile.nationality === 'DE')
return 'fa-flag-de'
return ''
}
get visustat() {
return this.datastat.num_reg > 0 || this.datastat.num_reg_lista > 0

View File

@@ -19,7 +19,7 @@
<q-item v-for="(user, index) in lastsreg" :key="user.username" class="q-mb-xs animated" v-ripple>
<q-item-section avatar>
<q-avatar v-if="geticon(user)" :class="geticon(user)">
<q-avatar v-if="tools.geticon(user.profile.nationality)" :class="tools.geticon(user.profile.nationality)">
</q-avatar>
<q-avatar v-else color="primary" text-color="white" class="text-center">

View File

@@ -43,3 +43,4 @@ export * from './CStatus'
export * from './CStatusReg'
export * from './CCardState'
export * from './CMyInnerPage'
export * from './CNextZoom'

View File

@@ -85,6 +85,16 @@ export interface INewsToSent {
error_job?: string
}
export interface ICalZoom {
lang?: string
title?: string
typeconf?: string
date_start?: string
date_end?: Date
id_conf_zoom?: number
note?: string
}
export interface IMailinglist {
name?: string
surname?: string
@@ -158,6 +168,7 @@ export interface IGlobalState {
templemail: ITemplEmail[],
opzemail: ISettings[],
mailinglist: IMailinglist[],
calzoom: ICalZoom[],
autoplaydisc: number
}

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 ExtraList extends Vue {
get db_fieldsTable() {
return fieldsTable
}
}

View File

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

View File

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

View File

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

View File

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 ZoomList extends Vue {
get db_fieldsTable() {
return fieldsTable
}
}

View File

@@ -0,0 +1,20 @@
<template>
<CMyPage img="" :title="$t('otherpages.admin.zoomlist')" keywords="" :description="$t('otherpages.admin.zoomlist')">
<CGridTableRec prop_mytable="calzoom"
:prop_mytitle="$t('otherpages.admin.zoomlist')"
:prop_mycolumns="db_fieldsTable.colTableCalZoom"
prop_colkey="_id"
nodataLabel="Nessuno Zoom"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
</CGridTableRec>
</CMyPage>
</template>
<script lang="ts" src="./zoomList.ts">
</script>
<style lang="scss" scoped>
@import './zoomList.scss';
</style>

View File

@@ -18,6 +18,7 @@ const msgglobal = {
eventlist: 'Le tue Prenotazioni',
usereventlist: 'Prenotazioni Utenti',
userlist: 'Lista Utenti',
zoomlist: 'Calendario Zoom',
extralist: 'Lista Extra',
tableslist: 'Lista Tabelle',
newsletter: 'Newsletter',
@@ -41,7 +42,7 @@ const msgglobal = {
paymenttype: 'Modalità di Pagamento',
paymenttype_long: 'Scegliere almeno 2 Modalità di Pagamento, per permettere alle persone di poter scegliere come inviare il dono.',
zoom: 'Partecipo agli Zoom (Video Conferenza)',
zoom_long: 'Si richiede di oartecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.',
zoom_long: 'Si richiede di partecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.',
sharemovement: 'Condivido il Movimento',
sharemovement_long: 'Condivido il Movimento con almeno 2 amici e li guido alla registrazione e agli zoom',
enter_prog: 'Entro in Programmazione',

View File

@@ -79,7 +79,8 @@ const state: IGlobalState = {
newstosent: [],
gallery: [],
mailinglist: [],
mypage: []
mypage: [],
calzoom: [],
}
async function getConfig(id) {
@@ -194,6 +195,8 @@ namespace Getters {
return GlobalStore.state.mailinglist
else if (table === tools.TABMYPAGE)
return GlobalStore.state.mypage
else if (table === tools.TABCALZOOM)
return GlobalStore.state.calzoom
else if (table === 'paymenttypes')
return GlobalStore.state.paymenttypes
else if (table === 'bookings')
@@ -807,6 +810,7 @@ namespace Actions {
GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
GlobalStore.state.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : []
GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : []
GlobalStore.state.calzoom = (res.data.calzoom) ? [...res.data.calzoom] : []
if (showall) {
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []

View File

@@ -391,7 +391,20 @@ export const fieldsTable = {
return ''
},
// IColGridTable
colTableCalZoom: [
// AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'title', label_trans: 'event.title' }),
AddCol({ name: 'lang', label_trans: 'pages.lang' }),
AddCol({ name: 'typeconf', label_trans: 'zoom.typeconf' }),
AddCol({ name: 'date_start', label_trans: 'event.dateTimeStart', fieldtype: tools.FieldType.date }),
AddCol({ name: 'date_end', label_trans: 'event.dateTimeEnd' , fieldtype: tools.FieldType.date }),
AddCol({ name: 'id_conf_zoom', label_trans: 'zoom.id_conf_zooom' }),
AddCol({ name: 'note', label_trans: 'zoom.note' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
],
// IColGridTable
colTableUsers: [
// AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'username', label_trans: 'reg.username_short' }),

View File

@@ -75,6 +75,7 @@ export const tools = {
TABGALLERY: 'gallery',
TABMAILINGLIST: 'mailinglist',
TABMYPAGE: 'mypage',
TABCALZOOM: 'calzoom',
TABTEMPLEMAIL: 'templemail',
TABOPZEMAIL: 'opzemail',
@@ -1896,10 +1897,19 @@ export const tools = {
return ''
},
getstrDateTimeShort(mytimestamp) {
// console.log('getstrDate', mytimestamp)
if (!!mytimestamp)
return date.formatDate(mytimestamp, 'DD/MM HH:mm')
return date.formatDate(mytimestamp, 'DD/MM HH:mm');
else
return ''
},
getstrDateMonthTimeShort(mytimestamp) {
// console.log('getstrDate', mytimestamp)
if (!!mytimestamp)
return date.formatDate(mytimestamp, 'DD MMM HH:mm')
else
return ''
},
@@ -3046,6 +3056,22 @@ export const tools = {
return copy
},
geticon(langin) {
let lang = langin.toUpperCase()
if (lang === 'IT')
return 'fa-flag-it'
else if (lang === 'ES')
return 'fa-flag-es'
else if (lang === 'US')
return 'fa-flag-us'
else if ((lang === 'GB') || (lang === 'UK'))
return 'fa-flag-gb'
else if (lang === 'DE')
return 'fa-flag-de'
return ''
},
// getLocale() {
// if (navigator.languages && navigator.languages.length > 0) {