fix Registrazione data

fix linkref
fix controllo login
fix pagination CGridTableRec
This commit is contained in:
Paolo Arena
2020-01-20 01:50:21 +01:00
parent 6541a3a84e
commit 5153c143dd
33 changed files with 540 additions and 415 deletions

View File

@@ -165,6 +165,7 @@ module.exports = function (ctx) {
'QColor',
'QIcon',
'QList',
'QKnob',
'QItemLabel',
'QItem',
'QCard',

View File

@@ -6,3 +6,33 @@
max-width: 250px;
min-width: 200px;
}
.my-sticky-header-table {
/* max height is important */
/* this is when the loading indicator appears */
}
.my-sticky-header-table .q-table__middle {
max-height: 650px !important;
@media (max-width: 718px) {
// PER VERSIONE MOBILE
max-height: 400px !important;
}
}
.my-sticky-header-table .q-table__top,
.my-sticky-header-table .q-table__bottom,
.my-sticky-header-table thead tr:first-child th {
/* bg color is important for th; just specify one */
background-color: #f0ffff;
}
.my-sticky-header-table thead tr th {
position: sticky;
z-index: 1;
}
.my-sticky-header-table thead tr:first-child th {
top: 0;
}
.my-sticky-header-table.q-table--loading thead tr:last-child th {
/* height of all previous header rows */
top: 48px;
}

View File

