From 7ece045e132c2c45854a08bccc2ff97b31b19af8 Mon Sep 17 00:00:00 2001 From: chattie Date: Thu, 20 Aug 2026 06:10:48 +0200 Subject: [PATCH] feat(F-085): completed feature --- backlog/features.json | 12 +++-- .../src/app/(dashboard)/tax-rates/page.tsx | 48 ++++++++++++++++++- .../src/modules/pricing/api/pricing.routes.ts | 5 ++ work/artifacts/F-085/architect.md | 26 ++++++++++ work/artifacts/F-085/implementer.md | 28 +++++++++++ work/artifacts/F-085/leader-close.json | 14 ++++++ work/artifacts/F-085/qa.json | 15 ++++++ work/artifacts/F-085/reviewer.json | 16 +++++++ work/artifacts/F-085/security.json | 15 ++++++ work/runtime-status.json | 34 ++++++------- 10 files changed, 190 insertions(+), 23 deletions(-) create mode 100644 work/artifacts/F-085/architect.md create mode 100644 work/artifacts/F-085/implementer.md create mode 100644 work/artifacts/F-085/leader-close.json create mode 100644 work/artifacts/F-085/qa.json create mode 100644 work/artifacts/F-085/reviewer.json create mode 100644 work/artifacts/F-085/security.json 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)}