Files
kintone-attendance-system/src/12.2歳以上日誌出力用/pvc.processAutoUpdate.js
2025-09-22 12:56:54 +08:00

21 lines
579 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function () {
"use strict";
const statusFieldMap = {
'指導教諭確認中0~2歳': '担任',
'指導教諭確認中3~5歳': '担任',
'園長確認中': '指導',
'完了': '園長'
}
window._StatusFieldMap = statusFieldMap
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;
});
})();