@@ -206,7 +206,7 @@ export default class CGridTableRec extends Vue {
const startRow = (page - 1) * rowsPerPage
const endRow = startRow + fetchCount
console.log('startRow', startRow, 'endRow', endRow)
// console.log('startRow', startRow, 'endRow', endRow)
this.serverData = []
@@ -233,7 +233,7 @@ export default class CGridTableRec extends Vue {
this.pagination.sortBy = sortBy
this.pagination.descending = descending
console.log('this.pagination', this.pagination)
// console.log('this.pagination', this.pagination)
// ...and turn of loading indicator
this.loading = false
@@ -350,7 +350,7 @@ export default class CGridTableRec extends Vue {
}
public saveFieldValue(mydata) {
console.log('saveFieldValue', mydata)
// console.log('saveFieldValue', mydata)
// Save on Server
GlobalStore.actions.saveFieldValue(mydata).then((esito) => {
@@ -541,7 +541,7 @@ export default class CGridTableRec extends Vue {
return this.selected.length === 0 ? '' : `${this.selected.length} record${this.selected.length > 1 ? 's' : ''} selected of ${this.serverData.length}`
}
public selectionclick(details) {
console.log('selectionclick this.selected', this.selected, 'details', details)
// console.log('selectionclick this.selected', this.selected, 'details', details)
if (details.added) {
this.rowclicksel = details.rows[0]
this.colclicksel = details.keys[0]

View File

@@ -3,6 +3,9 @@
<q-table
flat
bordered
class="my-sticky-header-table"
:data="serverData"
:columns="mycolumns"
:filter="myfilter"
@@ -176,6 +179,6 @@
<script lang="ts" src="./CGridTableRec.ts">
</script>
<style lang="scss" scoped>
<style lang="scss" >
@import './CGridTableRec.scss';
</style>

View File

@@ -1,12 +1,18 @@
<template>
<div class="clchip">
<div class="row clchip">
<div v-for="(rec, index) in myarrvalues">
<q-chip dense
<q-chip v-if="rec.icon"
dense
:color="rec.color"
text-color="white"
:icon="rec.icon">
{{rec.label}}
</q-chip>
<q-chip dense
:color="rec.color"
text-color="white">
{{rec.label}}
</q-chip>
</div>
</div>
</template>

View File

@@ -77,6 +77,11 @@ export default class CMyFieldDb extends MixinBase {
return '[---]'
else
return fieldsTable.getMultiValueByTable(this.col, val)
} else if (this.col.fieldtype === tools.FieldType.multioption) {
if (val === undefined)
return '[---]'
else
return fieldsTable.getMultiValueByTable(this.col, val)
} else if (this.col.fieldtype === tools.FieldType.password) {
if (val === undefined)
return '[---]'
@@ -115,6 +120,15 @@ export default class CMyFieldDb extends MixinBase {
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey)
}
public savefieldboolean(value) {
if (this.myvalue === undefined)
this.myvalue = 'true'
else
this.myvalue = value
this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey)
}
public selectcountry({name, iso2, dialCode}) {
// console.log(name, iso2, dialCode)
this.myvalue = iso2

View File

@@ -1,231 +1,233 @@
<template>
<div class="text-center">
<div class="row items-center justify-center q-gutter-md q-ma-xs">
<div class="q-ma-xs">
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
<template v-slot:control>
<div class="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
</template>
</q-field>
</div>
<div :class="getclassCol(col) + ` q-ma-sm q-pa-sm col-grow rounded-borders`" style="border: 1px solid #bbb">
<div v-if="type === tools.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
:value.sync="myvalue"
:readonly="false"
:dense="true"
:canEdit="canEdit"
>
</CDateTime>
</div>
<div v-else :class="mycl">
<div v-if="type === 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="type === tools.FieldType.nationality">
<q-input
input-class="cursor-pointer text-center"
:readonly="true"
v-model="countryname"
rounded
dense
debounce="1000"
>
<div class="hidden">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.intcode">
{{ myvalprinted }}
</div>
<div v-else-if="type === 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="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-html="myvalprinted">
</div>
</div>
<div v-else-if="type === tools.FieldType.boolean">
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="savefield"></q-toggle>
</div>
<div v-else>
{{ myvalprinted }}
</div>
<q-popup-edit
v-if="(canEdit && type !== tools.FieldType.boolean) && !disable"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
@save="savefield"
buttons
>
<div v-if="type === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue) }}
</div>
<div v-else-if="type === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="type === 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="type === tools.FieldType.html">
<CMyEditor :value.sync="myvalue" :title="title" @keyup.enter.stop>
</CMyEditor>
</div>
<div v-else-if="type === 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.nationality">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<q-input
v-model="countryname"
:readonly="true"
rounded dense
debounce="1000"
:label="title">
<template v-slot:prepend>
<div style="font-size: 1rem;">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</template>
</q-input>
<div style="height: 180px;">
</div>
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<vue-tel-input
@country-changed="intcode_change"
v-model="myvalue"
:disabledFetchingCountry="true"
:preferredCountries="tools.getprefCountries"
:placeholder="$t('reg.cell')"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>
<div style="height: 180px;">
</div>
</div>
</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"
>
</q-select>
</div>
</q-popup-edit>
</div>
</div>
<div class="text-center">
<div class="row items-center justify-center q-gutter-md q-ma-xs">
<div class="q-ma-xs">
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
<template v-slot:control>
<div class="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
</template>
</q-field>
</div>
<div :class="getclassCol(col) + ` q-ma-sm q-pa-sm col-grow rounded-borders`" style="border: 1px solid #bbb">
<div v-if="type === tools.FieldType.date">
<CDateTime
:label="col.label"
class="cursor-pointer"
:value.sync="myvalue"
:readonly="false"
:dense="true"
:canEdit="canEdit"
>
</CDateTime>
</div>
<div v-else :class="mycl">
<div v-if="type === 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="type === tools.FieldType.nationality">
<q-input
input-class="cursor-pointer text-center"
:readonly="true"
v-model="countryname"
rounded
dense
debounce="1000"
>
<div class="hidden">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.intcode">
{{ myvalprinted }}
</div>
<div v-else-if="((type === tools.FieldType.multiselect) || (type === tools.FieldType.multioption))">
<CMyChipList
:type="type"
: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.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-html="myvalprinted">
</div>
</div>
<div v-else-if="type === tools.FieldType.boolean">
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
@input="savefieldboolean"></q-toggle>
</div>
<div v-else>
{{ myvalprinted }}
</div>
<q-popup-edit
v-if="(canEdit && type !== tools.FieldType.boolean) && !disable"
v-model="myvalue"
:disable="col.disable"
:title="col.title"
@save="savefield"
buttons
>
<div v-if="type === tools.FieldType.boolean">
<q-checkbox v-model="myvalue" :label="col.title">
</q-checkbox>
{{ visuValByType(myvalue) }}
</div>
<div v-else-if="type === tools.FieldType.string">
<q-input v-model="myvalue"
autogrow
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.password">
<q-input v-model="myvalue"
type="password"
@keyup.enter.stop
autofocus>
</q-input>
</div>
<div v-else-if="type === tools.FieldType.number">
<q-input v-model="myvalue" type="number"
autofocus>
</q-input>
</div>
<div v-else-if="type === 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="type === tools.FieldType.html">
<CMyEditor :value.sync="myvalue" :title="title" @keyup.enter.stop>
</CMyEditor>
</div>
<div v-else-if="type === 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.nationality">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<q-input
v-model="countryname"
:readonly="true"
rounded dense
debounce="1000"
:label="title">
<template v-slot:prepend>
<div style="font-size: 1rem;">
<vue-country-code
:defaultCountry="myvalue"
:disabledFetchingCountry="true"
@onSelect="selectcountry"
:preferredCountries="tools.getprefCountries"
:dropdownOptions="{ disabledDialCode: true }">
</vue-country-code>
</div>
</template>
</q-input>
<div style="height: 180px;">
</div>
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
<vue-tel-input
@country-changed="intcode_change"
v-model="myvalue"
:disabledFetchingCountry="true"
:preferredCountries="tools.getprefCountries"
:placeholder="$t('reg.cell')"
:enabledCountryCode="true"
inputClasses="clCell"
wrapperClasses="clCellCode">
</vue-tel-input>
<div style="height: 180px;">
</div>
</div>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
<q-select
v-model="myvalue"
rounded
dense
outlined
multiple
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"
>
</q-select>
</div>
<div v-else-if="col.fieldtype === tools.FieldType.multioption">
</div>
</q-popup-edit>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" src="./CMyFieldDb.ts">
</script>
<style lang="scss" scoped>
@import './CMyFieldDb.scss';
@import './CMyFieldDb.scss';
</style>

View File

@@ -14,7 +14,7 @@ import { CGallery } from '../CGallery'
@Component({
name: 'CMyPopupEdit',
components: {CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery }
components: { CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery }
})
export default class CMyPopupEdit extends Vue {
@@ -28,6 +28,7 @@ export default class CMyPopupEdit extends Vue {
@Prop({ required: false, default: '5' }) public minuteinterval
public myvalue = ''
public myvalueprec = 'false'
public countryname = ''
get tools() {
@@ -41,6 +42,7 @@ export default class CMyPopupEdit extends Vue {
get db_fieldsTable() {
return fieldsTable
}
public changeval(newval) {
this.$emit('update:row', newval)
}
@@ -50,6 +52,7 @@ export default class CMyPopupEdit extends Vue {
}
public mounted() {
// console.log('mounted')
if ((this.subfield !== '') && (this.subfield !== '')) {
if (this.row[this.field] === undefined) {
this.row[this.field] = {}
@@ -63,6 +66,10 @@ export default class CMyPopupEdit extends Vue {
else
this.myvalue = this.row
}
this.myvalueprec = this.myvalue
// console.log('this.myvalueprec', this.myvalueprec)
}
public OpenEdit() {
@@ -70,9 +77,29 @@ export default class CMyPopupEdit extends Vue {
this.$emit('show')
}
public getval() {
let myval = 'false'
if ((this.subfield !== '') && (this.subfield !== '')) {
if (this.row[this.field] === undefined) {
this.row[this.field] = {}
myval = ''
} else {
myval = this.row[this.field][this.subfield]
}
} else {
if (this.field !== '')
myval = this.row[this.field]
else
myval = this.row
}
return myval
}
public SaveValueInt(newVal, valinitial) {
console.log('SaveValueInt', newVal, valinitial)
// console.log('SaveValueInt', newVal, valinitial)
// Update value in table memory
if (this.subfield !== '') {
@@ -91,6 +118,16 @@ export default class CMyPopupEdit extends Vue {
public Savedb(newVal, valinitial) {
if (this.col.fieldtype === tools.FieldType.boolean) {
// console.log('this.myvalue', this.myvalue, newVal, this.myvalueprec)
if (this.myvalueprec === undefined) {
newVal = true
this.myvalueprec = this.myvalue
this.myvalue = newVal
}
// console.log('DOPO this.myvalue', this.myvalue, newVal, this.myvalueprec)
}
// console.log('Savedb', newVal)
this.$emit('showandsave', this.row, this.col, newVal, valinitial)
@@ -171,13 +208,15 @@ export default class CMyPopupEdit extends Vue {
}
public selectcountry({name, iso2, dialCode}) {
public selectcountry({ name, iso2, dialCode }) {
// console.log(name, iso2, dialCode)
this.myvalueprec = this.myvalue
this.myvalue = iso2
this.countryname = name
}
public intcode_change(coderec) {
this.myvalueprec = this.myvalue
this.myvalue = '+' + coderec.dialCode
}

View File

@@ -38,7 +38,7 @@
</q-input>
<div class="text-center" style="margin-bottom: 10px;">
<a :href="getlinkforgetpwd" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
<a :href="getlinkforgetpwd()" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
</div>

View File

@@ -53,7 +53,6 @@ export default class CSignUp extends MixinBase {
terms: !process.env.PROD,
profile: DefaultProfile,
aportador_solidario: '',
already_registered: false
}
public created() {

View File

@@ -8,7 +8,7 @@
@click="myvisible = !myvisible"
>
<template v-slot:avatar>
<q-icon v-if="canopen" :name="icon" color="white"/>
<q-icon v-if="canopen && icon" :name="icon" color="white"/>
</template>
<template v-slot:action>
<div class="cursor-pointer">

View File

@@ -49,7 +49,7 @@ export default class FormNewsletter extends MixinBase {
return await Api.SendReq('/news/signup', 'POST', usertosend, false)
.then((res) => {
console.log('res', res)
// console.log('res', res)
if (res.data.code === serv_constants.RIS_SUBSCRIBED_OK) {
this.$q.notify({
color: 'green-4',

View File

@@ -234,10 +234,6 @@ canvas {
content: url('../../statics/icons/flag_it.svg');
}
.fa-flag-it:before {
content: url('../../statics/icons/flag_it.svg');
}
.clIconOnline {
color: white;
}

View File

@@ -346,7 +346,7 @@ export default class Header extends Vue {
}
public loginOk() {
tools.loginOk(this, false)
tools.loginOk(this, true)
}
public loginInCorso() {

View File

@@ -40,3 +40,6 @@ export * from './CTitleBanner'
export * from './CGallery'
export * from './CProfile'
export * from './CStatus'
export * from './CStatusReg'
export * from './CCardState'
export * from './CMyInnerPage'

View File

@@ -115,10 +115,6 @@
}
.q-item {
min-height: 20px;
}
.imgicon img {
font-size: 2.5rem !important;
border-radius: 8px;

View File

@@ -62,6 +62,7 @@ export interface IMyPage {
content?: string
active?: boolean
inmenu?: boolean
onlyif_logged?: boolean
submenu?: boolean
l_par?: number,
l_child?: number,
@@ -186,6 +187,7 @@ export interface IListRoutes {
infooter?: boolean
submenu?: boolean
onlyAdmin?: boolean
onlyif_logged?: boolean
onlyManager?: boolean
extraclass?: string
meta?: any

View File

@@ -19,8 +19,10 @@ export interface IUserProfile {
username_telegram?: string
teleg_id?: number
teleg_checkcode?: number
my_dream?: string
paymenttypes?: IPaymentType[]
manage_telegram?: boolean
saw_zoom_presentation?: boolean
}
export interface IPaymentType {
@@ -28,6 +30,11 @@ export interface IPaymentType {
label: string
}
export interface ICalcStat {
numinvitati?: number
numinvitati_attivi?: number
}
export interface IUserFields {
_id?: string
email?: string
@@ -38,11 +45,13 @@ export interface IUserFields {
ipaddr?: string
perm?: number
verified_email?: boolean
date_temp_reg?: Date
made_gift?: boolean
tokens?: IToken[]
lasttimeonline?: Date
profile?: IUserProfile
downline?: IUserFields[]
calcstat?: ICalcStat
}
/*

View File

@@ -1,4 +1,5 @@
export * from './UserStore'
export * from './NotevoleStore'
export * from './MessageStore'
export * from './GlobalStore'
export * from './signin-option'

View File

@@ -11,5 +11,5 @@ export interface ISignupOptions {
terms?: boolean
aportador_solidario?: string
profile?: IUserProfile
already_registered: boolean
// already_registered: boolean
}

View File

@@ -110,7 +110,7 @@ export default class Newsletter extends MixinBase {
if (this.newsstate.nextnewstosent)
this.eseguipolling = this.eseguipolling || true
console.log('this.eseguipolling', this.eseguipolling)
// console.log('this.eseguipolling', this.eseguipolling)
this.myloadingload = false
this.checkifpolling()

View File

@@ -3,7 +3,7 @@
<CGridTableRec prop_mytable="users"
prop_mytitle="Lista Utenti"
:prop_mycolumns="db_fieldsTable.colTableUsers"
prop_colkey="userId"
prop_colkey="_id"
nodataLabel="Nessun Utente"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
@@ -16,3 +16,5 @@
<style lang="scss" scoped>
@import './usersList.scss';
</style>

View File

@@ -37,6 +37,26 @@ const msgglobal = {
sendmsg: {
write: 'scrive'
},
steps: {
paymenttype: 'Modalità di Pagamento',
paymenttype_long: 'Scegliere almeno 2 Modalità di Pagamento, per permettere alle persone di poter scegliere come inviare il dono.',
zoom: 'Partecipo agli Zoom (Video Conferenza)',
zoom_long: 'Si richiede di oartecipare ad almeno 1 Zoom, ma è consigliato prendere parte al movimento in maniera più attiva.',
sharemovement: 'Condivido il Movimento',
sharemovement_long: 'Condivido il Movimento con almeno 2 amici e li guido alla registrazione e agli zoom',
enter_prog: 'Entro in Programmazione',
enter_prog_long: 'Entro in programmazione, e vengo aggiunto al Mandala, ed entro così nella chat corrispondente.',
collaborate: 'Collaborazione',
collaborate_long: 'Continuo a collaborare con il miei compagni, per arrivare al giorno della programmazione dove si attiverà il mio Mandala',
dream: 'Scrivi il tuo Sogno',
dream_long: 'Scrivi qui il tuo Sogno che vuoi realizzare!',
dono: 'Dono',
dono_long: 'Faccio il mio dono al proprietario della Bigliettera',
support: 'Sostengo il movimento',
support_long: 'Continuo a sostenere il movimento partecipando attivamente! Organizzando zoom e partecipando, sostenendo, informando, aiutando e diffondendo',
ricevo_dono: 'Ricevo il mio dono e CELEBRO',
ricevo_dono_long: 'Evviva!!!<br><strong>QUESTO MOVIMENTO È REALE E POSSIBILE SE LO FACCIAMO FUNZIONARE TUTTI, INSIEME !</strong>',
},
dialog: {
close: 'Chiudi',
copyclipboard: 'Copiato negli appunti',
@@ -49,6 +69,9 @@ const msgglobal = {
add: 'Aggiungi',
today: 'Oggi',
book: 'Prenota',
avanti: 'Avanti',
indietro: 'Indietro',
finish:'Fine',
sendmsg: 'Invia Messaggio',
sendonlymsg: 'Invia solo un Msg',
msg: {
@@ -72,6 +95,11 @@ const msgglobal = {
},
components: {
authentication: {
telegram: {
open: 'Clicca qui per aprire il BOT Telegram e segui le istruzioni',
ifclose: 'Se non si apre oppure l\'avevi chiuso: cerca \'AYNI BOT\' nella ricerca di Telegram e premi Start',
openbot: 'Apri BOT Telegram',
},
login: {
facebook: 'Facebook'
},
@@ -83,7 +111,7 @@ const msgglobal = {
verify_email: 'Verifica la tua email',
go_login: 'Torna al Login',
incorrect_input: 'Inserimento incorretto.',
link_sent: 'Ora leggi la tua email e conferma la registrazione',
link_sent: 'leggi la tua casella email e trova "Confermare la Registrazione a Ayni" e clicca su "Verifica Registrazione"',
title_unsubscribe: 'Disiscrizione alla newsletter',
title_unsubscribe_done: 'Disiscrizione completata correttamente',
}
@@ -114,8 +142,8 @@ const msgglobal = {
aportador_solidario: 'Chi ti ha Invitato',
aportador_solidario_nome_completo:'A.S. Nome',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Mi sono già Iscritto sulla Chat Notevole, prima del 13 Gennaio',
reflink: 'Link da condividere ai tuoi amici:',
already_registered: 'Mi sono già Iscritto sulla Chat Ayni, prima del 13 Gennaio',
reflink: 'Link da condividere:',
page_title: 'Registrazione',
made_gift: 'Dono',
incorso: 'Registrazione in corso...',
@@ -123,14 +151,19 @@ const msgglobal = {
email: 'Email',
intcode_cell: 'Prefisso Int.',
cell: 'Cellulare Telegram',
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
nationality: 'Nazionalità',
email_paypal: 'Email Paypal',
country_pay: 'Paese di Destinazione Pagamenti',
username_telegram: 'Username Telegram',
teleg_id: 'Telegram ID',
teleg_auth:'Codice Autorizzazione',
teleg_checkcode: 'Codice Telegram',
my_dream: 'Il mio Sogno',
saw_zoom_presentation: 'Ha visto Zoom',
manage_telegram: 'Gestori Telegram',
paymenttype: 'Modalità di Pagamenti Disponbili',
selected:'Selezionati',
img: 'Immagine',
date_reg: 'Data Reg.',
perm: 'Permessi',
@@ -157,8 +190,10 @@ const msgglobal = {
notmore: 'non dev\'essere lungo più di',
char: 'caratteri',
terms: 'Devi accettare le condizioni, per continuare.',
email_not_exist: 'l\'Email non è presente in archivio, verificare se è corretta',
duplicate_email: 'l\'Email è già stata registrata',
user_extralist_not_found: 'Utente in archivio non trovato, inserire il Nome, Cognome e numero di cellulare inviato in precedenza',
user_not_this_aportador: 'Stai utilizzando un link di una persona diversa dal tuo invitato originale.',
duplicate_username: 'L\'Username è stato già utilizzato',
aportador_not_exist: 'L\'Username di chi ti ha invitato non è presente. Contattaci.',
sameaspassword: 'Le password devono essere identiche',
@@ -437,6 +472,9 @@ const msgglobal = {
add: 'Aggrega',
today: 'Hoy',
book: 'Reserva',
avanti: 'Adelante',
indietro: 'Regresar',
finish:'Final',
sendmsg: 'Envia Mensaje',
sendonlymsg: 'Envia solo Mensaje',
msg: {
@@ -460,6 +498,10 @@ const msgglobal = {
},
components: {
authentication: {
telegram: {
open: 'Haga clic aquí para abrir el BOT Telegram y siga las instrucciones.',
openbot: 'Abres BOT Telegram',
},
login: {
facebook: 'Facebook'
},
@@ -502,7 +544,7 @@ const msgglobal = {
aportador_solidario: 'Aportador Solidario',
aportador_solidario_nome_completo:'A.S. Nombre',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Ya me he registrado en el chat Notevole',
already_registered: 'Ya me he registrado en el chat Ayni',
reflink: 'Enlaces para compartir con tus amigos:',
page_title: 'Registro',
made_gift: 'Don',
@@ -511,13 +553,18 @@ const msgglobal = {
email: 'Email',
intcode_cell: 'Prefijo Int.',
cell: 'Móvil Telegram',
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
nationality: 'Nacionalidad',
email_paypal: 'Email Paypal',
country_pay: 'País del Pagos de destino',
username_telegram: 'Usuario Telegram',
teleg_id: 'Telegram ID',
teleg_auth:'Código de autorización',
paymenttype: 'Métodos de pago disponibles',
teleg_checkcode: 'Codice Telegram',
selected:'seleccionado',
teleg_checkcode: 'Codigo Telegram',
my_dream: 'Mi Sueño',
saw_zoom_presentation: 'Ha visto Zoom',
manage_telegram: 'Gestori Telegram',
img: 'File image',
date_reg: 'Fecha Reg.',
@@ -545,6 +592,7 @@ const msgglobal = {
notmore: 'no tiene que ser más largo que',
char: 'caracteres',
terms: 'Debes aceptar las condiciones, para continuar..',
email_not_exist: 'El correo electrónico no está presente en el archivo, verifique si es correcto',
duplicate_email: 'La email ya ha sido registrada',
user_extralist_not_found: 'Usuario en el archivo no encontrado, inserte el nombre, apellido y número de teléfono enviado previamente',
duplicate_username: 'El nombre de usuario ya ha sido utilizado',
@@ -816,6 +864,9 @@ const msgglobal = {
cancel: 'annuler',
today: 'Aujourd\'hui',
book: 'Réserve',
avanti: 'Allez-y',
indietro: 'en arrière',
finish:'Fin',
sendmsg: 'envoyer msg',
sendonlymsg: 'envoyer seul un msg',
msg: {
@@ -839,6 +890,10 @@ const msgglobal = {
},
components: {
authentication: {
telegram: {
open: 'Cliquez ici pour ouvrir le télégramme BOT et suivez les instructions',
openbot: 'Ouvre BOT Telegram',
},
login: {
facebook: 'Facebook'
},
@@ -881,7 +936,7 @@ const msgglobal = {
aportador_solidario: 'Contributeur de solidarité',
aportador_solidario_nome_completo:'A.S. Nom',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'Je me suis déjà inscrit sur le chat Notevole',
already_registered: 'Je me suis déjà inscrit sur le chat Ayni',
reflink: 'Liens à partager avec vos amis:',
incorso: 'Inscription en cours...',
made_gift: 'Doné',
@@ -889,13 +944,18 @@ const msgglobal = {
email: 'Email',
intcode_cell: 'Préfixe int.',
cell: 'Téléphone Telegram',
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
nationality: 'Nationalité',
email_paypal: 'Email Paypal',
country_pay: 'Pays de destination Paiements',
username_telegram: 'Nom d\'utilisateur du Telegram',
teleg_id: 'Telegram ID',
teleg_auth:'Code d\'autorisation',
paymenttype: 'Méthodes de paiement disponibles',
selected:'sélectionné',
teleg_checkcode: 'Codice Telegram',
my_dream: 'Mon rêve',
saw_zoom_presentation: 'Ha visto Zoom',
manage_telegram: 'Gestori Telegram',
img: 'Fichier image',
date_reg: 'Date Inscript.',
@@ -923,6 +983,7 @@ const msgglobal = {
notmore: 'il ne doit pas être plus long que',
char: 'caractères',
terms: 'Vous devez accepter les conditions, pour continuer..',
email_not_exist: 'L\'email n\'est pas présent dans l\'archive, vérifiez s\'il est correct',
duplicate_email: 'L\'email a déjà été enregistré',
user_extralist_not_found: 'Utilisateur dans les archives introuvable, insérez le nom, le prénom et le numéro de téléphone portable envoyés précédemment',
duplicate_username: 'Le nom d\'utilisateur a déjà été utilisé',
@@ -1194,6 +1255,9 @@ const msgglobal = {
cancel: 'Cancel',
today: 'Today',
book: 'Book',
avanti: 'Continue',
indietro: 'Back',
finish:'Finish',
sendmsg: 'Send Message',
sendonlymsg: 'Send only a Msg',
msg: {
@@ -1217,6 +1281,10 @@ const msgglobal = {
},
components: {
authentication: {
telegram: {
open: 'Click here to open the BOT Telegram and follow the instructions',
openbot: 'Open BOT Telegram',
},
login: {
facebook: 'Facebook'
},
@@ -1259,7 +1327,7 @@ const msgglobal = {
aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Notevole Chat',
already_registered: 'I have already registered on the Ayni Chat',
reflink: 'Links to share to your friends:',
incorso: 'Registration please wait...',
made_gift: 'Donated',
@@ -1267,13 +1335,18 @@ const msgglobal = {
email: 'Email',
intcode_cell: 'International Code',
cell: 'Mobile Telegram',
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
nationality: 'Nationality',
email_paypal: 'Email Paypal',
country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
teleg_id: 'Telegram ID',
teleg_auth:'Authorization Code',
paymenttype: 'Available Payment Methods',
selected:'Selezionati',
teleg_checkcode: 'Codice Telegram',
my_dream: 'My Dream',
saw_zoom_presentation: 'Ha visto Zoom',
manage_telegram: 'Gestori Telegram',
img: 'File Image',
date_reg: 'Reg. Date',
@@ -1301,6 +1374,7 @@ const msgglobal = {
notmore: 'must not be more than',
char: 'characters long',
terms: 'You need to agree with the terms & conditions.',
email_not_exist: 'Email is not present in the archive, check if it is correct',
duplicate_email: 'Email was already registered',
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
duplicate_username: 'Username is already taken',
@@ -1571,6 +1645,9 @@ const msgglobal = {
cancel: 'Cancel',
today: 'Today',
book: 'Book',
avanti: 'Avanti',
indietro: 'Indietro',
finish:'Fine',
sendmsg: 'Send Message',
sendonlymsg: 'Send only a Msg',
msg: {
@@ -1594,6 +1671,10 @@ const msgglobal = {
},
components: {
authentication: {
telegram: {
open: 'Click here to open the BOT Telegram and follow the instructions',
openbot: 'Open BOT Telegram',
},
login: {
facebook: 'Facebook'
},
@@ -1636,7 +1717,7 @@ const msgglobal = {
aportador_solidario: 'Solidarity Contributor',
aportador_solidario_nome_completo:'A.S. Name',
aportador_solidario_ind_order:'A.S.Ind',
already_registered: 'I have already registered on the Notevole Chat',
already_registered: 'I have already registered on the Ayni Chat',
reflink: 'Links to share to your friends:',
page_title: 'Registration',
made_gift: 'Donated',
@@ -1645,13 +1726,18 @@ const msgglobal = {
email: 'Email',
intcode_cell: 'International Code',
cell: 'Mobile Telegram',
cellreg: 'Cellulare con cui ti eri registrato sulla Chat Notevole',
nationality: 'Nationality',
email_paypal: 'Email Paypal',
country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
teleg_id: 'Telegram ID',
teleg_auth:'Authorization Code',
paymenttype: 'Available Payment Methods',
selected:'Selected',
teleg_checkcode: 'Codice Telegram',
my_dream: 'My Dream',
saw_zoom_presentation: 'Ha visto Zoom',
manage_telegram: 'Gestori Telegram',
img: 'File Image',
date_reg: 'Reg. Date',
@@ -1679,6 +1765,7 @@ const msgglobal = {
notmore: 'must not be more than',
char: 'characters long',
terms: 'You need to agree with the terms & conditions.',
email_not_exist: 'Email is not present in the archive, check if it is correct',
duplicate_email: 'Email was already registered',
user_extralist_not_found: 'User in archive not found, insert the Name, Surname and mobile phone sent previously',
duplicate_username: 'Username is already taken',

View File

@@ -613,12 +613,20 @@ namespace Actions {
}
async function loadAfterLogin(context) {
// console.log('loadAfterLogin')
console.log('loadAfterLogin')
actions.clearDataAfterLoginOnlyIfActiveConnection()
await Actions.actions.loadSite()
let isok = false
if (!await Actions.actions.loadSite()) {
this.$router.push('/signin')
} else {
isok = true
}
state.arrConfig = await globalroutines(null, 'readall', 'config', null)
return isok
}
async function saveCfgServerKey(context, dataval: ICfgServer) {
@@ -806,21 +814,34 @@ namespace Actions {
GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : []
}
console.log('res.data.myuser', res.data.myuser)
if (res.data.myuser) {
UserStore.mutations.authUser(res.data.myuser)
UserStore.mutations.updateLocalStorage(res.data.myuser)
} else {
// User not exist !!
}
const islogged = localStorage.getItem(tools.localStorage.username)
console.log('islogged', islogged)
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
if (res.data.myuser === null && UserStore.state.isLogged) {
// Fai Logout
UserStore.actions.logout()
GlobalStore.state.RightDrawerOpen = true
if (res.data.myuser === null) {
if (islogged) {
// Fai Logout
console.log('Fai Logout', 'islogged', islogged)
UserStore.actions.logout()
GlobalStore.state.RightDrawerOpen = true
return false
}
}
}
return true
})
.catch((error) => {
console.log('error dbLoad', error)
@@ -858,6 +879,7 @@ namespace Actions {
component: () => import('@/root/mypage/mypage.vue'),
inmenu: page.inmenu,
infooter: page.infooter,
onlyif_logged: page.onlyif_logged,
level_child: page.l_child,
level_parent: page.l_par,
})

View File

@@ -96,7 +96,7 @@ namespace Actions {
return await Api.SendReq(`/sendmsg/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
.then((res) => {
console.log('res', res)
// console.log('res', res)
if (res.status === 200) {
setMsg(res.data.arrmsg, username)
return true
@@ -130,7 +130,7 @@ namespace Actions {
return await Api.SendReq('/sendmsg', 'POST', data)
.then((res) => {
console.log('res', res)
// console.log('res', res)
if (res.status === 200) {
if (res.data.code === serv_constants.RIS_CODE_OK) {
data._id = res.data.id

View File

@@ -1,5 +1,5 @@
import Api from '@api'
import { ISignupOptions, ISigninOptions, IUserState, IUserFields, IUserProfile } from 'model'
import { ISignupOptions, ISigninOptions, IUserState, IUserFields, IUserProfile, ICalcStat } from 'model'
import { ILinkReg, IResult, IIdToken, IToken } from 'model/other'
import { storeBuilder } from './Store/Store'
import router from '@router'
@@ -20,6 +20,11 @@ import { shared_consts } from '../../common/shared_vuejs'
const bcrypt = require('bcryptjs')
export const DefaultCalc: ICalcStat = {
numinvitati: 0,
numinvitati_attivi: 0,
}
export const DefaultUser: IUserFields = {
_id: '',
email: '',
@@ -34,6 +39,7 @@ export const DefaultUser: IUserFields = {
img: ''
},
downline: [],
calcstat: DefaultCalc
}
export const DefaultProfile: IUserProfile = {
@@ -48,7 +54,9 @@ export const DefaultProfile: IUserProfile = {
username_telegram: '',
teleg_id: 0,
teleg_checkcode: 0,
my_dream: '',
manage_telegram: false,
saw_zoom_presentation: false,
paymenttypes: []
}
@@ -187,7 +195,7 @@ namespace Getters {
}, 'getRefLink')
const isVerificato = b.read((mystate: IUserState) => {
const teleg_ok = mystate.my.profile.teleg_id > 0
const teleg_ok = mystate.my.profile.teleg_id > 0 && mystate.my.verified_email
return teleg_ok
}, 'isVerificato')
@@ -352,19 +360,17 @@ namespace Mutations {
}
function clearAuthData(mystate: IUserState) {
mystate.my._id = ''
mystate.my.username = ''
mystate.my.name = ''
mystate.my.surname = ''
resetArrToken(mystate.my.tokens)
mystate.my.verified_email = false
mystate.my.made_gift = false
mystate.my = DefaultUser
// resetArrToken(mystate.my.tokens)
mystate.categorySel = 'personal'
mystate.servercode = 0
mystate.resStatus = 0
mystate.isLogged = false
mystate.x_auth_token = ''
return true
}
function setErrorCatch(mystate: IUserState, axerr: Types.AxiosError) {
@@ -449,10 +455,10 @@ namespace Actions {
}
async function requestpwd(context, paramquery: IUserState) {
async function requestpwd(context, paramquery) {
const usertosend = {
email: paramquery.my.email
email: paramquery.email
}
console.log(usertosend)
@@ -536,7 +542,7 @@ namespace Actions {
return await Api.SendReq('/news/load', 'POST', paramquery)
.then((res) => {
console.log('res', res)
// console.log('res', res)
return res.data
}).catch((error) => {
return null
@@ -547,7 +553,7 @@ namespace Actions {
return await Api.SendReq('/news/setactivate', 'POST', paramquery)
.then((res) => {
console.log('res', res)
// console.log('res', res)
return res.data
}).catch((error) => {
return null
@@ -750,7 +756,7 @@ namespace Actions {
.then((res) => {
console.log(res)
}).then(() => {
Mutations.mutations.clearAuthData()
return Mutations.mutations.clearAuthData()
}).catch((error) => {
UserStore.mutations.setErrorCatch(error)
return UserStore.getters.getServerCode
@@ -762,7 +768,7 @@ namespace Actions {
}
async function setGlobal(isLogged: boolean) {
console.log('setGlobal')
console.log('setGlobal', isLogged)
try {
// state.isLogged = true
if (isLogged) {
@@ -774,9 +780,9 @@ namespace Actions {
GlobalStore.actions.checkUpdates()
}
const p3 = await GlobalStore.actions.loadAfterLogin()
const isok = await GlobalStore.actions.loadAfterLogin()
state.isLogged = isLogged
state.isLogged = isok && isLogged
if (static_data.functionality.ENABLE_TODOS_LOADING)
await Todos.actions.dbLoad({ checkPending: true })
@@ -830,7 +836,7 @@ namespace Actions {
GlobalStore.state.wasAlreadySubOnDb = localStorage.getItem(tools.localStorage.wasAlreadySubOnDb) === 'true'
// console.log('************* autologin _id', _id)
console.log('************* autologin _id', _id)
UserStore.mutations.setAuth(token)

View File

@@ -84,6 +84,7 @@ export const colmypage = [
AddCol({ name: 'keywords', label_trans: 'pages.keywords' }),
AddCol({ name: 'description', label_trans: 'pages.description' }),
AddCol({ name: 'heightimg', label_trans: 'pages.heightimg', fieldtype: tools.FieldType.number }),
AddCol({ name: 'onlyif_logged', label_trans: 'pages.onlyif_logged', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'imgback', label_trans: 'pages.imgback', fieldtype: tools.FieldType.string }),
AddCol({ name: 'content', label_trans: 'pages.content', fieldtype: tools.FieldType.html }),
AddCol({ name: 'active', label_trans: 'pages.active', fieldtype: tools.FieldType.boolean }),
@@ -402,6 +403,8 @@ export const fieldsTable = {
AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }),
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'profile.saw_zoom_presentation', field: 'profile', subfield: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'profile.my_dream', field: 'profile', subfield: 'my_dream', label_trans: 'reg.my_dream' }),
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell', fieldtype: tools.FieldType.intcode }),
AddCol({ name: 'profile.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
@@ -429,6 +432,7 @@ export const fieldsTable = {
AddCol({ name: 'name_complete', label_trans: 'reg.name_complete' }),
AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'num_invitati', label_trans: 'reg.num_invitati', fieldtype: tools.FieldType.number }),
AddCol({ name: 'is_in_whatsapp', label_trans: 'reg.is_in_whatsapp', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'is_in_telegram', label_trans: 'reg.is_in_telegram', fieldtype: tools.FieldType.boolean }),

View File

@@ -1,6 +1,7 @@
export {storeBuilder} from './Store/Store'
export {default as GlobalStore} from './GlobalStore'
export {default as UserStore} from './UserStore'
export {default as NotevoleStore} from './NotevoleStore'
export {default as MessageStore} from './MessageStore'
export {default as Todos} from './Todos'
export {default as Projects} from './Projects'

View File

@@ -6,10 +6,12 @@ export const serv_constants = {
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
RIS_CODE_EMAIL_VERIFIED: 1,
RIS_CODE_USER_NOT_THIS_APORTADOR: -75,
RIS_CODE_USER_EXTRALIST_NOTFOUND: -70,
RIS_CODE_USERNAME_ALREADY_EXIST: -60,
RIS_CODE_EMAIL_ALREADY_EXIST: -50,
RIS_CODE_EMAIL_NOT_SENT: -40,
RIS_CODE_EMAIL_NOT_EXIST: -45,
RIS_CODE_ERR_UNAUTHORIZED: -30,
RIS_CODE_LOGIN_ERR_GENERIC: -20,

View File

@@ -149,6 +149,7 @@ export const tools = {
image: 2048,
nationality: 4096,
intcode: 5000,
multioption: 6000,
},
FieldTypeArr: [
@@ -1393,6 +1394,11 @@ export const tools = {
let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|| ((!elem.onlyAdmin) && (!elem.onlyManager))) && elem.active
if (!tools.isLoggedToSystem()) {
if (elem.onlyif_logged)
visu = false
}
if (elem.meta && elem.meta.requiresAuth) {
visu = visu && tools.isLoggedToSystem()
}
@@ -1455,11 +1461,11 @@ export const tools = {
cancel: true,
persistent: false
}).onOk(() => {
console.log('OK')
// console.log('OK')
tools.executefunc(myself, table, funcok, par)
return true
}).onCancel(() => {
console.log('CANCEL')
// console.log('CANCEL')
tools.executefunc(myself, table, funccancel, par)
return false
})
@@ -1969,6 +1975,21 @@ export const tools = {
}
,
firstchars_onedot(value, numchars = 200) {
if (!value) {
return ''
}
try {
let mycar = value.substring(0, numchars)
if (value.length > numchars)
mycar += '.'
return mycar
} catch (e) {
return value
}
}
,
getDateNow() {
const mydate = new Date()
return mydate
@@ -2524,9 +2545,9 @@ export const tools = {
// console.log('loginInCorso')
let msg = mythis.$t('login.incorso')
if (process.env.DEBUG) {
msg += ' ' + process.env.MONGODB_HOST
}
// if (process.env.DEBUG) {
// msg += ' ' + process.env.MONGODB_HOST
// }
mythis.$q.loading.show({ message: msg })
}
,
@@ -2596,6 +2617,9 @@ export const tools = {
} else if (riscode === serv_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND) {
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_extralist_not_found'))
} else if (riscode === serv_constants.RIS_CODE_USER_NOT_THIS_APORTADOR) {
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_not_this_aportador'))
} else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) {
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username'))
@@ -2607,7 +2631,7 @@ export const tools = {
} else if (riscode === tools.OK) {
mythis.$router.push('/signin')
tools.showNotif(mythis.$q, mythis.$t('components.authentication.email_verification.link_sent'), {
color: 'info',
color: 'green',
textColor: 'black'
})
} else {
@@ -2655,7 +2679,7 @@ export const tools = {
}
,
ActionRecTable(mythis, action, table, id, item, askaction) {
console.log('ActionRecTable', id)
// console.log('ActionRecTable', id)
return tools.askConfirm(mythis.$q, 'Action', translate(askaction) + '?', translate('dialog.yes'), translate('dialog.no'), mythis, table, action, 0, {
param1: id,
param2: item
@@ -2722,7 +2746,7 @@ export const tools = {
},
getheightbywidth(mythis, mywidth, myheight, maxwidth) {
console.log('getheightbywidth')
// console.log('getheightbywidth')
const myw = this.getwidthscale(mythis, mywidth, maxwidth)
return myw * (myheight / mywidth)
},

View File

@@ -1,123 +0,0 @@
<template>
<div class="mypanel">
<div v-if="!emailinviata">
<q-banner
rounded
class="bg-primary text-white"
style="text-align: center;">
<span class="mybanner">{{ $t('reset.title_reset_pwd')}}</span>
</q-banner>
<br>
<q-field
:error="$v.form.email.$error"
:error-label="`${errorMsg('email', $v.form.email)}`"
>
<q-input
v-model="form.email"
autocomplete="email"
@change="val => { form.email = val }"
:before="[{icon: 'mail', handler () {}}]"
@blur="$v.form.email.$touch"
:error="$v.form.email.$error"
:float-label="$t('reg.email')"
/>
</q-field>
<div align="center">
<q-btn rounded size="lg" color="primary" @click="submit" :disable="$v.$error">
{{$t('login.send_reset_pwd')}}
</q-btn>
</div>
</div>
<div v-else>
<q-banner
rounded
class="bg-primary text-white"
style="text-align: center;">
<span class="mybanner">{{ $t('reset.email_sent')}}</span>
</q-banner>
<br>
<div>
{{ $t('reset.check_email')}}
</div>
</div>
</div>
</template>
<script lang="ts" >
import {mapActions} from 'vuex'
import * as types from '../../store/mutation-types'
import {serv_constants} from '../../store/Modules/serv_constants'
import Vue from 'vue'
import { email, required } from "vuelidate/lib/validators"
import { UserStore } from "../../store/Modules";
import { IUserFields, IUserState } from "../../model"
import { tools } from "../../store/Modules/tools";
import { toolsext } from '@src/store/Modules/toolsext'
export default class RequestResetPwd extends Vue{
emailsent = false
form: IUserFields = {
email: '',
tokenforgot: ''
}
created() {
// this.load();
}
get emailinviata() {
return this.emailsent
}
// validations: {
// form: {
// email: {
// required, email,
// },
// }
// },
submit() {
this.$v.form.$touch()
if (this.$v.form.$error) {
tools.showNotif(this.$q, this.$t('reg.err.errore_generico'))
return
}
this.$q.loading.show({message: this.$t('reset.incorso')})
this.form.tokenforgot = ''
console.log(this.form);
UserStore.actions.requestpwd(this.form)
.then((ris) => {
if (ris.code === serv_constants.RIS_CODE_OK)
this.emailsent = true
this.$q.loading.hide()
}).catch(err => {
console.log("ERROR = " + err.error)
this.$q.loading.hide()
});
}
})
</script>
<style scoped>
.mypanel {
padding: 10px;
margin: 10px;
}
</style>

View File

@@ -70,7 +70,6 @@
import { serv_constants } from '../../store/Modules/serv_constants'
import Vue from 'vue'
import { required } from "vuelidate/lib/validators"
import { UserStore } from "../../store/Modules";

View File

@@ -50,7 +50,7 @@ export default class Vreg extends Vue {
if (this.verificatook) {
setTimeout(() => {
this.$router.replace('/signin')
}, 3000)
}, 2000)
}
}).catch((err) => {