Lista Doni Navi
This commit is contained in:
0
src/store/Modules/ApiTables.ts
Normal file → Executable file
0
src/store/Modules/ApiTables.ts
Normal file → Executable file
45
src/store/Modules/GlobalStore.ts
Normal file → Executable file
45
src/store/Modules/GlobalStore.ts
Normal file → Executable file
@@ -808,6 +808,49 @@ namespace Actions {
|
||||
return null
|
||||
})
|
||||
}
|
||||
async function GetArrNavi(context) {
|
||||
console.log('GetArrNavi')
|
||||
|
||||
const mydata = {
|
||||
idapp: process.env.APP_ID
|
||||
}
|
||||
|
||||
return await Api.SendReq('/dashboard/getnavi', 'POST', mydata)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
if (res.data.code === serv_constants.RIS_CODE_OK) {
|
||||
return res.data.ris
|
||||
}
|
||||
}
|
||||
return null
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
async function GetArrDoniNavi(context) {
|
||||
console.log('GetArrDoniNavi')
|
||||
|
||||
const mydata = {
|
||||
idapp: process.env.APP_ID
|
||||
}
|
||||
|
||||
return await Api.SendReq('/dashboard/getdoninavi', 'POST', mydata)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
if (res.data.code === serv_constants.RIS_CODE_OK) {
|
||||
return res.data.ris
|
||||
}
|
||||
}
|
||||
return null
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
async function loadSite(context) {
|
||||
// console.log('CalendarStore: loadAfterLogin')
|
||||
@@ -958,6 +1001,8 @@ namespace Actions {
|
||||
sendEmailTest: b.dispatch(sendEmailTest),
|
||||
DuplicateRec: b.dispatch(DuplicateRec),
|
||||
InviaMsgADonatori: b.dispatch(InviaMsgADonatori),
|
||||
GetArrNavi: b.dispatch(GetArrNavi),
|
||||
GetArrDoniNavi: b.dispatch(GetArrDoniNavi),
|
||||
addDynamicPages: b.dispatch(addDynamicPages)
|
||||
}
|
||||
|
||||
|
||||
0
src/store/Modules/Interface/ProgressBar.ts
Normal file → Executable file
0
src/store/Modules/Interface/ProgressBar.ts
Normal file → Executable file
0
src/store/Modules/Interface/index.ts
Normal file → Executable file
0
src/store/Modules/Interface/index.ts
Normal file → Executable file
0
src/store/Modules/MessageStore.ts
Normal file → Executable file
0
src/store/Modules/MessageStore.ts
Normal file → Executable file
0
src/store/Modules/NotevoleStore.ts
Normal file → Executable file
0
src/store/Modules/NotevoleStore.ts
Normal file → Executable file
0
src/store/Modules/Projects.ts
Normal file → Executable file
0
src/store/Modules/Projects.ts
Normal file → Executable file
0
src/store/Modules/Store/Store.ts
Normal file → Executable file
0
src/store/Modules/Store/Store.ts
Normal file → Executable file
0
src/store/Modules/Store/calendar/CalendarStore.ts
Normal file → Executable file
0
src/store/Modules/Store/calendar/CalendarStore.ts
Normal file → Executable file
0
src/store/Modules/Todos.ts
Normal file → Executable file
0
src/store/Modules/Todos.ts
Normal file → Executable file
0
src/store/Modules/UserStore.ts
Normal file → Executable file
0
src/store/Modules/UserStore.ts
Normal file → Executable file
0
src/store/Modules/costanti.ts
Normal file → Executable file
0
src/store/Modules/costanti.ts
Normal file → Executable file
3
src/store/Modules/fieldsTable.ts
Normal file → Executable file
3
src/store/Modules/fieldsTable.ts
Normal file → Executable file
@@ -169,7 +169,8 @@ const colnavi = [
|
||||
AddCol({ name: 'date_start', label_trans: 'date_start', 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: 'made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'provvisoria', label_trans: 'reg.provvisoria', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'date_made_gift', label_trans: 'date_made_gift', fieldtype: tools.FieldType.date }),
|
||||
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 }),
|
||||
|
||||
0
src/store/Modules/index.ts
Normal file → Executable file
0
src/store/Modules/index.ts
Normal file → Executable file
2
src/store/Modules/lists.ts
Normal file → Executable file
2
src/store/Modules/lists.ts
Normal file → Executable file
@@ -22,6 +22,8 @@ export const lists = {
|
||||
DELETE_USERLIST: 335,
|
||||
REGALA_INVITATO: 340,
|
||||
INVIA_MSG_A_DONATORI: 350,
|
||||
DONO_INVIATO: 360,
|
||||
DONO_RICEVUTO: 370,
|
||||
|
||||
CAN_EDIT_TABLE: 400,
|
||||
SHOW_PREV_REC: 401
|
||||
|
||||
0
src/store/Modules/serv_constants.ts
Normal file → Executable file
0
src/store/Modules/serv_constants.ts
Normal file → Executable file
63
src/store/Modules/tools.ts
Normal file → Executable file
63
src/store/Modules/tools.ts
Normal file → Executable file
@@ -80,6 +80,7 @@ export const tools = {
|
||||
],
|
||||
|
||||
TABUSER: 'users',
|
||||
TABNAVI: 'navi',
|
||||
TABEVENTS: 'myevents',
|
||||
TABEXTRALIST: 'extralist',
|
||||
TABNEWSLETTER: 'newstosent',
|
||||
@@ -1502,11 +1503,50 @@ export const tools = {
|
||||
// console.log('param1', par.param1)
|
||||
GlobalStore.actions.InviaMsgADonatori({ msgobj: par.param1, navemediatore: par.param2 }).then((ris) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('dashboard.msg_donatori_ok'))
|
||||
if (par.param1.inviareale)
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('dashboard.msg_donatori_ok'))
|
||||
tools.askConfirm(myself.$q, '', ris.strout, translate('dialog.yes'), translate('dialog.no'), this, '', 0, 0, {})
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.DONO_INVIATO) {
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
table: tools.TABNAVI,
|
||||
fieldsvalue: { date_made_gift: par.param1.date_made_gift },
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
if (par.param3) {
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
|
||||
if (ris) {
|
||||
myself.ActionAfterYes(func, par.param1, par.param2)
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('dashboard.fatto_dono'))
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.DONO_RICEVUTO) {
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
table: tools.TABNAVI,
|
||||
fieldsvalue: { made_gift: par.param1.made_gift },
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
if (par.param3) {
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
|
||||
if (ris) {
|
||||
myself.ActionAfterYes(func, par.param1, par.param2)
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('dashboard.ricevuto_dono_ok'))
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1838,6 +1878,14 @@ export const tools = {
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrshortDateTime(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
return date.formatDate(mytimestamp, 'DD/MM HH:mm')
|
||||
else
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrTime(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
@@ -2091,14 +2139,23 @@ export const tools = {
|
||||
} catch (e) {
|
||||
return value
|
||||
}
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
getDateNow() {
|
||||
const mydate = new Date()
|
||||
return mydate
|
||||
},
|
||||
|
||||
isDateArrived(mydate) {
|
||||
const datenow = tools.getDateNow()
|
||||
const diff = date.getDateDiff(datenow, mydate)
|
||||
// console.log('diff = ' + diff)
|
||||
if (diff >= 0) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
getDayOfWeek(date) {
|
||||
const dayOfWeek = new Date(date).getDay()
|
||||
|
||||
|
||||
0
src/store/Modules/toolsext.ts
Normal file → Executable file
0
src/store/Modules/toolsext.ts
Normal file → Executable file
0
src/store/Modules/translation.ts
Normal file → Executable file
0
src/store/Modules/translation.ts
Normal file → Executable file
Reference in New Issue
Block a user