diff --git a/src/Components/TransactionPDF/TransactionPDF.tsx b/src/Components/TransactionPDF/TransactionPDF.tsx index 7605d40..fae3c08 100644 --- a/src/Components/TransactionPDF/TransactionPDF.tsx +++ b/src/Components/TransactionPDF/TransactionPDF.tsx @@ -8,10 +8,30 @@ import { import ustplogo from "../../assets/ustp-logo.png"; type props = { - transaction: TransactionType; + transaction: TransactionType | null; }; export default function TransactionPDF(props: props) { + if (!props.transaction) { + return ( + + + + + Invalid transaction PDF specified + + + + + ); + } return ( @@ -52,7 +72,6 @@ export default function TransactionPDF(props: props) { /> - - + - BORROWER'S SLIP + + {" "} + BORROWER'S SLIP{" "} + @@ -186,7 +208,10 @@ export default function TransactionPDF(props: props) { style={{ textDecoration: "underline" }} >{`${props.transaction.borrower.course}`}{" "} {"\n"} - Section: {props.transaction.section} + Section:{" "} + + {props.transaction.section} + @@ -230,7 +255,7 @@ export default function TransactionPDF(props: props) { display: "flex", gap: 5, alignSelf: "stretch", - marginTop: "10" + marginTop: "10", }} > {/* Consumables Area */} - + {/* Members here */} - + {/* Remarks */} - - - - Remarks - - - + + - {props.transaction.remarks} + Remarks + + + {props.transaction.remarks} + +