From 708909928c19cb06fa29884524f1e7bc3ffee6e4 Mon Sep 17 00:00:00 2001 From: xue jiahao Date: Mon, 17 Feb 2025 20:45:54 +0800 Subject: [PATCH] add approve flow action 2 --- src/保育計画月案/main.js | 17 +++++++++++++++++ src/保育計画週案/main.js | 21 +++++++++++++++++++++ src/学年別保育計画/main.js | 18 ++++++++++++++++++ src/学期反省・評価/main.js | 23 +++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 src/保育計画月案/main.js create mode 100644 src/保育計画週案/main.js create mode 100644 src/学年別保育計画/main.js create mode 100644 src/学期反省・評価/main.js diff --git a/src/保育計画月案/main.js b/src/保育計画月案/main.js new file mode 100644 index 0000000..cb77ad4 --- /dev/null +++ b/src/保育計画月案/main.js @@ -0,0 +1,17 @@ +(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 = { + '主幹確認中': '指導', + '園長確認中': '主幹', + '完了': '園長' + } + function getUpdateFieldByNextFlow(nextStatus) { + return statusFieldMap[nextStatus]; + } +})(); \ No newline at end of file diff --git a/src/保育計画週案/main.js b/src/保育計画週案/main.js new file mode 100644 index 0000000..7ed2d16 --- /dev/null +++ b/src/保育計画週案/main.js @@ -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]; + } +})(); \ No newline at end of file diff --git a/src/学年別保育計画/main.js b/src/学年別保育計画/main.js new file mode 100644 index 0000000..4c57b8b --- /dev/null +++ b/src/学年別保育計画/main.js @@ -0,0 +1,18 @@ +(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 = { + '指導教諭確認中': '担任', + '主幹確認中': '指導', + '園長確認中': '主幹', + '完了': '園長' + } + function getUpdateFieldByNextFlow(nextStatus) { + return statusFieldMap[nextStatus]; + } +})(); \ No newline at end of file diff --git a/src/学期反省・評価/main.js b/src/学期反省・評価/main.js new file mode 100644 index 0000000..11c3af6 --- /dev/null +++ b/src/学期反省・評価/main.js @@ -0,0 +1,23 @@ +(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 = { + '主幹確認中(1学期)': '指導1', + '園長確認中(1学期)': '主幹1', + '完了(1学期)': '園長1', + '主幹確認中(2学期)': '指導2', + '園長確認中(2学期)': '主幹2', + '完了(2学期)': '園長2', + '主幹確認中(3学期)': '指導3', + '園長確認中(3学期)': '主幹3', + '完了(3学期)': '園長3', + } + function getUpdateFieldByNextFlow(nextStatus) { + return statusFieldMap[nextStatus]; + } +})(); \ No newline at end of file