Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readmeconfig for sheet #1142

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utilities/project-factory/src/server/utils/excelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ function updateFontNameToRoboto(worksheet: ExcelJS.Worksheet) {

function formatWorksheet(worksheet: any, datas: any, headerSet: any) {
// Add empty rows after the main header
worksheet.addRow([]);
worksheet.addRow([]);
// worksheet.addRow([]);
// worksheet.addRow([]);
worksheet.addRow([]);

// Add the data rows with text wrapping
Expand Down
14 changes: 8 additions & 6 deletions utilities/project-factory/src/server/utils/genericUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,15 @@ async function createReadMeSheet(request: any, workbook: any, mainHeader: any, l
const headerSet = new Set();


const datas = readMeConfig.texts.flatMap((text: any) => {
const descriptions = text.descriptions.map((description: any) => {
return getLocalizedName(description.text, localizationMap);
const datas = readMeConfig.texts
.filter((text: any) => text?.inSheet) // Filter out texts with inSheet set to false
.flatMap((text: any) => {
const descriptions = text.descriptions.map((description: any) => {
return getLocalizedName(description.text, localizationMap);
});
headerSet.add(getLocalizedName(text.header, localizationMap));
return [getLocalizedName(text.header, localizationMap), ...descriptions, ""];
});
headerSet.add(getLocalizedName(text.header, localizationMap));
return [getLocalizedName(text.header, localizationMap), ...descriptions, "", "", "", ""];
});

// Create the worksheet and add the main header
const worksheet = workbook.addWorksheet(getLocalizedName("HCM_README_SHEETNAME", localizationMap));
Expand Down
Loading