Update label associated with grade
This commit is contained in:
parent
6e2e403873
commit
b2dc479a79
1 changed files with 20 additions and 7 deletions
|
|
@ -11,12 +11,25 @@
|
||||||
|
|
||||||
let { grade, score, reanalyzing, summary }: Props = $props();
|
let { grade, score, reanalyzing, summary }: Props = $props();
|
||||||
|
|
||||||
function getScoreLabel(score: number): string {
|
function getScoreLabel(grade: string): string {
|
||||||
if (score >= 90) return "Excellent";
|
switch (grade) {
|
||||||
if (score >= 70) return "Good";
|
case "A+":
|
||||||
if (score >= 50) return "Fair";
|
return "Excellent Deliverability";
|
||||||
if (score >= 30) return "Poor";
|
case "A":
|
||||||
return "Critical";
|
return "Good Deliverability";
|
||||||
|
case "B":
|
||||||
|
return "Fair Deliverability";
|
||||||
|
case "C":
|
||||||
|
return "Moderate Issues";
|
||||||
|
case "D":
|
||||||
|
return "Poor Deliverability";
|
||||||
|
case "E":
|
||||||
|
return "Critical Issues";
|
||||||
|
case "F":
|
||||||
|
return "Severe Problems";
|
||||||
|
default:
|
||||||
|
return "Unknown Status";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -33,7 +46,7 @@
|
||||||
{#if reanalyzing}
|
{#if reanalyzing}
|
||||||
Analyzing in progress…
|
Analyzing in progress…
|
||||||
{:else}
|
{:else}
|
||||||
{getScoreLabel(score)}
|
{getScoreLabel(grade)}
|
||||||
{/if}
|
{/if}
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-muted mb-4">Overall Deliverability Score</p>
|
<p class="text-muted mb-4">Overall Deliverability Score</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue