From 2e04240ef2a3515357934b60fd683c893ac6dde2 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 13 Aug 2024 14:01:33 +0200 Subject: [PATCH] ui fix --- .../stats/balance-sheet/+page.svelte | 96 +++++++++--------- .../[tickerID]/stats/cash-flow/+page.svelte | 88 ++++++++--------- .../[tickerID]/stats/income/+page.svelte | 8 +- .../[tickerID]/stats/ratios/+page.svelte | 98 +++++++++---------- 4 files changed, 143 insertions(+), 147 deletions(-) diff --git a/src/routes/stocks/[tickerID]/stats/balance-sheet/+page.svelte b/src/routes/stocks/[tickerID]/stats/balance-sheet/+page.svelte index a0733a4e..8b2c2548 100644 --- a/src/routes/stocks/[tickerID]/stats/balance-sheet/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/balance-sheet/+page.svelte @@ -578,54 +578,54 @@ $: {
- - - - - - - - - - {#each tableList as item, index} - - - - - - - - - - - - - {/each} - - -
{filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'}{statementConfig?.find((item) => item?.propertyName === displayStatement)?.label}ChangeGrowth
- {item?.date} - - {abbreviateNumber(item?.value)} - - {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} - - {#if index+1-tableList?.length === 0} - - - {:else} - {#if (item?.value- tableList[index+1]?.value) > 0} - - +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else if (item?.value - tableList[index+1]?.value ) < 0} - - -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else} - - - {/if} - {/if} -
+ + + {filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'} + {statementConfig?.find((item) => item?.propertyName === displayStatement)?.label} + Change + Growth + + + + {#each tableList as item, index} + + + + + {item?.date} + + + + {abbreviateNumber(item?.value)} + + + + {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} + + + + {#if index+1-tableList?.length === 0} + - + {:else} + {#if (item?.value- tableList[index+1]?.value) > 0} + + +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else if (item?.value - tableList[index+1]?.value ) < 0} + + -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else} + - + {/if} + {/if} + + + + {/each} + + +
diff --git a/src/routes/stocks/[tickerID]/stats/cash-flow/+page.svelte b/src/routes/stocks/[tickerID]/stats/cash-flow/+page.svelte index 8f4337ce..7ab2ad1c 100644 --- a/src/routes/stocks/[tickerID]/stats/cash-flow/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/cash-flow/+page.svelte @@ -533,56 +533,54 @@ $: {
- - - - - - - - - - {#each tableList as item, index} - - - - + + + + + + + + + + {#each tableList as item, index} + + + + - + - + - + - - {/each} + + {/each} - -
{filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'}{statementConfig?.find((item) => item?.propertyName === displayStatement)?.label}ChangeGrowth
- {item?.date} -
{filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'}{statementConfig?.find((item) => item?.propertyName === displayStatement)?.label}ChangeGrowth
+ {item?.date} + - {abbreviateNumber(item?.value)} - + {abbreviateNumber(item?.value)} + - {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} - + {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} + - {#if index+1-tableList?.length === 0} - - - {:else} - {#if (item?.value- tableList[index+1]?.value) > 0} - - +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else if (item?.value - tableList[index+1]?.value ) < 0} - - -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else} - - - {/if} - {/if} - + {#if index+1-tableList?.length === 0} + - + {:else} + {#if (item?.value- tableList[index+1]?.value) > 0} + + +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else if (item?.value - tableList[index+1]?.value ) < 0} + + -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else} + - + {/if} + {/if} +
- - + +
{:else} diff --git a/src/routes/stocks/[tickerID]/stats/income/+page.svelte b/src/routes/stocks/[tickerID]/stats/income/+page.svelte index f215d061..17fc984e 100644 --- a/src/routes/stocks/[tickerID]/stats/income/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/income/+page.svelte @@ -516,8 +516,8 @@ const exportData = (format = 'csv') => { {filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'} - {statementConfig?.find((item) => item?.propertyName === displayStatement)?.label} - Change + {statementConfig?.find((item) => item?.propertyName === displayStatement)?.label} + Change Growth @@ -530,11 +530,11 @@ const exportData = (format = 'csv') => { {item?.date} - + {abbreviateNumber(item?.value)} - + {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} diff --git a/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte b/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte index 82f88c44..70224f89 100644 --- a/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte +++ b/src/routes/stocks/[tickerID]/stats/ratios/+page.svelte @@ -469,56 +469,54 @@ $: {
- - - - - - - - - - {#each tableList as item, index} - - - - - - - - - - - - - {/each} - - -
{filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'}{statementConfig?.find((item) => item?.propertyName === displayStatement)?.label}ChangeGrowth
- {item?.date} - - {abbreviateNumber(item?.value)} - - {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} - - {#if index+1-tableList?.length === 0} - - - {:else} - {#if (item?.value- tableList[index+1]?.value) > 0} - - +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else if (item?.value - tableList[index+1]?.value ) < 0} - - -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% - - {:else} - - - {/if} - {/if} -
- - + + + {filterRule === 'annual' ? 'Fiscal Year End' : 'Quarter Ends'} + {statementConfig?.find((item) => item?.propertyName === displayStatement)?.label} + Change + Growth + + + + {#each tableList as item, index} + + + + + {item?.date} + + + + {abbreviateNumber(item?.value)} + + + + {item?.value-tableList[index+1]?.value !== 0 ? abbreviateNumber((item?.value-tableList[index+1]?.value)?.toFixed(2)) : '-'} + + + + {#if index+1-tableList?.length === 0} + - + {:else} + {#if (item?.value- tableList[index+1]?.value) > 0} + + +{(((item?.value-tableList[index+1]?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else if (item?.value - tableList[index+1]?.value ) < 0} + + -{(((tableList[index+1]?.value - item?.value) / item?.value) * 100 )?.toFixed(2)}% + + {:else} + - + {/if} + {/if} + + + + {/each} + + +
{:else}