-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ v-if="!child2.routes2"
+ :to="getroute(child2)"
+ :header-inset-level="child2.level_child"
+ :duration="300"
+ :icon="child2.materialIcon"
+ active-class="my-menu-active"
+ expand-icon-class="my-menu-icon-none"
+ class="item item-link drawer-closer cursor-pointer my-menu"
+ :label="tools.getLabelByItem(child2, mythis)">
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mixins/mixin-users.ts b/src/mixins/mixin-users.ts
index caa19d5..fbf5cd5 100644
--- a/src/mixins/mixin-users.ts
+++ b/src/mixins/mixin-users.ts
@@ -78,6 +78,10 @@ export default class MixinUsers extends Vue {
return UserStore.state.my.verified_email
}
+ get MadeGift() {
+ return UserStore.state.my.made_gift
+ }
+
get Email() {
return UserStore.state.my.email
}
diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts
index c1b4e15..2170511 100644
--- a/src/model/GlobalStore.ts
+++ b/src/model/GlobalStore.ts
@@ -54,6 +54,7 @@ export interface IMyPage {
author_username?: string
title?: string
icon?: string
+ order?: number
path?: string
keywords?: string
description?: string
@@ -171,11 +172,13 @@ export interface IMenuList {
export interface IListRoutes {
active?: boolean
+ order: number
path: string
name: string
materialIcon?: string
component?: Component
reqauth?: boolean
+ isseparator?: boolean
inmenu?: boolean
solotitle?: boolean
infooter?: boolean
diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts
index 2844b69..100df67 100644
--- a/src/model/UserStore.ts
+++ b/src/model/UserStore.ts
@@ -14,6 +14,7 @@ export interface IUserProfile {
cell?: string
dateofbirth?: Date
sex?: ESexType
+ country_pay?: string
email_paypal?: string
username_telegram?: string
}
@@ -28,9 +29,11 @@ export interface IUserFields {
ipaddr?: string
perm?: number
verified_email?: boolean
+ made_gift?: boolean
tokens?: IToken[]
lasttimeonline?: Date
profile?: IUserProfile
+ downline?: IUserFields[]
}
/*
diff --git a/src/statics/i18n.js b/src/statics/i18n.js
index 96410f8..ad11b3a 100644
--- a/src/statics/i18n.js
+++ b/src/statics/i18n.js
@@ -8,6 +8,7 @@ const msgglobal = {
showprevedit: 'Mostra Eventi Passati',
columns: 'Colonne',
tableslist: 'Tabelle',
+ nodata: 'Nessun Dato'
},
otherpages: {
error404: 'error404',
@@ -37,6 +38,7 @@ const msgglobal = {
},
dialog: {
close: 'Chiudi',
+ copyclipboard: 'Copiato negli appunti',
ok: 'Ok',
yes: 'Si',
no: 'No',
@@ -109,19 +111,22 @@ const msgglobal = {
},
reg: {
aportador_solidario: 'Chi ti ha Invitato',
+ reflink: 'Link da condividere ai tuoi amici:',
page_title: 'Registrazione',
+ made_gift: 'Doné',
incorso: 'Registrazione in corso...',
richiesto: 'Campo Richiesto',
email: 'Email',
intcode_cell: 'Prefisso Int.',
- cell: 'Cellulare',
+ cell: 'Cellulare Telegram',
nationality: 'Nazionalità',
email_paypal: 'Email Paypal',
+ country_pay: 'Paese di Destinazione Pagamenti',
username_telegram: 'Username Telegram',
img: 'Immagine',
date_reg: 'Data Reg.',
perm: 'Permessi',
- username: 'Nome Utente',
+ username: 'Username',
name: 'Nome',
surname: 'Cognome',
username_login: 'Nome Utente o email',
@@ -145,6 +150,7 @@ const msgglobal = {
terms: 'Devi accettare le condizioni, per continuare.',
duplicate_email: 'l\'Email è già stata registrata',
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',
},
tips: {
@@ -382,6 +388,7 @@ const msgglobal = {
editvalues: 'Cambiar valores',
addrecord: 'Agregar fila',
showprevedit: 'Mostrar eventos pasados',
+ nodata: 'Sin datos',
columns: 'Columnas',
tableslist: 'Tablas'
},
@@ -410,6 +417,7 @@ const msgglobal = {
},
dialog: {
close: 'Cerrar',
+ copyclipboard: 'Copiado al portapapeles',
ok: 'Vale',
yes: 'Sí',
no: 'No',
@@ -482,19 +490,22 @@ const msgglobal = {
},
reg: {
aportador_solidario: 'Aportador Solidario',
+ reflink: 'Enlaces para compartir con tus amigos:',
page_title: 'Registro',
+ made_gift: 'Don',
incorso: 'Registro en curso...',
richiesto: 'Campo requerido',
email: 'Email',
intcode_cell: 'Prefijo Int.',
- cell: 'Móvil',
+ cell: 'Móvil Telegram',
nationality: 'Nacionalidad',
email_paypal: 'Email Paypal',
+ country_pay: 'País del Pagos de destino',
username_telegram: 'Usuario Telegram',
img: 'File image',
date_reg: 'Fecha Reg.',
perm: 'Permisos',
- username: 'Nombre usuario',
+ username: 'Username',
name: 'Nombre',
surname: 'Apellido',
username_login: 'Nombre usuario o email',
@@ -518,6 +529,7 @@ const msgglobal = {
terms: 'Debes aceptar las condiciones, para continuar..',
duplicate_email: 'La email ya ha sido registrada',
duplicate_username: 'El nombre de usuario ya ha sido utilizado',
+ aportador_not_exist: 'El nombre de usuario de la persona que lo invitó no está presente. Contactanos.',
sameaspassword: 'Las contraseñas deben ser idénticas',
}
},
@@ -746,6 +758,7 @@ const msgglobal = {
editvalues: 'Changer les valeurs',
addrecord: 'Ajouter une ligne',
showprevedit: 'Afficher les événements passés',
+ nodata: 'Pas de données',
columns: 'Colonnes',
tableslist: 'Tables',
},
@@ -774,6 +787,7 @@ const msgglobal = {
},
dialog: {
close: 'Fermer',
+ copyclipboard: 'Copié dans le presse-papiers',
ok: 'Bien',
yes: 'Oui',
no: 'Non',
@@ -846,13 +860,15 @@ const msgglobal = {
},
reg: {
aportador_solidario: 'Contributeur de solidarité',
+ reflink: 'Liens à partager avec vos amis:',
incorso: 'Inscription en cours...',
richiesto: 'Champ obligatoire',
email: 'Email',
intcode_cell: 'Préfixe int.',
- cell: 'Téléphone',
+ cell: 'Téléphone Telegram',
nationality: 'Nationalité',
email_paypal: 'Email Paypal',
+ country_pay: 'Pays de destination Paiements',
username_telegram: 'Nom d\'utilisateur du Telegram',
img: 'Fichier image',
date_reg: 'Date Inscript.',
@@ -881,6 +897,7 @@ const msgglobal = {
terms: 'Vous devez accepter les conditions, pour continuer..',
duplicate_email: 'L\'email a déjà été enregistré',
duplicate_username: 'Le nom d\'utilisateur a déjà été utilisé',
+ aportador_not_exist: 'Le nom d\'utilisateur de la personne qui vous a invité n\'est pas présent. Contactez-nous.',
sameaspassword: 'Les mots de passe doivent être identiques',
}
},
@@ -1109,6 +1126,7 @@ const msgglobal = {
editvalues: 'Edit Values',
addrecord: 'Add Row',
showprevedit: 'Show Past Events',
+ nodata: 'No data',
columns: 'Columns',
tableslist: 'Tables',
},
@@ -1137,6 +1155,7 @@ const msgglobal = {
},
dialog: {
close: 'Close',
+ copyclipboard: 'Copied to clipboard',
ok: 'Ok',
yes: 'Yes',
no: 'No',
@@ -1209,13 +1228,16 @@ const msgglobal = {
},
reg: {
aportador_solidario: 'Solidarity Contributor',
+ reflink: 'Links to share to your friends:',
incorso: 'Registration please wait...',
+ made_gift: 'Donated',
richiesto: 'Field Required',
email: 'Email',
intcode_cell: 'International Code',
- cell: 'Mobile Phone',
+ cell: 'Mobile Telegram',
nationality: 'Nationality',
email_paypal: 'Email Paypal',
+ country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
img: 'File Image',
date_reg: 'Reg. Date',
@@ -1244,6 +1266,7 @@ const msgglobal = {
terms: 'You need to agree with the terms & conditions.',
duplicate_email: 'Email was already registered',
duplicate_username: 'Username is already taken',
+ aportador_not_exist: 'The username of the person who invited you is not present. Contact us.',
sameaspassword: 'Passwords must be identical',
}
},
@@ -1471,6 +1494,7 @@ const msgglobal = {
editvalues: 'Edit Values',
addrecord: 'Add Row',
showprevedit: 'Show Past Events',
+ nodata: 'No data',
columns: 'Columns',
tableslist: 'Tables',
},
@@ -1499,6 +1523,7 @@ const msgglobal = {
},
dialog: {
close: 'Close',
+ copyclipboard: 'Copied to clipboard',
ok: 'Ok',
yes: 'Yes',
no: 'No',
@@ -1571,14 +1596,17 @@ const msgglobal = {
},
reg: {
aportador_solidario: 'Solidarity Contributor',
+ reflink: 'Links to share to your friends:',
page_title: 'Registration',
+ made_gift: 'Donated',
incorso: 'Registration please wait...',
richiesto: 'Field Required',
email: 'Email',
intcode_cell: 'International Code',
- cell: 'Mobile Phone',
+ cell: 'Mobile Telegram',
nationality: 'Nationality',
email_paypal: 'Email Paypal',
+ country_pay: 'Country of Destination Payments',
username_telegram: 'Username Telegram',
img: 'File Image',
date_reg: 'Reg. Date',
@@ -1607,6 +1635,7 @@ const msgglobal = {
terms: 'You need to agree with the terms & conditions.',
duplicate_email: 'Email was already registered',
duplicate_username: 'Username is already taken',
+ aportador_not_exist: 'The username of the person who invited you is not present in the archive. Verify that it is correct.',
sameaspassword: 'Passwords must be identical',
}
},
diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts
index f09fa48..69d4e3c 100644
--- a/src/store/Modules/GlobalStore.ts
+++ b/src/store/Modules/GlobalStore.ts
@@ -837,6 +837,7 @@ namespace Actions {
if (page.active) {
arrpagesroute.push({
active: true,
+ order: page.order,
path: '/' + page.path,
name: undefined,
text: page.title,
@@ -852,6 +853,7 @@ namespace Actions {
const last = {
active: true,
+ order: 10000,
path: '*',
materialIcon: 'fas fa-calendar-plus',
name: 'otherpages.error404def',
@@ -860,7 +862,10 @@ namespace Actions {
infooter: false
}
- static_data.routes = [...static_data.routes, ...arrpagesroute, last]
+ static_data.routes = [...static_data.baseroutes, ...arrpagesroute, last]
+
+ // Sort array
+ static_data.routes = static_data.routes.sort((a, b) => a.order - b.order)
router.addRoutes([...arrpagesroute, last])
}
diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts
index 301f0fa..0e34de4 100644
--- a/src/store/Modules/UserStore.ts
+++ b/src/store/Modules/UserStore.ts
@@ -20,7 +20,7 @@ import { shared_consts } from '../../common/shared_vuejs'
const bcrypt = require('bcryptjs')
-const DefaultUser: IUserFields = {
+export const DefaultUser: IUserFields = {
_id: '',
email: '',
username: '',
@@ -29,9 +29,11 @@ const DefaultUser: IUserFields = {
password: '',
tokens: [],
verified_email: false,
+ made_gift: false,
profile: {
img: ''
- }
+ },
+ downline: []
}
export const DefaultProfile: IUserProfile = {
@@ -41,6 +43,7 @@ export const DefaultProfile: IUserProfile = {
cell: '',
dateofbirth: new Date(),
sex: 0,
+ country_pay: '',
email_paypal: '',
username_telegram: ''
}
@@ -166,6 +169,12 @@ namespace Getters {
return ''
}
}, 'getImgByUsername')
+ const getRefLink = b.read((mystate: IUserState) => (): string => {
+ // console.log('myrec', myrec)
+
+ return tools.getUrlSite() + '/signup/' + mystate.my.username
+
+ }, 'getRefLink')
export const getters = {
get isUserInvalid() {
@@ -207,6 +216,9 @@ namespace Getters {
get getUsersList() {
return getUsersList()
},
+ get getRefLink() {
+ return getRefLink()
+ },
}
}
@@ -263,6 +275,7 @@ namespace Mutations {
localStorage.setItem(tools.localStorage.expirationDate, expirationDate.toString())
localStorage.setItem(tools.localStorage.isLogged, String(true))
localStorage.setItem(tools.localStorage.verified_email, String(myuser.verified_email))
+ localStorage.setItem(tools.localStorage.made_gift, String(myuser.made_gift))
localStorage.setItem(tools.localStorage.wasAlreadySubOnDb, String(GlobalStore.state.wasAlreadySubOnDb))
}
@@ -323,6 +336,7 @@ namespace Mutations {
mystate.my.surname = ''
resetArrToken(mystate.my.tokens)
mystate.my.verified_email = false
+ mystate.my.made_gift = false
mystate.categorySel = 'personal'
mystate.servercode = 0
@@ -482,7 +496,7 @@ namespace Actions {
// mutations.setServerCode(myres);
return res
}).catch((error) => {
- return { numtot: 0, numadded: 0, numalreadyexisted: 0}
+ return { numtot: 0, numadded: 0, numalreadyexisted: 0 }
})
}
@@ -518,18 +532,18 @@ namespace Actions {
return bcrypt.hash(authData.password, bcrypt.genSaltSync(12))
.then((hashedPassword: string) => {
-/*
- const usertosend = {
- lang: mylang,
- email: authData.email,
- password: String(hashedPassword),
- username: authData.username,
- name: authData.name,
- surname: authData.surname
- }
- console.log(usertosend)
+ /*
+ const usertosend = {
+ lang: mylang,
+ email: authData.email,
+ password: String(hashedPassword),
+ username: authData.username,
+ name: authData.name,
+ surname: authData.surname
+ }
+ console.log(usertosend)
-*/
+ */
authData.lang = mylang
authData.password = String(hashedPassword)
@@ -689,6 +703,7 @@ namespace Actions {
localStorage.removeItem(tools.localStorage.isLogged)
// localStorage.removeItem(rescodes.localStorage.leftDrawerOpen)
localStorage.removeItem(tools.localStorage.verified_email)
+ localStorage.removeItem(tools.localStorage.made_gift)
localStorage.removeItem(tools.localStorage.categorySel)
localStorage.removeItem(tools.localStorage.wasAlreadySubOnDb)
@@ -775,6 +790,7 @@ namespace Actions {
const name = String(localStorage.getItem(tools.localStorage.name))
const surname = String(localStorage.getItem(tools.localStorage.surname))
const verified_email = localStorage.getItem(tools.localStorage.verified_email) === 'true'
+ const made_gift = localStorage.getItem(tools.localStorage.made_gift) === 'true'
const perm = parseInt(localStorage.getItem(tools.localStorage.perm), 10)
const img = String(localStorage.getItem(tools.localStorage.img))
@@ -790,6 +806,7 @@ namespace Actions {
name,
surname,
verified_email,
+ made_gift,
perm,
profile: { img }
})
@@ -809,6 +826,22 @@ namespace Actions {
}
}
+ async function getDashboard(context, paramquery) {
+
+ return await Api.SendReq('/dashboard', 'POST', paramquery)
+ .then((res) => {
+ if (res.status === 200) {
+ return res.data.dashboard
+ }
+ }).catch((error) => {
+ return {
+ aportador: {},
+ downline: []
+ }
+ })
+ }
+
+
/*
async function refreshUserInfos(){
let {token, refresh_token} = JWT.fetch();
@@ -837,6 +870,7 @@ namespace Actions {
importemail: b.dispatch(importemail),
newsletterload: b.dispatch(newsletterload),
newsletter_setactivate: b.dispatch(newsletter_setactivate),
+ getDashboard: b.dispatch(getDashboard),
}
}
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index 4153d7d..8326c05 100644
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -77,8 +77,10 @@ export const colgallery = [
export const colmypage = [
AddCol({ name: 'title', label_trans: 'pages.title' }),
+ AddCol({ name: 'lang', label_trans: 'pages.lang' }),
AddCol({ name: 'path', label_trans: 'pages.path' }),
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
+ AddCol({ name: 'order', label_trans: 'pages.order', fieldtype: tools.FieldType.number }),
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 }),
@@ -378,11 +380,13 @@ export const fieldsTable = {
AddCol({ name: 'name', label_trans: 'reg.name' }),
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
AddCol({ name: 'email', label_trans: 'reg.email' }),
+ AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
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' }),
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.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index 5c912b0..c2081ab 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -104,6 +104,7 @@ export const tools = {
localStorage: {
verified_email: 'vf',
+ made_gift: 'mg',
wasAlreadySubOnDb: 'sb',
categorySel: 'cs',
isLogged: 'ilog',
@@ -1387,8 +1388,13 @@ export const tools = {
},
visumenu(elem) { // : IListRoutes
- return (elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
- || ((!elem.onlyAdmin) && (!elem.onlyManager))
+ let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
+ || ((!elem.onlyAdmin) && (!elem.onlyManager))) && elem.active
+
+ if (elem.meta && elem.meta.requiresAuth) {
+ visu = visu && tools.isLoggedToSystem()
+ }
+ return visu
},
executefunc(myself: any, table, func: number, par: IParamDialog) {
@@ -2522,6 +2528,12 @@ export const tools = {
}
,
+ getUrlSite() {
+ const url = window.location.href
+ const arr = url.split('/')
+ return arr[0] + '//' + arr[2]
+ },
+
SignIncheckErrors(mythis, riscode, ispageLogin ?: boolean) {
// console.log('SignIncheckErrors: ', riscode)
try {
@@ -2874,6 +2886,17 @@ export const tools = {
isChristmasHoliday() {
const now = new Date()
return ((now.getMonth() === 11 && now.getDate() > 20) || (now.getMonth() === 0 && now.getDate() < 8))
+ },
+
+ CapitalizeAllWords(str) {
+ const splitStr = str.toLowerCase().split(' ')
+ for (var i = 0; i < splitStr.length; i++) {
+ // You do not need to check if i is larger than splitStr length, as your for does that for you
+ // Assign it back to the array
+ splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1)
+ }
+ // Directly return the joined string
+ return splitStr.join(' ')
}
// getLocale() {
diff --git a/src/validation/index.ts b/src/validation/index.ts
index 659e722..0ec582d 100644
--- a/src/validation/index.ts
+++ b/src/validation/index.ts
@@ -1,4 +1,5 @@
export { duplicate } from './duplicate'
export { registereduser } from './registereduser'
+export { aportadorexist } from './aportadorexist'
export { registeredemail } from './registeredemail'
export { complexity } from './complexity'
diff --git a/src/views/login/signup/signup-validate.ts b/src/views/login/signup/signup-validate.ts
deleted file mode 100644
index b23a420..0000000
--- a/src/views/login/signup/signup-validate.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { ISignupOptions } from 'model'
-import { email, minLength, required, sameAs } from 'vuelidate/lib/validators'
-// import { ValidationRuleset } from 'vuelidate'
-import { complexity, registeredemail, registereduser } from '../../../validation'
-
-export interface TSignup { signup: ISignupOptions, validationGroup: string[] }
-
-export const validations = {
- signup: {
- repeatPassword: {
- required,
- sameAsPassword: sameAs('password')
- },
- password: {
- complexity,
- required
- },
- username: {
- registereduser,
- required
- },
- name: {
- required
- },
- surname: {
- required
- },
- email: {
- email,
- registeredemail,
- required
- },
- terms: {
- required
- }
- }
-}
diff --git a/src/views/login/signup/signup.ts b/src/views/login/signup/signup.ts
index b8e2e3c..8d2894a 100644
--- a/src/views/login/signup/signup.ts
+++ b/src/views/login/signup/signup.ts
@@ -20,8 +20,8 @@ export default class Signup extends Vue {
}
public created() {
- if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
- tools.setCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited)
+ // if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, ''))
+ // tools.setCookie(tools.APORTADOR_SOLIDARIO, this.$route.params.invited)
}
}