fix: remove unused imports and dead code to clear ESLint errors

This commit is contained in:
Ryan Moon
2026-04-01 20:34:56 -05:00
parent a73c2de26e
commit 05f926c0dc
23 changed files with 34 additions and 54 deletions

View File

@@ -9,9 +9,9 @@ import { Button } from '@/components/ui/button'
import { Label } from '@/components/ui/label'
import { Badge } from '@/components/ui/badge'
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog'
import { FileText, Download, Check, Eye, Lock } from 'lucide-react'
import { FileText, Download, Check, Eye } from 'lucide-react'
import { toast } from 'sonner'
import type { RepairTicket, RepairLineItem, RepairNote } from '@/types/repair'
import type { RepairTicket, RepairLineItem } from '@/types/repair'
interface FileRecord {
id: string
@@ -65,7 +65,7 @@ export function PdfModal({ ticket, lineItems, ticketId }: PdfModalProps) {
function toggleNote(id: string) {
setSelectedNoteIds((prev) => {
const next = new Set(prev)
next.has(id) ? next.delete(id) : next.add(id)
if (next.has(id)) { next.delete(id) } else { next.add(id) }
return next
})
}
@@ -73,7 +73,7 @@ export function PdfModal({ ticket, lineItems, ticketId }: PdfModalProps) {
function togglePhoto(id: string) {
setSelectedPhotoIds((prev) => {
const next = new Set(prev)
next.has(id) ? next.delete(id) : next.add(id)
if (next.has(id)) { next.delete(id) } else { next.add(id) }
return next
})
}
@@ -102,7 +102,7 @@ export function PdfModal({ ticket, lineItems, ticketId }: PdfModalProps) {
)
toast.success('PDF generated and saved to documents')
setOpen(false)
} catch (err) {
} catch {
toast.error('Failed to generate PDF')
} finally {
setGenerating(false)