test-env #1

Merged
xuejiahao merged 29 commits from test-env into master 2025-09-22 08:01:42 +00:00
3 changed files with 57 additions and 29 deletions
Showing only changes of commit 316cf9646f - Show all commits

View File

@@ -87,6 +87,32 @@
return event;
});
// -------------------「園での様子_入力者」の処理 -------------------
const _DATA_HOLDER_MAP = {}
// 「園での様子_伝達事項」はテキストエリア複数行入力欄であり、app.record.edit.changeイベントをサポートしていません
// したがって、データを事前に保存しておき、保存submit時のタイミングで更新を行います。
kintone.events.on(['app.record.index.edit.show', 'app.record.create.show', 'app.record.edit.show'], function (event) {
_DATA_HOLDER_MAP['isEditorChanged'] = false;
_DATA_HOLDER_MAP['prevSituationValue'] = event.record['園での様子_伝達事項']['value'] || '';
return event;
});
kintone.events.on(['app.record.create.change.園での様子_入力者', 'app.record.edit.change.園での様子_入力者', 'app.record.index.edit.change.園での様子_入力者'], function(event) {
_DATA_HOLDER_MAP['isEditorChanged'] = true;
return event;
});
kintone.events.on(['app.record.create.submit', 'app.record.edit.submit', 'app.record.index.edit.submit'], function (event) {
const current = event.record['園での様子_伝達事項']['value'] || '';
if (_DATA_HOLDER_MAP['prevSituationValue'] != current && !_DATA_HOLDER_MAP['isEditorChanged']) {
event.record['園での様子_入力者']['value'] = [kintone.getLoginUser()];
}
return event;
});
//PVC追加
function dateToFieldInEditIn() {
return function (e) {