fix(backoffice): composition audit fixes for transactions, customers, moderation, users, monitoring, analytics

- Transactions list: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on all 7 headers
- Customers list: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on all 7 headers
- Customer detail: fake CSS vars --border-subtle/--brand-primary (never defined, silently falling back to hex) replaced with real --border-color/--primary-color
- Reviews list: hardcoded #fff card background and sticky-header background replaced with var(--bg-primary)/var(--bg-secondary); missing th scope=col added across dynamic column table header
- Reports list: hardcoded #fff background replaced with var(--bg-primary); fake --brand-primary var replaced with --primary-color; missing th scope=col added
- Review health widget: fake --surface-muted/--brand-primary vars replaced with real --bg-tertiary/--primary-color (matches product-health-widget precedent)
- Users page: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on both tables
- Monitoring page: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on webhooks and events tables
- Analytics page: fake --color-primary var (undefined anywhere in codebase) replaced with real --primary-color across tabs/chart/focus rings; fake --surface-muted/--brand-primary on health bar replaced with --bg-tertiary/--primary-color; hardcoded #fff card/summary-card backgrounds replaced with var(--bg-primary); missing th scope=col added across 4 tables

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-23 11:06:17 +04:00
parent 712a7b4daf
commit 63c9ceeaa6
16 changed files with 72 additions and 72 deletions

View File

