Skip to content

Commit 285c4d9

Browse files
add database block options for frontend
1 parent 7acf7d0 commit 285c4d9

2 files changed

Lines changed: 451 additions & 14 deletions

File tree

src/components/ReportBuilder/ReportBuilderPDF.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,15 @@ export const ReportBuilderDocument = ({
689689
{block.type === 'test' && block.status ? (
690690
<Text style={{ ...s.statusText, ...statusStyle }}>Status: {block.status}</Text>
691691
) : null}
692-
{block.type === 'blank' || (block.type === 'test' && block.static)
693-
? htmlToElements(block.content, s)
694-
: markdownToElements(block.content, s)}
692+
{block.type === 'database' && block.format && block.format !== 'text' ? (
693+
<Text style={s.codeBlock}>{block.content || ''}</Text>
694+
) : block.type === 'database' && (!block.format || block.format === 'text') ? (
695+
markdownToElements(block.content, s)
696+
) : block.type === 'blank' || (block.type === 'test' && block.static) ? (
697+
htmlToElements(block.content, s)
698+
) : (
699+
markdownToElements(block.content, s)
700+
)}
695701
</View>
696702
)
697703
})}

0 commit comments

Comments
 (0)