diff --git a/backlog/features.json b/backlog/features.json index 40812d5..5a1971e 100644 --- a/backlog/features.json +++ b/backlog/features.json @@ -3939,13 +3939,15 @@ "Successful change is reflected in the cell without a full page reload", "verify.sh is green" ], - "status": "pending", + "status": "done", "created_at": "2026-08-19", "gates": { - "reviewer": false, - "security": false, - "qa": false - } + "reviewer": true, + "security": true, + "qa": true, + "close": true + }, + "completed_at": "2026-08-20T04:10:48Z" }, { "id": "F-086", diff --git a/project/apps/admin/src/app/(dashboard)/tax-rates/page.tsx b/project/apps/admin/src/app/(dashboard)/tax-rates/page.tsx index 1cb3f6f..3ec80fb 100644 --- a/project/apps/admin/src/app/(dashboard)/tax-rates/page.tsx +++ b/project/apps/admin/src/app/(dashboard)/tax-rates/page.tsx @@ -14,6 +14,9 @@ export default function TaxRatesPage() { const [toggling, setToggling] = useState>({}); const [msg, setMsg] = useState(''); + const [tipoEditing, setTipoEditing] = useState(null); + const [savingTipo, setSavingTipo] = useState(null); + const load = useCallback(async () => { setLoading(true); try { const d = await taxApi.list(); setRates(d.items ?? []); } @@ -50,6 +53,19 @@ export default function TaxRatesPage() { } }; + const saveTipo = async (id: string, newTipo: 'general' | 'reduced' | 'super-reduced') => { + setSavingTipo(id); + try { + await taxApi.update(id, { appliesTo: newTipo }); + setRates(prev => prev.map(r => r.id === id ? { ...r, appliesTo: newTipo } : r)); + setTipoEditing(null); + } catch (er) { + alert(er instanceof Error ? er.message : 'Error al cambiar tipo'); + } finally { + setSavingTipo(null); + } + }; + return (
@@ -110,7 +126,37 @@ export default function TaxRatesPage() { ) : ( <> {r.name} - {r.appliesTo} + + {tipoEditing === r.id ? ( + + ) : ( + + )} + {fmt(r)}