feat(F-195): completed feature

This commit is contained in:
chattie
2026-08-22 22:36:05 +02:00
parent b85670cb51
commit c5e5b4c48c
9 changed files with 45 additions and 1 deletions

View File

@@ -7339,6 +7339,23 @@
"close": true
},
"completed_at": "2026-08-22T20:29:26Z"
},
{
"id": "F-195",
"type": "fix",
"title": "Hide IVA/Audit/Logs from main sidebar — only show inside Settings",
"description": "Remove tax-rates/audit/logs from NAV_ITEMS so they do not appear in the main admin sidebar; keep them as sub-pages inside the Settings section.",
"priority": "high",
"risk": "low",
"status": "done",
"created_at": "2026-08-22",
"gates": {
"reviewer": true,
"security": true,
"qa": true,
"close": true
},
"completed_at": "2026-08-22T20:36:05Z"
}
]
}

View File

@@ -56,6 +56,14 @@ export const NAV_ITEMS: NavItem[] = [
{ href: '/cms', label: 'CMS', icon: '📄', permission: 'cms.read' },
{ href: '/users', label: 'Usuarios', icon: '🔐', permission: 'admin-users.read' },
{ href: '/settings', label: 'Ajustes', icon: '⚙️', permission: 'dashboard' },
];
/**
* Sub-pages rendered inside the Settings sidebar.
* They are intentionally NOT in NAV_ITEMS — they only appear when the user
* navigates to /settings (or one of its sub-routes) via the in-page links.
*/
export const SETTINGS_SUB_NAV_ITEMS: NavItem[] = [
{ href: '/settings/tax-rates', label: 'IVA', icon: '💰', permission: 'orders.read' },
{ href: '/settings/audit', label: 'Auditoría', icon: '📋', permission: 'audit.read' },
{ href: '/settings/logs', label: 'Logs', icon: '🖥️', permission: 'audit.read' },

View File

@@ -0,0 +1,11 @@
# F-195 — Fix evidence
**Issue**: After F-194, IVA / Auditoría / Logs still appeared as top-level items in the main admin sidebar because their entries remained in `NAV_ITEMS`.
**Change** (`project/apps/admin/src/lib/permissions.ts`):
- Removed `IVA`, `Auditoría`, `Logs` entries from `NAV_ITEMS`. They no longer appear in the main sidebar.
- Added `SETTINGS_SUB_NAV_ITEMS` constant exposing the same routes so they can be consumed by the Settings sub-nav (already implemented in F-194 in `settings/page.tsx`).
- Routes (`/settings/tax-rates`, `/settings/audit`, `/settings/logs`) remain accessible via in-page links from the Settings sidebar.
**Validation**:
- admin typecheck: PASS

View File

@@ -0,0 +1 @@
{"feature_id":"F-195","agent":"leader","stage":"close","verdict":"APPROVED","checks":[{"item":"All gates APPROVED","ok":true}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-195","agent":"qa","stage":"qa_gate","verdict":"APPROVED","acceptance":[{"id":1,"criterion":"Main sidebar does not show IVA/Audit/Logs","ok":true},{"id":2,"criterion":"Sub-pages still reachable from Settings page","ok":true}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-195","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","checks":[{"item":"IVA/Audit/Logs removed from NAV_ITEMS","ok":true},{"item":"Routes still exist under /settings/...","ok":true},{"item":"typecheck passes","ok":true}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-195","agent":"security","stage":"security_gate","verdict":"APPROVED","checks":[{"item":"No new attack surface","ok":true}],"issues":[]}

View File

@@ -508,3 +508,7 @@
- Fix 1: replaced bare crypto.randomUUID() with generateIdempotencyKey() in PaymentModal and terminal page.
- Fix 2: moved tax-rates, audit and logs routes from top-level dashboard into /settings/... with breadcrumb navigation.
- Evidencia: admin/POS typecheck and builds green; 268/268 unit tests pass; verify.sh green.
## F-195 cerrada (2026-08-22) — Hide IVA/Audit/Logs from main sidebar
- Gates: reviewer APPROVED, security APPROVED, qa APPROVED, verify.sh exit 0.
- Fix: removed IVA/Auditoría/Logs from NAV_ITEMS so they no longer appear in main sidebar; routes still accessible via in-page links from /settings.

View File

@@ -6,6 +6,6 @@
"state": "waiting",
"next_agent": "leader",
"waiting_for": "Seleccionar una feature pending y actualizar este estado",
"updated_at": "2026-08-22T20:29:26Z",
"updated_at": "2026-08-22T20:36:05Z",
"timeline": []
}