Skip to content

Commit

Permalink
Merge pull request #313 from UserOfficeProject/release-2023-10-05
Browse files Browse the repository at this point in the history
Release 2023-10-05
  • Loading branch information
bashanlam authored Oct 5, 2023
2 parents 7848b48 + 0bf3ea6 commit 26308ac
Show file tree
Hide file tree
Showing 6 changed files with 423 additions and 179 deletions.
141 changes: 141 additions & 0 deletions example.custom-proposal-sample-declaration.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<html lang='en'>
<head>
<meta charset='utf-8' />

<!-- Bootstrap CSS -->
<link
href='http://localhost:4501/static/css/bootstrap.min.css'
rel='stylesheet'
/>

<link href='http://localhost:4501/fonts/segoeui' rel='stylesheet' />

<style>
body { font-size: 16px; line-height: 2; font-family: SegoeUI; } td, td h6
{ line-height: 1.5; } .bold { font-weight: bold; } .w-40 { width: 40%; }
.w-60 { width: 60%; } .no-break-inside { break-inside: avoid; }
.break-before { break-before: page; } .link-page a::after { content:
target-counter(attr(href), page); } .link-page::after { content: ', '; }
.link-page:last-of-type::after { content: none; } .index-value::after {
content: ''; }
</style>
</head>

<body>
<div class='container-fluid pt-5'>
<div class='row'>
<div class='col'>
<h4 class='title'>Sample: {{sample.title}}</h4>
<div class='row my-3'>
<div class='col'>
<table class='border w-100'>
<tbody class='border'>
{{#each sampleQuestionaryFields}}
{{#if ($eq this.question.dataType 'EMBELLISHMENT')}}
{{#if ($notEq this.config.omitFromPdf true)}}
<tr class='border-bottom'>
<td class='p-3 border-right' colspan='2'>
<h5 class='bold m-0'>{{this.config.plain}}</h5>
</td>
</tr>
{{/if}}
{{else}}
<tr class='border-bottom no-break-inside'>
<td class='p-3 border-right w-40'>
<h6 class='bold m-0'>{{this.question.question}}</h6>
</td>
<td class='p-3 w-60'>
{{#if ($eq this.question.dataType 'NUMBER_INPUT')}}
{{#if this.value.value}}
{{this.value.value}}
{{this.value.unit.unit}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if ($eq this.question.dataType 'BOOLEAN')}}
{{#if this.value}}Yes{{else}}No{{/if}}
{{else if ($eq this.question.dataType 'INTERVAL')}}
{{#if ($or this.value.min this.value.max)}}
{{this.value.min}}
-
{{this.value.max}}
{{#if this.value.unit}}
{{this.value.unit.unit}}
{{/if}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if ($eq this.question.dataType 'DATE')}}
{{#if this.value}} {{$utcDate this.value}} {{else}}
<em>Left blank</em>
{{/if}}
{{else if
($eq
this.question.dataType 'DYNAMIC_MULTIPLE_CHOICE'
)
}}
{{#if this.value}}
{{$join this.value ', '}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if
($eq
this.question.dataType 'SELECTION_FROM_OPTIONS'
)
}}
{{#if this.value}}
{{$join this.value ', '}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if ($eq this.question.dataType 'TEXT_INPUT')}}
{{#if this.value}}
{{this.value}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if
($eq this.question.dataType 'RICH_TEXT_INPUT')
}}
{{#if this.value}}
{{{this.value}}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if
($eq this.question.dataType 'INSTRUMENT_PICKER')
}}
{{#if this.value}}
{{{this.value}}}
{{else}}
<em>Left blank</em>
{{/if}}
{{else if ($eq this.question.dataType 'FILE_UPLOAD')}}
{{#if this.value}}
See attachment below
{{else}}
<em>Left blank</em>
{{/if}}
{{/if}}
</td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>

<h5 class='title'>Status:</h5>
{{sample.status}}

{{#if sample.safetyComment}}
<h5 class='title mt-3'>Comment:</h5>
{{sample.safetyComment}}
{{/if}}
</div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 26308ac

Please sign in to comment.