-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR requests, needs rebasing when other PR is done
- Loading branch information
Peter York
committed
Sep 30, 2024
1 parent
ccf2c2e
commit b3682bc
Showing
3 changed files
with
57 additions
and
75 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
<script lang="ts"> | ||
import { state } from "../data"; | ||
import { criteria } from "../lists"; | ||
import Report from "./Report.svelte"; | ||
import { DefaultButton } from "govuk-svelte"; | ||
import { base } from "$app/paths"; | ||
function openReportInNewTab() { | ||
window.open(`${base}/planning/report/printable`, '_blank').focus(); | ||
} | ||
function openReportInNewTab() { | ||
window.open(`${base}/planning/report/printable`, "_blank"); | ||
} | ||
</script> | ||
|
||
<div class="govuk-width-container"> | ||
<Report> | ||
<div> | ||
<p>The export to PDF button will open a new tab. Right-click the page and select 'Print'. Then you can export to PDF.</p> | ||
<p> | ||
The export to PDF button will open a new tab. Right-click the page and | ||
select 'Print'. Then you can export to PDF. | ||
</p> | ||
<DefaultButton on:click={openReportInNewTab}>Export to PDF</DefaultButton> | ||
</div> | ||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Application details | ||
</caption> | ||
{#each [["Site address", $state.summary.siteAddress], ["Local authority reference", $state.summary.localAuthorityReference], ["ATE reference", $state.summary.ateReference], ["Local planning authority", $state.summary.localPlanningAuthority], ["Local highway authority", $state.summary.localHighwayAuthority], ["Completed by", $state.summary.completedBy], ["Date", $state.summary.date], ["Application type", $state.summary.applicationType], ["Summary of proposal", $state.summary.proposalSummary]] as [key, value]} | ||
<tr> | ||
<th>{key}</th> | ||
<td>{value}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
|
||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Assessment report | ||
</caption> | ||
<tr> | ||
<th>Criterion</th> | ||
<th>Rating</th> | ||
<th>Appraiser Comments</th> | ||
<th>Relevant Policy & Guidance</th> | ||
</tr> | ||
{#each criteria as criterion, idx} | ||
<tr> | ||
<td>{idx + 1}. {criterion}</td> | ||
<td>{$state.ratings[idx]}</td> | ||
<td>{$state.appraiserComments[idx]}</td> | ||
<td>{$state.localGuidance[idx]}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</div> | ||
</Report> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script lang="ts"> | ||
import { state } from "../data"; | ||
import { criteria } from "../lists"; | ||
import { DefaultButton } from "govuk-svelte"; | ||
import { base } from "$app/paths"; | ||
function openReportInNewTab() { | ||
window.open(`${base}/planning/report/printable`, "_blank").focus(); | ||
} | ||
</script> | ||
|
||
<div class="govuk-width-container"> | ||
<slot /> | ||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Application details | ||
</caption> | ||
{#each [["Site address", $state.summary.siteAddress], ["Local authority reference", $state.summary.localAuthorityReference], ["ATE reference", $state.summary.ateReference], ["Local planning authority", $state.summary.localPlanningAuthority], ["Local highway authority", $state.summary.localHighwayAuthority], ["Completed by", $state.summary.completedBy], ["Date", $state.summary.date], ["Application type", $state.summary.applicationType], ["Summary of proposal", $state.summary.proposalSummary]] as [key, value]} | ||
<tr> | ||
<th>{key}</th> | ||
<td>{value}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
|
||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Assessment report | ||
</caption> | ||
<tr> | ||
<th>Criterion</th> | ||
<th>Rating</th> | ||
<th>Appraiser Comments</th> | ||
<th>Relevant Policy & Guidance</th> | ||
</tr> | ||
{#each criteria as criterion, idx} | ||
<tr> | ||
<td>{idx + 1}. {criterion}</td> | ||
<td>{$state.ratings[idx]}</td> | ||
<td>{$state.appraiserComments[idx]}</td> | ||
<td>{$state.localGuidance[idx]}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,4 @@ | ||
<script lang="ts"> | ||
import { state } from "../../data"; | ||
import { criteria } from "../../lists"; | ||
import Report from "../Report.svelte"; | ||
</script> | ||
|
||
<div class="govuk-width-container"> | ||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Application details | ||
</caption> | ||
{#each [["Site address", $state.summary.siteAddress], ["Local authority reference", $state.summary.localAuthorityReference], ["ATE reference", $state.summary.ateReference], ["Local planning authority", $state.summary.localPlanningAuthority], ["Local highway authority", $state.summary.localHighwayAuthority], ["Completed by", $state.summary.completedBy], ["Date", $state.summary.date], ["Application type", $state.summary.applicationType], ["Summary of proposal", $state.summary.proposalSummary]] as [key, value]} | ||
<tr> | ||
<th>{key}</th> | ||
<td>{value}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
|
||
<table> | ||
<caption class="govuk-table__caption govuk-table__caption--m"> | ||
Assessment report | ||
</caption> | ||
<tr> | ||
<th>Criterion</th> | ||
<th>Rating</th> | ||
<th>Appraiser Comments</th> | ||
<th>Relevant Policy & Guidance</th> | ||
</tr> | ||
{#each criteria as criterion, idx} | ||
<tr> | ||
<td>{idx + 1}. {criterion}</td> | ||
<td>{$state.ratings[idx]}</td> | ||
<td>{$state.appraiserComments[idx]}</td> | ||
<td>{$state.localGuidance[idx]}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</div> | ||
<Report/> |