- Dynamic Pages (MyPage)

- Uploading files to the Server FTP.
This commit is contained in:
Paolo Arena
2019-12-27 12:43:42 +01:00
parent ad8f335d6c
commit ad94721b7d
35 changed files with 355 additions and 232 deletions

View File

@@ -136,7 +136,7 @@ module.exports = function (ctx) {
.test(/\.(gql|graphql)$/)
.loader('graphql-tag/loader') */
// extendPrerender(config);
extendPrerender(config);
}
},
dev: {

View File

@@ -23,6 +23,7 @@ export default class CDateTime extends Vue {
@Prop({ required: false, default: false }) public disable!: boolean
@Prop({ required: false, default: '' }) public bgcolor!: string
@Prop({ required: false, default: false }) public dense: boolean
@Prop({ required: false, default: '5' }) public minuteinterval: boolean
public mystyleicon: string = 'font-size: 1.5rem;'
public showDateTimeScroller: boolean = false
@@ -61,6 +62,7 @@ export default class CDateTime extends Vue {
public changevalueDate() {
if (this.valueDate)
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
// console.log('changevalueDate myvalue', this.myvalue)
}
@Watch('value')
@@ -70,9 +72,10 @@ export default class CDateTime extends Vue {
}
public savetoclose() {
// console.log('Close')
this.saveit = true
this.showDateTimeScroller = false
// this.$emit('savetoclose', this.myvalue, this.valueprec)
this.$emit('savetoclose', this.myvalue, this.valueprec)
}
get scrollerPopupStyle280() {
@@ -100,7 +103,7 @@ export default class CDateTime extends Vue {
else
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
console.log('created myvalue', this.myvalue)
// console.log('created myvalue', this.myvalue)
}
public changeval(newval) {

View File

@@ -48,7 +48,7 @@
bar-color="#2196f3"
text-color="white"
color="primary"
minute-interval="5"
:minute-interval="minuteinterval"
inner-text-color="primary"
inner-color="white"
:style="scrollerPopupStyle280"

View File

@@ -273,7 +273,7 @@ export default class CEventsCalendar extends MixinEvents {
}
get dayHeight() {
if (Screen.height < 400)
if (Screen.height < 410)
return 80
else if (Screen.height < 500)
return 100

View File

@@ -45,9 +45,9 @@ export default class CFacebookFrame extends Vue {
get mywidth() {
let myw = 340
if (tools.getwidth(this) < 400)
if (tools.getwidth(this) < 410)
return myw
if ((tools.getwidth(this) > 400) && (tools.getwidth(this) < 1100))
if ((tools.getwidth(this) > 410) && (tools.getwidth(this) < 1100))
return Math.round((tools.getwidth(this) / 3) - 30)
else
return myw

View File

@@ -1,5 +1,5 @@
<template>
<div class="q-pa-sm">
<div class="q-pa-xs">
<q-table
:data="serverData"
@@ -100,6 +100,7 @@
:row.sync="props.row"
:field="col.field"
:subfield="col.subfield"
minuteinterval="1"
@save="SaveValue"
@show="selItem(props.row, col)"
@showandsave="showandsel">
@@ -142,6 +143,7 @@
<div class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
@click="colclicksel = mycol">
<CMyPopupEdit :canEdit="true"
view="field"
:col="mycol"
:showall="true"
:row="rowclicksel"

View File

@@ -49,7 +49,6 @@
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="savefield"></q-toggle>
</div>
<div v-else>
{{ myvalprinted }}
</div>

View File

@@ -10,10 +10,11 @@ import { CDateTime } from '../CDateTime'
import { CMyToggleList } from '../CMyToggleList'
import { CMySelect } from '../CMySelect'
import { CMyEditor } from '../CMyEditor'
import { CGallery } from '../CGallery'
@Component({
name: 'CMyPopupEdit',
components: {CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor}
components: {CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery }
})
export default class CMyPopupEdit extends Vue {
@@ -23,6 +24,8 @@ export default class CMyPopupEdit extends Vue {
@Prop({ required: false, default: '' }) public field
@Prop({ required: false, default: '' }) public subfield
@Prop({ required: false, default: false }) public showall
@Prop({ required: false, default: 'row' }) public view
@Prop({ required: false, default: '5' }) public minuteinterval
public myvalue = ''
@@ -30,6 +33,10 @@ export default class CMyPopupEdit extends Vue {
return tools
}
get isviewfield() {
return this.view === 'field'
}
get db_fieldsTable() {
return fieldsTable
}
@@ -60,7 +67,7 @@ export default class CMyPopupEdit extends Vue {
public SaveValueInt(newVal, valinitial) {
// console.log('SaveValueInt', newVal)
console.log('SaveValueInt', newVal)
// Update value in table memory
if (this.subfield !== '') {
@@ -146,7 +153,7 @@ export default class CMyPopupEdit extends Vue {
public getclassCol(col) {
if (col) {
let mycl = (col.disable) ? '' : 'colmodif'
let mycl = (col.disable || this.isviewfield) ? '' : 'colmodif'
mycl += (col.fieldtype === tools.FieldType.date) ? ' coldate flex flex-container' : ''
return mycl

View File

@@ -1,148 +1,147 @@
<template>
<div :class="getclassCol(col)">
<div v-if="col.fieldtype === tools.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
:valueDate="myvalue"
:readonly="false"
:dense="true"
:canEdit="canEdit"
@savetoclose="SaveValueInt"
@show="OpenEdit">
</CDateTime>
<div v-if="col.fieldtype === tools.FieldType.listimages">
<CGallery :gall="row" :listimages="myvalue" :edit="isviewfield"
@showandsave="Savedb">
</CGallery>
</div>
<div v-else>
<div v-if="col.fieldtype === tools.FieldType.binary">
<CMyChipList
:type="tools.FieldType.binary"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<CMyChipList
:type="tools.FieldType.multiselect"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.boolean">
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="Savedb"></q-toggle>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.html">
<div v-html="visuValByType(myvalue, col, row)">
</div>
</div>
<div v-else>
{{ visuValByType(myvalue, col, row) }}
</div>
<!--<q-select v-model="myvalue"-->
<!--rounded-->
<!--outlined-->
<!--dense-->
<!--:options="db_fieldsTable.getTableJoinByName(col.jointable)"-->
<!--:display-value="db_fieldsTable.getLabelByTable(col.jointable)"-->
<!--emit-value-->
<!--@input="SaveValueInt"-->
<!--&gt;-->
<!--</q-select>-->
<!-- Edit Value -->
<q-popup-edit
v-if="canEdit"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
buttons
@save="SaveValueInt"
@show="OpenEdit">
<span v-if="col.fieldtype === tools.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
:valueDate="myvalue"
:readonly="false"
:minuteinterval="minuteinterval"
:dense="true"
:canEdit="canEdit"
@savetoclose="SaveValueInt"
@show="OpenEdit">
</CDateTime>
</span>
<div v-if="col.fieldtype !== tools.FieldType.date">
<div>
<div v-if="col.fieldtype === tools.FieldType.binary">
<CMyChipList
:type="tools.FieldType.binary"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<!-- Show Value -->
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<CMyChipList
:type="tools.FieldType.multiselect"
:value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.boolean">
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="Savedb"></q-toggle>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.html">
<div v-html="visuValByType(myvalue, col, row)">
<div v-if="col.fieldtype === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue, col, row) }}
</div>
</div>
<div v-else>
{{ visuValByType(myvalue, col, row) }}
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
<q-popup-edit
v-if="canEdit"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
buttons
persistent
@save="SaveValueInt"
@show="OpenEdit">
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
<div v-if="col.fieldtype === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue, col, row) }}
</div>
<div v-else-if="col.fieldtype === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.binary">
<CMyToggleList :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.binary">
<CMyToggleList :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
</CMyToggleList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.html">
<CMyEditor :value.sync="myvalue" :title="col.title" @keyup.enter.stop>
</CMyEditor>
<!--<q-input v-model="myvalue"-->
<!--autofocus-->
<!--@keyup.enter.stop-->
<!--type="textarea"></q-input>-->
</div>
<div v-else-if="col.fieldtype === tools.FieldType.select">
<CMySelect :label="col.title"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
</CMyToggleList>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.html">
<CMyEditor :value.sync="myvalue" :title="col.title" @keyup.enter.stop>
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:useinput="false">
</CMySelect>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<q-select
v-model="myvalue"
rounded
outlined
multiple
dense
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
@input="changeCol">
</CMyEditor>
<!--<q-input v-model="myvalue"-->
<!--autofocus-->
<!--@keyup.enter.stop-->
<!--type="textarea"></q-input>-->
</div>
<div v-else-if="col.fieldtype === tools.FieldType.select">
<CMySelect :label="col.title"
:value.sync="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:useinput="false">
</CMySelect>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<q-select
v-model="myvalue"
rounded
outlined
multiple
dense
options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
emit-value
map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px"
@input="changeCol">
</q-select>
</div>
</q-select>
</div>
</q-popup-edit>
</q-popup-edit>
</div>
</div>
</div>
</template>
<script lang="ts" src="./CMyPopupEdit.ts">

View File

@@ -14,9 +14,9 @@
</div>
<div v-else>
<div class="q-my-md">
<p class="text-subtitle2 text-center">
<p v-if="urlmap" class="text-subtitle2 text-center">
<span v-html="title"></span>
- <a href="urlmap" target="_blank" class="text-black">Apri Mappa</a>
- <a :href="urlmap" target="_blank" class="text-black">Apri Mappa</a>
</p>
<a :href="urlmap" target="_blank">
<q-img :src="`statics/` + imgmap" class="imgautosize" alt="my map">

View File

@@ -17,6 +17,7 @@ import router from '@router'
import globalroutines from '../../globalroutines/index'
import { ICategory } from '../../model'
import { static_data } from '../../db/static_data'
// import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
@@ -39,6 +40,10 @@ export default class CSignIn extends Vue {
password: process.env.TEST_PASSWORD || ''
}
get static_data() {
return static_data
}
public created() {
this.$v.$reset()

View File

@@ -55,7 +55,7 @@
:disable="$v.$error || iswaitingforRes">{{$t('login.enter')}}
</q-btn>
</div>
<div align="center" style="margin-top:10px;">
<div v-if="static_data.functionality.ENABLE_REGISTRATION" align="center" style="margin-top:10px;">
<q-btn flat rounded size="md" color="primary" to="/signup">{{$t('reg.submit')}}
</q-btn>
</div>

View File

@@ -0,0 +1,3 @@
.myshad {
text-shadow: .125rem .125rem .125rem darkgray;
}

View File

@@ -26,6 +26,23 @@ import { Screen } from 'quasar'
export default class CTitleBanner extends Vue {
@Prop({ required: true}) public title: string
@Prop({ required: false, default: 'bg-primary' }) public bgcolor: string
@Prop({ required: false, default: 'primary' }) public color: string
@Prop({ required: false, default: 'text-white' }) public clcolor: string
@Prop({ required: false, default: '' }) public mystyle: string
@Prop({ required: false, default: '' }) public myclass: string
@Prop({ required: false, default: '' }) public myclasstext: string
@Prop({ required: false, default: '' }) public icon: string
@Prop({ required: false, default: true }) public visible: boolean
public myvisible: boolean = true
public mounted() {
this.myvisible = this.visible
}
get iconopen() {
if (!this.myvisible)
return 'fas fa-chevron-down q-icon q-expansion-item__toggle-icon q-focusable '
else
return 'fas fa-chevron-down q-icon q-expansion-item__toggle-icon q-focusable rotate-180'
}
}

View File

@@ -1,11 +1,27 @@
<template>
<div>
<q-banner
class="q-my-md"
rounded dense :class="bgcolor+` text-white`"
:color="color+` q-title`" style="text-align: center;">
<span class="mybanner">{{title}}</span>
inline-actions
rounded dense
:class="bgcolor+` q-my-md `+clcolor+ ` ` + myclass"
style="text-align: center; "
@click="myvisible = !myvisible"
>
<template v-slot:avatar>
<q-icon :name="icon" color="white" />
</template>
<template v-slot:action>
<q-icon :name="iconopen" color="white" />
</template>
<span :class="`mybanner `+ myclasstext" :style="mystyle">{{title}}</span>
</q-banner>
<q-slide-transition>
<div v-show="myvisible">
<slot></slot>
</div>
</q-slide-transition>
</div>
</template>

View File

@@ -137,13 +137,6 @@ $textcol_scuro: darkblue;
font-size: 0.6rem;
}
.carousel_img_3 {
//background-image: url(../../statics/images/cibo_sano.jpg);
background-size: 620px 620px !important;
background-position: 50% top !important;
background-repeat: no-repeat !important;
}
}
.custom-caption {

View File

@@ -44,7 +44,7 @@
</div>
</div>
<div class="text-center">
<div v-if="getValDb('URLMAP', false)" class="text-center">
<span v-html="getValDb('MAP_TITLE', false)"></span>
<br>
<a :href="getValDb('URLMAP', false)" target="_blank" class="footer_link">Apri Mappa</a>
@@ -61,7 +61,6 @@
<div class="q-mt-xs mycontacts">
<p class="mycontacts_title">{{$t('homepage.titlecontatti')}}</p>
<div class="mycontacts_text">
<i v-if="getValDb('MAIN_EMAIL', false)" aria-hidden="true"
class="q-icon fas fa-envelope q-mx-sm"></i>

View File

@@ -7,7 +7,14 @@
font-weight: 350;
}
.q-toolbar__title{
padding: 0 12px;
}
@media screen and (max-width: 600px) {
.q-toolbar__title{
padding: 0;
}
.layout-padding {
padding: 1.5em .5em;
}

View File

@@ -308,7 +308,7 @@ export default class Header extends Vue {
}
get getappname() {
return tools.getappname(this)
return tools.getappname(this, tools.isMobile())
}
public toggleanimation() {

View File

@@ -34,3 +34,4 @@ export * from './Shen/CTesseraElettronica'
export * from './CGoogleMap'
export * from './COpenStreetMap'
export * from './CTitleBanner'
export * from './CGallery'

View File

@@ -1,7 +1,6 @@
import Vue from 'vue'
import { Watch } from 'vue-property-decorator'
import { GlobalStore } from '../../store/Modules'
import Component from 'vue-class-component'
import { static_data } from '../../db/static_data'
import { tools } from '../../store/Modules/tools'
import { IListRoutes } from '@src/model'

View File

@@ -7,10 +7,11 @@ import { toolsext } from '@src/store/Modules/toolsext'
import { GlobalStore } from '../store/Modules'
import { fieldsTable } from '@src/store/Modules/fieldsTable'
import { CalendarStore } from '@store'
import MixinMetaTags from '@src/mixins/mixin-metatags'
// You can declare a mixin as the same style as components.
@Component
export default class MixinBase extends Vue {
export default class MixinBase extends MixinMetaTags {
public mythis() {
return this
}
@@ -103,8 +104,8 @@ export default class MixinBase extends Vue {
try {
if (myval) {
const myrec = JSON.parse(myval)
// console.log('*************** getarrValDb')
// console.table(myrec)
console.log('*************** getarrValDb')
console.table(myrec)
return myrec
} else {
return []

View File

@@ -149,6 +149,7 @@ export interface IGlobalState {
settings: ISettings[],
disciplines: IDiscipline[],
newstosent: INewsToSent[],
gallery: IGallery[],
mypage: IMyPage[],
templemail: ITemplEmail[],
opzemail: ISettings[],
@@ -258,14 +259,20 @@ export interface ITimeLineMain {
body: ITimeLineEntry[]
}
export interface IImgGallery {
_id?:string
imagefile: string
order?: number
alt?: string
description?: string
}
export interface IGallery {
_id?: string
author_username: string
title: string
subtitle?: IAllLang
img: string
width?: number
height?: number
ingallery?: boolean
inexibitions?: boolean
directory: string
list: IImgGallery[]
}
export interface IColl {
@@ -293,6 +300,7 @@ export interface IParamDialog {
export interface IFunctionality {
PWA?: boolean
ENABLE_REGISTRATION?: boolean
SHOW_USER_MENU?: boolean
SHOW_IF_IS_SERVER_CONNECTION?: boolean
ENABLE_TODOS_LOADING?: boolean

View File

@@ -107,7 +107,7 @@
</div>
</CMyPage>
</template>
<script lang="ts" src="eventlist.ts">
<script lang="ts" src="./eventlist.ts">
</script>
<style lang="scss" scoped>
@import './eventlist.scss';

View File

@@ -2,16 +2,15 @@ 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 { static_data } from '../../../db/static_data'
import { Screen } from 'quasar'
import { colgallery } from 'store/Modules/fieldsTable'
import { colgallery } from '@src/store/Modules/fieldsTable'
import { CImgText } from '../../../../../associazioneShen/src/components/CImgText/index'
import { CImgText } from '../../../components/CImgText/index'
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
import MixinMetaTags from '../../../../../associazioneShen/src/mixins/mixin-metatags'
import MixinBase from 'mixins/mixin-base'
import MixinBase from '../../../mixins/mixin-base'
@Component({
mixins: [MixinBase],

View File

@@ -14,7 +14,7 @@
</div>
</CMyPage>
</template>
<script lang="ts" src="gallery.ts">
<script lang="ts" src="./gallery.ts">
</script>
<style lang="scss" scoped>

View File

@@ -1,16 +1,16 @@
import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator'
import { tools } from 'store/Modules/tools'
import { tools } from '@src/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 { colnewstosent, coltemplemail, colopzemail, colmailinglist } from '@src/store/Modules/fieldsTable'
import { DefaultNewsState, INewsState } from '@src/model/index'
import translate from '../../../globalroutines/util'
import { getCookie } from 'utils/auth'
import { CTitle } from '../../../components/CTitle'
import { CMyPage } from '../../../components/CMyPage'
import MixinBase from '../../../mixins/mixin-base'
const namespace = 'CalendarModule'

View File

@@ -536,7 +536,7 @@
</CMyPage>
</template>
<script lang="ts" src="newsletter.ts">
<script lang="ts" src="./newsletter.ts">
</script>
<style lang="scss" scoped>
@import './newsletter.scss';

View File

@@ -21,6 +21,7 @@ const msgglobal = {
newsletter: 'Newsletter',
pages: 'Pagine',
media: 'Media',
gallery: 'Gallerie',
},
manage: {
menu: 'Gestione',
@@ -359,8 +360,10 @@ const msgglobal = {
lastemailsent_Job: 'Ultima Inviata',
starting_job: 'Invio Iniziato',
finish_job: 'Invio Terminato',
processing_job: 'Lavoro in corso',
error_job: 'Info Errori',
statesub: 'Sottoscritto',
wrongerr: 'Email non valida',
},
privacy_policy:'Privacy Policy',
cookies: 'Usiamo i Cookie per una migliore prestazione web.'
@@ -712,8 +715,10 @@ const msgglobal = {
lastemailsent_Job: 'Ùltimo enviado',
starting_job: 'Comenzó a enviar',
finish_job: 'Envio terminado',
processing_job: 'En curso',
error_job: 'Info Error',
statesub: 'Subscribir',
wrongerr: 'Email invalide',
},
privacy_policy:'Política de privacidad',
cookies: 'Utilizamos cookies para un mejor rendimiento web.'
@@ -1064,8 +1069,10 @@ const msgglobal = {
lastemailsent_Job: 'Dernier envoyé',
starting_job: 'Envoyé',
finish_job: 'Envoy Terminé',
processing_job: 'travaux en cours',
error_job: 'info d\'erreur',
statesub: 'Abonné',
wrongerr: 'Email inválido',
},
privacy_policy:'Politique de confidentialité',
cookies: 'Nous utilisons des cookies pour améliorer les performances Web.'
@@ -1414,9 +1421,11 @@ const msgglobal = {
datefinishJob: 'End Job',
lastemailsent_Job: 'Last Sent',
starting_job: 'Job started',
finish_job: 'Sent terminated',
finish_job: 'Work in progress',
processing_job: 'Lavoro in corso',
error_job: 'Info Error',
statesub: 'Subscribed',
wrongerr: 'Invalid Email',
},
privacy_policy:'Privacy Policy',
cookies: 'We use cookies for better web performance.'
@@ -1768,8 +1777,10 @@ const msgglobal = {
lastemailsent_Job: 'Last Sent',
starting_job: 'Job started',
finish_job: 'Sent terminated',
processing_job: 'Work in progress',
error_job: 'Info Error',
statesub: 'Subscribed',
wrongerr: 'Invalid Email',
},
privacy_policy:'Privacy Policy',
cookies: 'Wir verwenden Cookies für eine bessere Webleistung.'

View File

@@ -1,14 +1,10 @@
function geturl() {
const miaurl = document.location.href
if (miaurl.includes('test.')) {
return 'https://test.associazioneshen.it/'
if (miaurl.includes('localhost')) {
return 'http://localhost:8084/'
} else {
if (miaurl.includes('localhost')) {
return 'http://localhost:8080/'
} else {
return 'https://associazioneshen.it/'
}
return 'https://mandalasolidale.freeplanet.app/'
}
}

View File

@@ -76,6 +76,7 @@ const state: IGlobalState = {
disciplines: [],
autoplaydisc: 8000,
newstosent: [],
gallery: [],
mailinglist: [],
mypage: []
}
@@ -182,6 +183,8 @@ namespace Getters {
return GlobalStore.state.disciplines
else if (table === tools.TABNEWSLETTER)
return GlobalStore.state.newstosent
else if (table === tools.TABGALLERY)
return GlobalStore.state.gallery
else if (table === tools.TABTEMPLEMAIL)
return GlobalStore.state.templemail
else if (table === tools.TABOPZEMAIL)
@@ -771,6 +774,7 @@ namespace Actions {
CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : []
GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : []
GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : []
if (showall) {
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []

View File

@@ -709,7 +709,7 @@ namespace Actions {
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
await Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
console.log('add routes')
// console.log('add routes')
GlobalStore.actions.addDynamicPages()

View File

@@ -58,10 +58,23 @@ export const colmailinglist = [
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }),
AddCol({ name: 'statesub', label_trans: 'newsletter.statesub', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'wrongerr', label_trans: 'newsletter.wrongerr', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'lastid_newstosent', label_trans: 'reg.lastid_newstosent', fieldtype: tools.FieldType.string }),
AddCol(DeleteRec)
]
export const colgallery = [
AddCol({ name: 'author_username', label_trans: 'gallery.author_username' }),
AddCol({ name: 'title', label_trans: 'gallery.title' }),
AddCol({ name: 'directory', label_trans: 'gallery.directory' }),
AddCol({
name: 'list',
label_trans: 'gallery.list',
fieldtype: tools.FieldType.listimages,
jointable: ''
}),
]
export const colmypage = [
AddCol({ name: 'title', label_trans: 'pages.title' }),
AddCol({ name: 'path', label_trans: 'pages.path' }),
@@ -117,6 +130,7 @@ export const colnewstosent = [
AddCol({ name: 'lastemailsent_Job', label_trans: 'newsletter.lastemailsent_Job', fieldtype: tools.FieldType.date }),
AddCol({ name: 'starting_job', label_trans: 'newsletter.starting_job', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'finish_job', label_trans: 'newsletter.finish_job', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'processing_job', label_trans: 'newsletter.processing_job', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'error_job', label_trans: 'newsletter.error_job', fieldtype: tools.FieldType.string }),
AddCol(DeleteRec),
AddCol(DuplicateRec)
@@ -418,6 +432,13 @@ export const fieldsTable = {
collabel: 'label',
onlyAdmin: true
},
{
value: 'gallery',
label: 'Gallerie',
columns: colgallery,
colkey: '_id',
collabel: 'title',
},
{
value: 'templemail',
label: 'Template Email',

View File

@@ -24,7 +24,7 @@ import translate from '@src/globalroutines/util'
import { RouteNames } from '@src/router/route-names'
import { lists } from './lists'
import { static_data } from '@src/db/static_data'
import { preloadedimages, static_data } from '@src/db/static_data'
import { IColl, ITimeLineEntry, ITimeLineMain } from '@src/model/GlobalStore'
import { func_tools } from '@src/store/Modules/toolsext'
import { serv_constants } from '@src/store/Modules/serv_constants'
@@ -66,6 +66,7 @@ export const tools = {
TABEVENTS: 'myevents',
TABNEWSLETTER: 'newstosent',
TABGALLERY: 'gallery',
TABMAILINGLIST: 'mailinglist',
TABMYPAGE: 'mypage',
TABTEMPLEMAIL: 'templemail',
@@ -139,6 +140,7 @@ export const tools = {
typeinrec: 128,
multiselect: 256,
password: 512,
listimages: 1024,
},
FieldTypeArr: [
@@ -2120,29 +2122,25 @@ export const tools = {
}
,
heightgallery() {
return tools.heightGallVal().toString() + 'px'
heightgallery(coeff) {
return tools.heightGallVal(coeff).toString() + 'px'
}
,
heightGallVal() {
heightGallVal(coeff = 1.33) {
let maxh2 = 0
if (Screen.width < 400) {
maxh2 = 350
} else if (Screen.width < 600) {
maxh2 = 400
} else if (Screen.width < 700) {
maxh2 = 450
} else if (Screen.width < 800) {
maxh2 = 550
} else if (Screen.width < 1000) {
maxh2 = 650
} else if (Screen.width < 1200) {
maxh2 = 700
} else {
let myw = Screen.width
if (!this.isMobile())
if (GlobalStore.state.leftDrawerOpen)
myw -= 300
if (!this.isMobile())
if (GlobalStore.state.RightDrawerOpen)
myw -= 300
maxh2 = (myw / coeff) + 20
if (maxh2 > 750)
maxh2 = 750
}
return maxh2
}
@@ -2186,7 +2184,7 @@ export const tools = {
,
myheight_dialog() {
if (Screen.width < 400) {
if (Screen.width < 410) {
return '337'
} else if (Screen.width < 600) {
return '400'
@@ -2199,7 +2197,7 @@ export const tools = {
if (!!sized) {
return sized
} else {
if (Screen.width < 400) {
if (Screen.width < 410) {
return 'max-height: 250px'
} else {
return 'max-height: 350px'
@@ -2236,7 +2234,7 @@ export const tools = {
,
maxwidth_imgtitle() {
if (Screen.width < 400) {
if (Screen.width < 410) {
return 'max-width: 250px'
} else {
return 'max-width: 350px'
@@ -2245,12 +2243,12 @@ export const tools = {
,
isMobile() {
return (Screen.width < 400)
return (Screen.width < 450)
}
,
mywidth_imgtitle() {
if (Screen.width < 400) {
if (Screen.width < 450) {
return '250'
} else if (Screen.width < 600) {
return '350'
@@ -2266,7 +2264,7 @@ export const tools = {
,
showthumbnails() {
if (Screen.width < 400) {
if (Screen.width < 410) {
return false
} else if (Screen.width < 600) {
return true
@@ -2404,7 +2402,7 @@ export const tools = {
const myimage = dir + file
// console.log('includes = ', static_data.preLoadImages.map((a) => a.imgname).includes(myimage), myimage)
let ris = ''
if (this.isMobile() && (static_data.preLoadImages.map((a) => a.imgname).includes(myimage))) {
if (this.isMobile() && (preloadedimages().map((a) => a.imgname).includes(myimage))) {
ris = dir + 'mobile/' + file
} else {
ris = myimage
@@ -2451,14 +2449,21 @@ export const tools = {
return '"' + myevent.title + '" (' + tools.getstrDateEmailTime(mythis, myevent.dateTimeStart) + ')'
},
getlangforQuasar(mylang) {
if (mylang === 'enUs')
return 'en-us'
else
return mylang
},
setLangAtt(mylang) {
console.log('setLangAtt =', mylang)
// console.log('PRIMA this.$q.lang.isoName', this.$q.lang.isoName)
// dynamic import, so loading on demand only
import(`quasar/lang/${mylang}`).then((lang) => {
import(`quasar/lang/${this.getlangforQuasar(mylang)}`).then((lang) => {
console.log(' Import dinamically lang =', lang)
Quasar.lang.set(lang.default)
Quasar.lang.set(this.getlangforQuasar(lang.default))
import(`../../statics/i18n`).then(() => {
console.log(' *** MY LANG DOPO=', Quasar.lang.isoName)
})
@@ -2468,12 +2473,12 @@ export const tools = {
}
,
getappname(mythis) {
getappname(mythis, short) {
if (mythis === undefined)
return ''
if (mythis.$t === undefined)
return ''
if (Screen.width < 400) {
if (short) {
return mythis.$t('msg.myAppNameShort')
} else {
return mythis.$t('msg.myAppName')
@@ -2652,31 +2657,36 @@ export const tools = {
// return height()
return mythis.$q.screen.height
},
getwidth(mythis) {
getwidth(mythis, withright = false, withleft = true) {
// return height()
let myw = mythis.$q.screen.width
if (GlobalStore.state.leftDrawerOpen)
myw -= 300
// if (GlobalStore.state.RightDrawerOpen)
// myw -= 300
if (withleft) {
if (GlobalStore.state.leftDrawerOpen)
myw -= 300
}
if (withright)
if (GlobalStore.state.RightDrawerOpen)
myw -= 300
return myw
},
getwidthscale(mythis, mywidth, maxwidth) {
if (this.isMobile()) {
if (mywidth > this.getwidth(mythis) - 20)
mywidth = this.getwidth(mythis) - 20
// if (mywidth > this.getwidth(mythis) - 20)
mywidth = this.getwidth(mythis, false, false) - 32
// console.log('mywidth', mywidth)
return mywidth
} else {
// console.log('this.getwidth(mythis) = ', this.getwidth(mythis))
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.6)
let myw = mywidth + ((this.getwidth(mythis, true) - mywidth) * 0.6)
// console.log('myw1 = ', myw)
if (myw > maxwidth)
myw = maxwidth
if (myw > this.getwidth(mythis) - 20)
myw = this.getwidth(mythis) - 20
if (myw > this.getwidth(mythis) - 24)
myw = this.getwidth(mythis) - 24
// console.log('myw = ', myw)
return myw
@@ -2826,6 +2836,24 @@ export const tools = {
return process.env.DEV
},
geturlupload() {
return process.env.MONGODB_HOST + '/upload'
},
getheaders() {
return [{ name: 'x-auth', value: UserStore.state.x_auth_token }]
},
getelembylang(arr) {
const mylang = toolsext.getLocale()
for (const elem in arr) {
if (arr[elem][mylang])
return arr[elem][mylang]
}
},
isChristmasHoliday() {
const now = new Date()
return ((now.getMonth() === 11 && now.getDate() > 20) || (now.getMonth() === 0 && now.getDate() < 8))
}
// getLocale() {
// if (navigator.languages && navigator.languages.length > 0) {

View File

@@ -1286,6 +1286,11 @@
"@types/minimatch" "*"
"@types/node" "*"
"@types/googlemaps@^3.38.0":
version "3.38.1"
resolved "https://registry.yarnpkg.com/@types/googlemaps/-/googlemaps-3.38.1.tgz#34f0be176f899bab5563103d7103fa7c3a72c02c"
integrity sha512-6rVIwaJOKXAMzg+Cz22+fJkgQd8IMK8q9DBSL3Wg9GAffGCy71MdTEf+8T9bIa4mvC0DClEsyzwrOfuf9rM0Zg==
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"