From e79579a2e2d6245e2cdc9ebcc44a4b4d8401f781 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 9 Jan 2025 12:20:06 +0000 Subject: [PATCH] rep defecty 35 --- components/pdftemplates/enforcement_pdf.js | 8 ++++++-- components/pdftemplates/finalComments_pdf.js | 6 ++++-- components/pdftemplates/lpaQuestionnaire_pdf.js | 8 ++++++-- components/pdftemplates/other_pdf.js | 6 ++++-- components/pdftemplates/statement_pdf.js | 6 ++++-- components/pdftemplates/writtenStatement_pdf.js | 6 ++++-- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js index fc3b7031..ef34ef8f 100644 --- a/components/pdftemplates/enforcement_pdf.js +++ b/components/pdftemplates/enforcement_pdf.js @@ -7,7 +7,7 @@ import { View, } from "@react-pdf/renderer"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; const styles = StyleSheet.create({ page: { @@ -1543,7 +1543,11 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize( + p.size + )}{" "} + {"\n"} ); diff --git a/components/pdftemplates/finalComments_pdf.js b/components/pdftemplates/finalComments_pdf.js index d90c04db..2cb13523 100644 --- a/components/pdftemplates/finalComments_pdf.js +++ b/components/pdftemplates/finalComments_pdf.js @@ -10,7 +10,7 @@ import ReactPDF, { } from "@react-pdf/renderer"; import { createElement } from "react"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import transLookupCY from "../../locales/cy/myrepresentations.json"; import transLookupEN from "../../locales/en/myrepresentations.json"; @@ -377,7 +377,9 @@ export const finalComments_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize(p.size)}{" "} + {"\n"} ); diff --git a/components/pdftemplates/lpaQuestionnaire_pdf.js b/components/pdftemplates/lpaQuestionnaire_pdf.js index d86ee469..267a9a45 100644 --- a/components/pdftemplates/lpaQuestionnaire_pdf.js +++ b/components/pdftemplates/lpaQuestionnaire_pdf.js @@ -7,7 +7,7 @@ import { View, } from "@react-pdf/renderer"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import transLookupCY from "../../locales/cy/myrepresentations.json"; import transLookupEN from "../../locales/en/myrepresentations.json"; @@ -1413,7 +1413,11 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize( + p.size + )}{" "} + {"\n"} ); diff --git a/components/pdftemplates/other_pdf.js b/components/pdftemplates/other_pdf.js index 550ec54f..f8508bf8 100644 --- a/components/pdftemplates/other_pdf.js +++ b/components/pdftemplates/other_pdf.js @@ -10,7 +10,7 @@ import ReactPDF, { } from "@react-pdf/renderer"; import { createElement } from "react"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import transLookupCY from "../../locales/cy/myrepresentations.json"; import transLookupEN from "../../locales/en/myrepresentations.json"; @@ -312,7 +312,9 @@ export const other_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize(p.size)}{" "} + {"\n"} ); diff --git a/components/pdftemplates/statement_pdf.js b/components/pdftemplates/statement_pdf.js index 921c340c..2d8bd406 100644 --- a/components/pdftemplates/statement_pdf.js +++ b/components/pdftemplates/statement_pdf.js @@ -7,7 +7,7 @@ import { View, } from "@react-pdf/renderer"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; import transLookupCY from "../../locales/cy/myrepresentations.json"; import transLookupEN from "../../locales/en/myrepresentations.json"; @@ -371,7 +371,9 @@ export const statement_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize(p.size)}{" "} + {"\n"} ); diff --git a/components/pdftemplates/writtenStatement_pdf.js b/components/pdftemplates/writtenStatement_pdf.js index 09cedad8..235ec4d5 100644 --- a/components/pdftemplates/writtenStatement_pdf.js +++ b/components/pdftemplates/writtenStatement_pdf.js @@ -7,7 +7,7 @@ import { View, } from "@react-pdf/renderer"; import Html from "react-pdf-html"; -import { getFormCollectionByID } from "../../components/utils"; +import { getFormCollectionByID, bytesToSize } from "../../components/utils"; const styles = StyleSheet.create({ page: { @@ -289,7 +289,9 @@ export const writtenStatement_pdf = ({ docProps }) => { styles.questionTextMid } > - {p.name} - {p.size} + {p.name} -{" "} + {bytesToSize(p.size)}{" "} + {"\n"} );