@@ -10,10 +10,12 @@ import {
1010} from '../components/ui/dialog' ;
1111import { Button } from '../components/ui/button' ;
1212import { useEntries } from '../hooks/useEntries' ;
13+ import { POST } from '../api/resend/routes/sendTest' ;
1314
1415const ShareEmailModal : React . FC < { onClose : ( ) => void } > = ( { onClose } ) => {
1516 const { data } = useEntries ( ) ;
1617 const managerEmail = data . managerEmail ;
18+
1719 // Only include public statements that are not resolved.
1820 const publicStatements = data . entries . filter (
1921 ( entry ) => entry . isPublic && ! entry . isResolved
@@ -25,57 +27,49 @@ const ShareEmailModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
2527 < DialogTitle className = 'text-lg font-bold' >
2628 Sharing with: { managerEmail || 'No manager email set' }
2729 </ DialogTitle >
30+
2831 < DialogDescription className = 'mt-2' >
2932 Below are your public, unresolved statements and their pending
3033 actions:
3134 </ DialogDescription >
35+
3236 < div className = 'mt-4 space-y-4' >
3337 { publicStatements . length > 0 ? (
34- publicStatements . map ( ( entry ) => (
35- < div
36- key = { entry . id }
37- className = 'p-4 border rounded bg-white shadow-sm'
38- >
39- < p className = 'text-base font-semibold' > { entry . input } </ p >
40- { entry . actions && entry . actions . length > 0 && (
41- < div className = 'mt-2 space-y-2' >
42- { entry . actions
43- . filter ( ( action ) => ! action . completed )
44- . map ( ( action ) => (
45- < div
46- key = { action . id }
47- className = 'pl-4 border-l-2 border-gray-300'
48- >
49- < p className = 'text-sm' > { action . action } </ p >
50- { action . byDate && action . byDate . trim ( ) !== '' && (
51- < p className = 'text-xs text-gray-500' >
52- Due: { action . byDate }
53- </ p >
54- ) }
55- </ div >
56- ) ) }
57- </ div >
58- ) }
59- </ div >
60- ) )
38+ publicStatements . map ( ( entry ) => ( < div
39+ key = { entry . id }
40+ className = 'p-4 border rounded bg-white shadow-sm'
41+ >
42+ < p className = 'text-base font-semibold' > { entry . input } </ p >
43+ { entry . actions && entry . actions . length > 0 && (
44+ < div className = 'mt-2 space-y-2' >
45+ { entry . actions
46+ . filter ( ( action ) => ! action . completed )
47+ . map ( ( action ) => (
48+ < div
49+ key = { action . id }
50+ className = 'pl-4 border-l-2 border-gray-300'
51+ >
52+ < p className = 'text-sm' > { action . action } </ p >
53+ { action . byDate && action . byDate . trim ( ) !== '' && (
54+ < p className = 'text-xs text-gray-500' >
55+ Due: { action . byDate }
56+ </ p >
57+ ) }
58+ </ div >
59+ ) ) }
60+ </ div >
61+ ) }
62+ </ div > ) )
6163 ) : (
6264 < p className = 'text-gray-600' >
6365 No public unresolved statements available.
6466 </ p >
6567 ) }
6668 </ div >
69+
6770 < DialogFooter className = 'mt-4 flex justify-end space-x-4' >
68- < Button
69- variant = 'pink'
70- onClick = { ( ) => {
71- /* placeholder for Send */
72- } }
73- >
74- Send
75- </ Button >
76- < Button variant = 'pink' onClick = { onClose } >
77- Close
78- </ Button >
71+ < Button variant = 'pink' onClick = { ( ) => { POST ( ) } } > Send </ Button >
72+ < Button variant = 'pink' onClick = { onClose } > Close </ Button >
7973 </ DialogFooter >
8074 </ DialogContent >
8175 </ Dialog >
0 commit comments