fix app flow
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
(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週目)': '主幹',
|
||||
@@ -15,7 +10,13 @@
|
||||
'園長確認中(5週目)': '主幹',
|
||||
'完了(5週目)': '園長',
|
||||
}
|
||||
function getUpdateFieldByNextFlow(nextStatus) {
|
||||
return statusFieldMap[nextStatus];
|
||||
}
|
||||
|
||||
kintone.events.on("app.record.detail.process.proceed", (event) => {
|
||||
const field = statusFieldMap[event.nextStatus.value];
|
||||
if (field) {
|
||||
event.record[field].value = kintone.getLoginUser().name;
|
||||
}
|
||||
return event;
|
||||
});
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user