import styles from "../../styles"; import { colors } from "../../styles"; import { TransactionType } from "../Types/Types"; import StatusTextColor from "../StatusTextColor/StatusTextColor"; export interface props { transaction: TransactionType; onClick?: React.MouseEventHandler; } export default function TransactionEntry(props: props) { return (
props.onClick} >

ID: {props.transaction.id}

{props.transaction.timestamp}

Borrower: {props.transaction.borrower.name}{" "} {`(ID:${props.transaction.borrower.id})`}

{`(${props.transaction.borrower.course})`}

Teacher: {props.transaction.teacher.name}{" "} {`(ID:${props.transaction.teacher.id})`}

Subject: {props.transaction.subject}

{props.transaction.remarks}

Equipments:

{props.transaction.equipments.map((equipment) => (

{` - ${equipment.name} (ID:${equipment.id})`}

))}

{`${props.transaction.transaction_status}`}

); }