Lista Doni Navi

This commit is contained in:
Paolo Arena
2020-03-25 09:26:08 +01:00
parent e0f61836ff
commit c25d103a0c
14 changed files with 1022 additions and 580 deletions

View File

@@ -782,14 +782,15 @@ namespace Actions {
})
}
async function InviaMsgADonatori(context, { msgobj, navemediatore }) {
async function InviaMsgADonatori(context, { msgobj, navemediatore, tipomsg }) {
console.log('InviaMsgADonatori', msgobj)
const mydata = {
idapp: process.env.APP_ID,
tipomsg: tools.TipoMsg.SEND_LINK_CHAT_DONATORI,
msgextra: msgobj.msgextra,
msgpar1: msgobj.msgpar1,
username: msgobj.username,
tipomsg,
inviareale: msgobj.inviareale,
navemediatore
}

View File

@@ -167,6 +167,7 @@ const colnavi = [
AddCol({ name: 'ind_order', label_trans: 'ind_order' }),
AddCol({ name: 'parent_id', label_trans: 'parent_id' }),
AddCol({ name: 'date_start', label_trans: 'date_start', fieldtype: tools.FieldType.date }),
AddCol({ name: 'date_gift_chat_open', label_trans: 'date_gift_chat_open', fieldtype: tools.FieldType.date }),
AddCol({ name: 'link_chat', label_trans: 'reg.link_chat' }),
AddCol({ name: 'sent_msg_howto_make_gift', label_trans: 'sent_msg_howto_make_gift', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
@@ -175,6 +176,8 @@ const colnavi = [
AddCol({ name: 'received_gift', label_trans: 'received_gift', fieldtype: tools.FieldType.boolean }),
AddCol({ name: 'date_received_gift', label_trans: 'date_received_gift', fieldtype: tools.FieldType.date }),
AddCol({ name: 'num_tess', label_trans: 'num_tess', fieldtype: tools.FieldType.number }),
AddCol({ name: 'note', label_trans: 'note', fieldtype: tools.FieldType.string }),
AddCol({ name: 'note_interne', label_trans: 'note_interne', fieldtype: tools.FieldType.string }),
AddCol(DeleteRec),
AddCol(DuplicateRec)
]

View File

@@ -22,6 +22,7 @@ export const lists = {
DELETE_USERLIST: 335,
REGALA_INVITATO: 340,
INVIA_MSG_A_DONATORI: 350,
INVIA_MSG_A_SINGOLO: 355,
DONO_INVIATO: 360,
DONO_RICEVUTO: 370,

View File

@@ -60,6 +60,8 @@ export const tools = {
TipoMsg: {
SEND_LINK_CHAT_DONATORI: 1,
SEND_MSG: 2,
SEND_MSG_SINGOLO: 3
},
listBestColor: [
@@ -1501,7 +1503,11 @@ export const tools = {
})
} else if (func === lists.MenuAction.INVIA_MSG_A_DONATORI) {
// console.log('param1', par.param1)
GlobalStore.actions.InviaMsgADonatori({ msgobj: par.param1, navemediatore: par.param2 }).then((ris) => {
GlobalStore.actions.InviaMsgADonatori({
msgobj: par.param1,
navemediatore: par.param2,
tipomsg: par.param1.tipomsg
}).then((ris) => {
if (ris) {
if (par.param1.inviareale)
tools.showPositiveNotif(myself.$q, myself.$t('dashboard.msg_donatori_ok'))
@@ -1509,6 +1515,19 @@ export const tools = {
} else
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
})
} else if (func === lists.MenuAction.INVIA_MSG_A_SINGOLO) {
// console.log('param1', par.param1)
GlobalStore.actions.InviaMsgADonatori({
msgobj: par.param1,
navemediatore: par.param2,
tipomsg: par.param1.tipomsg
})
.then((ris) => {
if (ris) {
tools.showPositiveNotif(myself.$q, myself.$t('cal.sendmsg_sent'))
} else
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
})
} else if (func === lists.MenuAction.DONO_INVIATO) {
const mydatatosave = {
id: par.param1._id,
@@ -2402,8 +2421,10 @@ export const tools = {
return '337'
} else if (Screen.width < 600) {
return '400'
} else {
} else if (Screen.width < 900) {
return '500'
} else {
return '600'
}
},