birth date and place fields

deepsource-autofix-76c6eb20
Dan Gowans 2024-07-02 09:58:12 -04:00
parent 7f2d7638fd
commit 8cba2c528c
1 changed files with 17 additions and 9 deletions

View File

@ -23,8 +23,7 @@
const recipient = recipientOccupants.length > 0 ? recipientOccupants[0] : undefined; const recipient = recipientOccupants.length > 0 ? recipientOccupants[0] : undefined;
const deathDateOccupantTypeField = "Death Date"; const recipientFields = ["Birth Date", "Birth Place"]
const deathPlaceOccupantTypeField = "Death Place";
%> %>
<html> <html>
<head> <head>
@ -167,13 +166,22 @@
</tr><tr> </tr><tr>
<th class="has-text-left">E-mail:</th> <th class="has-text-left">E-mail:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantEmailAddress : "" %>&nbsp;</td> <td class="has-border-bottom"><%= recipient ? recipient.occupantEmailAddress : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Date of birth:</th>
<td class="has-border-bottom">&nbsp;</td>
</tr><tr>
<th class="has-text-left has-text-nowrap">Place of birth:</th>
<td class="has-border-bottom" style="width:100%">&nbsp;</td>
</tr> </tr>
<%
for (const fieldName of recipientFields) {
%>
<tr>
<th class="has-text-left"><%= fieldName %>:</th>
<%
const field = lotOccupancy.lotOccupancyFields.find((possibleField) => {
return possibleField.occupancyTypeField === fieldName;
});
%>
<td class="has-border-bottom"><%= field?.lotOccupancyFieldValue ?? "" %>&nbsp;</td>
</tr>
<%
}
%>
</tbody> </tbody>
</table> </table>
</td> </td>
@ -216,7 +224,7 @@
</tr> </tr>
<% <%
for (const field of lotOccupancy.lotOccupancyFields) { for (const field of lotOccupancy.lotOccupancyFields) {
if (field.lotOccupancyFieldValue) { if (!recipientFields.includes(field.occupancyTypeField) && field.lotOccupancyFieldValue) {
%> %>
<tr> <tr>
<td><%= field.occupancyTypeField %></td> <td><%= field.occupancyTypeField %></td>