- Nuovi Passi da completare: Leggere le Linee Guida e accettare le condizioni

- Aggiunti i Video e confermare di averli visti
 - In "La tua Lavagna" sono stati aggiunti come requisiti: (Accetto le Linee Guida e Vedo il Video di AYNI)
 - Aggiunto bottone "Invita Persone": apre la pagina dove c'è il messaggio da inviare alle persone.
 - La nuova pagina di registrazione https://test.gifteconomy.app/signup/paoloar77, comprende ora il testo delle Linee Guida + i Video, ed in fondo i campi per registrarsi.
This commit is contained in:
Paolo Arena
2020-02-07 22:08:01 +01:00
parent b15edbe5d2
commit 7d8c130ce6
27 changed files with 714 additions and 321 deletions

View File

@@ -207,8 +207,6 @@ namespace Getters {
return MessageStore.state.last_msgs
else if (table === 'settings')
return UserStore.state.settings
else if (table === 'permissions')
return UserStore.state.permissionsList
else
return null
@@ -665,10 +663,6 @@ namespace Actions {
UserStore.mutations.setusersList(res.data.usersList)
}
if (res.data.permissionsList) {
UserStore.state.permissionsList = res.data.permissionsList
}
if (res.data.last_msgs) {
MessageStore.state.last_msgs = [...res.data.last_msgs]
}

View File

@@ -40,6 +40,7 @@ export const DefaultUser: IUserFields = {
img: '',
teleg_id: 0,
saw_zoom_presentation: false,
saw_and_accepted: false,
},
downline: [],
calcstat: DefaultCalc,
@@ -61,6 +62,7 @@ export const DefaultProfile: IUserProfile = {
my_dream: '',
manage_telegram: false,
saw_zoom_presentation: false,
saw_and_accepted: false,
paymenttypes: []
}
@@ -76,7 +78,6 @@ const state: IUserState = {
isAdmin: false,
isManager: false,
usersList: [],
permissionsList: [],
countusers: 0,
lastparamquery: {}
}

View File

@@ -346,14 +346,11 @@ export const fieldsTable = {
}
},
getColByTable(table) {
if (table === 'permissions') {
return ['value', 'label']
}
},
getTableJoinByName(table) {
if (table === 'permissions')
return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher]
else if (table === 'accepted')
return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
else if (table === 'fieldstype')
return tools.FieldTypeArr
else
@@ -405,6 +402,21 @@ export const fieldsTable = {
AddCol(DuplicateRec),
],
colTableUsersBase: [
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }),
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality' }),
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell' }),
AddCol({ name: 'perm', label_trans: 'reg.perm', fieldtype: tools.FieldType.binary, jointable: 'permissions' }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
],
// IColGridTable
colTableUsers: [
// AddCol({ name: '_id', label_trans: 'reg.id' }),
@@ -422,6 +434,7 @@ export const fieldsTable = {
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.saw_and_accepted', field: 'profile', subfield: 'saw_and_accepted', label_trans: 'reg.saw_and_accepted', fieldtype: tools.FieldType.binary, jointable: 'accepted' }),
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' }),
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell' }),
@@ -558,6 +571,15 @@ export const fieldsTable = {
colicon: 'icon',
noshow: true,
},
{
value: 'accepted',
label: 'Condizioni',
columns: colTablePermission,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: 'fieldstype',
label: 'Tipi di Campi',

View File

@@ -34,11 +34,12 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { dom } from 'quasar'
const printf = require('util').format;
const printf = require('util').format
const { height, width } = dom
import Cookies from 'js-cookie'
import { forEachComment } from 'tslint'
const TokenKey = 'Admin-Token'
@@ -1461,7 +1462,7 @@ export const tools = {
id: par.param1._id,
table: tools.TABUSER,
fieldsvalue: { aportador_solidario: par.param2 },
notifBot: {}
notifBot: null
}
if (par.param3) {
@@ -1496,6 +1497,25 @@ export const tools = {
}
},
async saveFieldToServer(myself: any, table, id, mydata) {
const mydatatosave = {
id,
table,
fieldsvalue: mydata,
notifBot: null
}
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
if (ris) {
tools.showPositiveNotif(myself.$q, myself.$t('db.recupdated'))
} else {
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
}
})
},
async askConfirm($q: any, mytitle, mytext, ok, cancel, myself: any, table, funcok: number, funccancel: number, par: IParamDialog) {
return $q.dialog({
message: mytext,
@@ -2824,7 +2844,11 @@ export const tools = {
},
SetBit(myval, bit) {
myval = myval | bit
myval |= bit
return myval
},
UnSetBit(myval, bit) {
myval &= ~bit
return myval
},
getUnique(arr, comp) {
@@ -3151,13 +3175,21 @@ export const tools = {
return mystr.replace(/\s+/g, '')
},
copyStringToClipboard(mythis, mystr) {
copyStringToClipboard(mythis, mystr, show) {
copyToClipboard(mystr).then(() => {
tools.showNotif(mythis.$q, mythis.$t('dialog.copyclipboard') + ' \'' + mystr + '\'')
let msg = mythis.$t('dialog.copyclipboard')
if (show)
msg += ' \'' + mystr + '\''
tools.showNotif(mythis.$q, msg)
})
},
getlinkhref(mylink, text) {
return '<a href="' + mylink + '" target="_blank">' + text + '</a>'
},
getNationsByNationality(nat, code) {
if (nat === 'IT') {
return 'Italy'
@@ -3216,8 +3248,12 @@ export const tools = {
return 'https://zoom.us/j/' + id
},
myprintf( ) {
myprintf(val, params: any[]) {
params.forEach((par) => {
val = val.replace('{' + par.strin + '}', par.strout)
})
return val
}
// getLocale() {