Skip to content

Commit

Permalink
chore(estate): Include autonomous answer in formdata (#15075)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
juni-haukur and kodiakhq[bot] authored Jun 4, 2024
1 parent 6fa6386 commit 9a47b3e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { UploadData } from '../types'
import PDFDocument from 'pdfkit'
import getStream from 'get-stream'
import { EstateTypes } from '../consts'

const someValueIsSet = (object: Record<string, unknown>) => {
return Object.values(object).some((value) => value !== undefined)
Expand Down Expand Up @@ -60,6 +61,10 @@ export const transformUploadDataToPDFStream = async (
data.notifier.phoneNumber ?? 'Símanúmer vantar',
)
fieldWithValue(doc, 'Netfang', data.notifier.email ?? 'Netfang vantar')
if (data.applicationType === EstateTypes.permitForUndividedEstate) {
fieldWithValue(doc, 'Lögráða', data.notifier.autonomous ?? 'Svar vantar')
}

moveDownBy(2, doc)

if (data.representative) {
Expand Down

0 comments on commit 9a47b3e

Please sign in to comment.