diff --git a/src/components/close-trade.tsx b/src/components/close-trade.tsx index 68b240e..a17659d 100644 --- a/src/components/close-trade.tsx +++ b/src/components/close-trade.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Stack, InputAdornment } from '@mui/material'; +import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Stack, InputAdornment, Typography, Grid } from '@mui/material'; import { DatePickerElement, FormContainer, TextFieldElement, TextareaAutosizeElement } from 'react-hook-form-mui'; export type CloseTradeCloseDialogReason = 'cancel' | 'close' @@ -20,6 +20,7 @@ import { Trade } from '@prisma/client'; export const CloseTradeDialog = (props: ITickerProps) => { const { onClose, open, tradeId } = props; const [trade, setTrade] = useState(null); + const [p1, setp1 ] = useState(0); useEffect(() => { ky(`/api/trades/${tradeId}`).json().then(j => setTrade(j)); @@ -47,7 +48,8 @@ export const CloseTradeDialog = (props: ITickerProps) => { contractPriceAtOpen: trade.contractPrice, tradeId: tradeId, notes: trade.notes, - transactionEndDate: dayjs() + transactionEndDate: dayjs(), + transactionStartDate: dayjs(trade.transactionStartDate).format('MM/DD/YYYY') } return { - - - $ }} /> + {/* {dv.symbol} ${dv.contractPriceAtOpen as unknown as string} - Purchased on {dv.transactionStartDate} */} + + + + + + + + + $ }} /> + + + + + + $ }} />