出欠集計表出力
This commit is contained in:
14
src/utils.js
14
src/utils.js
@@ -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];
|
||||
}, [[], []]);
|
||||
}
|
||||
Reference in New Issue
Block a user