- Profile
- Bot Telegram - fixed Chip multiselect
This commit is contained in:
@@ -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
|
* 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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export default class CDateTime extends Vue {
|
|||||||
this.valueDate = new Date()
|
this.valueDate = new Date()
|
||||||
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
this.myvalue = tools.getstrYYMMDDDateTime(this.valueDate)
|
||||||
}
|
}
|
||||||
|
// console.log('Opening', this.valueDate, this.myvalue)
|
||||||
this.$emit('show')
|
this.$emit('show')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ export default class CGridTableRec extends Vue {
|
|||||||
|
|
||||||
if (this.colsel.subfield !== '') {
|
if (this.colsel.subfield !== '') {
|
||||||
if (mydata.fieldsvalue[this.colsel.field] === undefined) {
|
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 {
|
} else {
|
||||||
mydata.fieldsvalue[this.colsel.field] = newVal
|
mydata.fieldsvalue[this.colsel.field] = newVal
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.clchip{
|
.clchip{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
//flex: 1;
|
//flex: 1;
|
||||||
//flex-direction: column;
|
//flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,10 @@ export default class CMyChipList extends Vue {
|
|||||||
this.myarrvalues = []
|
this.myarrvalues = []
|
||||||
|
|
||||||
// console.table(this.options)
|
// console.table(this.options)
|
||||||
|
if (this.options) {
|
||||||
this.options.forEach((rec, index) => {
|
this.options.forEach((rec, index) => {
|
||||||
if (this.type === tools.FieldType.multiselect) {
|
if (this.type === tools.FieldType.multiselect) {
|
||||||
|
if (!!this.value) {
|
||||||
if (this.value.includes(rec[this.optval])) {
|
if (this.value.includes(rec[this.optval])) {
|
||||||
const mydata = {
|
const mydata = {
|
||||||
label: null,
|
label: null,
|
||||||
@@ -62,6 +64,35 @@ export default class CMyChipList extends Vue {
|
|||||||
|
|
||||||
this.myarrvalues.push(mydata)
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (tools.isBitActive(this.value, rec[this.optval])) {
|
if (tools.isBitActive(this.value, rec[this.optval])) {
|
||||||
const mydata = {
|
const mydata = {
|
||||||
@@ -81,6 +112,7 @@ export default class CMyChipList extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (this.myarrvalues.length === 0)
|
if (this.myarrvalues.length === 0)
|
||||||
this.myarrvalues.push({ label: this.$t('otherpages.manage.nessuno'), color: 'gray' })
|
this.myarrvalues.push({ label: this.$t('otherpages.manage.nessuno'), color: 'gray' })
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ import { fieldsTable } from '../../store/Modules/fieldsTable'
|
|||||||
import { IColGridTable } from '../../model'
|
import { IColGridTable } from '../../model'
|
||||||
import { CMySelect } from '../CMySelect'
|
import { CMySelect } from '../CMySelect'
|
||||||
import { GlobalStore, UserStore } from '../../store/Modules'
|
import { GlobalStore, UserStore } from '../../store/Modules'
|
||||||
|
import { CMyChipList } from '../CMyChipList'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
name: 'CMyFieldDb',
|
name: 'CMyFieldDb',
|
||||||
components: { CMyEditor, CMySelect }
|
components: { CMyEditor, CMySelect, CMyChipList }
|
||||||
})
|
})
|
||||||
|
|
||||||
export default class CMyFieldDb extends MixinBase {
|
export default class CMyFieldDb extends MixinBase {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
<!-- Show Value -->
|
<!-- Show Value -->
|
||||||
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
|
<div v-else-if="type === tools.FieldType.nationality">
|
||||||
<q-input
|
<q-input
|
||||||
input-class="cursor-pointer text-center"
|
input-class="cursor-pointer text-center"
|
||||||
:readonly="true"
|
:readonly="true"
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
|
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
|
<div v-else-if="type === tools.FieldType.intcode">
|
||||||
|
|
||||||
{{ myvalue }}
|
{{ myvalprinted }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="type === tools.FieldType.multiselect">
|
<div v-else-if="type === tools.FieldType.multiselect">
|
||||||
@@ -68,6 +68,16 @@
|
|||||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="type === tools.FieldType.select">
|
||||||
|
<CMyChipList
|
||||||
|
myclass="text-center"
|
||||||
|
:type="tools.FieldType.select"
|
||||||
|
: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="type === tools.FieldType.html">
|
<div v-else-if="type === tools.FieldType.html">
|
||||||
<div v-html="myvalprinted">
|
<div v-html="myvalprinted">
|
||||||
|
|
||||||
@@ -186,7 +196,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="type === tools.FieldType.multiselect">
|
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
|
||||||
<q-select
|
<q-select
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
rounded
|
rounded
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default class CMyPopupEdit extends Vue {
|
|||||||
|
|
||||||
public SaveValueInt(newVal, valinitial) {
|
public SaveValueInt(newVal, valinitial) {
|
||||||
|
|
||||||
// console.log('SaveValueInt', newVal)
|
console.log('SaveValueInt', newVal, valinitial)
|
||||||
|
|
||||||
// Update value in table memory
|
// Update value in table memory
|
||||||
if (this.subfield !== '') {
|
if (this.subfield !== '') {
|
||||||
|
|||||||
@@ -58,6 +58,16 @@
|
|||||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === tools.FieldType.select">
|
||||||
|
<CMyChipList
|
||||||
|
myclass="text-center"
|
||||||
|
:type="tools.FieldType.select"
|
||||||
|
: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">
|
<div v-else-if="col.fieldtype === tools.FieldType.boolean">
|
||||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||||
@input="Savedb"></q-toggle>
|
@input="Savedb"></q-toggle>
|
||||||
@@ -174,6 +184,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
|
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
|
||||||
|
<div>join: {{col.jointable}}</div>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
rounded
|
rounded
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export default class CSignUp extends MixinBase {
|
|||||||
public errorMsg(cosa: string, item: any) {
|
public errorMsg(cosa: string, item: any) {
|
||||||
try {
|
try {
|
||||||
if (!item.$error) { return '' }
|
if (!item.$error) { return '' }
|
||||||
console.log('errorMsg', cosa, item)
|
// console.log('errorMsg', cosa, item)
|
||||||
if (item.$params.email && !item.email) { return this.$t('reg.err.email') }
|
if (item.$params.email && !item.email) { return this.$t('reg.err.email') }
|
||||||
|
|
||||||
if (cosa === 'repeatpassword') {
|
if (cosa === 'repeatpassword') {
|
||||||
@@ -135,7 +135,7 @@ export default class CSignUp extends MixinBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('item', item)
|
// console.log('item', item)
|
||||||
|
|
||||||
if (item.minLength !== undefined) {
|
if (item.minLength !== undefined) {
|
||||||
if (!item.minLength) {
|
if (!item.minLength) {
|
||||||
@@ -155,7 +155,7 @@ export default class CSignUp extends MixinBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(' ....avanti')
|
// console.log(' ....avanti')
|
||||||
if (cosa === 'email') {
|
if (cosa === 'email') {
|
||||||
// console.log("EMAIL " + item.isUnique);
|
// console.log("EMAIL " + item.isUnique);
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
@@ -166,7 +166,7 @@ export default class CSignUp extends MixinBase {
|
|||||||
} else if (cosa === 'aportador_solidario') {
|
} else if (cosa === 'aportador_solidario') {
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
if (!item.aportadorexist) {
|
if (!item.aportadorexist) {
|
||||||
console.log('!item.aportadorexist !')
|
// console.log('!item.aportadorexist !')
|
||||||
return this.$t('reg.err.aportador_not_exist')
|
return this.$t('reg.err.aportador_not_exist')
|
||||||
}
|
}
|
||||||
} else if ((cosa === 'name') || (cosa === 'surname')) {
|
} else if ((cosa === 'name') || (cosa === 'surname')) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
@blur="$v.signup.aportador_solidario.$touch"
|
@blur="$v.signup.aportador_solidario.$touch"
|
||||||
:error="$v.signup.aportador_solidario.$error"
|
:error="$v.signup.aportador_solidario.$error"
|
||||||
:error-message="errorMsg('aportador_solidario', $v.signup.aportador_solidario)"
|
:error-message="errorMsg('aportador_solidario', $v.signup.aportador_solidario)"
|
||||||
|
maxlength="20"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
|
|
||||||
:label="$t('reg.aportador_solidario')">
|
:label="$t('reg.aportador_solidario')">
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
@blur="$v.signup.email.$touch"
|
@blur="$v.signup.email.$touch"
|
||||||
:error="$v.signup.email.$error"
|
:error="$v.signup.email.$error"
|
||||||
:error-message="errorMsg('email', $v.signup.email)"
|
:error-message="errorMsg('email', $v.signup.email)"
|
||||||
|
maxlength="50"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
:label="$t('reg.email')">
|
:label="$t('reg.email')">
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
@blur="$v.signup.username.$touch"
|
@blur="$v.signup.username.$touch"
|
||||||
:error="$v.signup.username.$error"
|
:error="$v.signup.username.$error"
|
||||||
@keydown.space="(event) => event.preventDefault()"
|
@keydown.space="(event) => event.preventDefault()"
|
||||||
|
maxlength="20"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
:error-message="errorMsg('username', $v.signup.username)"
|
:error-message="errorMsg('username', $v.signup.username)"
|
||||||
:label="$t('reg.username')">
|
:label="$t('reg.username')">
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
rounded outlined
|
rounded outlined
|
||||||
@blur="$v.signup.name.$touch"
|
@blur="$v.signup.name.$touch"
|
||||||
:error="$v.signup.name.$error"
|
:error="$v.signup.name.$error"
|
||||||
|
maxlength="30"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
:error-message="errorMsg('name', $v.signup.name)"
|
:error-message="errorMsg('name', $v.signup.name)"
|
||||||
:label="$t('reg.name')">
|
:label="$t('reg.name')">
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
rounded outlined
|
rounded outlined
|
||||||
@blur="$v.signup.surname.$touch"
|
@blur="$v.signup.surname.$touch"
|
||||||
:error="$v.signup.surname.$error"
|
:error="$v.signup.surname.$error"
|
||||||
|
maxlength="30"
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
:error-message="errorMsg('surname', $v.signup.surname)"
|
:error-message="errorMsg('surname', $v.signup.surname)"
|
||||||
:label="$t('reg.surname')">
|
:label="$t('reg.surname')">
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
@blur="$v.signup.password.$touch"
|
@blur="$v.signup.password.$touch"
|
||||||
:error="$v.signup.password.$error"
|
:error="$v.signup.password.$error"
|
||||||
:error-message="`${errorMsg('password', $v.signup.password)}`"
|
:error-message="`${errorMsg('password', $v.signup.password)}`"
|
||||||
|
maxlength="30"
|
||||||
:label="$t('reg.password')">
|
:label="$t('reg.password')">
|
||||||
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
@@ -113,6 +113,7 @@
|
|||||||
<q-input
|
<q-input
|
||||||
v-model="signup.repeatPassword"
|
v-model="signup.repeatPassword"
|
||||||
type="password"
|
type="password"
|
||||||
|
maxlength="30"
|
||||||
rounded outlined
|
rounded outlined
|
||||||
@blur="$v.signup.repeatPassword.$touch"
|
@blur="$v.signup.repeatPassword.$touch"
|
||||||
:error="$v.signup.repeatPassword.$error"
|
:error="$v.signup.repeatPassword.$error"
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
@country-changed="intcode_change"
|
@country-changed="intcode_change"
|
||||||
v-model="signup.profile.cell"
|
v-model="signup.profile.cell"
|
||||||
:placeholder="$t('reg.cell')"
|
:placeholder="$t('reg.cell')"
|
||||||
|
maxlength="20"
|
||||||
:enabledCountryCode="true"
|
:enabledCountryCode="true"
|
||||||
inputClasses="clCell"
|
inputClasses="clCell"
|
||||||
wrapperClasses="clCellCode">
|
wrapperClasses="clCellCode">
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default class MixinBase extends MixinMetaTags {
|
|||||||
|
|
||||||
public async setValDb(key, value, type, serv: boolean, table?, subkey?) {
|
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
|
let mydatatosave = null
|
||||||
if (table === 'users') {
|
if (table === 'users') {
|
||||||
const myid = UserStore.state.my._id
|
const myid = UserStore.state.my._id
|
||||||
@@ -78,7 +78,7 @@ export default class MixinBase extends MixinMetaTags {
|
|||||||
myfield[key] = value
|
myfield[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('myfield', myfield)
|
// console.log('myfield', myfield)
|
||||||
|
|
||||||
mydatatosave = {
|
mydatatosave = {
|
||||||
id: myid,
|
id: myid,
|
||||||
@@ -118,7 +118,7 @@ export default class MixinBase extends MixinMetaTags {
|
|||||||
return recsett.find((rec) => rec.key === key)
|
return recsett.find((rec) => rec.key === key)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('myrec', myrec)
|
// console.log('myrec', myrec)
|
||||||
|
|
||||||
mydatatosave = {
|
mydatatosave = {
|
||||||
id: myrec._id,
|
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) => {
|
GlobalStore.actions.saveFieldValue(mydatatosave).then((esito) => {
|
||||||
if (esito) {
|
if (esito) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { IAction } from '@src/model/Projects'
|
import { IAction } from '@src/model/Projects'
|
||||||
import { Component } from 'vue-router/types/router'
|
import { Component } from 'vue-router/types/router'
|
||||||
import { lists } from '@src/store/Modules/lists'
|
import { lists } from '@src/store/Modules/lists'
|
||||||
|
import { IPaymentType } from '@src/model/UserStore'
|
||||||
|
|
||||||
export interface IPost {
|
export interface IPost {
|
||||||
title: string
|
title: string
|
||||||
@@ -149,6 +150,7 @@ export interface IGlobalState {
|
|||||||
serv_settings: ISettings[],
|
serv_settings: ISettings[],
|
||||||
settings: ISettings[],
|
settings: ISettings[],
|
||||||
disciplines: IDiscipline[],
|
disciplines: IDiscipline[],
|
||||||
|
paymenttypes: IPaymentType[],
|
||||||
newstosent: INewsToSent[],
|
newstosent: INewsToSent[],
|
||||||
gallery: IGallery[],
|
gallery: IGallery[],
|
||||||
mypage: IMyPage[],
|
mypage: IMyPage[],
|
||||||
|
|||||||
@@ -17,6 +17,14 @@ export interface IUserProfile {
|
|||||||
country_pay?: string
|
country_pay?: string
|
||||||
email_paypal?: string
|
email_paypal?: string
|
||||||
username_telegram?: string
|
username_telegram?: string
|
||||||
|
teleg_id?: number
|
||||||
|
teleg_checkcode?: number
|
||||||
|
paymenttypes?: IPaymentType[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPaymentType {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IUserFields {
|
export interface IUserFields {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const msgglobal = {
|
|||||||
aportador_solidario: 'Chi ti ha Invitato',
|
aportador_solidario: 'Chi ti ha Invitato',
|
||||||
reflink: 'Link da condividere ai tuoi amici:',
|
reflink: 'Link da condividere ai tuoi amici:',
|
||||||
page_title: 'Registrazione',
|
page_title: 'Registrazione',
|
||||||
made_gift: 'Doné',
|
made_gift: 'Dono',
|
||||||
incorso: 'Registrazione in corso...',
|
incorso: 'Registrazione in corso...',
|
||||||
richiesto: 'Campo Richiesto',
|
richiesto: 'Campo Richiesto',
|
||||||
email: 'Email',
|
email: 'Email',
|
||||||
@@ -123,10 +123,12 @@ const msgglobal = {
|
|||||||
email_paypal: 'Email Paypal',
|
email_paypal: 'Email Paypal',
|
||||||
country_pay: 'Paese di Destinazione Pagamenti',
|
country_pay: 'Paese di Destinazione Pagamenti',
|
||||||
username_telegram: 'Username Telegram',
|
username_telegram: 'Username Telegram',
|
||||||
|
teleg_id: 'Telegram ID',
|
||||||
|
paymenttype: 'Modalità di Pagamenti Disponbili',
|
||||||
img: 'Immagine',
|
img: 'Immagine',
|
||||||
date_reg: 'Data Reg.',
|
date_reg: 'Data Reg.',
|
||||||
perm: 'Permessi',
|
perm: 'Permessi',
|
||||||
username: 'Username',
|
username: 'Username (Pseudonimo)',
|
||||||
name: 'Nome',
|
name: 'Nome',
|
||||||
surname: 'Cognome',
|
surname: 'Cognome',
|
||||||
username_login: 'Nome Utente o email',
|
username_login: 'Nome Utente o email',
|
||||||
@@ -502,10 +504,12 @@ const msgglobal = {
|
|||||||
email_paypal: 'Email Paypal',
|
email_paypal: 'Email Paypal',
|
||||||
country_pay: 'País del Pagos de destino',
|
country_pay: 'País del Pagos de destino',
|
||||||
username_telegram: 'Usuario Telegram',
|
username_telegram: 'Usuario Telegram',
|
||||||
|
teleg_id: 'Telegram ID',
|
||||||
|
paymenttype: 'Métodos de pago disponibles',
|
||||||
img: 'File image',
|
img: 'File image',
|
||||||
date_reg: 'Fecha Reg.',
|
date_reg: 'Fecha Reg.',
|
||||||
perm: 'Permisos',
|
perm: 'Permisos',
|
||||||
username: 'Username',
|
username: 'Username (Apodo)',
|
||||||
name: 'Nombre',
|
name: 'Nombre',
|
||||||
surname: 'Apellido',
|
surname: 'Apellido',
|
||||||
username_login: 'Nombre usuario o email',
|
username_login: 'Nombre usuario o email',
|
||||||
@@ -862,6 +866,7 @@ const msgglobal = {
|
|||||||
aportador_solidario: 'Contributeur de solidarité',
|
aportador_solidario: 'Contributeur de solidarité',
|
||||||
reflink: 'Liens à partager avec vos amis:',
|
reflink: 'Liens à partager avec vos amis:',
|
||||||
incorso: 'Inscription en cours...',
|
incorso: 'Inscription en cours...',
|
||||||
|
made_gift: 'Doné',
|
||||||
richiesto: 'Champ obligatoire',
|
richiesto: 'Champ obligatoire',
|
||||||
email: 'Email',
|
email: 'Email',
|
||||||
intcode_cell: 'Préfixe int.',
|
intcode_cell: 'Préfixe int.',
|
||||||
@@ -870,10 +875,12 @@ const msgglobal = {
|
|||||||
email_paypal: 'Email Paypal',
|
email_paypal: 'Email Paypal',
|
||||||
country_pay: 'Pays de destination Paiements',
|
country_pay: 'Pays de destination Paiements',
|
||||||
username_telegram: 'Nom d\'utilisateur du Telegram',
|
username_telegram: 'Nom d\'utilisateur du Telegram',
|
||||||
|
teleg_id: 'Telegram ID',
|
||||||
|
paymenttype: 'Méthodes de paiement disponibles',
|
||||||
img: 'Fichier image',
|
img: 'Fichier image',
|
||||||
date_reg: 'Date Inscript.',
|
date_reg: 'Date Inscript.',
|
||||||
perm: 'Autorisations',
|
perm: 'Autorisations',
|
||||||
username: 'Nom d\'utilisateur',
|
username: 'Username (Surnom)',
|
||||||
name: 'Nom',
|
name: 'Nom',
|
||||||
surname: 'Prénom',
|
surname: 'Prénom',
|
||||||
username_login: 'Nom d\'utilisateur ou email',
|
username_login: 'Nom d\'utilisateur ou email',
|
||||||
@@ -1239,11 +1246,13 @@ const msgglobal = {
|
|||||||
email_paypal: 'Email Paypal',
|
email_paypal: 'Email Paypal',
|
||||||
country_pay: 'Country of Destination Payments',
|
country_pay: 'Country of Destination Payments',
|
||||||
username_telegram: 'Username Telegram',
|
username_telegram: 'Username Telegram',
|
||||||
|
teleg_id: 'Telegram ID',
|
||||||
|
paymenttype: 'Available Payment Methods',
|
||||||
img: 'File Image',
|
img: 'File Image',
|
||||||
date_reg: 'Reg. Date',
|
date_reg: 'Reg. Date',
|
||||||
perm: 'Permissions',
|
perm: 'Permissions',
|
||||||
username_login: 'Username or email',
|
username_login: 'Username or email',
|
||||||
username: 'Username',
|
username: 'Username (Pseudonym)',
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
surname: 'Surname',
|
surname: 'Surname',
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
@@ -1608,11 +1617,13 @@ const msgglobal = {
|
|||||||
email_paypal: 'Email Paypal',
|
email_paypal: 'Email Paypal',
|
||||||
country_pay: 'Country of Destination Payments',
|
country_pay: 'Country of Destination Payments',
|
||||||
username_telegram: 'Username Telegram',
|
username_telegram: 'Username Telegram',
|
||||||
|
teleg_id: 'Telegram ID',
|
||||||
|
paymenttype: 'Available Payment Methods',
|
||||||
img: 'File Image',
|
img: 'File Image',
|
||||||
date_reg: 'Reg. Date',
|
date_reg: 'Reg. Date',
|
||||||
perm: 'Permissions',
|
perm: 'Permissions',
|
||||||
username_login: 'Username or email',
|
username_login: 'Username or email',
|
||||||
username: 'Username',
|
username: 'Username (Pseudonym)',
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
surname: 'Surname',
|
surname: 'Surname',
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ const state: IGlobalState = {
|
|||||||
opzemail: [],
|
opzemail: [],
|
||||||
settings: [],
|
settings: [],
|
||||||
disciplines: [],
|
disciplines: [],
|
||||||
|
paymenttypes: [],
|
||||||
autoplaydisc: 8000,
|
autoplaydisc: 8000,
|
||||||
newstosent: [],
|
newstosent: [],
|
||||||
gallery: [],
|
gallery: [],
|
||||||
@@ -193,6 +194,8 @@ namespace Getters {
|
|||||||
return GlobalStore.state.mailinglist
|
return GlobalStore.state.mailinglist
|
||||||
else if (table === tools.TABMYPAGE)
|
else if (table === tools.TABMYPAGE)
|
||||||
return GlobalStore.state.mypage
|
return GlobalStore.state.mypage
|
||||||
|
else if (table === 'paymenttypes')
|
||||||
|
return GlobalStore.state.paymenttypes
|
||||||
else if (table === 'bookings')
|
else if (table === 'bookings')
|
||||||
return CalendarStore.state.bookedevent
|
return CalendarStore.state.bookedevent
|
||||||
else if (table === 'users')
|
else if (table === 'users')
|
||||||
@@ -391,7 +394,7 @@ namespace Mutations {
|
|||||||
// console.log('myrec', myrec)
|
// console.log('myrec', myrec)
|
||||||
if (myrec) {
|
if (myrec) {
|
||||||
for (const [key, value] of Object.entries(mydata.fieldsvalue)) {
|
for (const [key, value] of Object.entries(mydata.fieldsvalue)) {
|
||||||
console.log('key', value, myrec[key])
|
// console.log('key', value, myrec[key])
|
||||||
myrec[key] = value
|
myrec[key] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -792,6 +795,7 @@ namespace Actions {
|
|||||||
CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : []
|
CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : []
|
||||||
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] : []
|
||||||
|
GlobalStore.state.paymenttypes = (res.data.paymenttypes) ? [...res.data.paymenttypes] : []
|
||||||
GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : []
|
GlobalStore.state.gallery = (res.data.gallery) ? [...res.data.gallery] : []
|
||||||
|
|
||||||
if (showall) {
|
if (showall) {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const DefaultUser: IUserFields = {
|
|||||||
profile: {
|
profile: {
|
||||||
img: ''
|
img: ''
|
||||||
},
|
},
|
||||||
downline: []
|
downline: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DefaultProfile: IUserProfile = {
|
export const DefaultProfile: IUserProfile = {
|
||||||
@@ -45,7 +45,10 @@ export const DefaultProfile: IUserProfile = {
|
|||||||
sex: 0,
|
sex: 0,
|
||||||
country_pay: '',
|
country_pay: '',
|
||||||
email_paypal: '',
|
email_paypal: '',
|
||||||
username_telegram: ''
|
username_telegram: '',
|
||||||
|
teleg_id: 0,
|
||||||
|
teleg_checkcode: 0,
|
||||||
|
paymenttypes: []
|
||||||
}
|
}
|
||||||
|
|
||||||
// State
|
// State
|
||||||
@@ -157,6 +160,12 @@ namespace Getters {
|
|||||||
return mystate.usersList.find((item) => item.username === username)
|
return mystate.usersList.find((item) => item.username === username)
|
||||||
}, 'getUserByUsername')
|
}, '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 => {
|
const getImgByUsername = b.read((mystate: IUserState) => (username): string => {
|
||||||
if (username === '')
|
if (username === '')
|
||||||
return ''
|
return ''
|
||||||
@@ -219,6 +228,9 @@ namespace Getters {
|
|||||||
get getRefLink() {
|
get getRefLink() {
|
||||||
return getRefLink()
|
return getRefLink()
|
||||||
},
|
},
|
||||||
|
get getPaymenttypeById() {
|
||||||
|
return getPaymenttypeById()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -554,7 +566,7 @@ namespace Actions {
|
|||||||
|
|
||||||
const newuser = res.data
|
const newuser = res.data
|
||||||
|
|
||||||
console.log('newuser', newuser)
|
// console.log('newuser', newuser)
|
||||||
|
|
||||||
Mutations.mutations.setServerCode(res.status)
|
Mutations.mutations.setServerCode(res.status)
|
||||||
|
|
||||||
|
|||||||
@@ -151,6 +151,12 @@ const colcontribtype = [
|
|||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const colpaymenttype = [
|
||||||
|
AddCol({ name: 'key', label_trans: 'reg.key' }),
|
||||||
|
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
|
||||||
|
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 }),
|
||||||
@@ -289,29 +295,37 @@ export const fieldsTable = {
|
|||||||
const collab = this.getLabelByTable(col.jointable)
|
const collab = this.getLabelByTable(col.jointable)
|
||||||
|
|
||||||
// console.table(mylist)
|
// console.table(mylist)
|
||||||
// console.log('key=', key, 'collab', collab, 'val', val)
|
let risultato = ''
|
||||||
|
|
||||||
const myris = mylist.find((myrec) => myrec[key] === val)
|
if (tools.isObject(collab)) {
|
||||||
// console.log('myris', myris)
|
risultato = mylist.filter((myrec) => myrec.username === val).map(collab)
|
||||||
if (myris) {
|
|
||||||
return myris[collab]
|
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getMultiValueByTable(col: IColGridTable, arrval) {
|
getMultiValueByTable(col: IColGridTable, arrval) {
|
||||||
|
// console.log('getMultiValueByTable')
|
||||||
if (col.jointable) {
|
if (col.jointable) {
|
||||||
const mylist = this.getTableJoinByName(col.jointable)
|
const mylist = this.getTableJoinByName(col.jointable)
|
||||||
const key = this.getKeyByTable(col.jointable)
|
const key = this.getKeyByTable(col.jointable)
|
||||||
const collab = this.getLabelByTable(col.jointable)
|
const collab = this.getLabelByTable(col.jointable)
|
||||||
|
|
||||||
// console.table(mylist)
|
// 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]))
|
const myris = mylist.filter((myrec) => arrval.includes(myrec[key]))
|
||||||
// console.log('myris', myris)
|
// console.log('myris', myris)
|
||||||
@@ -363,7 +377,10 @@ export const fieldsTable = {
|
|||||||
},
|
},
|
||||||
getTitleByTable(mytable): string {
|
getTitleByTable(mytable): string {
|
||||||
const myrec = this.getrecTableList(mytable)
|
const myrec = this.getrecTableList(mytable)
|
||||||
|
if (!!myrec)
|
||||||
return myrec.label
|
return myrec.label
|
||||||
|
else
|
||||||
|
return ''
|
||||||
},
|
},
|
||||||
getIconByTable(mytable): string {
|
getIconByTable(mytable): string {
|
||||||
const myrec = this.getrecTableList(mytable)
|
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.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.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.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: '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: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||||
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
|
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
|
||||||
@@ -425,6 +444,13 @@ export const fieldsTable = {
|
|||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'label'
|
collabel: 'label'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'paymenttypes',
|
||||||
|
label: 'Tipi di Pagamenti',
|
||||||
|
columns: colpaymenttype,
|
||||||
|
colkey: '_id',
|
||||||
|
collabel: 'label'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'disciplines',
|
value: 'disciplines',
|
||||||
label: 'Discipline',
|
label: 'Discipline',
|
||||||
|
|||||||
Reference in New Issue
Block a user