Skip to content

Commit

Permalink
fix: carriage return on "precisions" and "description"
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Jun 26, 2024
1 parent f1109ea commit 70599fb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 86 deletions.
11 changes: 0 additions & 11 deletions packages/frontend/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { Route as LoginImport } from './routes/login'
import { Route as IndexImport } from './routes/index'
import { Route as ResetPasswordLinkImport } from './routes/reset-password.$link'
import { Route as PdfReportIdImport } from './routes/pdf.$reportId'
import { Route as ExportReportIdImport } from './routes/export.$reportId'
import { Route as EditReportIdImport } from './routes/edit.$reportId'

// Create Virtual Routes
Expand Down Expand Up @@ -59,11 +58,6 @@ const PdfReportIdRoute = PdfReportIdImport.update({
getParentRoute: () => rootRoute,
} as any)

const ExportReportIdRoute = ExportReportIdImport.update({
path: '/export/$reportId',
getParentRoute: () => rootRoute,
} as any)

const EditReportIdRoute = EditReportIdImport.update({
path: '/edit/$reportId',
getParentRoute: () => rootRoute,
Expand All @@ -89,10 +83,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof EditReportIdImport
parentRoute: typeof rootRoute
}
'/export/$reportId': {
preLoaderRoute: typeof ExportReportIdImport
parentRoute: typeof rootRoute
}
'/pdf/$reportId': {
preLoaderRoute: typeof PdfReportIdImport
parentRoute: typeof rootRoute
Expand All @@ -115,7 +105,6 @@ export const routeTree = rootRoute.addChildren([
LoginRoute,
SignupLazyRoute,
EditReportIdRoute,
ExportReportIdRoute,
PdfReportIdRoute,
ResetPasswordLinkRoute,
ResetPasswordIndexLazyRoute,
Expand Down
72 changes: 0 additions & 72 deletions packages/frontend/src/routes/export.$reportId.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/frontend/src/routes/pdf.$reportId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export const PDF = () => {
</Center>
);
}

return (
<styled.div w="100%" h="100%" bgColor={mode === "edit" ? "background-open-blue-france" : "unset"} overflowY="auto">
<TextEditorContextProvider>
Expand Down Expand Up @@ -342,6 +341,7 @@ const PdfCanvasPage = ({ file, page }: { file: string; page: number }) => {

return (
<styled.canvas
// @ts-ignore
ref={canvasRef}
width={{ base: "100%", lg: "800px" }}
my="16px"
Expand Down
12 changes: 10 additions & 2 deletions packages/pdf/src/report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,22 @@ export const getReportHtmlString = (
report.precisions
? `<p>
<strong>Précisions : </strong><br/>
<span>${report.precisions}</span>
<span>${report.precisions
?.split("\n")
.map((s) => s.trim())
.join("<br/>")}</span>
</p>`
: ""
}
<p>
<strong>Le projet pour rappel : </strong><br/>
${report.projectDescription ?? ""}
${
report.projectDescription
?.split("\n")
.map((s) => s.trim())
.join("<br/>") ?? ""
}
</p>
<p>
Expand Down

0 comments on commit 70599fb

Please sign in to comment.