some fix and update document

This commit is contained in:
2025-02-13 10:19:09 +08:00
parent 3031c07b9c
commit bd59a1c267
6 changed files with 19 additions and 15 deletions

Binary file not shown.

View File

@@ -5,8 +5,8 @@ const env = {
appId: 19,
excelName: "出欠集計表",
view: {
'0,1歳日誌データ連携用途': 13352636,
'2歳以上日誌データ連携用途': 13352638,
linkFor0to1: 13352636,
linkForOthers: 13352638,
}
},
"0,1歳日誌出力用": {

View File

@@ -268,24 +268,24 @@ function showError(show, text) {
}
}
function showSuccess(show, text) {
function showSuccess(show, text, time = 3000) {
if (show) {
buildNotification('success', text);
buildNotification('success', text, time);
notificationEl.open();
} else {
notificationEl && notificationEl.close();
}
}
function buildNotification(type, text) {
function buildNotification(type, text, duration = -1) {
const param = {
type,
text,
duration
}
if (!notificationEl) {
notificationEl = new Kuc.Notification({
type,
text
});
notificationEl = new Kuc.Notification(param);
} else {
notificationEl.close();
notificationEl.type = type;
notificationEl.text = text;
Object.assign(notificationEl, param)
}
}

View File

@@ -29,6 +29,7 @@ class BatchCreateHandler {
// console.log(records);
const createResult = await this.createData(api, records, todayString);
showSuccess(true, "出欠簿一括作成完了");
location.reload();
loading(false);
}

View File

@@ -44,7 +44,7 @@ class Link2Handler {
return await api.record.getAllRecordsWithId({
app: env["園児別出欠簿入力"].appId,
fields: ['クラス', "園児名", "園での様子_伝達事項", "評価反省"],
condition: `学年 not in ("歳児", "歳児") and 登園日 = "${dateString}"`
condition: `学年 in ("歳児", "3歳児", "4歳児", "歳児") and 登園日 = "${dateString}"`
});
} catch (e) {
showError(true, '園児台帳アプリのデータ読み取りエラー\n - ' + e);
@@ -78,13 +78,16 @@ class Link2Handler {
condition: `登園日 = "${dateString}"`
})
const generatedRecordId = generatedRecords[0]?.$id.value;
const param = {
app: env["2歳以上日誌出力用"].appId,
record
}
let addResult;
if (generatedRecordId) {
param.id = generatedRecordId;
// 本アプリの当日データでテーブルを上書きし、対応する園児データがない行を【削除】します
addResult = await api.record.updateRecord(param);
} else {
addResult = await api.record.addRecord(param);

View File

@@ -5,12 +5,12 @@
kintone.events.on("app.record.index.show", (event) => {
const headerSpace = getHeaderSpace('single-label-line');
if (event.viewId === APP_ENV.view["0,1歳日誌データ連携用途"]) {
if (event.viewId === APP_ENV.view.linkFor0to1) {
Link1Handler.getInstance(headerSpace);
return event;
}
if (event.viewId === APP_ENV.view["2歳以上日誌データ連携用途"]) {
if (event.viewId === APP_ENV.view.linkForOthers) {
Link2Handler.getInstance(headerSpace);
return event;
}