Skip to content

Commit

Permalink
MHR large search report with UXA. (#1005)
Browse files Browse the repository at this point in the history
* PPR large search report with UXA.

Signed-off-by: Doug Lovett <[email protected]>

* Get search pdf request restore previous behaviour.

Signed-off-by: Doug Lovett <[email protected]>

* Get account search histor request restore previous behaviour.

Signed-off-by: Doug Lovett <[email protected]>

* Cumulative unit test updates.

Signed-off-by: Doug Lovett <[email protected]>

* Resolve GCP limits preventing large pdf downloads.

Signed-off-by: Doug Lovett <[email protected]>

Signed-off-by: Doug Lovett <[email protected]>
  • Loading branch information
doug-lovett authored Oct 25, 2022
1 parent 6590641 commit 23bd60c
Show file tree
Hide file tree
Showing 15 changed files with 966 additions and 276 deletions.
120 changes: 120 additions & 0 deletions ppr-api/report-templates/searchCoverV2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
[[macros.html]]

<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ meta_title }}</title>
<meta charset="UTF-8">
<meta name="author" content="BC Registries and Online Services">
{% if environment == '' %}
[[v2/stylePage.html]]
{% else %}
[[v2/stylePageDraft.html]]
{% endif %}
[[v2/style.html]]
</head>
<body>
<div class="business-details-container mtn-2">

{% if meta_subject|length > 70 %}
<table class="business-name-header-long ma-0 pa-0" role="presentation">
<tr>
<td class="lbl-business-name ma-0 pt-3 pb-3">
{{ meta_subject }}
</td>
</tr>
</table>
{% else %}
<table class="business-name-header" role="presentation">
<tr>
<td class="lbl-business-name ma-0 pa-0">
{{ meta_subject }}
</td>
</tr>
</table>
{% endif %}

<table class="business-details-table" role="presentation">
<tr>
<td class="lbl-business-detail">
<div>Search Date and Time:</div>
<div>Account Name:</div>
{% if searchQuery.clientReferenceId is defined and searchQuery.clientReferenceId != "" %}
<div>Folio Number:</div>
{% endif %}
<div>Number of Sub-Reports:</div>
</td>
<td>
<div>{{searchDateTime}}</div>
<div>
{% if meta_account_name is defined %}
{{meta_account_name}}
{% else %}
Not available.
{% endif %}
</div>
{% if searchQuery.clientReferenceId is defined and searchQuery.clientReferenceId != "" %}
<div>{{searchQuery.clientReferenceId}}</div>
{% endif %}
{% if subreport is defined and subreport != '' %}
<div>{{subreport}}</div>
{% endif %}
<div>{{reportCount}}</div>
</td>
<td class="registar-certify-section">
</td>
</tr>
</table>
</div>

<table class="search-cover-info-table mt-6" role="presentation">
<tr>
<td>
This search result report contains a large number of registrations and has been divided into multiple sub-reports.
</td>
</tr>
</table>

<table class="header-table-toc mt-6" role="presentation">
<tr>
<th colspan="3" class="header-toc-title pt-2">
TABLE OF CONTENTS
</th>
</tr>
<tr class="mt-2">
<td>
Total Registrations in Report: {{ totalResultsSize }}
</td>
<td>Total Exact Matches: {{ exactResultsSize }}</td>
<td>Total Search Report Pages: {{ reportPageCount }}</td>
</tr>
</table>

