ui fix
This commit is contained in:
parent
bbba87f3b3
commit
85ba1761ec
@ -423,329 +423,334 @@
|
|||||||
(item) => item?.propertyName === displayStatement,
|
(item) => item?.propertyName === displayStatement,
|
||||||
)?.text}
|
)?.text}
|
||||||
<!--<Katex formula={true} math={"\\textrm{Revenue}=\\textrm{Revenue} - \\textrm{All Expenses}"}/>-->
|
<!--<Katex formula={true} math={"\\textrm{Revenue}=\\textrm{Revenue} - \\textrm{All Expenses}"}/>-->
|
||||||
{:else}
|
{:else if income?.length > 0}
|
||||||
Get detailed income statement breakdowns, uncovering revenue,
|
Get detailed income statement breakdowns, uncovering revenue,
|
||||||
expenses, and much more.
|
expenses, and much more.
|
||||||
|
{:else}
|
||||||
|
No financial data available for {$displayCompanyName}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{#if income?.length > 0}
|
||||||
<div
|
|
||||||
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
class="bg-[#313131] w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
|
class="inline-flex justify-center w-full rounded-md sm:w-auto sm:ml-auto mt-3 mb-6"
|
||||||
>
|
>
|
||||||
{#each tabs as item, i}
|
|
||||||
<button
|
|
||||||
on:click={() => (activeIdx = i)}
|
|
||||||
class="group relative z-[1] rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1 {activeIdx ===
|
|
||||||
i
|
|
||||||
? 'z-0'
|
|
||||||
: ''} "
|
|
||||||
>
|
|
||||||
{#if activeIdx === i}
|
|
||||||
<div
|
|
||||||
class="absolute inset-0 rounded-md bg-[#fff]"
|
|
||||||
></div>
|
|
||||||
{/if}
|
|
||||||
<span
|
|
||||||
class="relative text-sm block font-semibold {activeIdx ===
|
|
||||||
i
|
|
||||||
? 'text-black'
|
|
||||||
: 'text-white'}"
|
|
||||||
>
|
|
||||||
{item.title}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="mb-2 flex flex-row items-center w-full justify-end sm:justify-center"
|
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="inline-flex mt-2 sm:mt-0 cursor-pointer relative mr-auto"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
on:click={toggleMode}
|
|
||||||
type="checkbox"
|
|
||||||
checked={$coolMode}
|
|
||||||
value={$coolMode}
|
|
||||||
class="sr-only peer"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class="w-11 h-6 bg-gray-400 rounded-full peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#1563F9]"
|
class="bg-[#313131] w-full min-w-24 sm:w-fit relative flex flex-wrap items-center justify-center rounded-md p-1 mt-4"
|
||||||
></div>
|
>
|
||||||
{#if $coolMode}
|
{#each tabs as item, i}
|
||||||
<span class="ml-2 text-sm font-medium text-white">
|
<button
|
||||||
Cool Mode
|
on:click={() => (activeIdx = i)}
|
||||||
</span>
|
class="group relative z-[1] rounded-full w-1/2 min-w-24 md:w-auto px-5 py-1 {activeIdx ===
|
||||||
{:else}
|
i
|
||||||
<span class="ml-2 text-sm font-medium text-white">
|
? 'z-0'
|
||||||
Boring Mode
|
: ''} "
|
||||||
</span>
|
>
|
||||||
{/if}
|
{#if activeIdx === i}
|
||||||
</label>
|
<div
|
||||||
|
class="absolute inset-0 rounded-md bg-[#fff]"
|
||||||
|
></div>
|
||||||
|
{/if}
|
||||||
|
<span
|
||||||
|
class="relative text-sm block font-semibold {activeIdx ===
|
||||||
|
i
|
||||||
|
? 'text-black'
|
||||||
|
: 'text-white'}"
|
||||||
|
>
|
||||||
|
{item.title}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-row items-center w-fit sm:w-[50%] md:w-auto sm:ml-auto"
|
class="mb-2 flex flex-row items-center w-full justify-end sm:justify-center"
|
||||||
>
|
>
|
||||||
<div class="relative inline-block text-left grow">
|
<label
|
||||||
<DropdownMenu.Root>
|
class="inline-flex mt-2 sm:mt-0 cursor-pointer relative mr-auto"
|
||||||
<DropdownMenu.Trigger asChild let:builder>
|
|
||||||
<Button
|
|
||||||
builders={[builder]}
|
|
||||||
class="w-full border-gray-600 border bg-[#09090B] sm:hover:bg-[#27272A] ease-out flex flex-row justify-between items-center px-3 py-2 text-white rounded-md truncate"
|
|
||||||
>
|
|
||||||
<span class="truncate text-white">{timeFrame}</span>
|
|
||||||
<svg
|
|
||||||
class="-mr-1 ml-1 h-5 w-5 xs:ml-2 inline-block"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
fill="currentColor"
|
|
||||||
style="max-width:40px"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fill-rule="evenodd"
|
|
||||||
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
|
|
||||||
clip-rule="evenodd"
|
|
||||||
></path>
|
|
||||||
</svg>
|
|
||||||
</Button>
|
|
||||||
</DropdownMenu.Trigger>
|
|
||||||
<DropdownMenu.Content
|
|
||||||
class="w-56 h-fit max-h-72 overflow-y-auto scroller"
|
|
||||||
>
|
|
||||||
<DropdownMenu.Label class="text-gray-400">
|
|
||||||
Select time frame
|
|
||||||
</DropdownMenu.Label>
|
|
||||||
<DropdownMenu.Separator />
|
|
||||||
<DropdownMenu.Group>
|
|
||||||
<DropdownMenu.Item
|
|
||||||
on:click={() => (timeFrame = "5Y")}
|
|
||||||
class="cursor-pointer hover:bg-[#27272A]"
|
|
||||||
>
|
|
||||||
5 years
|
|
||||||
</DropdownMenu.Item>
|
|
||||||
<DropdownMenu.Item
|
|
||||||
on:click={() => (timeFrame = "10Y")}
|
|
||||||
class="cursor-pointer hover:bg-[#27272A]"
|
|
||||||
>
|
|
||||||
10 years
|
|
||||||
</DropdownMenu.Item>
|
|
||||||
<DropdownMenu.Item
|
|
||||||
on:click={() => (timeFrame = "MAX")}
|
|
||||||
class="cursor-pointer hover:bg-[#27272A]"
|
|
||||||
>
|
|
||||||
Max
|
|
||||||
</DropdownMenu.Item>
|
|
||||||
</DropdownMenu.Group>
|
|
||||||
</DropdownMenu.Content>
|
|
||||||
</DropdownMenu.Root>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
on:click={() => exportFundamentalData("csv")}
|
|
||||||
class="ml-2 w-full border-gray-600 border bg-[#09090B] sm:hover:bg-[#27272A] ease-out flex flex-row justify-between items-center px-3 py-2 text-white rounded-md truncate"
|
|
||||||
>
|
>
|
||||||
<span class="truncate text-white">Download</span>
|
<input
|
||||||
<svg
|
on:click={toggleMode}
|
||||||
class="{data?.user?.tier === 'Pro'
|
type="checkbox"
|
||||||
? 'hidden'
|
checked={$coolMode}
|
||||||
: ''} ml-1 -mt-0.5 w-3.5 h-3.5"
|
value={$coolMode}
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
class="sr-only peer"
|
||||||
viewBox="0 0 24 24"
|
/>
|
||||||
><path
|
<div
|
||||||
fill="#A3A3A3"
|
class="w-11 h-6 bg-gray-400 rounded-full peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#1563F9]"
|
||||||
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
></div>
|
||||||
/></svg
|
{#if $coolMode}
|
||||||
>
|
<span class="ml-2 text-sm font-medium text-white">
|
||||||
</Button>
|
Cool Mode
|
||||||
</div>
|
</span>
|
||||||
</div>
|
{:else}
|
||||||
|
<span class="ml-2 text-sm font-medium text-white">
|
||||||
|
Boring Mode
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
</label>
|
||||||
|
|
||||||
{#if $coolMode}
|
<div
|
||||||
<div class="sm:w-full">
|
class="flex flex-row items-center w-fit sm:w-[50%] md:w-auto sm:ml-auto"
|
||||||
<div class="relative">
|
>
|
||||||
<select
|
<div class="relative inline-block text-left grow">
|
||||||
class="w-36 select select-bordered select-sm p-0 pl-5 overflow-y-auto bg-[#313131]"
|
<DropdownMenu.Root>
|
||||||
on:change={changeStatement}
|
<DropdownMenu.Trigger asChild let:builder>
|
||||||
|
<Button
|
||||||
|
builders={[builder]}
|
||||||
|
class="w-full border-gray-600 border bg-[#09090B] sm:hover:bg-[#27272A] ease-out flex flex-row justify-between items-center px-3 py-2 text-white rounded-md truncate"
|
||||||
|
>
|
||||||
|
<span class="truncate text-white">{timeFrame}</span>
|
||||||
|
<svg
|
||||||
|
class="-mr-1 ml-1 h-5 w-5 xs:ml-2 inline-block"
|
||||||
|
viewBox="0 0 20 20"
|
||||||
|
fill="currentColor"
|
||||||
|
style="max-width:40px"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenu.Trigger>
|
||||||
|
<DropdownMenu.Content
|
||||||
|
class="w-56 h-fit max-h-72 overflow-y-auto scroller"
|
||||||
|
>
|
||||||
|
<DropdownMenu.Label class="text-gray-400">
|
||||||
|
Select time frame
|
||||||
|
</DropdownMenu.Label>
|
||||||
|
<DropdownMenu.Separator />
|
||||||
|
<DropdownMenu.Group>
|
||||||
|
<DropdownMenu.Item
|
||||||
|
on:click={() => (timeFrame = "5Y")}
|
||||||
|
class="cursor-pointer hover:bg-[#27272A]"
|
||||||
|
>
|
||||||
|
5 years
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
<DropdownMenu.Item
|
||||||
|
on:click={() => (timeFrame = "10Y")}
|
||||||
|
class="cursor-pointer hover:bg-[#27272A]"
|
||||||
|
>
|
||||||
|
10 years
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
<DropdownMenu.Item
|
||||||
|
on:click={() => (timeFrame = "MAX")}
|
||||||
|
class="cursor-pointer hover:bg-[#27272A]"
|
||||||
|
>
|
||||||
|
Max
|
||||||
|
</DropdownMenu.Item>
|
||||||
|
</DropdownMenu.Group>
|
||||||
|
</DropdownMenu.Content>
|
||||||
|
</DropdownMenu.Root>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
on:click={() => exportFundamentalData("csv")}
|
||||||
|
class="ml-2 w-full border-gray-600 border bg-[#09090B] sm:hover:bg-[#27272A] ease-out flex flex-row justify-between items-center px-3 py-2 text-white rounded-md truncate"
|
||||||
>
|
>
|
||||||
<option disabled>Choose an Cash Flow Variable</option>
|
<span class="truncate text-white">Download</span>
|
||||||
<option value="revenue" selected>Revenue</option>
|
<svg
|
||||||
<option value="costOfRevenue">Cost of Revenue</option>
|
class="{data?.user?.tier === 'Pro'
|
||||||
<option value="grossProfit">Gross Profit</option>
|
? 'hidden'
|
||||||
<option value="sellingGeneralAndAdministrativeExpenses"
|
: ''} ml-1 -mt-0.5 w-3.5 h-3.5"
|
||||||
>Selling, General & Admin</option
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
><path
|
||||||
|
fill="#A3A3A3"
|
||||||
|
d="M17 9V7c0-2.8-2.2-5-5-5S7 4.2 7 7v2c-1.7 0-3 1.3-3 3v7c0 1.7 1.3 3 3 3h10c1.7 0 3-1.3 3-3v-7c0-1.7-1.3-3-3-3M9 7c0-1.7 1.3-3 3-3s3 1.3 3 3v2H9z"
|
||||||
|
/></svg
|
||||||
>
|
>
|
||||||
<option value="researchAndDevelopmentExpenses"
|
</Button>
|
||||||
>Research & Development</option
|
|
||||||
>
|
|
||||||
<option value="otherExpenses">Other Expenses</option>
|
|
||||||
<option value="operatingExpenses"
|
|
||||||
>Operating Expenses</option
|
|
||||||
>
|
|
||||||
<option value="interestExpense">Interest Expense</option>
|
|
||||||
<option value="incomeBeforeTax">Pretax Income</option>
|
|
||||||
<option value="incomeTaxExpense">Income Tax</option>
|
|
||||||
<option value="netIncome">Net Income</option>
|
|
||||||
<option value="weightedAverageShsOut"
|
|
||||||
>Shares Outstanding (Basic)</option
|
|
||||||
>
|
|
||||||
<option value="weightedAverageShsOutDil"
|
|
||||||
>Shares Outstanding (Diluted)</option
|
|
||||||
>
|
|
||||||
<option value="eps">EPS (Basic)</option>
|
|
||||||
<option value="epsdiluted">EPS (Diluted)</option>
|
|
||||||
<option value="ebitda">EBITDA</option>
|
|
||||||
<option value="depreciationAndAmortization"
|
|
||||||
>Depreciation & Amortization</option
|
|
||||||
>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="app w-full">
|
{#if $coolMode}
|
||||||
<Chart {init} options={optionsData} class="chart" />
|
<div class="sm:w-full">
|
||||||
</div>
|
<div class="relative">
|
||||||
|
<select
|
||||||
|
class="w-36 select select-bordered select-sm p-0 pl-5 overflow-y-auto bg-[#313131]"
|
||||||
|
on:change={changeStatement}
|
||||||
|
>
|
||||||
|
<option disabled>Choose an Cash Flow Variable</option>
|
||||||
|
<option value="revenue" selected>Revenue</option>
|
||||||
|
<option value="costOfRevenue">Cost of Revenue</option>
|
||||||
|
<option value="grossProfit">Gross Profit</option>
|
||||||
|
<option value="sellingGeneralAndAdministrativeExpenses"
|
||||||
|
>Selling, General & Admin</option
|
||||||
|
>
|
||||||
|
<option value="researchAndDevelopmentExpenses"
|
||||||
|
>Research & Development</option
|
||||||
|
>
|
||||||
|
<option value="otherExpenses">Other Expenses</option>
|
||||||
|
<option value="operatingExpenses"
|
||||||
|
>Operating Expenses</option
|
||||||
|
>
|
||||||
|
<option value="interestExpense">Interest Expense</option
|
||||||
|
>
|
||||||
|
<option value="incomeBeforeTax">Pretax Income</option>
|
||||||
|
<option value="incomeTaxExpense">Income Tax</option>
|
||||||
|
<option value="netIncome">Net Income</option>
|
||||||
|
<option value="weightedAverageShsOut"
|
||||||
|
>Shares Outstanding (Basic)</option
|
||||||
|
>
|
||||||
|
<option value="weightedAverageShsOutDil"
|
||||||
|
>Shares Outstanding (Diluted)</option
|
||||||
|
>
|
||||||
|
<option value="eps">EPS (Basic)</option>
|
||||||
|
<option value="epsdiluted">EPS (Diluted)</option>
|
||||||
|
<option value="ebitda">EBITDA</option>
|
||||||
|
<option value="depreciationAndAmortization"
|
||||||
|
>Depreciation & Amortization</option
|
||||||
|
>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 class="mt-5 text-2xl text-gray-200 font-semibold">
|
<div class="app w-full">
|
||||||
{statementConfig?.find(
|
<Chart {init} options={optionsData} class="chart" />
|
||||||
(item) => item?.propertyName === displayStatement,
|
</div>
|
||||||
)?.label} History
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="w-full overflow-x-scroll">
|
<h2 class="mt-5 text-2xl text-gray-200 font-semibold">
|
||||||
<table
|
{statementConfig?.find(
|
||||||
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
(item) => item?.propertyName === displayStatement,
|
||||||
>
|
)?.label} History
|
||||||
<thead>
|
</h2>
|
||||||
<tr class="border border-gray-600">
|
|
||||||
<th
|
<div class="w-full overflow-x-scroll">
|
||||||
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
<table
|
||||||
>{filterRule === "annual"
|
class="table table-sm table-compact rounded-none sm:rounded-md w-full border-bg-[#09090B] m-auto mt-4"
|
||||||
? "Fiscal Year End"
|
>
|
||||||
: "Quarter Ends"}</th
|
<thead>
|
||||||
>
|
<tr class="border border-gray-600">
|
||||||
<th
|
<th
|
||||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
class="text-white font-semibold text-start text-sm sm:text-[1rem]"
|
||||||
>{statementConfig?.find(
|
>{filterRule === "annual"
|
||||||
(item) => item?.propertyName === displayStatement,
|
? "Fiscal Year End"
|
||||||
)?.label}</th
|
: "Quarter Ends"}</th
|
||||||
>
|
|
||||||
<th
|
|
||||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
|
||||||
>Change</th
|
|
||||||
>
|
|
||||||
<th
|
|
||||||
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
|
||||||
>Growth</th
|
|
||||||
>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{#each tableList as item, index}
|
|
||||||
<!-- row -->
|
|
||||||
<tr
|
|
||||||
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B] shake-ticker cursor-pointer"
|
|
||||||
>
|
|
||||||
<td
|
|
||||||
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
|
||||||
>
|
>
|
||||||
{item?.date}
|
<th
|
||||||
</td>
|
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||||
|
>{statementConfig?.find(
|
||||||
<td
|
(item) => item?.propertyName === displayStatement,
|
||||||
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
)?.label}</th
|
||||||
>
|
>
|
||||||
{abbreviateNumber(item?.value)}
|
<th
|
||||||
</td>
|
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||||
|
>Change</th
|
||||||
<td
|
|
||||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
|
||||||
>
|
>
|
||||||
{item?.value - tableList[index + 1]?.value !== 0
|
<th
|
||||||
? abbreviateNumber(
|
class="text-white font-semibold text-end text-sm sm:text-[1rem]"
|
||||||
(
|
>Growth</th
|
||||||
item?.value - tableList[index + 1]?.value
|
|
||||||
)?.toFixed(2),
|
|
||||||
)
|
|
||||||
: "-"}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td
|
|
||||||
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
|
||||||
>
|
>
|
||||||
{#if index + 1 - tableList?.length === 0}
|
|
||||||
-
|
|
||||||
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
|
||||||
<span class="text-[#FF2F1F]">-100.00%</span>
|
|
||||||
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
|
||||||
<span class="text-[#00FC50]">100.00%</span>
|
|
||||||
{:else if item?.value - tableList[index + 1]?.value > 0}
|
|
||||||
<span class="text-[#00FC50]">
|
|
||||||
{(
|
|
||||||
((item?.value - tableList[index + 1]?.value) /
|
|
||||||
Math.abs(item?.value)) *
|
|
||||||
100
|
|
||||||
)?.toFixed(2)}%
|
|
||||||
</span>
|
|
||||||
{:else if item?.value - tableList[index + 1]?.value < 0}
|
|
||||||
<span class="text-[#FF2F1F]">
|
|
||||||
-{(
|
|
||||||
Math?.abs(
|
|
||||||
(tableList[index + 1]?.value -
|
|
||||||
item?.value) /
|
|
||||||
Math.abs(item?.value),
|
|
||||||
) * 100
|
|
||||||
)?.toFixed(2)}%
|
|
||||||
</span>
|
|
||||||
{:else}
|
|
||||||
-
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{#each tableList as item, index}
|
||||||
</div>
|
<!-- row -->
|
||||||
{:else}
|
<tr
|
||||||
<div
|
class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#09090B] shake-ticker cursor-pointer"
|
||||||
class="w-full rounded-none sm:rounded-md m-auto overflow-x-auto"
|
>
|
||||||
>
|
|
||||||
<table class="table table-sm table-compact w-full">
|
|
||||||
<thead>
|
|
||||||
<tr class="text-white">
|
|
||||||
<td
|
|
||||||
class="text-start bg-[#09090B] text-white text-sm font-semibold pr-10"
|
|
||||||
>Year</td
|
|
||||||
>
|
|
||||||
{#each income as cash}
|
|
||||||
{#if filterRule === "annual"}
|
|
||||||
<td
|
<td
|
||||||
class="bg-[#09090B] font-semibold text-sm text-end"
|
class="text-white font-medium text-sm sm:text-[1rem] whitespace-nowrap border-b-[#09090B]"
|
||||||
>
|
>
|
||||||
{"FY" + cash?.calendarYear?.slice(-2)}
|
{item?.date}
|
||||||
</td>
|
</td>
|
||||||
{:else}
|
|
||||||
<td
|
<td
|
||||||
class="bg-[#09090B] font-semibold text-sm text-end"
|
class="text-white text-sm sm:text-[1rem] text-right whitespace-nowrap border-b-[#09090B]"
|
||||||
>
|
>
|
||||||
{"FY" +
|
{abbreviateNumber(item?.value)}
|
||||||
cash?.calendarYear?.slice(-2) +
|
|
||||||
" " +
|
|
||||||
cash?.period}
|
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
|
||||||
|
<td
|
||||||
|
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||||
|
>
|
||||||
|
{item?.value - tableList[index + 1]?.value !== 0
|
||||||
|
? abbreviateNumber(
|
||||||
|
(
|
||||||
|
item?.value - tableList[index + 1]?.value
|
||||||
|
)?.toFixed(2),
|
||||||
|
)
|
||||||
|
: "-"}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td
|
||||||
|
class="text-white text-sm sm:text-[1rem] whitespace-nowrap font-medium text-end border-b-[#09090B]"
|
||||||
|
>
|
||||||
|
{#if index + 1 - tableList?.length === 0}
|
||||||
|
-
|
||||||
|
{:else if item?.value === 0 && tableList[index + 1]?.value < 0}
|
||||||
|
<span class="text-[#FF2F1F]">-100.00%</span>
|
||||||
|
{:else if item?.value === 0 && tableList[index + 1]?.value > 0}
|
||||||
|
<span class="text-[#00FC50]">100.00%</span>
|
||||||
|
{:else if item?.value - tableList[index + 1]?.value > 0}
|
||||||
|
<span class="text-[#00FC50]">
|
||||||
|
{(
|
||||||
|
((item?.value -
|
||||||
|
tableList[index + 1]?.value) /
|
||||||
|
Math.abs(item?.value)) *
|
||||||
|
100
|
||||||
|
)?.toFixed(2)}%
|
||||||
|
</span>
|
||||||
|
{:else if item?.value - tableList[index + 1]?.value < 0}
|
||||||
|
<span class="text-[#FF2F1F]">
|
||||||
|
-{(
|
||||||
|
Math?.abs(
|
||||||
|
(tableList[index + 1]?.value -
|
||||||
|
item?.value) /
|
||||||
|
Math.abs(item?.value),
|
||||||
|
) * 100
|
||||||
|
)?.toFixed(2)}%
|
||||||
|
</span>
|
||||||
|
{:else}
|
||||||
|
-
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tr>
|
</tbody>
|
||||||
</thead>
|
</table>
|
||||||
<tbody>
|
</div>
|
||||||
<!-- row -->
|
{:else}
|
||||||
<FinancialTable data={income} />
|
<div
|
||||||
</tbody>
|
class="w-full rounded-none sm:rounded-md m-auto overflow-x-auto"
|
||||||
</table>
|
>
|
||||||
</div>
|
<table class="table table-sm table-compact w-full">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-white">
|
||||||
|
<td
|
||||||
|
class="text-start bg-[#09090B] text-white text-sm font-semibold pr-10"
|
||||||
|
>Year</td
|
||||||
|
>
|
||||||
|
{#each income as cash}
|
||||||
|
{#if filterRule === "annual"}
|
||||||
|
<td
|
||||||
|
class="bg-[#09090B] font-semibold text-sm text-end"
|
||||||
|
>
|
||||||
|
{"FY" + cash?.calendarYear?.slice(-2)}
|
||||||
|
</td>
|
||||||
|
{:else}
|
||||||
|
<td
|
||||||
|
class="bg-[#09090B] font-semibold text-sm text-end"
|
||||||
|
>
|
||||||
|
{"FY" +
|
||||||
|
cash?.calendarYear?.slice(-2) +
|
||||||
|
" " +
|
||||||
|
cash?.period}
|
||||||
|
</td>
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- row -->
|
||||||
|
<FinancialTable data={income} />
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user