add approve flow action
This commit is contained in:
17
src/utils.js
17
src/utils.js
@@ -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;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user