diff --git a/src/routes/stocks/[tickerID]/statistics/employees/+page.svelte b/src/routes/stocks/[tickerID]/statistics/employees/+page.svelte index 3fa9cd1a..bf04dc7e 100644 --- a/src/routes/stocks/[tickerID]/statistics/employees/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/employees/+page.svelte @@ -21,9 +21,9 @@ let employeeHistory = data?.getHistoryEmployee ?? []; let historyList = sortByDate(employeeHistory); - let employees = "n/a"; - let changeRate = "n/a"; - let growthRate = "n/a"; + let employees = null; + let changeRate = null; + let growthRate = null; let optionsTotal; let optionsChange; @@ -407,12 +407,15 @@ day: "numeric", year: "numeric", daySuffix: "2-digit", - })}. The number of employees {changeRate >= 0 + })}. The number of employees {changeRate >= 0 && + changeRate !== null ? "increased" : "decreased"} by {new Intl.NumberFormat("en")?.format(changeRate)} or = 0 ? "text-[#00FC50]" : "text-[#FF2F1F]"} + class={changeRate >= 0 && changeRate !== null + ? "text-[#00FC50]" + : "text-[#FF2F1F]"} > {growthRate}% @@ -442,7 +445,7 @@
Employees @@ -463,7 +466,9 @@ {#if dateDistance} n/a {:else} - {new Intl.NumberFormat("en")?.format(changeRate)} + {changeRate !== null + ? new Intl.NumberFormat("en")?.format(changeRate) + : "n/a"} {/if}
@@ -473,7 +478,7 @@ ? "before:content-['+'] " : ''} font-semibold bp:text-xl sm:mt-1.5 sm:text-2xl" > - {growthRate}% + {growthRate !== null ? growthRate + "%" : "n/a"}
@@ -518,81 +523,82 @@ > Employees Chart - -
-
- - - - - - - Select Type - - - - (sortBy = "Total")} - class="cursor-pointer hover:bg-[#27272A]" - > - Total - - (sortBy = "Change")} - class="cursor-pointer hover:bg-[#27272A]" - > - Change - - (sortBy = "Growth")} - class="cursor-pointer hover:bg-[#27272A]" - > - Growth - - - - -
- + + + + Select Type + + + + (sortBy = "Total")} + class="cursor-pointer hover:bg-[#27272A]" + > + Total + + (sortBy = "Change")} + class="cursor-pointer hover:bg-[#27272A]" + > + Change + + (sortBy = "Growth")} + class="cursor-pointer hover:bg-[#27272A]" + > + Growth + + + + +
+ -
+ Download + + + + {/if} {#if historyList?.length !== 0} @@ -702,7 +708,7 @@ {:else}

No history found

diff --git a/src/routes/stocks/[tickerID]/statistics/market-cap/+page.svelte b/src/routes/stocks/[tickerID]/statistics/market-cap/+page.svelte index a272bdf4..69ee5156 100644 --- a/src/routes/stocks/[tickerID]/statistics/market-cap/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/market-cap/+page.svelte @@ -486,12 +486,19 @@ 1-Year Change
= + 0 && changePercentageYearAgo !== null ? "before:content-['+'] text-[#00FC50]" - : 'text-[#FF2F1F]'}" + : changePercentageYearAgo < 0 && + changePercentageYearAgo !== null + ? 'text-[#FF2F1F]' + : 'text-white'}" > - {abbreviateNumber(changePercentageYearAgo?.toFixed(2))}% + {changePercentageYearAgo !== null + ? abbreviateNumber( + changePercentageYearAgo?.toFixed(2), + ) + "%" + : "n/a"}