diff --git a/src/common/pattern.ts b/src/common/pattern.ts
index 12ffed3..01e1d59 100644
--- a/src/common/pattern.ts
+++ b/src/common/pattern.ts
@@ -17,6 +17,6 @@ export class Patterns {
*
* 8 to 20 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol
*/
- public static Password: RegExp = /^((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,20})/i
+ public static Password: RegExp = /^((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,30})/i
}
diff --git a/src/components/CDateTime/CDateTime.ts b/src/components/CDateTime/CDateTime.ts
index 097f83d..4c57ee4 100644
--- a/src/components/CDateTime/CDateTime.ts
+++ b/src/components/CDateTime/CDateTime.ts
@@ -45,6 +45,7 @@ export default class CDateTime extends Vue {
this.valueDate = new Date()
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
}
+ // console.log('Opening', this.valueDate, this.myvalue)
this.$emit('show')
}
diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts
index a51bf05..1ed6770 100644
--- a/src/components/CGridTableRec/CGridTableRec.ts
+++ b/src/components/CGridTableRec/CGridTableRec.ts
@@ -142,9 +142,9 @@ export default class CGridTableRec extends Vue {
if (this.colsel.subfield !== '') {
if (mydata.fieldsvalue[this.colsel.field] === undefined) {
- mydata.fieldsvalue[this.colsel.field] = {}
+ mydata.fieldsvalue[this.colsel.field + '.' + this.colsel.subfield] = newVal
}
- mydata.fieldsvalue[this.colsel.field][this.colsel.subfield] = newVal
+ // mydata.fieldsvalue[this.colsel.field][this.colsel.subfield] = newVal
} else {
mydata.fieldsvalue[this.colsel.field] = newVal
}
diff --git a/src/components/CMyChipList/CMyChipList.scss b/src/components/CMyChipList/CMyChipList.scss
index 2e84f39..9ecaf73 100644
--- a/src/components/CMyChipList/CMyChipList.scss
+++ b/src/components/CMyChipList/CMyChipList.scss
@@ -1,5 +1,6 @@
.clchip{
display: flex;
+ justify-content: center;
//flex: 1;
//flex-direction: column;
}
diff --git a/src/components/CMyChipList/CMyChipList.ts b/src/components/CMyChipList/CMyChipList.ts
index dfbebf0..27f8449 100644
--- a/src/components/CMyChipList/CMyChipList.ts
+++ b/src/components/CMyChipList/CMyChipList.ts
@@ -35,52 +35,84 @@ export default class CMyChipList extends Vue {
this.myarrvalues = []
// console.table(this.options)
- this.options.forEach((rec, index) => {
- if (this.type === tools.FieldType.multiselect) {
- if (this.value.includes(rec[this.optval])) {
- const mydata = {
- label: null,
- value: rec[this.optval],
- // myris = mylist.filter((myrec) => arrval.includes(myrec[key]))
- valbool: true,
- icon: '',
- color: tools.getColorByIndexBest(index)
+ if (this.options) {
+ this.options.forEach((rec, index) => {
+ if (this.type === tools.FieldType.multiselect) {
+ if (!!this.value) {
+ if (this.value.includes(rec[this.optval])) {
+ const mydata = {
+ label: null,
+ value: rec[this.optval],
+ // myris = mylist.filter((myrec) => arrval.includes(myrec[key]))
+ valbool: true,
+ icon: '',
+ color: tools.getColorByIndexBest(index)
+ }
+
+ if (tools.isObject(this.optlab)) {
+ mydata.label = this.options.filter((myrec) => myrec[this.optval] === mydata.value).map(this.optlab)
+ if (mydata.label)
+ mydata.label = mydata.label[0]
+ } else {
+ mydata.label = rec[this.optlab]
+ }
+
+ if (this.opticon)
+ mydata.icon = rec[this.opticon]
+ if (this.optcolor)
+ mydata.color = rec[this.optcolor]
+
+ this.myarrvalues.push(mydata)
+ }
+ }
+ } else if (this.type === tools.FieldType.select) {
+ if (this.value === rec[this.optval]) {
+ const mydata = {
+ label: null,
+ value: this.value,
+ valbool: true,
+ icon: '',
+ color: tools.getColorByIndexBest(index)
+ }
+
+ // console.log('mydata', mydata, 'optlab', this.optlab, 'value', this.value)
+
+ if (tools.isObject(this.optlab)) {
+ mydata.label = this.options.filter((myrec) => myrec[this.optval] === mydata.value).map(this.optlab)
+ if (mydata.label)
+ mydata.label = mydata.label[0]
+ } else {
+ mydata.label = rec[this.optlab]
+ }
+
+ if (this.opticon)
+ mydata.icon = rec[this.opticon]
+ if (this.optcolor)
+ mydata.color = rec[this.optcolor]
+
+ this.myarrvalues.push(mydata)
}
- if (tools.isObject(this.optlab)) {
- mydata.label = this.options.filter((myrec) => myrec[this.optval] === mydata.value).map(this.optlab)
- if (mydata.label)
- mydata.label = mydata.label[0]
- } else {
- mydata.label = rec[this.optlab]
+ } else {
+ if (tools.isBitActive(this.value, rec[this.optval])) {
+ const mydata = {
+ label: this.$t(rec[this.optlab]),
+ value: rec[this.optval],
+ valbool: tools.isBitActive(this.value, rec[this.optval]),
+ icon: '',
+ color: tools.getColorByIndexBest(index)
+ }
+
+ if (this.opticon)
+ mydata.icon = rec[this.opticon]
+ if (this.optcolor)
+ mydata.color = rec[this.optcolor]
+
+ this.myarrvalues.push(mydata)
}
-
- if (this.opticon)
- mydata.icon = rec[this.opticon]
- if (this.optcolor)
- mydata.color = rec[this.optcolor]
-
- this.myarrvalues.push(mydata)
}
- } else {
- if (tools.isBitActive(this.value, rec[this.optval])) {
- const mydata = {
- label: this.$t(rec[this.optlab]),
- value: rec[this.optval],
- valbool: tools.isBitActive(this.value, rec[this.optval]),
- icon: '',
- color: tools.getColorByIndexBest(index)
- }
-
- if (this.opticon)
- mydata.icon = rec[this.opticon]
- if (this.optcolor)
- mydata.color = rec[this.optcolor]
-
- this.myarrvalues.push(mydata)
- }
- }
- })
+ })
+ }
if (this.myarrvalues.length === 0)
this.myarrvalues.push({ label: this.$t('otherpages.manage.nessuno'), color: 'gray' })
diff --git a/src/components/CMyFieldDb/CMyFieldDb.ts b/src/components/CMyFieldDb/CMyFieldDb.ts
index 3497768..5b78dc8 100644
--- a/src/components/CMyFieldDb/CMyFieldDb.ts
+++ b/src/components/CMyFieldDb/CMyFieldDb.ts
@@ -10,10 +10,11 @@ import { fieldsTable } from '../../store/Modules/fieldsTable'
import { IColGridTable } from '../../model'
import { CMySelect } from '../CMySelect'
import { GlobalStore, UserStore } from '../../store/Modules'
+import { CMyChipList } from '../CMyChipList'
@Component({
name: 'CMyFieldDb',
- components: { CMyEditor, CMySelect }
+ components: { CMyEditor, CMySelect, CMyChipList }
})
export default class CMyFieldDb extends MixinBase {
diff --git a/src/components/CMyFieldDb/CMyFieldDb.vue b/src/components/CMyFieldDb/CMyFieldDb.vue
index f8abc9e..1460a8d 100644
--- a/src/components/CMyFieldDb/CMyFieldDb.vue
+++ b/src/components/CMyFieldDb/CMyFieldDb.vue
@@ -31,7 +31,7 @@
:opticon="db_fieldsTable.getIconByTable(col.jointable)">
-
+
-
+
- {{ myvalue }}
+ {{ myvalprinted }}
@@ -68,6 +68,16 @@
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)">
+
+
+
-
+
+
+
+
@@ -174,6 +184,8 @@
+
join: {{col.jointable}}
+
@@ -35,7 +35,7 @@
@blur="$v.signup.email.$touch"
:error="$v.signup.email.$error"
:error-message="errorMsg('email', $v.signup.email)"
-
+ maxlength="50"
debounce="1000"
:label="$t('reg.email')">
@@ -51,7 +51,7 @@
@blur="$v.signup.username.$touch"
:error="$v.signup.username.$error"
@keydown.space="(event) => event.preventDefault()"
-
+ maxlength="20"
debounce="1000"
:error-message="errorMsg('username', $v.signup.username)"
:label="$t('reg.username')">
@@ -67,7 +67,7 @@
rounded outlined
@blur="$v.signup.name.$touch"
:error="$v.signup.name.$error"
-
+ maxlength="30"
debounce="1000"
:error-message="errorMsg('name', $v.signup.name)"
:label="$t('reg.name')">
@@ -83,7 +83,7 @@
rounded outlined
@blur="$v.signup.surname.$touch"
:error="$v.signup.surname.$error"
-
+ maxlength="30"
debounce="1000"
:error-message="errorMsg('surname', $v.signup.surname)"
:label="$t('reg.surname')">
@@ -101,7 +101,7 @@
@blur="$v.signup.password.$touch"
:error="$v.signup.password.$error"
:error-message="`${errorMsg('password', $v.signup.password)}`"
-
+ maxlength="30"
:label="$t('reg.password')">
@@ -113,6 +113,7 @@
diff --git a/src/mixins/mixin-base.ts b/src/mixins/mixin-base.ts
index ad76c56..24a3ab5 100644
--- a/src/mixins/mixin-base.ts
+++ b/src/mixins/mixin-base.ts
@@ -58,7 +58,7 @@ export default class MixinBase extends MixinMetaTags {
public async setValDb(key, value, type, serv: boolean, table?, subkey?) {
- console.log('setValDb', key, value, serv, table, subkey)
+ // console.log('setValDb', key, value, serv, table, subkey)
let mydatatosave = null
if (table === 'users') {
const myid = UserStore.state.my._id
@@ -78,7 +78,7 @@ export default class MixinBase extends MixinMetaTags {
myfield[key] = value
}
- console.log('myfield', myfield)
+ // console.log('myfield', myfield)
mydatatosave = {
id: myid,
@@ -118,7 +118,7 @@ export default class MixinBase extends MixinMetaTags {
return recsett.find((rec) => rec.key === key)
})
}
- console.log('myrec', myrec)
+ // console.log('myrec', myrec)
mydatatosave = {
id: myrec._id,
@@ -127,7 +127,7 @@ export default class MixinBase extends MixinMetaTags {
}
}
- console.log('mydatatosave', mydatatosave)
+ // console.log('mydatatosave', mydatatosave)
GlobalStore.actions.saveFieldValue(mydatatosave).then((esito) => {
if (esito) {
diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts
index 2170511..5f40334 100644
--- a/src/model/GlobalStore.ts
+++ b/src/model/GlobalStore.ts
@@ -1,6 +1,7 @@
import { IAction } from '@src/model/Projects'
import { Component } from 'vue-router/types/router'
import { lists } from '@src/store/Modules/lists'
+import { IPaymentType } from '@src/model/UserStore'
export interface IPost {
title: string
@@ -149,6 +150,7 @@ export interface IGlobalState {
serv_settings: ISettings[],
settings: ISettings[],
disciplines: IDiscipline[],
+ paymenttypes: IPaymentType[],
newstosent: INewsToSent[],
gallery: IGallery[],
mypage: IMyPage[],
diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts
index 100df67..295275e 100644
--- a/src/model/UserStore.ts
+++ b/src/model/UserStore.ts
@@ -17,6 +17,14 @@ export interface IUserProfile {
country_pay?: string
email_paypal?: string
username_telegram?: string
+ teleg_id?: number
+ teleg_checkcode?: number
+ paymenttypes?: IPaymentType[]
+}
+
+export interface IPaymentType {
+ key: string
+ label: string
}
export interface IUserFields {
diff --git a/src/statics/i18n.js b/src/statics/i18n.js
index ad11b3a..35afde7 100644
--- a/src/statics/i18n.js
+++ b/src/statics/i18n.js
@@ -113,7 +113,7 @@ const msgglobal = {
aportador_solidario: 'Chi ti ha Invitato',
reflink: 'Link da condividere ai tuoi amici:',
page_title: 'Registrazione',
- made_gift: 'Doné',
+ made_gift: 'Dono',
incorso: 'Registrazione in corso...',
richiesto: 'Campo Richiesto',
email: 'Email',
@@ -123,10 +123,12 @@ const msgglobal = {
email_paypal: 'Email Paypal',
country_pay: 'Paese di Destinazione Pagamenti',
username_telegram: 'Username Telegram',
+ teleg_id: 'Telegram ID',
+ paymenttype: 'Modalità di Pagamenti Disponbili',
img: 'Immagine',
date_reg: 'Data Reg.',
perm: 'Permessi',
- username: 'Username',
+ username: 'Username (Pseudonimo)',
name: 'Nome',
surname: 'Cognome',
username_login: 'Nome Utente o email',
@@ -502,10 +504,12 @@ const msgglobal = {
email_paypal: 'Email Paypal',
country_pay: 'País del Pagos de destino',
username_telegram: 'Usuario Telegram',
+ teleg_id: 'Telegram ID',
+ paymenttype: 'Métodos de pago disponibles',
img: 'File image',
date_reg: 'Fecha Reg.',
perm: 'Permisos',
- username: 'Username',
+ username: 'Username (Apodo)',
name: 'Nombre',
surname: 'Apellido',
username_login: 'Nombre usuario o email',
@@ -862,6 +866,7 @@ const msgglobal = {
aportador_solidario: 'Contributeur de solidarité',
reflink: 'Liens à partager avec vos amis:',
incorso: 'Inscription en cours...',
+ made_gift: 'Doné',
richiesto: 'Champ obligatoire',
email: 'Email',
intcode_cell: 'Préfixe int.',
@@ -870,10 +875,12 @@ const msgglobal = {
email_paypal: 'Email Paypal',
country_pay: 'Pays de destination Paiements',
username_telegram: 'Nom d\'utilisateur du Telegram',
+ teleg_id: 'Telegram ID',
+ paymenttype: 'Méthodes de paiement disponibles',
img: 'Fichier image',
date_reg: 'Date Inscript.',
perm: 'Autorisations',
- username: 'Nom d\'utilisateur',
+ username: 'Username (Surnom)',
name: 'Nom',
surname: 'Prénom',
username_login: 'Nom d\'utilisateur ou email',
@@ -1239,11 +1246,13 @@ const msgglobal = {
email_paypal: 'Email Paypal',
country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
+ teleg_id: 'Telegram ID',
+ paymenttype: 'Available Payment Methods',
img: 'File Image',
date_reg: 'Reg. Date',
perm: 'Permissions',
username_login: 'Username or email',
- username: 'Username',
+ username: 'Username (Pseudonym)',
name: 'Name',
surname: 'Surname',
password: 'Password',
@@ -1608,11 +1617,13 @@ const msgglobal = {
email_paypal: 'Email Paypal',
country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
+ teleg_id: 'Telegram ID',
+ paymenttype: 'Available Payment Methods',
img: 'File Image',
date_reg: 'Reg. Date',
perm: 'Permissions',
username_login: 'Username or email',
- username: 'Username',
+ username: 'Username (Pseudonym)',
name: 'Name',
surname: 'Surname',
password: 'Password',
diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts
index 69d4e3c..0817e8a 100644
--- a/src/store/Modules/GlobalStore.ts
+++ b/src/store/Modules/GlobalStore.ts
@@ -74,6 +74,7 @@ const state: IGlobalState = {
opzemail: [],
settings: [],
disciplines: [],
+ paymenttypes: [],
autoplaydisc: 8000,
newstosent: [],
gallery: [],
@@ -193,6 +194,8 @@ namespace Getters {
return GlobalStore.state.mailinglist
else if (table === tools.TABMYPAGE)
return GlobalStore.state.mypage
+ else if (table === 'paymenttypes')
+ return GlobalStore.state.paymenttypes
else if (table === 'bookings')
return CalendarStore.state.bookedevent
else if (table === 'users')
@@ -391,7 +394,7 @@ namespace Mutations {
// console.log('myrec', myrec)
if (myrec) {
for (const [key, value] of Object.entries(mydata.fieldsvalue)) {
- console.log('key', value, myrec[key])
+ // console.log('key', value, myrec[key])
myrec[key] = value
}
}
@@ -792,6 +795,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.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : []
GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : []
if (showall) {
diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts
index 0e34de4..80172ed 100644
--- a/src/store/Modules/UserStore.ts
+++ b/src/store/Modules/UserStore.ts
@@ -33,7 +33,7 @@ export const DefaultUser: IUserFields = {
profile: {
img: ''
},
- downline: []
+ downline: [],
}
export const DefaultProfile: IUserProfile = {
@@ -45,7 +45,10 @@ export const DefaultProfile: IUserProfile = {
sex: 0,
country_pay: '',
email_paypal: '',
- username_telegram: ''
+ username_telegram: '',
+ teleg_id: 0,
+ teleg_checkcode: 0,
+ paymenttypes: []
}
// State
@@ -157,6 +160,12 @@ namespace Getters {
return mystate.usersList.find((item) => item.username === username)
}, 'getUserByUsername')
+ const getPaymenttypeById = b.read((mystate: IUserState) => (id) => {
+ const ctrec = mystate.my.profile.paymenttypes.find((mycontr) => mycontr.key === id)
+ return (ctrec) ? ctrec.label : ''
+
+ }, 'getPaymenttypeById')
+
const getImgByUsername = b.read((mystate: IUserState) => (username): string => {
if (username === '')
return ''
@@ -219,6 +228,9 @@ namespace Getters {
get getRefLink() {
return getRefLink()
},
+ get getPaymenttypeById() {
+ return getPaymenttypeById()
+ },
}
}
@@ -554,7 +566,7 @@ namespace Actions {
const newuser = res.data
- console.log('newuser', newuser)
+ // console.log('newuser', newuser)
Mutations.mutations.setServerCode(res.status)
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index 8326c05..f7f845d 100644
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -151,6 +151,12 @@ const colcontribtype = [
AddCol(DeleteRec)
]
+const colpaymenttype = [
+ AddCol({ name: 'key', label_trans: 'reg.key' }),
+ AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
+ AddCol(DeleteRec)
+]
+
const coldisciplines = [
AddCol({ name: 'typol_code', label_trans: 'disc.typol_code' }),
AddCol({ name: 'order', label_trans: 'disc.order', fieldtype: tools.FieldType.number }),
@@ -289,29 +295,37 @@ export const fieldsTable = {
const collab = this.getLabelByTable(col.jointable)
// console.table(mylist)
- // console.log('key=', key, 'collab', collab, 'val', val)
+ let risultato = ''
- const myris = mylist.find((myrec) => myrec[key] === val)
- // console.log('myris', myris)
- if (myris) {
- return myris[collab]
+ if (tools.isObject(collab)) {
+ risultato = mylist.filter((myrec) => myrec.username === val).map(collab)
} else {
- return ''
+ const myris = mylist.find((myrec) => myrec[key] === val)
+ risultato = myris[collab]
}
+
+ if (key === 'username') {
+ console.log('key=', key, 'collab', collab, 'val', val)
+ console.log('myris', risultato)
+ }
+
+ return risultato
+
} else {
return ''
}
},
getMultiValueByTable(col: IColGridTable, arrval) {
+ // console.log('getMultiValueByTable')
if (col.jointable) {
const mylist = this.getTableJoinByName(col.jointable)
const key = this.getKeyByTable(col.jointable)
const collab = this.getLabelByTable(col.jointable)
// console.table(mylist)
- // console.log('key=', key, 'collab', collab, 'val', val)
+ // console.log('key=', key, 'collab', collab, 'val', collab)
const myris = mylist.filter((myrec) => arrval.includes(myrec[key]))
// console.log('myris', myris)
@@ -363,7 +377,10 @@ export const fieldsTable = {
},
getTitleByTable(mytable): string {
const myrec = this.getrecTableList(mytable)
- return myrec.label
+ if (!!myrec)
+ return myrec.label
+ else
+ return ''
},
getIconByTable(mytable): string {
const myrec = this.getrecTableList(mytable)
@@ -387,7 +404,9 @@ export const fieldsTable = {
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', fieldtype: tools.FieldType.intcode }),
AddCol({ name: 'profile.email_paypal', field: 'profile', subfield: 'email_paypal', label_trans: 'reg.email_paypal' }),
AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay', fieldtype: tools.FieldType.nationality }),
- AddCol({ name: 'profile.username_telegram', field: 'profile', subfield: 'username_telegram', label_trans: 'reg.username_telegram' }),
+ AddCol({ name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id' }),
+ AddCol({ name: 'profile.teleg_checkcode', field: 'profile', subfield: 'teleg_checkcode', label_trans: 'reg.teleg_checkcode' }),
+ AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }),
AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
@@ -425,6 +444,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'label'
},
+ {
+ value: 'paymenttypes',
+ label: 'Tipi di Pagamenti',
+ columns: colpaymenttype,
+ colkey: '_id',
+ collabel: 'label'
+ },
{
value: 'disciplines',
label: 'Discipline',