Show dependency counts inline in admin lists (Task #128)
Surfaces the dependency counts (already returned by the admin list endpoints since Task #96) directly in the Apps, Services, and Users admin panel rows so admins can see usage at a glance — no need to open the delete dialog to find out. Changes: - artifacts/tx-os/src/pages/admin.tsx: - Apps panel rows now render a small bullet-separated subtitle line under the route showing non-zero groupCount / restrictionCount / openCount (data-testid="app-counts-<id>"). - Services panel rows render an inline "N orders" line under the price when orderCount > 0 (data-testid="service-counts-<id>"). - Users panel rows render a bullet-separated subtitle under the displayName showing non-zero noteCount / orderCount / conversationCount / messageCount (data-testid="user-counts-<id>"). - Style mirrors the existing GroupsPanel inline counts row (text-[11px] muted-foreground, flex flex-wrap, "•" separators). - Zero counts are filtered out so empty rows stay clean. - artifacts/tx-os/src/locales/{en,ar}.json: - Added admin.apps.counts.{groups,restrictions,opens} - Added admin.services.counts.orders - Added admin.users.counts.{notes,orders,conversations,messages} - lib/api-client-react/dist + tsbuildinfo: regenerated stale composite build output so the count fields on UserProfile / App / Service schemas (added in Task #96) are visible to the tx-os typecheck. No source change in lib/api-client-react. Verification: - tsc --noEmit passes cleanly for artifacts/tx-os. - End-to-end browser test confirmed: admin sees inline counts in Apps, Services, and Users; rows with zero deps render no counts row; Arabic/RTL layout still works. Replit-Task-Id: 31d3e38d-f611-4d5e-9cfa-823326495328
This commit is contained in:
@@ -431,6 +431,24 @@
|
||||
"groupsRemoved": "مجموعات مُزالة",
|
||||
"back": "رجوع للتعديل",
|
||||
"confirm": "تأكيد وحفظ"
|
||||
},
|
||||
"counts": {
|
||||
"notes": "{{count}} ملاحظة",
|
||||
"orders": "{{count}} طلب",
|
||||
"conversations": "{{count}} محادثة",
|
||||
"messages": "{{count}} رسالة"
|
||||
}
|
||||
},
|
||||
"apps": {
|
||||
"counts": {
|
||||
"groups": "{{count}} مجموعة",
|
||||
"restrictions": "{{count}} قيد",
|
||||
"opens": "{{count}} فتحة"
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"counts": {
|
||||
"orders": "{{count}} طلب"
|
||||
}
|
||||
},
|
||||
"roles": {
|
||||
|
||||
Reference in New Issue
Block a user