Fix sorting
This commit is contained in:
BIN
document/①仕様書_園児別出欠簿入力_20250507.xlsx
Normal file
BIN
document/①仕様書_園児別出欠簿入力_20250507.xlsx
Normal file
Binary file not shown.
@@ -162,7 +162,9 @@ class ExtractHandler {
|
|||||||
|
|
||||||
function fillMainPage(baseCells, worksheet, recordMap) {
|
function fillMainPage(baseCells, worksheet, recordMap) {
|
||||||
baseCells['番号'] = baseCells['番号'].filter((_, index) => index % 2 !== 0);
|
baseCells['番号'] = baseCells['番号'].filter((_, index) => index % 2 !== 0);
|
||||||
const sortedRecords = Object.values(recordMap.byId).sort((a, b) => a['idKey'].localeCompare(b['idKey']));
|
const sortedRecords = Object.values(recordMap.byId).sort((a, b) =>
|
||||||
|
parseInt(a['id'], 10) - parseInt(b['id'], 10)
|
||||||
|
);
|
||||||
|
|
||||||
const lastPage = 2;
|
const lastPage = 2;
|
||||||
const baseForTemplate = baseCells['番号'][lastPage - 1]; // 番号 merged 2 rows
|
const baseForTemplate = baseCells['番号'][lastPage - 1]; // 番号 merged 2 rows
|
||||||
|
|||||||
Reference in New Issue
Block a user