add approve flow action

This commit is contained in:
2025-02-17 17:39:54 +08:00
parent a8f36062d7
commit b71b258569
12 changed files with 29 additions and 2 deletions

View File

@@ -499,4 +499,21 @@ function groupingBySex(list) {
}
return [male, female];
}, [[], []]);
}
const statusFieldMap = {
'指導教諭確認中': '担任',
'主幹確認中': '指導',
'園長確認中': '主幹',
'完了': '園長'
}
function getUpdateFieldByNextFlow(nextStatus) {
return statusFieldMap[nextStatus];
}
function addApproveFlowAction() {
return kintone.events.on("app.record.detail.process.proceed", (event) => {
event.record[getUpdateFieldByNextFlow(event.nextStatus.value)].value = kintone.getLoginUser().name;
return event;
});
}