chore(lint): biome config + auto-fix sweep + translation hot-path quality fixes
- biome: enable unsafeParameterDecoratorsEnabled (NestJS @Body/@Query); ignore *.gen.ts; spec files override noExplicitAny - translations: remove dictionary fallback DB write — was producing half-translated strings (e.g. "Body frame" → "Kaporta frame") that poisoned future lookups; now misses fall through to bootstrap script - categories: add translateMany() to PCAT root/subgroup/parts insert paths (was only EMEX) - auto-fix: organize imports, type-only imports, node: protocol on stdlib imports, and template-literal cleanups across 24 files Drops lint count from 769 → 257; remaining are legacy noNonNullAssertion / noArrayIndexKey / useExhaustiveDependencies that need manual review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -247,57 +247,52 @@ function AdminCopyLogsPage() {
|
||||
</>
|
||||
)}
|
||||
|
||||
{tab === "top" && (
|
||||
<>
|
||||
{topLoading ? (
|
||||
<div className="space-y-3">
|
||||
{Array.from({ length: 10 }).map((_, i) => (
|
||||
<Skeleton key={`top-skel-${i}`} className="h-12 w-full" />
|
||||
))}
|
||||
</div>
|
||||
) : !topCodes || topCodes.length === 0 ? (
|
||||
<Card>
|
||||
<CardContent className="flex flex-col items-center gap-3 py-16 text-center">
|
||||
<TrendingUp className="h-12 w-12 text-muted-foreground" />
|
||||
<p className="text-lg font-medium">Veri bulunamadi</p>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Son 30 gunde kopyalanan OEM kodu yok
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
) : (
|
||||
<Card>
|
||||
<CardContent className="overflow-x-auto p-0">
|
||||
<div className="min-w-[500px]">
|
||||
<div className="grid grid-cols-4 items-center gap-4 border-b px-6 py-3 text-sm font-medium text-muted-foreground">
|
||||
<span>#</span>
|
||||
<span>OEM Kodu</span>
|
||||
<span className="text-center">Kopyalanma</span>
|
||||
<span className="text-center">Benzersiz Kullanici</span>
|
||||
</div>
|
||||
<div className="divide-y">
|
||||
{topCodes.map((item, idx) => (
|
||||
<div
|
||||
key={item.oemCode}
|
||||
className="grid grid-cols-4 items-center gap-4 px-6 py-3 text-sm"
|
||||
>
|
||||
<span className="text-muted-foreground">{idx + 1}</span>
|
||||
<div>
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 text-xs font-semibold">
|
||||
{item.oemCode}
|
||||
</code>
|
||||
</div>
|
||||
<div className="text-center font-medium">{item.copyCount}</div>
|
||||
<div className="text-center text-muted-foreground">{item.uniqueUsers}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{tab === "top" &&
|
||||
(topLoading ? (
|
||||
<div className="space-y-3">
|
||||
{Array.from({ length: 10 }).map((_, i) => (
|
||||
<Skeleton key={`top-skel-${i}`} className="h-12 w-full" />
|
||||
))}
|
||||
</div>
|
||||
) : !topCodes || topCodes.length === 0 ? (
|
||||
<Card>
|
||||
<CardContent className="flex flex-col items-center gap-3 py-16 text-center">
|
||||
<TrendingUp className="h-12 w-12 text-muted-foreground" />
|
||||
<p className="text-lg font-medium">Veri bulunamadi</p>
|
||||
<p className="text-sm text-muted-foreground">Son 30 gunde kopyalanan OEM kodu yok</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
) : (
|
||||
<Card>
|
||||
<CardContent className="overflow-x-auto p-0">
|
||||
<div className="min-w-[500px]">
|
||||
<div className="grid grid-cols-4 items-center gap-4 border-b px-6 py-3 text-sm font-medium text-muted-foreground">
|
||||
<span>#</span>
|
||||
<span>OEM Kodu</span>
|
||||
<span className="text-center">Kopyalanma</span>
|
||||
<span className="text-center">Benzersiz Kullanici</span>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<div className="divide-y">
|
||||
{topCodes.map((item, idx) => (
|
||||
<div
|
||||
key={item.oemCode}
|
||||
className="grid grid-cols-4 items-center gap-4 px-6 py-3 text-sm"
|
||||
>
|
||||
<span className="text-muted-foreground">{idx + 1}</span>
|
||||
<div>
|
||||
<code className="rounded bg-muted px-1.5 py-0.5 text-xs font-semibold">
|
||||
{item.oemCode}
|
||||
</code>
|
||||
</div>
|
||||
<div className="text-center font-medium">{item.copyCount}</div>
|
||||
<div className="text-center text-muted-foreground">{item.uniqueUsers}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user