add approve flow action 2

This commit is contained in:
2025-02-17 20:45:54 +08:00
parent b71b258569
commit 708909928c
4 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
(function () {
"use strict";
kintone.events.on("app.record.detail.process.proceed", (event) => {
event.record[getUpdateFieldByNextFlow(event.nextStatus.value)].value = kintone.getLoginUser().name;
return event;
});
const statusFieldMap = {
'主幹確認中4週目': '指導',
'園長確認中4週目': '主幹',
'完了4週目': '園長',
'担任作成中5週目': '園長',
'主幹確認中5週目': '指導',
'園長確認中5週目': '主幹',
'完了5週目': '園長',
}
function getUpdateFieldByNextFlow(nextStatus) {
return statusFieldMap[nextStatus];
}
})();