fix app flow

This commit is contained in:
2025-02-17 21:18:24 +08:00
parent 708909928c
commit 253bdabb97
5 changed files with 42 additions and 36 deletions

View File

@@ -507,13 +507,13 @@ 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;
const field = statusFieldMap[event.nextStatus.value];
if (field) {
event.record[field].value = kintone.getLoginUser().name;
}
return event;
});
}