Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ function HearingsTab({ caseId, caseData }) {
<label style={{ display: 'block', color: 'var(--text-secondary)', fontSize: '0.875rem', marginBottom: '0.5rem' }}>Duration</label>
<select
value={hearingData.durationMinutes}
onChange={e => setHearingData({ ...hearingData, durationMinutes: parseInt(e.target.value) })}
onChange={e => setHearingData({ ...hearingData, durationMinutes: parseInt(e.target.value, 10) })}
style={{
width: '100%', padding: '0.875rem', borderRadius: '0.75rem',
background: 'var(--bg-glass)', border: 'var(--border-glass)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,77 +302,4 @@ export default function CasePreparationPage() {
if (confirm("Send this draft to the client for approval?")) {
try {
await import('../../services/api').then(({ default: api }) =>
api.post(`/api/v1/cases/${selectedCaseId}/submit-draft`, { draftContent })
);
alert("Draft sent to client!");
fetchCaseDetails(selectedCaseId);
} catch (e) { console.error(e); alert("Failed to send"); }
}
}}
className="btn"
style={{
display: 'flex', alignItems: 'center', gap: '0.5rem',
background: 'rgba(63, 93, 204, 0.08)',
color: 'var(--color-secondary)', border: '1px solid rgba(63, 93, 204, 0.2)',
padding: '0.6rem 1.25rem', borderRadius: '0.75rem', fontWeight: '700',
fontSize: '0.85rem', cursor: 'pointer'
}}>
<ArrowRight size={16} /> Send for Review
</button>

<button
onClick={handleExport}
className="btn btn-primary"
style={{
display: 'flex', alignItems: 'center', gap: '0.5rem',
fontSize: '0.85rem', padding: '0.6rem 1.25rem', borderRadius: '0.75rem'
}}>
<Download size={16} /> Export
</button>
</div>
</div>

<div style={{ position: 'relative' }}>
{!selectedTemplate && (
<div style={{
position: 'absolute', inset: 0, zIndex: 10,
background: 'var(--bg-glass-strong)', borderRadius: '1rem',
display: 'flex', flexDirection: 'column', alignItems: 'center',
justifyContent: 'center', textAlign: 'center', padding: '2rem'
}}>
<Type size={48} color="var(--text-secondary)" style={{ marginBottom: '1rem' }} />
<h3 style={{ color: 'var(--text-main)', marginBottom: '0.5rem' }}>No Template Selected</h3>
<p style={{ color: 'var(--text-secondary)', fontSize: '0.9rem', maxWidth: '300px' }}>
Please select a document type from the sidebar to begin your professional draft.
</p>
</div>
)}
<textarea
value={draftContent}
onChange={(e) => setDraftContent(e.target.value)}
placeholder="Draft content will appear here..."
style={{
width: '100%',
height: '500px',
background: 'var(--bg-glass)',
border: 'var(--border-glass)',
borderRadius: '1rem',
padding: '2rem',
color: 'var(--text-main)',
fontFamily: '"Inter", "Courier New", monospace',
fontSize: '1rem',
lineHeight: '1.8',
outline: 'none',
resize: 'none'
}}
/>
</div>
</div>
</div>
<style>{`
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
`}</style>
</div>
);
}
.catch(err => console.error(err))
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ function TabEvidence({ caseId }) {
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))', gap: '1.5rem' }}>
{documents.map(doc => {
const dateStr = doc.uploadDate || doc.createdAt || new Date().toISOString();
const isValidDate = !isNaN(new Date(dateStr).getTime());
const isValidDate = !Number.isNaN(new Date(dateStr).getTime());

return (
<div key={doc.id} style={{
Expand Down
Loading
Loading