- Create Newsletter Page: MailingList (without the class style, using Gulp tasks)#94
- Add test Email button
This commit is contained in:
@@ -1 +1 @@
|
|||||||
../../../freeplanet_serverside/server/tools/shared_nodejs.js
|
/home/paolo/myproject/freeplanet_serverside/src/server/tools/shared_nodejs.js
|
||||||
@@ -27,7 +27,7 @@ export const shared_consts = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
fieldsUserToChange() {
|
fieldsUserToChange() {
|
||||||
return ['_id', 'username', 'email', 'cell', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile']
|
return ['_id', 'username', 'email', 'cell', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ export default class CDateTime extends Vue {
|
|||||||
// console.log('Opening', 'myvalue', this.myvalue, 'value', this.value)
|
// console.log('Opening', 'myvalue', this.myvalue, 'value', this.value)
|
||||||
this.saveit = false
|
this.saveit = false
|
||||||
this.valueprec = this.myvalue
|
this.valueprec = this.myvalue
|
||||||
|
if (this.myvalue === undefined) {
|
||||||
|
this.valueDate = new Date()
|
||||||
|
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||||
|
}
|
||||||
this.$emit('show')
|
this.$emit('show')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,8 +59,9 @@ export default class CDateTime extends Vue {
|
|||||||
|
|
||||||
@Watch('valueDate')
|
@Watch('valueDate')
|
||||||
public changevalueDate() {
|
public changevalueDate() {
|
||||||
|
if (this.valueDate)
|
||||||
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||||
// console.log('changevalueDate myvalue', this.myvalue)
|
console.log('changevalueDate myvalue', this.myvalue)
|
||||||
}
|
}
|
||||||
@Watch('value')
|
@Watch('value')
|
||||||
public changevalue() {
|
public changevalue() {
|
||||||
@@ -95,7 +100,7 @@ export default class CDateTime extends Vue {
|
|||||||
else
|
else
|
||||||
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||||
|
|
||||||
// console.log('myvalue', this.myvalue)
|
console.log('created myvalue', this.myvalue)
|
||||||
}
|
}
|
||||||
|
|
||||||
public changeval(newval) {
|
public changeval(newval) {
|
||||||
|
|||||||
@@ -11,4 +11,12 @@ export default class MixinMetaTags extends Vue {
|
|||||||
public setmeta(mymeta: IMetaTags) {
|
public setmeta(mymeta: IMetaTags) {
|
||||||
this.mymeta = mymeta
|
this.mymeta = mymeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getsrcbyimg(myimg) {
|
||||||
|
// return this.src
|
||||||
|
const filefull = tools.getimgFullpathbysize(myimg)
|
||||||
|
|
||||||
|
return tools.getimgbysize(filefull.path, filefull.file)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,28 @@ export interface ITeachUname {
|
|||||||
username?: string
|
username?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface INewsToSent {
|
||||||
|
_id: string
|
||||||
|
idapp?: string
|
||||||
|
label?: string
|
||||||
|
numemail_tot?: number
|
||||||
|
numemail_sent?: number
|
||||||
|
datetoSent?: Date
|
||||||
|
datestartJob?: Date
|
||||||
|
datefinishJob?: Date
|
||||||
|
lastemailsent_Job?: Date
|
||||||
|
starting_job?: boolean
|
||||||
|
finish_job?: boolean
|
||||||
|
error_job?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IMailinglist {
|
||||||
|
name?: string
|
||||||
|
surname?: string
|
||||||
|
email: string
|
||||||
|
lastid_newstosent?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface IDiscipline {
|
export interface IDiscipline {
|
||||||
typol_code?: string
|
typol_code?: string
|
||||||
order?: number
|
order?: number
|
||||||
@@ -96,6 +118,8 @@ export interface IGlobalState {
|
|||||||
lastaction: IAction
|
lastaction: IAction
|
||||||
settings: ISettings[],
|
settings: ISettings[],
|
||||||
disciplines: IDiscipline[],
|
disciplines: IDiscipline[],
|
||||||
|
newstosent: INewsToSent[],
|
||||||
|
mailinglist: IMailinglist[],
|
||||||
autoplaydisc: number
|
autoplaydisc: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ const msgglobal = {
|
|||||||
tableslist: 'Tabelle',
|
tableslist: 'Tabelle',
|
||||||
},
|
},
|
||||||
otherpages: {
|
otherpages: {
|
||||||
|
error404: 'error404',
|
||||||
|
error404def: 'error404def',
|
||||||
admin : {
|
admin : {
|
||||||
menu: 'Amministrazione',
|
menu: 'Amministrazione',
|
||||||
eventlist: 'Le tue Prenotazioni',
|
eventlist: 'Le tue Prenotazioni',
|
||||||
@@ -217,7 +219,13 @@ const msgglobal = {
|
|||||||
code: 'Id',
|
code: 'Id',
|
||||||
whereicon: 'Icona',
|
whereicon: 'Icona',
|
||||||
},
|
},
|
||||||
|
col: {
|
||||||
|
label: 'Etichetta',
|
||||||
|
value: 'Valore',
|
||||||
|
type: 'Tipo'
|
||||||
|
},
|
||||||
cal: {
|
cal: {
|
||||||
|
num: 'Numero',
|
||||||
booked: 'Prenotato',
|
booked: 'Prenotato',
|
||||||
booked_error: 'Prenotazione non avvenuta. Riprovare più tardi',
|
booked_error: 'Prenotazione non avvenuta. Riprovare più tardi',
|
||||||
sendmsg_error: 'Messaggio non inviato. Riprovare più tardi',
|
sendmsg_error: 'Messaggio non inviato. Riprovare più tardi',
|
||||||
@@ -525,7 +533,13 @@ const msgglobal = {
|
|||||||
code: 'Id',
|
code: 'Id',
|
||||||
whereicon: 'Icono',
|
whereicon: 'Icono',
|
||||||
},
|
},
|
||||||
|
col: {
|
||||||
|
label: 'Etichetta',
|
||||||
|
value: 'Valore',
|
||||||
|
type: 'Tipo'
|
||||||
|
},
|
||||||
cal: {
|
cal: {
|
||||||
|
num: 'Número',
|
||||||
booked: 'Reservado',
|
booked: 'Reservado',
|
||||||
booked_error: 'Reserva fallida. Intenta nuevamente más tarde',
|
booked_error: 'Reserva fallida. Intenta nuevamente más tarde',
|
||||||
sendmsg_error: 'Mensaje no enviado Intenta nuevamente más tarde',
|
sendmsg_error: 'Mensaje no enviado Intenta nuevamente más tarde',
|
||||||
@@ -829,7 +843,13 @@ const msgglobal = {
|
|||||||
code: 'Id',
|
code: 'Id',
|
||||||
whereicon: 'icône',
|
whereicon: 'icône',
|
||||||
},
|
},
|
||||||
|
col: {
|
||||||
|
label: 'Etichetta',
|
||||||
|
value: 'Valore',
|
||||||
|
type: 'Tipo'
|
||||||
|
},
|
||||||
cal: {
|
cal: {
|
||||||
|
num: 'Nombre',
|
||||||
booked: 'Réservé',
|
booked: 'Réservé',
|
||||||
booked_error: 'La réservation a échoué. Réessayez plus tard',
|
booked_error: 'La réservation a échoué. Réessayez plus tard',
|
||||||
sendmsg_error: 'Message non envoyé. Réessayez plus tard',
|
sendmsg_error: 'Message non envoyé. Réessayez plus tard',
|
||||||
@@ -1132,7 +1152,13 @@ const msgglobal = {
|
|||||||
code: 'Id',
|
code: 'Id',
|
||||||
whereicon: 'Icon',
|
whereicon: 'Icon',
|
||||||
},
|
},
|
||||||
|
col: {
|
||||||
|
label: 'Etichetta',
|
||||||
|
value: 'Valore',
|
||||||
|
type: 'Tipo'
|
||||||
|
},
|
||||||
cal: {
|
cal: {
|
||||||
|
num: 'Number',
|
||||||
booked: 'Booked',
|
booked: 'Booked',
|
||||||
booked_error: 'Reservation failed. Try again later',
|
booked_error: 'Reservation failed. Try again later',
|
||||||
sendmsg_error: 'Message not sent. Try again later',
|
sendmsg_error: 'Message not sent. Try again later',
|
||||||
@@ -1437,7 +1463,13 @@ const msgglobal = {
|
|||||||
code: 'Id',
|
code: 'Id',
|
||||||
whereicon: 'Icon',
|
whereicon: 'Icon',
|
||||||
},
|
},
|
||||||
|
col: {
|
||||||
|
label: 'Etichetta',
|
||||||
|
value: 'Valore',
|
||||||
|
type: 'Tipo'
|
||||||
|
},
|
||||||
cal: {
|
cal: {
|
||||||
|
num: 'Number',
|
||||||
booked: 'Booked',
|
booked: 'Booked',
|
||||||
booked_error: 'Reservation failed. Try again later',
|
booked_error: 'Reservation failed. Try again later',
|
||||||
sendmsg_error: 'Message not sent. Try again later',
|
sendmsg_error: 'Message not sent. Try again later',
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ const state: IGlobalState = {
|
|||||||
},
|
},
|
||||||
settings: [],
|
settings: [],
|
||||||
disciplines: [],
|
disciplines: [],
|
||||||
autoplaydisc: 8000
|
autoplaydisc: 8000,
|
||||||
|
newstosent: [],
|
||||||
|
mailinglist: []
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getConfig(id) {
|
async function getConfig(id) {
|
||||||
@@ -167,6 +169,10 @@ namespace Getters {
|
|||||||
return CalendarStore.state.contribtype
|
return CalendarStore.state.contribtype
|
||||||
else if (table === 'disciplines')
|
else if (table === 'disciplines')
|
||||||
return GlobalStore.state.disciplines
|
return GlobalStore.state.disciplines
|
||||||
|
else if (table === tools.TABNEWSLETTER)
|
||||||
|
return GlobalStore.state.newstosent
|
||||||
|
else if (table === tools.TABMAILINGLIST)
|
||||||
|
return GlobalStore.state.mailinglist
|
||||||
else if (table === 'bookings')
|
else if (table === 'bookings')
|
||||||
return CalendarStore.state.bookedevent
|
return CalendarStore.state.bookedevent
|
||||||
else if (table === 'users')
|
else if (table === 'users')
|
||||||
@@ -369,7 +375,6 @@ namespace Actions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createPushSubscription(context) {
|
function createPushSubscription(context) {
|
||||||
console.log('createPushSubscription')
|
|
||||||
|
|
||||||
// If Already subscribed, don't send to the Server DB
|
// If Already subscribed, don't send to the Server DB
|
||||||
// if (state.wasAlreadySubOnDb) {
|
// if (state.wasAlreadySubOnDb) {
|
||||||
@@ -388,7 +393,7 @@ namespace Actions {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log('createPushSubscription')
|
console.log('createPushSubscription')
|
||||||
|
|
||||||
let reg
|
let reg
|
||||||
const mykey = process.env.PUBLICKEY_PUSH
|
const mykey = process.env.PUBLICKEY_PUSH
|
||||||
@@ -696,6 +701,11 @@ namespace Actions {
|
|||||||
GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : []
|
GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : []
|
||||||
GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
|
GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
|
||||||
|
|
||||||
|
if (showall) {
|
||||||
|
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
|
||||||
|
GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
||||||
|
}
|
||||||
|
|
||||||
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -707,6 +717,18 @@ namespace Actions {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function sendEmailTest(context) {
|
||||||
|
const usertosend = {
|
||||||
|
locale: tools.getLocale()
|
||||||
|
}
|
||||||
|
console.log(usertosend)
|
||||||
|
|
||||||
|
return await Api.SendReq('/signup_news/testemail', 'POST', usertosend)
|
||||||
|
.then((res) => {
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
setConta: b.dispatch(setConta),
|
setConta: b.dispatch(setConta),
|
||||||
createPushSubscription: b.dispatch(createPushSubscription),
|
createPushSubscription: b.dispatch(createPushSubscription),
|
||||||
@@ -721,6 +743,7 @@ namespace Actions {
|
|||||||
loadTable: b.dispatch(loadTable),
|
loadTable: b.dispatch(loadTable),
|
||||||
saveTable: b.dispatch(saveTable),
|
saveTable: b.dispatch(saveTable),
|
||||||
DeleteRec: b.dispatch(DeleteRec),
|
DeleteRec: b.dispatch(DeleteRec),
|
||||||
|
sendEmailTest: b.dispatch(sendEmailTest),
|
||||||
DuplicateRec: b.dispatch(DuplicateRec)
|
DuplicateRec: b.dispatch(DuplicateRec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ function AddCol(params: IColGridTable) {
|
|||||||
|
|
||||||
const colTableWhere = [
|
const colTableWhere = [
|
||||||
AddCol({ name: 'code', label_trans: 'where.code' }),
|
AddCol({ name: 'code', label_trans: 'where.code' }),
|
||||||
AddCol({ name: 'placename', label_trans: 'cal.where'} ),
|
AddCol({ name: 'placename', label_trans: 'cal.where' }),
|
||||||
AddCol({ name: 'whereicon', label_trans: 'where.whereicon' }),
|
AddCol({ name: 'whereicon', label_trans: 'where.whereicon' }),
|
||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
@@ -53,6 +53,21 @@ const colcontribtype = [
|
|||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const colnewstosent = [
|
||||||
|
AddCol({ name: 'label', label_trans: 'event.title' }),
|
||||||
|
AddCol({ name: 'datetoSent', label_trans: 'news.datetoSent', fieldtype: tools.FieldType.date }),
|
||||||
|
AddCol({ name: 'activate', label_trans: 'news.activate', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'numemail_tot', label_trans: 'news.numemail_tot', fieldtype: tools.FieldType.number }),
|
||||||
|
AddCol({ name: 'numemail_sent', label_trans: 'news.numemail_sent', fieldtype: tools.FieldType.number }),
|
||||||
|
AddCol({ name: 'datestartJob', label_trans: 'news.datestartJob', fieldtype: tools.FieldType.date }),
|
||||||
|
AddCol({ name: 'datefinishJob', label_trans: 'news.datefinishJob', fieldtype: tools.FieldType.date }),
|
||||||
|
AddCol({ name: 'lastemailsent_Job', label_trans: 'news.lastemailsent_Job', fieldtype: tools.FieldType.date }),
|
||||||
|
AddCol({ name: 'starting_job', label_trans: 'news.starting_job', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'finish_job', label_trans: 'news.finish_job', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'error_job', label_trans: 'news.error_job', fieldtype: tools.FieldType.string }),
|
||||||
|
AddCol(DeleteRec)
|
||||||
|
]
|
||||||
|
|
||||||
const coldisciplines = [
|
const coldisciplines = [
|
||||||
AddCol({ name: 'typol_code', label_trans: 'disc.typol_code' }),
|
AddCol({ name: 'typol_code', label_trans: 'disc.typol_code' }),
|
||||||
AddCol({ name: 'order', label_trans: 'disc.order', fieldtype: tools.FieldType.number }),
|
AddCol({ name: 'order', label_trans: 'disc.order', fieldtype: tools.FieldType.number }),
|
||||||
@@ -65,7 +80,12 @@ const coldisciplines = [
|
|||||||
AddCol({ name: 'img_small', label_trans: 'event.img_small' }),
|
AddCol({ name: 'img_small', label_trans: 'event.img_small' }),
|
||||||
AddCol({ name: 'showinhome', label_trans: 'event.showinhome', fieldtype: tools.FieldType.boolean }),
|
AddCol({ name: 'showinhome', label_trans: 'event.showinhome', fieldtype: tools.FieldType.boolean }),
|
||||||
AddCol({ name: 'showinnewsletter', label_trans: 'event.showinnewsletter', fieldtype: tools.FieldType.boolean }),
|
AddCol({ name: 'showinnewsletter', label_trans: 'event.showinnewsletter', fieldtype: tools.FieldType.boolean }),
|
||||||
AddCol({ name: 'teachers', label_trans: 'event.teacher', fieldtype: tools.FieldType.multiselect, jointable: 'operators' }),
|
AddCol({
|
||||||
|
name: 'teachers',
|
||||||
|
label_trans: 'event.teacher',
|
||||||
|
fieldtype: tools.FieldType.multiselect,
|
||||||
|
jointable: 'operators'
|
||||||
|
}),
|
||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -84,6 +104,14 @@ const colTablePermission = [
|
|||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const colmailinglist = [
|
||||||
|
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||||
|
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||||
|
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||||
|
AddCol({ name: 'lastid_newstosent', label_trans: 'reg.lastid_newstosent', fieldtype: tools.FieldType.string } ),
|
||||||
|
AddCol(DeleteRec)
|
||||||
|
]
|
||||||
|
|
||||||
const colTableOperator = [
|
const colTableOperator = [
|
||||||
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
||||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||||
@@ -95,7 +123,7 @@ const colTableOperator = [
|
|||||||
AddCol({ name: 'qualification', label_trans: 'op.qualification' }),
|
AddCol({ name: 'qualification', label_trans: 'op.qualification' }),
|
||||||
AddCol({ name: 'disciplines', label_trans: 'op.disciplines' }),
|
AddCol({ name: 'disciplines', label_trans: 'op.disciplines' }),
|
||||||
AddCol({ name: 'certifications', label_trans: 'op.certifications' }),
|
AddCol({ name: 'certifications', label_trans: 'op.certifications' }),
|
||||||
AddCol({ name: 'intro', label_trans: 'op.intro' , fieldtype: tools.FieldType.html }),
|
AddCol({ name: 'intro', label_trans: 'op.intro', fieldtype: tools.FieldType.html }),
|
||||||
AddCol({ name: 'info', label_trans: 'op.info', fieldtype: tools.FieldType.html }),
|
AddCol({ name: 'info', label_trans: 'op.info', fieldtype: tools.FieldType.html }),
|
||||||
AddCol({ name: 'webpage', label_trans: 'op.webpage' }),
|
AddCol({ name: 'webpage', label_trans: 'op.webpage' }),
|
||||||
AddCol({ name: 'days_working', label_trans: 'op.days_working' }),
|
AddCol({ name: 'days_working', label_trans: 'op.days_working' }),
|
||||||
@@ -116,11 +144,21 @@ const colTableEvents = [
|
|||||||
AddCol({ name: 'img_small', label_trans: 'event.img_small' }),
|
AddCol({ name: 'img_small', label_trans: 'event.img_small' }),
|
||||||
AddCol({ name: 'img', label_trans: 'event.img' }),
|
AddCol({ name: 'img', label_trans: 'event.img' }),
|
||||||
AddCol({ name: 'wherecode', label_trans: 'event.where', fieldtype: tools.FieldType.select, jointable: 'wheres' }),
|
AddCol({ name: 'wherecode', label_trans: 'event.where', fieldtype: tools.FieldType.select, jointable: 'wheres' }),
|
||||||
AddCol({ name: 'contribtype', label_trans: 'event.contribtype', fieldtype: tools.FieldType.select, jointable: 'contribtype' }),
|
AddCol({
|
||||||
|
name: 'contribtype',
|
||||||
|
label_trans: 'event.contribtype',
|
||||||
|
fieldtype: tools.FieldType.select,
|
||||||
|
jointable: 'contribtype'
|
||||||
|
}),
|
||||||
AddCol({ name: 'price', label_trans: 'event.price' }),
|
AddCol({ name: 'price', label_trans: 'event.price' }),
|
||||||
AddCol({ name: 'infoafterprice', label_trans: 'event.infoafterprice' }),
|
AddCol({ name: 'infoafterprice', label_trans: 'event.infoafterprice' }),
|
||||||
AddCol({ name: 'teacher', label_trans: 'event.teacher', fieldtype: tools.FieldType.select, jointable: 'operators' }),
|
AddCol({ name: 'teacher', label_trans: 'event.teacher', fieldtype: tools.FieldType.select, jointable: 'operators' }),
|
||||||
AddCol({ name: 'teacher2', label_trans: 'event.teacher2', fieldtype: tools.FieldType.select, jointable: 'operators' }),
|
AddCol({
|
||||||
|
name: 'teacher2',
|
||||||
|
label_trans: 'event.teacher2',
|
||||||
|
fieldtype: tools.FieldType.select,
|
||||||
|
jointable: 'operators'
|
||||||
|
}),
|
||||||
AddCol({ name: 'infoextra', label_trans: 'event.infoextra' }),
|
AddCol({ name: 'infoextra', label_trans: 'event.infoextra' }),
|
||||||
AddCol({ name: 'linkpage', label_trans: 'event.linkpage' }),
|
AddCol({ name: 'linkpage', label_trans: 'event.linkpage' }),
|
||||||
AddCol({ name: 'linkpdf', label_trans: 'event.linkpdf' }),
|
AddCol({ name: 'linkpdf', label_trans: 'event.linkpdf' }),
|
||||||
@@ -297,6 +335,20 @@ export const fieldsTable = {
|
|||||||
colkey: 'typol_code',
|
colkey: 'typol_code',
|
||||||
collabel: 'label'
|
collabel: 'label'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'newstosent',
|
||||||
|
label: 'Newsletter da Inviare',
|
||||||
|
columns: colnewstosent,
|
||||||
|
colkey: '_id',
|
||||||
|
collabel: 'label'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'mailinglist',
|
||||||
|
label: 'MailingList',
|
||||||
|
columns: colmailinglist,
|
||||||
|
colkey: '_id',
|
||||||
|
collabel: (rec) => rec.name + ' ' + rec.surname
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'permissions',
|
value: 'permissions',
|
||||||
label: 'Permessi',
|
label: 'Permessi',
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
TABEVENTS: 'myevents',
|
TABEVENTS: 'myevents',
|
||||||
|
TABNEWSLETTER: 'newstosent',
|
||||||
|
TABMAILINGLIST: 'mailinglist',
|
||||||
|
|
||||||
MAX_CHARACTERS: 60,
|
MAX_CHARACTERS: 60,
|
||||||
projects: 'projects',
|
projects: 'projects',
|
||||||
@@ -2644,11 +2646,16 @@ export const tools = {
|
|||||||
|
|
||||||
getwidthscale(mythis, mywidth, maxwidth) {
|
getwidthscale(mythis, mywidth, maxwidth) {
|
||||||
if (this.isMobile()) {
|
if (this.isMobile()) {
|
||||||
|
if (mywidth > this.getwidth(mythis) - 20)
|
||||||
|
mywidth = this.getwidth(mythis) - 20
|
||||||
|
|
||||||
return mywidth
|
return mywidth
|
||||||
} else {
|
} else {
|
||||||
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.4)
|
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.4)
|
||||||
if (myw > maxwidth)
|
if (myw > maxwidth)
|
||||||
myw = maxwidth
|
myw = maxwidth
|
||||||
|
if (myw > this.getwidth(mythis) - 20)
|
||||||
|
myw = this.getwidth(mythis) - 20
|
||||||
|
|
||||||
return myw
|
return myw
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user