fixed: completed_at field

This commit is contained in:
Paolo Arena
2019-04-05 23:59:52 +02:00
parent 7a55fa7f68
commit ac3f6f0ba9
12 changed files with 643 additions and 460 deletions

View File

@@ -20,7 +20,7 @@ const state: IProjectsState = {
visuLastCompleted: 10
}
const fieldtochange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'live_url', 'test_url', 'begin_development', 'begin_test']
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursworked', 'id_parent', 'status', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'live_url', 'test_url', 'begin_development', 'begin_test']
const b = storeBuilder.module<IProjectsState>('Projects', state)
const stateGetter = b.state()
@@ -302,8 +302,8 @@ namespace Actions {
return id
}
async function modify(context, { myitem, field }) {
return await ApiTables.table_ModifyRecord(nametable, myitem, fieldtochange)
async function modify(context, { myitem, field } ) {
return await ApiTables.table_ModifyRecord(nametable, myitem, listFieldsToChange, field)
}
async function swapElems(context, itemdragend: IDrag) {
@@ -311,7 +311,7 @@ namespace Actions {
const myarr = Getters.getters.items_dacompletare(itemdragend.id_proj)
tools.swapGeneralElem(nametable, myarr, itemdragend, fieldtochange)
tools.swapGeneralElem(nametable, myarr, itemdragend, listFieldsToChange)
}