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();
|
||||
|
||||
function getScoreLabel(score: number): string {
|
||||
if (score >= 90) return "Excellent";
|
||||
if (score >= 70) return "Good";
|
||||
if (score >= 50) return "Fair";
|
||||
if (score >= 30) return "Poor";
|
||||
return "Critical";
|
||||
function getScoreLabel(grade: string): string {
|
||||
switch (grade) {
|
||||
case "A+":
|
||||
return "Excellent Deliverability";
|
||||
case "A":
|
||||
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>
|
||||
|
||||
|
|
@ -33,7 +46,7 @@
|
|||
{#if reanalyzing}
|
||||
Analyzing in progress…
|
||||
{:else}
|
||||
{getScoreLabel(score)}
|
||||
{getScoreLabel(grade)}
|
||||
{/if}
|
||||
</h3>
|
||||
<p class="text-muted mb-4">Overall Deliverability Score</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue