Skip to content

Commit

Permalink
removed await
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish-egov committed Nov 13, 2024
1 parent 57a6ce5 commit a5acb54
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions health-services/project-factory/src/server/utils/genericUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,8 @@ async function createFacilityAndBoundaryFile(facilitySheetData: any, boundaryShe
addDataToSheet(request, facilitySheet, facilitySheetData, undefined, undefined, true, false, localizationMap, fileUrl, schema);
hideUniqueIdentifierColumn(facilitySheet, createAndSearch?.["facility"]?.uniqueIdentifierColumn);
changeFirstRowColumnColour(facilitySheet, 'E06666');
await handledropdownthings(facilitySheet, request.body?.dropdowns);
await handleHiddenColumns(facilitySheet, request.body?.hiddenColumns);
handledropdownthings(facilitySheet, request.body?.dropdowns);
handleHiddenColumns(facilitySheet, request.body?.hiddenColumns);

// Add boundary sheet to the workbook
const localizedBoundaryTab = getLocalizedName(getBoundaryTabName(), localizationMap);
Expand All @@ -753,7 +753,7 @@ async function createFacilityAndBoundaryFile(facilitySheetData: any, boundaryShe
request.body.fileDetails = fileDetails;
}

async function handledropdownthings(sheet: any, dropdowns: any) {
function handledropdownthings(sheet: any, dropdowns: any) {
let dropdownColumnIndex = -1;
if (dropdowns) {
for (const key of Object.keys(dropdowns)) {
Expand Down Expand Up @@ -788,7 +788,7 @@ async function handledropdownthings(sheet: any, dropdowns: any) {
}
}

async function handleHiddenColumns(sheet: any, hiddenColumns: any) {
function handleHiddenColumns(sheet: any, hiddenColumns: any) {
if (hiddenColumns) {
for (const columnName of hiddenColumns) {
const firstRow = sheet.getRow(1);
Expand Down Expand Up @@ -821,8 +821,8 @@ async function createUserAndBoundaryFile(userSheetData: any, boundarySheetData:
const userSheet = workbook.addWorksheet(localizedUserTab);
addDataToSheet(request, userSheet, userSheetData, undefined, undefined, true, false, localizationMap, fileUrl, schema);
hideUniqueIdentifierColumn(userSheet, createAndSearch?.["user"]?.uniqueIdentifierColumn);
await handledropdownthings(userSheet, request.body?.dropdowns);
await handleHiddenColumns(userSheet, request.body?.hiddenColumns);
handledropdownthings(userSheet, request.body?.dropdowns);
handleHiddenColumns(userSheet, request.body?.hiddenColumns);
// Add boundary sheet to the workbook
const localizedBoundaryTab = getLocalizedName(getBoundaryTabName(), localizationMap)
const boundarySheet = workbook.addWorksheet(localizedBoundaryTab);
Expand Down Expand Up @@ -988,8 +988,8 @@ async function generateUserSheetForMicroPlan(
// Create a sheet for each role, using the role name as the sheet name
const userSheet: any = workbook.addWorksheet(role);
addDataToSheet(request, userSheet, userSheetData, undefined, undefined, true, false, localizationMap, fileUrl, schema);
await handledropdownthings(userSheet, request.body?.dropdowns);
await handleHiddenColumns(userSheet, request.body?.hiddenColumns);
handledropdownthings(userSheet, request.body?.dropdowns);
handleHiddenColumns(userSheet, request.body?.hiddenColumns);
}

// Create and upload the workbook file
Expand Down

0 comments on commit a5acb54

Please sign in to comment.