- Nella Lavagna, cliccando sul nome dell'invitato, compaiono le sue informazioni sugli step rimasti, in dettaglio.
- Ogni utente puo' cosi scegliere di regalare un proprio invitato, cliccando sull'invitato, scrivendo l'username del destinatario e premendo il bottone 'Regala Invitato'. Al destinatario gli arriverà un messaggio sul Bot Telegram che indica che gli è stato regalato un'invitato.
This commit is contained in:
@@ -125,8 +125,8 @@ namespace Actions {
|
||||
data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByEmail)
|
||||
data.options = tools.SetBit(data.options, shared_consts.MessageOptions.Notify_ByPushNotification)
|
||||
|
||||
console.log('DOPO:')
|
||||
console.table(data)
|
||||
// console.log('DOPO:')
|
||||
// console.table(data)
|
||||
|
||||
return await Api.SendReq('/sendmsg', 'POST', data)
|
||||
.then((res) => {
|
||||
|
||||
@@ -34,6 +34,7 @@ export const DefaultUser: IUserFields = {
|
||||
password: '',
|
||||
tokens: [],
|
||||
verified_email: false,
|
||||
aportador_solidario: '',
|
||||
made_gift: false,
|
||||
profile: {
|
||||
img: '',
|
||||
@@ -41,7 +42,8 @@ export const DefaultUser: IUserFields = {
|
||||
saw_zoom_presentation: false,
|
||||
},
|
||||
downline: [],
|
||||
calcstat: DefaultCalc
|
||||
calcstat: DefaultCalc,
|
||||
dashboard: null
|
||||
}
|
||||
|
||||
export const DefaultProfile: IUserProfile = {
|
||||
@@ -75,7 +77,8 @@ const state: IUserState = {
|
||||
isManager: false,
|
||||
usersList: [],
|
||||
permissionsList: [],
|
||||
countusers: 0
|
||||
countusers: 0,
|
||||
lastparamquery: {}
|
||||
}
|
||||
|
||||
const b = storeBuilder.module<IUserState>('UserModule', state)
|
||||
@@ -732,7 +735,7 @@ namespace Actions {
|
||||
|
||||
const myuser: IUserFields = res.data.usertosend
|
||||
if (myuser) {
|
||||
console.table(myuser)
|
||||
// console.table(myuser)
|
||||
|
||||
Mutations.mutations.authUser(myuser)
|
||||
|
||||
@@ -902,10 +905,20 @@ namespace Actions {
|
||||
|
||||
async function getDashboard(context, paramquery) {
|
||||
|
||||
if (paramquery === null)
|
||||
paramquery = state.lastparamquery
|
||||
else
|
||||
state.lastparamquery = paramquery
|
||||
|
||||
return await Api.SendReq('/dashboard', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
return res.data.dashboard
|
||||
state.my.dashboard = res.data.dashboard
|
||||
state.my.dashboard.myself = (res.data.dashboard.myself === undefined) ? DefaultUser : res.data.dashboard.myself
|
||||
state.my.dashboard.aportador = (res.data.dashboard.aportador === undefined) ? DefaultUser : res.data.dashboard.aportador
|
||||
state.my.dashboard.numpeople_aportador = (res.data.dashboard.numpeople_aportador === undefined) ? 0 : res.data.dashboard.numpeople_aportador
|
||||
|
||||
return state.my.dashboard
|
||||
}
|
||||
}).catch((error) => {
|
||||
return {
|
||||
|
||||
@@ -416,6 +416,7 @@ export const fieldsTable = {
|
||||
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: 'note', label_trans: 'reg.note' }),
|
||||
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
|
||||
AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
|
||||
@@ -449,6 +450,8 @@ 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: 'note', label_trans: 'reg.note' }),
|
||||
AddCol({ name: 'contacted', label_trans: 'reg.contacted', fieldtype: tools.FieldType.boolean }),
|
||||
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 }),
|
||||
@@ -458,7 +461,6 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'aportador_solidario_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
|
||||
AddCol({ name: 'aportador_solidario_originale_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'note', label_trans: 'reg.note' }),
|
||||
AddCol({ name: 'col_b', label_trans: 'reg.col_b', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'col_h', label_trans: 'reg.col_h', fieldtype: tools.FieldType.number }),
|
||||
AddCol(DeleteRec),
|
||||
|
||||
@@ -18,6 +18,8 @@ export const lists = {
|
||||
DELETE_RECTABLE: 300,
|
||||
DUPLICATE_RECTABLE: 310,
|
||||
DELETE_EVENT: 320,
|
||||
DELETE_EXTRALIST: 330,
|
||||
REGALA_INVITATO: 340,
|
||||
|
||||
CAN_EDIT_TABLE: 400,
|
||||
SHOW_PREV_REC: 401
|
||||
|
||||
@@ -34,6 +34,8 @@ import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
import { dom } from 'quasar'
|
||||
|
||||
const printf = require('util').format;
|
||||
|
||||
const { height, width } = dom
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
@@ -72,7 +74,9 @@ export const tools = {
|
||||
'yellow'
|
||||
],
|
||||
|
||||
TABUSER: 'users',
|
||||
TABEVENTS: 'myevents',
|
||||
TABEXTRALIST: 'extralist',
|
||||
TABNEWSLETTER: 'newstosent',
|
||||
TABGALLERY: 'gallery',
|
||||
TABMAILINGLIST: 'mailinglist',
|
||||
@@ -153,7 +157,7 @@ export const tools = {
|
||||
image: 2048,
|
||||
nationality: 4096,
|
||||
intcode: 5000,
|
||||
multioption: 6000,
|
||||
multioption: 6000
|
||||
},
|
||||
|
||||
FieldTypeArr: [
|
||||
@@ -1433,6 +1437,35 @@ export const tools = {
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('cal.cancelederrorevent'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.DELETE_EXTRALIST) {
|
||||
// console.log('param1', par.param1, 'id', par.param1._id)
|
||||
GlobalStore.actions.DeleteRec({ table: tools.TABEXTRALIST, id: par.param1._id }).then((ris) => {
|
||||
if (ris) {
|
||||
myself.update_username()
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('reg.cancella_invitato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.REGALA_INVITATO) {
|
||||
// console.log('param1', par.param1, 'id', par.param1._id)
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
table: tools.TABUSER,
|
||||
fieldsvalue: { aportador_solidario: par.param2 },
|
||||
notifBot: {}
|
||||
}
|
||||
|
||||
if (par.param3) {
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
|
||||
if (ris) {
|
||||
myself.update_username()
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('reg.invitato_regalato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.DELETE_RECTABLE) {
|
||||
console.log('param1', par.param1)
|
||||
GlobalStore.actions.DeleteRec({ table, id: par.param1 }).then((ris) => {
|
||||
@@ -1899,7 +1932,6 @@ export const tools = {
|
||||
return ''
|
||||
},
|
||||
|
||||
|
||||
getstrDateTimeShort(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
@@ -2705,7 +2737,7 @@ export const tools = {
|
||||
|
||||
const mydata = {
|
||||
table,
|
||||
data,
|
||||
data
|
||||
}
|
||||
|
||||
return await
|
||||
@@ -2902,7 +2934,7 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
isObject(anything) {
|
||||
//Object.create(null) instanceof Object → false
|
||||
// Object.create(null) instanceof Object → false
|
||||
return Object(anything) === anything
|
||||
},
|
||||
isDebug() {
|
||||
@@ -3056,7 +3088,7 @@ export const tools = {
|
||||
return ''
|
||||
},
|
||||
clone(obj) {
|
||||
if (null == obj || 'object' != typeof obj) return obj
|
||||
if (null === obj || 'object' !== typeof obj) return obj
|
||||
const copy = obj.constructor()
|
||||
for (const attr in obj) {
|
||||
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]
|
||||
@@ -3095,9 +3127,13 @@ export const tools = {
|
||||
return 'fa-flag-sm'
|
||||
else if (lang === 'HR')
|
||||
return 'fa-flag-hr'
|
||||
else if (lang === 'RO')
|
||||
return 'fa-flag-ro'
|
||||
else if (lang === 'CL')
|
||||
return 'fa-flag-cl'
|
||||
|
||||
return ''
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
@@ -3154,9 +3190,26 @@ export const tools = {
|
||||
return 'United Kingdom'
|
||||
} else if (nat === 'UA') {
|
||||
return 'Ukraine'
|
||||
} else if (nat === 'RO') {
|
||||
return 'Romania'
|
||||
} else if (nat === 'CL') {
|
||||
return 'Chile'
|
||||
}
|
||||
},
|
||||
|
||||
getLinkZoom() {
|
||||
let id = ''
|
||||
if (GlobalStore.state.calzoom.length > 0) {
|
||||
id = GlobalStore.state.calzoom.slice(-1)[0].id_conf_zoom.toString()
|
||||
} else {
|
||||
id = '6668882000'
|
||||
}
|
||||
return 'https://zoom.us/j/' + id
|
||||
},
|
||||
|
||||
myprintf( ) {
|
||||
|
||||
}
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user