Skip to content

Commit cc148a4

Browse files
committed
Adding changes to fix excel export.
1 parent 01d3d09 commit cc148a4

File tree

6 files changed

+51
-6
lines changed

6 files changed

+51
-6
lines changed

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.Designer.cs

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.da.Designer.cs

Lines changed: 15 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.da.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,10 @@
8484
<data name="PlanRegistrationFound" xml:space="preserve">
8585
<value>Registrering hentet</value>
8686
</data>
87+
<data name="From" xml:space="preserve">
88+
<value>Fra</value>
89+
</data>
90+
<data name="To" xml:space="preserve">
91+
<value>Til</value>
92+
</data>
8793
</root>

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,10 @@
8484
<data name="PlanRegistrationFound" xml:space="preserve">
8585
<value>Plan registration found</value>
8686
</data>
87+
<data name="From" xml:space="preserve">
88+
<value>From</value>
89+
</data>
90+
<data name="To" xml:space="preserve">
91+
<value>To</value>
92+
</data>
8793
</root>

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/TimePlanningWorkingHoursService/TimePlanningWorkingHoursService.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,10 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(TimePlanni
13801380
var content = await Index(model);
13811381
if (!content.Success) return new OperationDataResult<Stream>(false, content.Message);
13821382

1383-
var timePlannings = content.Model;
1383+
// remove the first entry from the content.Model
1384+
var timePlannings = content.Model.Skip(1).ToList();
1385+
1386+
//var timePlannings = content.Model;
13841387
var plr = new PlanRegistration();
13851388

13861389
// Fill data
@@ -1582,6 +1585,8 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(
15821585
WorksheetPart totalWorksheetPart1 = workbookPart1.AddNewPart<WorksheetPart>($"rId1");
15831586
var totalHeaders = new[]
15841587
{
1588+
Translations.From,
1589+
Translations.To,
15851590
Translations.Employee_no,
15861591
Translations.Worker,
15871592
Translations.PlanHours,
@@ -1731,7 +1736,9 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(
17311736
});
17321737
if (!content.Success) return new OperationDataResult<Stream>(false, content.Message);
17331738

1734-
var timePlannings = content.Model;
1739+
//var timePlannings = content.Model;
1740+
1741+
var timePlannings = content.Model.Skip(1).ToList();
17351742
var plr = new PlanRegistration();
17361743

17371744
// Fill data
@@ -1762,6 +1769,8 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(
17621769
#region TotalSheetFillData
17631770

17641771
var totalRow = new Row() { RowIndex = (uint)totalRowIndex };
1772+
totalRow.Append(CreateDateCell(model.DateFrom));
1773+
totalRow.Append(CreateDateCell(model.DateTo));
17651774
totalRow.Append(CreateCell(worker.EmployeeNo ?? string.Empty));
17661775
totalRow.Append(CreateCell(site.Name));
17671776
totalRow.Append(CreateNumericCell(content.Model.Sum(x => x.PlanHours)));
-31 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)