From b9ab0ca632857f8d6bfc3cb21a8387ff6074bb4e Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 25 Oct 2024 22:30:36 +0200 Subject: [PATCH] update financial page --- src/lib/components/TopETFTickerHolder.svelte | 319 ++++++++++-------- .../financials/balance-sheet/+page.svelte | 2 +- .../financials/cash-flow/+page.svelte | 7 +- .../[tickerID]/financials/ratios/+page.svelte | 7 +- .../[tickerID]/metrics/[slug]/+page.svelte | 134 ++++---- .../stocks/[tickerID]/statistics/+page.svelte | 37 +- 6 files changed, 249 insertions(+), 257 deletions(-) diff --git a/src/lib/components/TopETFTickerHolder.svelte b/src/lib/components/TopETFTickerHolder.svelte index 53fac901..6c7a7181 100644 --- a/src/lib/components/TopETFTickerHolder.svelte +++ b/src/lib/components/TopETFTickerHolder.svelte @@ -1,174 +1,203 @@ - - - + + + +
+
+ +
+

+ Top ETFs Holder +

+
+ + Find the ETFs with the highest portfolio weights for this stock. +
- - - {#if topETFHolder?.length !== 0} -
- - - - - - - - - - {#each topETFHolder as item, index} - etfSelector(item?.symbol)} class="text-white cursor-pointer bg-[#000] border-b border-[#000]"> - {#if index <=6} - + + + + {#if topETFHolder?.length !== 0} +
+
CompanyTotal Assets% of Fund
+ + + + + + + + + {#each topETFHolder as item, index} + etfSelector(item?.symbol)} + class="text-white cursor-pointer bg-[#000] border-b border-[#000]" + > + {#if index <= 6} - - - - + + + + {/if} - {/each} - -
CompanyTotal Assets% of Fund
- {item?.symbol} + {item?.symbol} - {#if typeof item?.name !== 'undefined'} - {item?.name?.length > 20 ? item?.name?.slice(0,20) + "..." : item?.name} + {#if typeof item?.name !== "undefined"} + {item?.name?.length > 20 + ? item?.name?.slice(0, 20) + "..." + : item?.name} {:else} n/a {/if}
- -
- {item?.totalAssets !== null ? abbreviateNumber(item?.totalAssets) : '-'} - - {item?.weightPercentage !== null ? abbreviateNumber(item?.weightPercentage)?.toFixed(2) : '-'}% - + {item?.totalAssets !== null + ? abbreviateNumber(item?.totalAssets) + : "-"} + + {item?.weightPercentage !== null + ? abbreviateNumber(item?.weightPercentage)?.toFixed(2) + : "-"}% +
-
- - {:else} -
- No data available -
- {/if} - - + {/each} + +
+ {:else} +
+ No data available
- - \ No newline at end of file + {/if} +
+
+ diff --git a/src/routes/stocks/[tickerID]/financials/balance-sheet/+page.svelte b/src/routes/stocks/[tickerID]/financials/balance-sheet/+page.svelte index 93013ef1..b5724c07 100644 --- a/src/routes/stocks/[tickerID]/financials/balance-sheet/+page.svelte +++ b/src/routes/stocks/[tickerID]/financials/balance-sheet/+page.svelte @@ -823,7 +823,7 @@ Year {#each balanceSheet as balance} diff --git a/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte b/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte index 34a82ffa..f616f223 100644 --- a/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte +++ b/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte @@ -750,11 +750,10 @@
- +
- {#each cashFlow as cash} @@ -909,7 +908,7 @@ {#each cashFlow as cash} diff --git a/src/routes/stocks/[tickerID]/financials/ratios/+page.svelte b/src/routes/stocks/[tickerID]/financials/ratios/+page.svelte index eb2c4f92..794e1ab3 100644 --- a/src/routes/stocks/[tickerID]/financials/ratios/+page.svelte +++ b/src/routes/stocks/[tickerID]/financials/ratios/+page.svelte @@ -698,13 +698,10 @@
-
Year
Sales Maturities Of Investments
+
- + {#each ratios as item} {#if filterRule === "annual"}
YearYear {#if rawData?.length !== 0} -
-
- -
+
+ +
-

History

+

History

-
- - - - +
Quarter
+ + + + + + + + + {#each tableList as item} + + + + + + + - - - {#each tableList as item, index} - - - - - - - - - {/each} - -
QuarterValue% Change
- Value - % Change + {#if item?.valueGrowth > 0} + + +{item?.valueGrowth?.toFixed(2)}% + + {:else if item?.valueGrowth < 0} + + {item?.valueGrowth?.toFixed(2)}% + + {:else} + - + {/if} +
- {new Date(item?.date ?? null)?.toLocaleString( - "en-US", - { - month: "short", - day: "numeric", - year: "numeric", - }, - )} - - {item?.value !== null - ? abbreviateNumber(item?.value) - : "-"} - - {#if item?.valueGrowth > 0} - - +{item?.valueGrowth?.toFixed(2)}% - - {:else if item?.valueGrowth < 0} - - {item?.valueGrowth?.toFixed(2)}% - - {:else} - - - {/if} -
-
+ {/each} + +
{:else}

{#if Object?.keys(quantStats)?.length !== 0}
-
-

- Important Dates -

-

- The last earnings date was Wednesday, October 23, 2024, after - market close. -

- - - - - - -
Earnings Date - Oct 23, 2024
Ex-Dividend Date - n/a
-
+

Share Statistics @@ -568,7 +537,7 @@ updateYearRange()

-
+

Stock Price Statistics