This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Servpro.FranchiseSystems.Framework.Messaging.Events.Jobs.DryingReport.Models.DailyNarrativeDto | |
@if (Model?.DailyNarratives != null && Model.DailyNarratives.Count > 0) | |
{ | |
<div class="floatLeft"> | |
<p class="title">Daily Narrative</p> | |
<table class="daily-narrative-table" summary="Daily Narrative"> | |
<tr> | |
<th scope="col" class="table-caption leftColumn">Timestamp</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost("commands/generate-drying-report")] | |
[MiddlewareFilter(typeof(JsReportPipeline))] | |
public async Task<IActionResult> GenerateDryingReport(Guid jobId, DryingReportTestScenarios isMock = 0) | |
{ | |
if (jobId == Guid.Empty) | |
return BadRequest(nameof(jobId)); | |
var dryingReport = isMock != DryingReportTestScenarios.UseJobId ? DryingReportGeneratedDtoMockData.GetMockForPreview(isMock) : await _mediator.Send(new GenerateDryingReport.Command(jobId)); | |
//Render the Header. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using jsreport.AspNetCore; | |
using jsreport.Local; | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
//setup MVC because we need the server pdf rendering | |
services.AddMvc(); | |
services.AddJsReport(new LocalReporting() | |
.UseBinary(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Collection("api")] | |
public class DryingReportTests | |
{ | |
private static readonly string OutputPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\~DRTestOutput\"; | |
private readonly TestContext _context; | |
public DryingReportTests(TestContext context) | |
=> _context = context; | |
[Fact(Skip = "Do not run in pipeline - test used for verification and actual PDF generation")] |