Fix TypeScript compile errors blocking Docker build
- Add vite-env.d.ts for import.meta.env type support - Remove unused imports: ChevronRight, useCallback (x2), today - Silence unused attachments state read (keep setter for future use) - Fix FloatManagement changeTinTargets reducer: drop unused k, fix v type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
63a5a72fa3
commit
577e98e6b1
5 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { NavLink, useNavigate } from 'react-router-dom'
|
||||
import {
|
||||
Banknote, ClipboardList, BarChart2, Wallet, FileText, Settings, LogOut, ChevronRight,
|
||||
Banknote, ClipboardList, BarChart2, Wallet, FileText, Settings, LogOut,
|
||||
} from 'lucide-react'
|
||||
import type { User } from '../types'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useState, useCallback } from 'react'
|
||||
import { useState } from 'react'
|
||||
import { RefreshCw, Save, CheckCircle, Loader } from 'lucide-react'
|
||||
import { api } from '../api'
|
||||
import { PageHeader, Card, Btn, StatusBadge } from '../components/Layout'
|
||||
|
|
@ -38,7 +38,7 @@ export function DailyCashUp({ user: _user }: Props) {
|
|||
const [float, setFloat] = useState<Denomination[]>(initDenominations('float'))
|
||||
const [machines, setMachines] = useState<CardMachine[]>(initMachines())
|
||||
const [notes, setNotes] = useState('')
|
||||
const [attachments, setAttachments] = useState<Attachment[]>([])
|
||||
const [, setAttachments] = useState<Attachment[]>([])
|
||||
const [newbookTotals, setNewbookTotals] = useState<PaymentTotals | null>(null)
|
||||
const [tillPayments, setTillPayments] = useState<TillPayment[]>([])
|
||||
const [fetching, setFetching] = useState(false)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Routes, Route, NavLink, Navigate, useNavigate } from 'react-router-dom'
|
||||
import { api } from '../api'
|
||||
import { PageHeader, Card, Btn } from '../components/Layout'
|
||||
|
|
@ -44,7 +44,7 @@ function FloatCountForm({ type }: { type: CountType }) {
|
|||
const totalCounted = denoms.reduce((s, d) => s + d.value * (denomQtys[d.value] ?? 0), 0)
|
||||
const totalReceipts = receipts.reduce((s, r) => s + (parseFloat(r.amount) || 0), 0)
|
||||
const targetAmount = type === 'petty_cash' ? pettyTarget : type === 'change_tin'
|
||||
? Object.entries(changeTinTargets).reduce((s, [k, v]) => s + parseFloat(v as string || '0'), 0)
|
||||
? Object.entries(changeTinTargets).reduce((s, [, v]) => s + (v || 0), 0)
|
||||
: 0
|
||||
const variance = type === 'petty_cash'
|
||||
? totalCounted + totalReceipts - pettyTarget
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useState } from 'react'
|
||||
import { api } from '../api'
|
||||
import { PageHeader, Card, Btn } from '../components/Layout'
|
||||
import { fmtGBP, today } from '../types'
|
||||
import { fmtGBP } from '../types'
|
||||
|
||||
interface SalesCol { gl_code: string; category: string; net_amount: number; vat_amount: number; gross_amount: number }
|
||||
interface ReconRow { category: string; banked_amount: number; reported_amount: number }
|
||||
|
|
|
|||
1
frontend/src/vite-env.d.ts
vendored
Normal file
1
frontend/src/vite-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/// <reference types="vite/client" />
|
||||
Loading…
Add table
Add a link
Reference in a new issue