@@ -65,7 +65,7 @@
<app-empty-state [title]="'adminAnalytics.topProductsEmptyTitle' | translate" [description]="'adminAnalytics.topProductsEmptyDescription' | translate" />
} @else {
<app-table>
<thead><tr><th>{{ 'adminProducts.name' | translate }}</th><th>{{ 'adminAnalytics.quantitySold' | translate }}</th><th>{{ 'adminAnalytics.revenue' | translate }}</th></tr></thead>
<thead><tr><th scope="col">{{ 'adminProducts.name' | translate }}</th><th scope="col">{{ 'adminAnalytics.quantitySold' | translate }}</th><th scope="col">{{ 'adminAnalytics.revenue' | translate }}</th></tr></thead>
<tbody>
@for (product of facade.topProducts(); track product.productId) {
<tr><td>{{ product.name }}</td><td>{{ product.quantity }}</td><td>{{ product.revenue }}</td></tr>
@@ -81,7 +81,7 @@
<app-empty-state [title]="'adminAnalytics.lowStockEmptyTitle' | translate" />
} @else {
<app-table>
<thead><tr><th>{{ 'adminProducts.name' | translate }}</th><th>{{ 'adminAnalytics.quantity' | translate }}</th><th>{{ 'adminAnalytics.status' | translate }}</th></tr></thead>
<thead><tr><th scope="col">{{ 'adminProducts.name' | translate }}</th><th scope="col">{{ 'adminAnalytics.quantity' | translate }}</th><th scope="col">{{ 'adminAnalytics.status' | translate }}</th></tr></thead>
<tbody>
@for (product of facade.lowStockProducts(); track product.productId) {
<tr>
@@ -164,7 +164,7 @@
<app-empty-state [title]="'adminAnalytics.noReviewedProducts' | translate" />
} @else {
<app-table>
<thead><tr><th>{{ 'adminProducts.name' | translate }}</th><th>{{ 'adminAnalytics.reviewCount' | translate }}</th></tr></thead>
<thead><tr><th scope="col">{{ 'adminProducts.name' | translate }}</th><th scope="col">{{ 'adminAnalytics.reviewCount' | translate }}</th></tr></thead>
<tbody>@for (row of pa.mostReviewed; track row.productId) { <tr><td>{{ row.name }}</td><td>{{ row.value }}</td></tr> }</tbody>
</app-table>
}
@@ -175,7 +175,7 @@
<app-empty-state [title]="'adminAnalytics.noReviewedProducts' | translate" />
} @else {
<app-table>
<thead><tr><th>{{ 'adminProducts.name' | translate }}</th><th>{{ 'adminAnalytics.avgRating' | translate }}</th></tr></thead>
<thead><tr><th scope="col">{{ 'adminProducts.name' | translate }}</th><th scope="col">{{ 'adminAnalytics.avgRating' | translate }}</th></tr></thead>
<tbody>@for (row of pa.worstRated; track row.productId) { <tr><td>{{ row.name }}</td><td>{{ row.value }}</td></tr> }</tbody>
</app-table>
}

View File

@@ -15,21 +15,21 @@
border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text-primary, #1e3c38); }
.tab:focus-visible { outline: 2px solid var(--color-primary, #2f8f5b); outline-offset: 2px; }
.tab--active { color: var(--color-primary, #2f8f5b); border-bottom-color: var(--color-primary, #2f8f5b); }
.tab:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.tab--active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.panel { display: grid; gap: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.summary-card { border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); padding: 12px; display: grid; gap: 4px; background: #fff; }
.summary-card { border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); padding: 12px; display: grid; gap: 4px; background: var(--bg-primary, #fff); }
.summary-card span { font-size: var(--font-size-xs, 0.75rem); color: var(--text-secondary, #6b7280); }
.summary-card strong { font-size: var(--font-size-xl, 1.125rem); }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card h2 { margin: 0; font-size: var(--font-size-xl, 1.125rem); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.chart .bar { flex: 1; background: var(--color-primary, #2f8f5b); border-radius: 3px 3px 0 0; min-height: 2px; }
.chart .bar { flex: 1; background: var(--primary-color); border-radius: 3px 3px 0 0; min-height: 2px; }
.pending-section p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-secondary, #6b7280); }
.skeleton-rows { display: grid; gap: 8px; }
@@ -39,11 +39,11 @@
.activity-list li { display: flex; justify-content: space-between; gap: 8px; }
.warning-list li, .recommendation-list li, .health-checks li { display: flex; align-items: center; gap: 10px; }
.recommendation-list a, .health-checks a { color: var(--text-primary, #1e3c38); text-decoration: underline; }
.recommendation-list a:focus-visible, .health-checks a:focus-visible { outline: 2px solid var(--color-primary, #2f8f5b); outline-offset: 2px; }
.recommendation-list a:focus-visible, .health-checks a:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.muted { color: var(--text-secondary, #6b7280); font-size: var(--font-size-sm, 0.8125rem); }
.health-widget__bar { height: 8px; border-radius: var(--radius-full, 999px); background: var(--surface-muted, #eef2f0); overflow: hidden; }
.health-widget__bar-fill { height: 100%; background: var(--brand-primary, #1e8a6e); transition: width 0.3s ease; }
.health-widget__bar { height: 8px; border-radius: var(--radius-full, 999px); background: var(--bg-tertiary); overflow: hidden; }
.health-widget__bar-fill { height: 100%; background: var(--primary-color); transition: width 0.3s ease; }
.health-percent { margin: 0; font-size: var(--font-size-sm, 0.8125rem); color: var(--text-secondary, #6b7280); }
@media (max-width: 900px) {

View File

@@ -7,7 +7,7 @@
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; }
.muted { color: var(--text-secondary, #5f6e6a); font-size: var(--font-size-sm, 0.8125rem); }
.order-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle, #e7ece9); }
.link-button { all: unset; cursor: pointer; color: var(--brand-primary, #1e8a6e); font-weight: var(--font-weight-semibold, 600); }
.order-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border-color, #d3dad9); }
.link-button { all: unset; cursor: pointer; color: var(--primary-color); font-weight: var(--font-weight-semibold, 600); }
.link-button:hover, .link-button:focus-visible { text-decoration: underline; }
@media (max-width: 700px) { .grid.two { grid-template-columns: 1fr; } }

View File

@@ -13,13 +13,13 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminCustomers.name' | translate }}</th>
<th>{{ 'adminCustomers.email' | translate }}</th>
<th>{{ 'adminCustomers.phone' | translate }}</th>
<th>{{ 'adminCustomers.orderCount' | translate }}</th>
<th>{{ 'adminCustomers.lifetimeValue' | translate }}</th>
<th>{{ 'adminOrders.createdAt' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col">{{ 'adminCustomers.name' | translate }}</th>
<th scope="col">{{ 'adminCustomers.email' | translate }}</th>
<th scope="col">{{ 'adminCustomers.phone' | translate }}</th>
<th scope="col">{{ 'adminCustomers.orderCount' | translate }}</th>
<th scope="col">{{ 'adminCustomers.lifetimeValue' | translate }}</th>
<th scope="col">{{ 'adminOrders.createdAt' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,3 +1,3 @@
.admin-customers-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.admin-customers-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.toolbar { display: flex; }
.skeleton-rows { display: grid; gap: 8px; }

View File

@@ -1,6 +1,6 @@
.review-health { display: grid; gap: 6px; align-items: center; }
.review-health__bar { height: 6px; border-radius: var(--radius-full, 999px); background: var(--surface-muted, #eef2f0); overflow: hidden; }
.review-health__bar-fill { height: 100%; background: var(--brand-primary, #1e8a6e); }
.review-health__bar { height: 6px; border-radius: var(--radius-full, 999px); background: var(--bg-tertiary); overflow: hidden; }
.review-health__bar-fill { height: 100%; background: var(--primary-color); }
.review-health__percent { font-size: var(--font-size-xs, 0.75rem); font-weight: var(--font-weight-bold, 700); color: var(--text-secondary, #5f6e6a); }
.review-health__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--font-size-xs, 0.75rem); color: var(--text-secondary, #5f6e6a); }
.review-health__list li { display: flex; align-items: center; gap: 6px; }

View File

@@ -10,12 +10,12 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminModeration.reportTarget' | translate }}</th>
<th>{{ 'adminModeration.reportType' | translate }}</th>
<th>{{ 'adminModeration.reportReason' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
<th>{{ 'adminOrders.createdAt' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col">{{ 'adminModeration.reportTarget' | translate }}</th>
<th scope="col">{{ 'adminModeration.reportType' | translate }}</th>
<th scope="col">{{ 'adminModeration.reportReason' | translate }}</th>
<th scope="col">{{ 'backoffice.status' | translate }}</th>
<th scope="col">{{ 'adminOrders.createdAt' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,6 +1,6 @@
.admin-reports-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.admin-reports-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.toolbar { display: flex; align-items: center; gap: 12px; }
.toolbar h1 { margin: 0; font-size: var(--font-size-2xl, 1.25rem); }
.actions { display: flex; gap: 8px; }
.link-button { all: unset; cursor: pointer; color: var(--brand-primary, #1e8a6e); font-weight: var(--font-weight-semibold, 600); }
.link-button { all: unset; cursor: pointer; color: var(--primary-color); font-weight: var(--font-weight-semibold, 600); }
.link-button:hover, .link-button:focus-visible { text-decoration: underline; }

View File

@@ -69,15 +69,15 @@
<app-table>
<thead>
<tr>
<th><input type="checkbox" [attr.aria-label]="'adminModeration.selectAllRows' | translate" (change)="facade.toggleAll($any($event.target).checked)" /></th>
<th>{{ 'adminModeration.customer' | translate }}</th>
@if (isColumnVisible('product')) { <th>{{ 'adminModeration.product' | translate }}</th> }
@if (isColumnVisible('rating')) { <th>{{ 'adminModeration.rating' | translate }}</th> }
@if (isColumnVisible('status')) { <th>{{ 'backoffice.status' | translate }}</th> }
@if (isColumnVisible('reports')) { <th>{{ 'adminModeration.reportsColumn' | translate }}</th> }
@if (isColumnVisible('created')) { <th>{{ 'adminOrders.createdAt' | translate }}</th> }
<th>{{ 'adminModeration.health' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col"><input type="checkbox" [attr.aria-label]="'adminModeration.selectAllRows' | translate" (change)="facade.toggleAll($any($event.target).checked)" /></th>
<th scope="col">{{ 'adminModeration.customer' | translate }}</th>
@if (isColumnVisible('product')) { <th scope="col">{{ 'adminModeration.product' | translate }}</th> }
@if (isColumnVisible('rating')) { <th scope="col">{{ 'adminModeration.rating' | translate }}</th> }
@if (isColumnVisible('status')) { <th scope="col">{{ 'backoffice.status' | translate }}</th> }
@if (isColumnVisible('reports')) { <th scope="col">{{ 'adminModeration.reportsColumn' | translate }}</th> }
@if (isColumnVisible('created')) { <th scope="col">{{ 'adminOrders.createdAt' | translate }}</th> }
<th scope="col">{{ 'adminModeration.health' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,4 +1,4 @@
.admin-reviews-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.admin-reviews-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
select { min-height: 40px; padding: 0 10px; border: 1px solid var(--border-color, #d3dad9); border-radius: 10px; }
@@ -16,7 +16,7 @@ select { min-height: 40px; padding: 0 10px; border: 1px solid var(--border-color
max-height: 70vh;
overflow: auto;
thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
thead th { position: sticky; top: 0; background: var(--bg-secondary, #f4f4f5); z-index: 1; }
}
.density-compact td, .density-compact th { padding: 4px 8px; }

View File

@@ -37,10 +37,10 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminMonitoring.endpoint' | translate }}</th>
<th>{{ 'adminMonitoring.event' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
<th>{{ 'adminOrders.createdAt' | translate }}</th>
<th scope="col">{{ 'adminMonitoring.endpoint' | translate }}</th>
<th scope="col">{{ 'adminMonitoring.event' | translate }}</th>
<th scope="col">{{ 'backoffice.status' | translate }}</th>
<th scope="col">{{ 'adminOrders.createdAt' | translate }}</th>
</tr>
</thead>
<tbody>
@@ -78,11 +78,11 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminMonitoring.category' | translate }}</th>
<th>{{ 'adminMonitoring.level' | translate }}</th>
<th>{{ 'adminMonitoring.message' | translate }}</th>
<th>{{ 'adminUsers.name' | translate }}</th>
<th>{{ 'adminOrders.createdAt' | translate }}</th>
<th scope="col">{{ 'adminMonitoring.category' | translate }}</th>
<th scope="col">{{ 'adminMonitoring.level' | translate }}</th>
<th scope="col">{{ 'adminMonitoring.message' | translate }}</th>
<th scope="col">{{ 'adminUsers.name' | translate }}</th>
<th scope="col">{{ 'adminOrders.createdAt' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,5 +1,5 @@
.admin-monitoring-page { display: grid; gap: 16px; padding: 16px; max-width: 1100px; margin: 0 auto; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.card h2 { margin: 0; font-size: var(--font-size-xl, 1.125rem); }
.health-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.queue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

View File

@@ -27,13 +27,13 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminOrders.orderNumber' | translate }}</th>
<th>{{ 'adminTransactions.type' | translate }}</th>
<th>{{ 'adminTransactions.method' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
<th>{{ 'backoffice.price' | translate }}</th>
<th>{{ 'adminTransactions.fraud' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col">{{ 'adminOrders.orderNumber' | translate }}</th>
<th scope="col">{{ 'adminTransactions.type' | translate }}</th>
<th scope="col">{{ 'adminTransactions.method' | translate }}</th>
<th scope="col">{{ 'backoffice.status' | translate }}</th>
<th scope="col">{{ 'backoffice.price' | translate }}</th>
<th scope="col">{{ 'adminTransactions.fraud' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,4 +1,4 @@
.admin-transactions-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.admin-transactions-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
select { min-height: 40px; padding: 0 10px; border: 1px solid var(--border-color, #d3dad9); border-radius: 10px; }

View File

@@ -11,12 +11,12 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminUsers.name' | translate }}</th>
<th>{{ 'adminUsers.scope' | translate }}</th>
<th>{{ 'adminUsers.role' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
<th>{{ 'adminUsers.lastLogin' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col">{{ 'adminUsers.name' | translate }}</th>
<th scope="col">{{ 'adminUsers.scope' | translate }}</th>
<th scope="col">{{ 'adminUsers.role' | translate }}</th>
<th scope="col">{{ 'backoffice.status' | translate }}</th>
<th scope="col">{{ 'adminUsers.lastLogin' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>
@@ -66,10 +66,10 @@
<app-table>
<thead>
<tr>
<th>{{ 'adminUsers.email' | translate }}</th>
<th>{{ 'adminUsers.role' | translate }}</th>
<th>{{ 'backoffice.status' | translate }}</th>
<th>{{ 'adminProducts.actions' | translate }}</th>
<th scope="col">{{ 'adminUsers.email' | translate }}</th>
<th scope="col">{{ 'adminUsers.role' | translate }}</th>
<th scope="col">{{ 'backoffice.status' | translate }}</th>
<th scope="col">{{ 'adminProducts.actions' | translate }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,5 +1,5 @@
.admin-users-page { display: grid; gap: 16px; padding: 16px; max-width: 1100px; margin: 0 auto; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: #fff; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.card h2 { margin: 0; font-size: var(--font-size-xl, 1.125rem); }
.hint { margin: 0; color: var(--text-secondary, #6b7280); font-size: var(--font-size-sm, 0.8125rem); }
.invite-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }