Calcolo Hours

This commit is contained in:
Paolo Arena
2021-02-11 02:21:36 +01:00
parent 7d0b3fb26f
commit 5568547784
37 changed files with 1372 additions and 574 deletions

View File

@@ -331,6 +331,24 @@ namespace Actions {
ApiTables.aftercalling(ris, checkPending, nametable)
}
async function calculateHoursProjects(context, { projId, actualphase }) {
let ris = null
ris = await Api.SendReq('/projects/calc/' + projId + '/' + actualphase, 'GET', null)
.then((res) => {
if (res.data.rec) { // console.log('RISULTANTE CATEGORIES DAL SERVER = ', res.data.categories)
return res.data.rec
}
return null
})
.catch((error) => {
console.log('error calculateHoursProjects', error)
})
return ris
}
async function deleteItem(context, { idobj }) {
console.log('deleteItem: KEY = ', idobj)
@@ -452,6 +470,7 @@ namespace Actions {
export const actions = {
dbLoad: b.dispatch(dbLoad),
calculateHoursProjects: b.dispatch(calculateHoursProjects),
swapElems: b.dispatch(swapElems),
deleteItem: b.dispatch(deleteItem),
dbInsert: b.dispatch(dbInsert),