<div class="container pt-4">
<table class="search-cover-summary-table mt-4" role="presentation">
<tr class="search-cover-summary-table-header">
<td class="top-align"></td>
<td class="top-align">Number of Registrations in Sub-report</td>
<td class="top-align">Number of Exact Matches in Sub-report</td>
<td class="top-align pb-4">First Registration Date</td>
<td class="top-align pb-4">Last Registration Date</td>
<td class="top-align pb-4">Page</td>
</tr>
{% for result in reports %}
<tr>
<td>{{result.index}}</td>
<td>{{result.registrationCount}}</td>
<td>{{result.exactCount}}</td>
<td>{{result.startDate}}</td>
<td>{{result.endDate}}</td>
<td>{{result.startPage}}</td>
</tr>
<tr class="solid-row-separator">
<td colspan="3" style="height:1px"/>
</tr>
{% endfor %}
</table>
</div>
<p class="last-page"></p>
</body>
</html>
103 changes: 59 additions & 44 deletions ppr-api/report-templates/searchResultV2.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
<title>{{ meta_title }}</title>
<meta charset="UTF-8">
<meta name="author" content="BC Registries and Online Services">
{% if search_light is defined and search_light %}
[[v2/stylePageLight.html]]
[[v2/styleMail.html]]
{% if environment == '' %}
[[v2/stylePage.html]]
{% else %}
{% if environment == '' %}
[[v2/stylePage.html]]
{% else %}
[[v2/stylePageDraft.html]]
{% endif %}
[[v2/style.html]]
[[v2/stylePageDraft.html]]
{% endif %}

[[v2/style.html]]
</head>
<body>
<div class="business-details-container mtn-2">
Expand Down Expand Up @@ -48,6 +42,9 @@
{% if searchQuery.clientReferenceId is defined and searchQuery.clientReferenceId != "" %}
<div>Folio Number:</div>
{% endif %}
{% if subreport is defined and subreport != '' %}
<div>Sub-report:</div>
{% endif %}
</td>
<td>
<div>{{searchDateTime}}</div>
Expand All @@ -59,9 +56,10 @@
{% endif %}
</div>
{% if searchQuery.clientReferenceId is defined and searchQuery.clientReferenceId != "" %}
<div>
{{searchQuery.clientReferenceId}}
</div>
<div>{{searchQuery.clientReferenceId}}</div>
{% endif %}
{% if subreport is defined and subreport != '' %}
<div>{{subreport}}</div>
{% endif %}
</td>
<td class="registar-certify-section">
Expand All @@ -79,38 +77,55 @@
</table>
</div>

<table class="header-table-toc mt-6" role="presentation">
<tr>
<th colspan="3" class="header-toc-title pt-2">
{% if totalResultsSize > 0 %}
TABLE OF CONTENTS
{% elif selected is not defined %}
NIL RESULT
{% else %}
NO REGISTRATIONS SELECTED
{% endif %}
</th>
</tr>
<tr class="mt-2">
<td>
{% if totalResultsSize == 1 %}
1 Match in 1 Registration in Report
{% elif totalResultsSize > 1 %}
{{ selected|length }} Matches in {{ totalResultsSize }} Registrations in Report
{% else %}
0 Matches in 0 Registrations in Report
{% endif %}
</td>
<td>Exact Matches: {% if totalResultsSize == 0 %} 0 {% else %} {{ exactMatchCount }} {% endif %} (*)</td>
<td>Total Search Report Pages:
{% if subreport is defined and subreport != '' %}
<table class="header-table-toc-sub mt-6" role="presentation">
<tr>
<th colspan="3" class="header-toc-title pt-2">
SUB-REPORT {{ subreport|upper }} TABLE OF CONTENTS
</th>
</tr>
<tr class="mt-2">
<td>
{{ selected|length }} Matches in {{ totalResultsSize }} Registrations in Sub-report
</td>
<td>Exact Matches: {{ exactMatchCount }} (*)</td>
<td>Total Sub-report Pages: {{ totalPageCount }}</td>
</tr>
</table>
{% else %}
<table class="header-table-toc mt-6" role="presentation">
<tr>
<th colspan="3" class="header-toc-title pt-2">
{% if totalResultsSize > 0 %}
{{ totalPageCount }}
TABLE OF CONTENTS
{% elif selected is not defined %}
NIL RESULT
{% else %}
0
NO REGISTRATIONS SELECTED
{% endif %}
</td>
</tr>
</table>
</th>
</tr>
<tr class="mt-2">
<td>
{% if totalResultsSize == 1 %}
1 Match in 1 Registration in Report
{% elif totalResultsSize > 1 %}
{{ selected|length }} Matches in {{ totalResultsSize }} Registrations in Report
{% else %}
0 Matches in 0 Registrations in Report
{% endif %}
</td>
<td>Exact Matches: {% if totalResultsSize == 0 %} 0 {% else %} {{ exactMatchCount }} {% endif %} (*)</td>
<td>Total Search Report Pages:
{% if totalResultsSize > 0 %}
{{ totalPageCount }}
{% else %}
0
{% endif %}
</td>
</tr>
</table>
{% endif %}

