some fix and update document
This commit is contained in:
BIN
document/PVC.one
BIN
document/PVC.one
Binary file not shown.
@@ -5,8 +5,8 @@ const env = {
|
||||
appId: 19,
|
||||
excelName: "出欠集計表",
|
||||
view: {
|
||||
'0,1歳日誌データ連携用途': 13352636,
|
||||
'2歳以上日誌データ連携用途': 13352638,
|
||||
linkFor0to1: 13352636,
|
||||
linkForOthers: 13352638,
|
||||
}
|
||||
},
|
||||
"0,1歳日誌出力用": {
|
||||
|
||||
20
src/utils.js
20
src/utils.js
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ class BatchCreateHandler {
|
||||
// console.log(records);
|
||||
|
||||
const createResult = await this.createData(api, records, todayString);
|
||||
showSuccess(true, "出欠簿一括作成完了");
|
||||
location.reload();
|
||||
loading(false);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class Link2Handler {
|
||||
return await api.record.getAllRecordsWithId({
|
||||
app: env["園児別出欠簿入力"].appId,
|
||||
fields: ['クラス', "園児名", "園での様子_伝達事項", "評価反省"],
|
||||
condition: `学年 not in ("0歳児", "1歳児") and 登園日 = "${dateString}"`
|
||||
condition: `学年 in ("2歳児", "3歳児", "4歳児", "5歳児") 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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user