Fix: restrict book query to assigned library IDs for non-admin users
This commit is contained in:
committed by
Aditya Chandel
parent
1f3e77f775
commit
852373711e
+1
-1
@@ -178,7 +178,7 @@
|
||||
<p class="whitespace-nowrap"><span class="font-bold">Language:</span> {{ metadata.language || '-' }}</p>
|
||||
<p class="whitespace-nowrap"><span class="font-bold">ISBN 10:</span> {{ metadata.isbn10 || '-' }}</p>
|
||||
<p class="whitespace-nowrap flex items-center gap-2">
|
||||
<span class="font-bold">Match Score:</span>
|
||||
<span class="font-bold">Metadata Score:</span>
|
||||
@if (book?.metadataMatchScore != null) {
|
||||
<span
|
||||
class="inline-block px-2 py-0.5 rounded-full text-xs font-bold text-white border"
|
||||
|
||||
+9
-7
@@ -288,12 +288,14 @@ export class MetadataViewerComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
getMatchScoreColorClass(score: number): string {
|
||||
if (score >= 0.95) return 'bg-green-600 border-green-700';
|
||||
if (score >= 0.90) return 'bg-green-500 border-green-600';
|
||||
if (score >= 0.80) return 'bg-green-400 border-green-500';
|
||||
if (score >= 0.70) return 'bg-yellow-500 border-yellow-600';
|
||||
if (score >= 0.50) return 'bg-yellow-400 border-yellow-500';
|
||||
if (score >= 0.30) return 'bg-red-500 border-red-600';
|
||||
return 'bg-red-600 border-red-700';
|
||||
if (score >= 0.95) return 'bg-green-900 border-green-950';
|
||||
if (score >= 0.90) return 'bg-green-800 border-green-900';
|
||||
if (score >= 0.80) return 'bg-green-700 border-green-800';
|
||||
if (score >= 0.70) return 'bg-yellow-700 border-yellow-800';
|
||||
if (score >= 0.60) return 'bg-yellow-600 border-yellow-700';
|
||||
if (score >= 0.50) return 'bg-yellow-500 border-yellow-600';
|
||||
if (score >= 0.40) return 'bg-red-500 border-red-600';
|
||||
if (score >= 0.30) return 'bg-red-600 border-red-700';
|
||||
return 'bg-red-700 border-red-800';
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ export class ThemeConfiguratorComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
if (isPlatformBrowser(this.platformId)) {
|
||||
this.onPresetChange(); // Ensures both primary and surface colors apply
|
||||
this.onPresetChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user