{% if totalResultsSize > 0 %}
{% if selected is defined %}
Expand All @@ -130,15 +145,15 @@

{% if totalResultsSize > 0 %}
{% for detail in details %}
{% if search_light is not defined or not search_light %}
{% if search_large is not defined or not search_large %}
<p style="page-break-before: always" ></p>
{% else %}
<div class="pt-6"></div>
{% endif %}
[[search-result/financingStatement.html]]

{% if detail.financingStatement.changes is defined %}
{% if search_light is not defined or not search_light %}
{% if search_large is not defined or not search_large %}
<p style="page-break-before: always" ></p>
{% endif %}
<div class="separator-header mt-4"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<td class="top-align"></td>
<td class="top-align">Base Registration</td>
<td class="top-align">Base Registration Date</td>
<td class="top-align">Debtor Name</td>
<td class="top-align pb-4">Debtor Name</td>
{% if searchQuery.type == 'INDIVIDUAL_DEBTOR' %}
<td class="top-align">Birth Date</td>
<td class="top-align pb-4">Birth Date</td>
{% endif %}
<td class="top-align">Page</td>
<td class="top-align pb-4">Page</td>
</tr>
{% for result in selected %}
<tr class="no-page-break">
Expand Down Expand Up @@ -66,10 +66,10 @@
<table class="selected-reg-num-table mt-4" role="presentation">
<tr class="selected-reg-num-table-header no-page-break">
<td class="top-align"></td>
<td class="top-align">Base Registration</td>
<td class="top-align pb-4">Base Registration</td>
<td class="top-align">Base Registration Date</td>
<td class="top-align">Registration Type</td>
<td class="top-align">Page</td>
<td class="top-align pb-8">Registration Type</td>
<td class="top-align pb-8">Page</td>
</tr>
<tr class="no-page-break">
<td>1</td>
Expand All @@ -88,13 +88,13 @@
<table class="selected-serial-table mt-4" role="presentation">
<tr class="selected-serial-table-header no-page-break">
<td class="top-align"></td>
<td class="top-align">Base Registration</td>
<td class="top-align pb-4">Base Registration</td>
<td class="top-align">Base Registration Date</td>
<td class="top-align">Serial Number</td>
<td class="top-align">Type Code</td>
<td class="top-align">Year</td>
<td class="top-align">Make/Model</td>
<td class="top-align">Page</td>
<td class="top-align pb-8">Serial Number</td>
<td class="top-align pb-4">Type Code</td>
<td class="top-align pb-8">Year</td>
<td class="top-align pb-8">Make/Model</td>
<td class="top-align pb-8">Page</td>
</tr>
{% for result in selected %}
<tr class="no-page-break">
Expand Down Expand Up @@ -140,13 +140,13 @@
<table class="selected-mhr-table mt-4" role="presentation">
<tr class="selected-mhr-table-header no-page-break">
<td class="top-align"></td>
<td class="top-align">Base Registration</td>
<td class="top-align pb-4">Base Registration</td>
<td class="top-align">Base Registration Date</td>
<td class="top-align">Serial Number</td>
<td class="top-align">Year</td>
<td class="top-align">Make/Model</td>
<td class="top-align">MHR Number</td>
<td class="top-align">Page</td>
<td class="top-align pb-8">Serial Number</td>
<td class="top-align pb-8">Year</td>
<td class="top-align pb-8">Make/Model</td>
<td class="top-align pb-8">MHR Number</td>
<td class="top-align pb-8">Page</td>
</tr>
{% for result in selected %}
<tr class="no-page-break">
Expand Down
Loading

0 comments on commit 23bd60c

Please sign in to comment.