Skip to content

Commit

Permalink
Merge pull request #1630 from ORNL-AMO/issue-1627
Browse files Browse the repository at this point in the history
updates to import template
  • Loading branch information
rmroot authored Jun 17, 2024
2 parents 3c5b219 + b5e108b commit 4264e0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/upload-data/upload-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ export class UploadDataService {
&& sheetNames[8] == "Stationary Fuel - Other Energy" && sheetNames[9] == "Mobile Fuel" && sheetNames[10] == "Water" && sheetNames[11] == "Other Utility - Emission"
&& sheetNames[12] == "Predictors" && sheetNames[13] == "Fix Me" && sheetNames[14] == "HIDE_NAICS3") {
return "V2";
}
//sheet names for V2 updated issue 1627
else if (sheetNames[0] == "V2" && sheetNames[1] == "Getting Started" && sheetNames[2] == "HIDE_Lists" && sheetNames[3] == "HIDE_Meter_Lists" &&
sheetNames[4] == "Facilities" && sheetNames[5] == "Meters-Utilities" && sheetNames[6] == "HIDE_Meters-Utilites" && sheetNames[7] == "Electricity"
&& sheetNames[8] == "Stationary Fuel - Other Energy" && sheetNames[9] == "Mobile Fuel" && sheetNames[10] == "Water" && sheetNames[11] == "Other Utility - Emission"
&& sheetNames[12] == "Predictors" && sheetNames[13] == "Troubleshooting" && sheetNames[14] == "HIDE_NAICS3") {
console.log("V2.2")
return "V2";
} else if (sheetNames[0] == "Help" && sheetNames[1] == 'Facilities' && sheetNames[2] == "Meters-Utilities" && sheetNames[3] == "Electricity" && sheetNames[4] == "Non-electricity" && sheetNames[5] == "Predictors") {
return "V1";
} else {
Expand Down Expand Up @@ -303,7 +311,7 @@ export class UploadDataService {
//we can still access the data using this value
newMeter.importWizardName = groupItem.value;
//start with random meter number
newMeter.meterNumber = selectedFacility.name.replace(' ', '_') + '_' + newMeter.source .replace(' ', '_')+ '_' + Math.random().toString(36).substr(2, 3);
newMeter.meterNumber = selectedFacility.name.replace(' ', '_') + '_' + newMeter.source.replace(' ', '_') + '_' + Math.random().toString(36).substr(2, 3);

//set emissions mulitpliers
newMeter = this.editMeterFormService.setMultipliers(newMeter);
Expand Down
Binary file modified src/assets/csv_templates/VERIFI-Import-Data.xlsx
Binary file not shown.

0 comments on commit 4264e0e

Please sign in to comment.