出欠集計表出力

This commit is contained in:
2025-02-17 15:00:16 +08:00
parent ccf474bdc6
commit 226853ac37
3 changed files with 333 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
const Kuc = Kucs['1.19.0'];
const WEEK = ['日', '月', '火', '水', '木', '金', '土']
const monthItems = Array.from({ length: 12 }, (_, i) => {
const month = "" + (i + 1);
return { label: month, value: month.padStart(2, '0') };
@@ -170,6 +172,7 @@ function checkInputData(map, { btnLabel, yearElId, monthElId, dateElId, classElI
}
function getLastDate(year, month) {
// month は 1-12 の数値で入力する
return new Date(year, month, 0);
}
@@ -486,3 +489,14 @@ function fillApproveArea(baseCells, worksheet, record) {
worksheet.getCell(signRow, baseCells['園長'][0].col + i).value = (record[signLabels[i]]?.value || '');
}
}
function groupingBySex(list) {
return list.reduce(([male, female], record) => {
if (record['性別'].value === '男') {
return [male.concat(record), female];
} else if (record['性別'].value === '女') {
return [male, female.concat(record)];
}
return [male, female];
}, [[], []]);
}