refactor code
This commit is contained in:
parent
0ed2a92497
commit
7a68a47125
@ -55,10 +55,10 @@
|
|||||||
<div class="flex justify-start items-center w-full m-auto pl-2">
|
<div class="flex justify-start items-center w-full m-auto pl-2">
|
||||||
<table class="table lg:table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table lg:table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Ex-Dividend</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B]">Ex-Dividend</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Payment Date</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B]">Payment Date</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Amount</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B]">Amount</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
|||||||
@ -146,7 +146,7 @@ $: {
|
|||||||
<div class="bg-[#000] h-auto w-screen">
|
<div class="bg-[#000] h-auto w-screen">
|
||||||
|
|
||||||
<!--Start Header-->
|
<!--Start Header-->
|
||||||
<div class="bg-[#191919] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
<div class="bg-[#27272A] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
||||||
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
||||||
ESG Score
|
ESG Score
|
||||||
</h2>
|
</h2>
|
||||||
@ -168,7 +168,7 @@ $: {
|
|||||||
<div class="mt-5 flex flex-col m-auto items-center rounded-lg w-full mb-16 p-3">
|
<div class="mt-5 flex flex-col m-auto items-center rounded-lg w-full mb-16 p-3">
|
||||||
|
|
||||||
|
|
||||||
<div class="shadow-lg bg-[#191919] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
<div class="shadow-lg bg-[#27272A] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
||||||
<div class="flex flex-col -mt-2 w-full">
|
<div class="flex flex-col -mt-2 w-full">
|
||||||
<div class="flex flex-row items-center w-full">
|
<div class="flex flex-row items-center w-full">
|
||||||
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
||||||
@ -182,7 +182,7 @@ $: {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shadow-lg bg-[#191919] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
<div class="shadow-lg bg-[#27272A] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
||||||
<div class="flex flex-col -mt-2 w-full">
|
<div class="flex flex-col -mt-2 w-full">
|
||||||
<div class="flex flex-row items-center w-full">
|
<div class="flex flex-row items-center w-full">
|
||||||
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
||||||
@ -196,7 +196,7 @@ $: {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shadow-lg bg-[#191919] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
<div class="shadow-lg bg-[#27272A] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
||||||
<div class="flex flex-col -mt-2 w-full">
|
<div class="flex flex-col -mt-2 w-full">
|
||||||
<div class="flex flex-row items-center w-full">
|
<div class="flex flex-row items-center w-full">
|
||||||
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
||||||
@ -209,7 +209,7 @@ $: {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shadow-lg bg-[#191919] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
<div class="shadow-lg bg-[#27272A] w-full rounded-lg p-4 mb-5 flex flex-row items-center">
|
||||||
<div class="flex flex-col -mt-2 w-full">
|
<div class="flex flex-col -mt-2 w-full">
|
||||||
<div class="flex flex-row items-center w-full">
|
<div class="flex flex-row items-center w-full">
|
||||||
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
<span class="text-white text-md font-medium text-start mb-2 mr-auto mt-2">
|
||||||
|
|||||||
@ -80,7 +80,7 @@ afterUpdate(async() => {
|
|||||||
<div class="space-y-3 sm:pt-5">
|
<div class="space-y-3 sm:pt-5">
|
||||||
<div class="bg-[#000] h-auto w-screen">
|
<div class="bg-[#000] h-auto w-screen">
|
||||||
<!--Start Header-->
|
<!--Start Header-->
|
||||||
<div class="bg-[#09090B] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
<div class="bg-[#27272A] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
||||||
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
||||||
Executives
|
Executives
|
||||||
</h2>
|
</h2>
|
||||||
@ -128,7 +128,7 @@ afterUpdate(async() => {
|
|||||||
<!--Start Item-->
|
<!--Start Item-->
|
||||||
<div class="flex flex-row items-center pl-4 pr-4 w-full mb-3">
|
<div class="flex flex-row items-center pl-4 pr-4 w-full mb-3">
|
||||||
|
|
||||||
<div class="w-full rounded-md bg-[#09090B] shadow-lg h-auto pb-3 pl-3 pt-3">
|
<div class="w-full rounded-md bg-[#27272A] shadow-lg h-auto pb-3 pl-3 pt-3">
|
||||||
<div class="flex flex-row items-center relative">
|
<div class="flex flex-row items-center relative">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="flex flex-row items-center mr-auto mb-2 text-white font-medium text-[1rem] w-56">
|
<div class="flex flex-row items-center mr-auto mb-2 text-white font-medium text-[1rem] w-56">
|
||||||
@ -147,7 +147,7 @@ afterUpdate(async() => {
|
|||||||
|
|
||||||
{#if item?.gender === 'male'}
|
{#if item?.gender === 'male'}
|
||||||
<div class="flex flex-row items-center ml-auto absolute right-3 top-0">
|
<div class="flex flex-row items-center ml-auto absolute right-3 top-0">
|
||||||
<div class="h-full bg-gray-800 transform -translate-x-1/2" aria-hidden="true"></div>
|
<div class="h-full bg-[#27272A] transform -translate-x-1/2" aria-hidden="true"></div>
|
||||||
<div class="w-2 h-2 bg-[#FF2F1F] border-4 box-content border-gray-900 rounded-full transform -translate-x-1/2" aria-hidden="true"></div>
|
<div class="w-2 h-2 bg-[#FF2F1F] border-4 box-content border-gray-900 rounded-full transform -translate-x-1/2" aria-hidden="true"></div>
|
||||||
<span class="text-white text-[0.85rem] inline-block">
|
<span class="text-white text-[0.85rem] inline-block">
|
||||||
Male
|
Male
|
||||||
@ -155,7 +155,7 @@ afterUpdate(async() => {
|
|||||||
</div>
|
</div>
|
||||||
{:else if item?.gender === 'female'}
|
{:else if item?.gender === 'female'}
|
||||||
<div class="flex flex-row items-center ml-auto absolute right-3 top-0">
|
<div class="flex flex-row items-center ml-auto absolute right-3 top-0">
|
||||||
<div class="h-full bg-gray-800 transform -translate-x-1/2 " aria-hidden="true"></div>
|
<div class="h-full bg-[#27272A] transform -translate-x-1/2 " aria-hidden="true"></div>
|
||||||
<div class="w-2 h-2 bg-[#0FC008] border-4 box-content border-gray-900 rounded-full transform -translate-x-1/2" aria-hidden="true"></div>
|
<div class="w-2 h-2 bg-[#0FC008] border-4 box-content border-gray-900 rounded-full transform -translate-x-1/2" aria-hidden="true"></div>
|
||||||
<span class="text-white text-[0.85rem] inline-block">
|
<span class="text-white text-[0.85rem] inline-block">
|
||||||
Female
|
Female
|
||||||
|
|||||||
@ -172,7 +172,7 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
<div class="w-11/12 mt-5">
|
<div class="w-11/12 mt-5">
|
||||||
<div class="relative right-0 bg-[#141417] rounded-lg">
|
<div class="relative right-0 bg-[#27272A] rounded-lg">
|
||||||
|
|
||||||
<div class="relative flex flex-row items-center p-1 list-none rounded-lg">
|
<div class="relative flex flex-row items-center p-1 list-none rounded-lg">
|
||||||
<AnimateSharedLayout>
|
<AnimateSharedLayout>
|
||||||
@ -227,7 +227,7 @@ $: {
|
|||||||
<div class="mt-5 w-full">
|
<div class="mt-5 w-full">
|
||||||
|
|
||||||
{#each displayList as item}
|
{#each displayList as item}
|
||||||
<div class="flex flex-col justify-center m-auto items-start rounded-md bg-[#141417] shadow-lg h-auto w-11/12 mb-3" transition:fade={{ delay: 0, duration: 80 }} in={accordionOpen[item?.year]}>
|
<div class="flex flex-col justify-center m-auto items-start rounded-md bg-[#27272A] shadow-lg h-auto w-11/12 mb-3" transition:fade={{ delay: 0, duration: 80 }} in={accordionOpen[item?.year]}>
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-row items-center w-full p-3">
|
<div class="flex flex-row items-center w-full p-3">
|
||||||
|
|||||||
@ -38,10 +38,10 @@ export let similarTicker;
|
|||||||
<div class="flex justify-start items-center w-full m-auto pl-2">
|
<div class="flex justify-start items-center w-full m-auto pl-2">
|
||||||
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Fund Name</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B]">Fund Name</th>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Total Assets</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B]">Total Assets</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Holdings</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B]">Holdings</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -39,10 +39,10 @@ export let similarstock;
|
|||||||
<div class="flex justify-start items-center w-full m-auto ">
|
<div class="flex justify-start items-center w-full m-auto ">
|
||||||
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Company</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B]">Company</th>
|
||||||
<th class="text-white font-semibold text-sm text-center bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Market Cap</th>
|
<th class="text-white font-semibold text-sm text-center bg-[#000] sm:bg-[#09090B]">Market Cap</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Avg Volume</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B]">Avg Volume</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -104,7 +104,7 @@ export let similarstock;
|
|||||||
<div class="bg-[#000] h-auto w-screen">
|
<div class="bg-[#000] h-auto w-screen">
|
||||||
|
|
||||||
<!--Start Header-->
|
<!--Start Header-->
|
||||||
<div class="bg-[#09090B] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
<div class="bg-[#27272A] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
||||||
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
||||||
Similar Ticker
|
Similar Ticker
|
||||||
</h2>
|
</h2>
|
||||||
@ -125,10 +125,10 @@ export let similarstock;
|
|||||||
<div class="flex justify-start items-center w-full m-auto mt-10 overflow-hidden">
|
<div class="flex justify-start items-center w-full m-auto mt-10 overflow-hidden">
|
||||||
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-bold text-sm text-start bg-[#000] border-b border-blue-400">Company</th>
|
<th class="text-white font-bold text-sm text-start bg-[#000]">Company</th>
|
||||||
<th class="text-white font-bold text-sm text-center bg-[#000] border-b border-blue-400">Market Cap</th>
|
<th class="text-white font-bold text-sm text-center bg-[#000]">Market Cap</th>
|
||||||
<th class="text-white font-bold text-sm text-end bg-[#000] border-b border-blue-400">Avg Volume</th>
|
<th class="text-white font-bold text-sm text-end bg-[#000]">Avg Volume</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -14,11 +14,7 @@
|
|||||||
//import copilotIcon from '$lib/images/copilot_icon.png';
|
//import copilotIcon from '$lib/images/copilot_icon.png';
|
||||||
|
|
||||||
|
|
||||||
export let stockDeck;
|
|
||||||
export let data;
|
export let data;
|
||||||
export let similarstock;
|
|
||||||
export let topETFHolder;
|
|
||||||
|
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if($similarTickerClicked)
|
if($similarTickerClicked)
|
||||||
@ -66,8 +62,6 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--Start Executive Modal-->
|
<!--Start Executive Modal-->
|
||||||
<div class="drawer drawer-end z-40 overflow-hidden w-screen">
|
<div class="drawer drawer-end z-40 overflow-hidden w-screen">
|
||||||
<input id="secFilingModal" type="checkbox" class="drawer-toggle"/>
|
<input id="secFilingModal" type="checkbox" class="drawer-toggle"/>
|
||||||
@ -136,7 +130,7 @@ $: {
|
|||||||
|
|
||||||
<div class="w-screen overflow-y-scroll" >
|
<div class="w-screen overflow-y-scroll" >
|
||||||
|
|
||||||
<TickerInfoCard stockDeck={stockDeck}/>
|
<TickerInfoCard stockDeck={data?.getStockDeck}/>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -164,7 +158,7 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
<div class="w-screen overflow-y-scroll" >
|
<div class="w-screen overflow-y-scroll" >
|
||||||
<ESGCard stockDeck={stockDeck}/>
|
<ESGCard stockDeck={data?.getStockDeck}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -188,7 +182,7 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
<div class="w-screen overflow-y-scroll" >
|
<div class="w-screen overflow-y-scroll" >
|
||||||
<SimilarTickerCard similarstock={similarstock}/>
|
<SimilarTickerCard similarstock={data?.getSimilarStock}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -211,7 +205,7 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
<div class="w-screen overflow-y-scroll" >
|
<div class="w-screen overflow-y-scroll" >
|
||||||
<TopETFTickerHolder topETFHolder={topETFHolder}/>
|
<TopETFTickerHolder topETFHolder={data?.getTopETFHolder}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -39,40 +39,13 @@ async function getTaRating(ticker) {
|
|||||||
});
|
});
|
||||||
rawData = await response.json();
|
rawData = await response.json();
|
||||||
|
|
||||||
showFullStats = false;
|
|
||||||
overallSignal = rawData?.overallSignal;
|
|
||||||
signalList = rawData?.signalList ?? []
|
|
||||||
buyCount = 0;
|
|
||||||
sellCount = 0;
|
|
||||||
neutralCount=0;
|
|
||||||
|
|
||||||
signalList?.forEach(item => {
|
|
||||||
switch (item?.signal) {
|
|
||||||
case "Strong Buy":
|
|
||||||
buyCount++;
|
|
||||||
break;
|
|
||||||
case "Buy":
|
|
||||||
buyCount++;
|
|
||||||
break;
|
|
||||||
case "Sell":
|
|
||||||
sellCount++;
|
|
||||||
break;
|
|
||||||
case "Strong Sell":
|
|
||||||
sellCount++;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
neutralCount++;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
setCache(ticker, rawData, 'getTaRating');
|
setCache(ticker, rawData, 'getTaRating');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to fetch swap data:', error);
|
console.error('Failed to fetch swap data:', error);
|
||||||
rawData = {};
|
rawData = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rawData?.signalList?.lenght !== 0) {
|
if (Object?.keys(rawData)?.length !== 0) {
|
||||||
$taRatingComponent = true;
|
$taRatingComponent = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -84,16 +57,45 @@ async function getTaRating(ticker) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$: {
|
async function updateData() {
|
||||||
if (($assetType === 'stock' ? $stockTicker : $assetType === 'etf' ? $etfTicker : $cryptoTicker) && typeof window !== 'undefined') {
|
if (($assetType === 'stock' ? $stockTicker : $assetType === 'etf' ? $etfTicker : $cryptoTicker) && typeof window !== 'undefined') {
|
||||||
|
|
||||||
isLoaded = false;
|
isLoaded = false;
|
||||||
const ticker = $assetType === 'stock' ? $stockTicker : $assetType === 'etf' ? $etfTicker : $cryptoTicker;
|
const ticker = $assetType === 'stock' ? $stockTicker : $assetType === 'etf' ? $etfTicker : $cryptoTicker;
|
||||||
getTaRating(ticker).then(() => {
|
|
||||||
isLoaded = true;
|
try {
|
||||||
|
await getTaRating(ticker);
|
||||||
|
showFullStats = false;
|
||||||
|
overallSignal = rawData?.overallSignal;
|
||||||
|
signalList = rawData?.signalList || [];
|
||||||
|
buyCount = 0;
|
||||||
|
sellCount = 0;
|
||||||
|
neutralCount = 0;
|
||||||
|
|
||||||
|
signalList?.forEach(item => {
|
||||||
|
switch (item?.signal) {
|
||||||
|
case "Strong Buy":
|
||||||
|
case "Buy":
|
||||||
|
buyCount++;
|
||||||
|
break;
|
||||||
|
case "Sell":
|
||||||
|
case "Strong Sell":
|
||||||
|
sellCount++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
neutralCount++;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
isLoaded = true;
|
||||||
|
console.log(signalList);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching data:", error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$: if ($assetType || $stockTicker || $etfTicker || $cryptoTicker) {
|
||||||
|
updateData();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -116,7 +118,7 @@ $: {
|
|||||||
|
|
||||||
{#if data?.user?.tier === 'Pro'}
|
{#if data?.user?.tier === 'Pro'}
|
||||||
{#if isLoaded}
|
{#if isLoaded}
|
||||||
{#if Object?.keys(rawData)?.length !== 0}
|
{#if signalList?.length !== 0}
|
||||||
|
|
||||||
{#if overallSignal !== 'n/a'}
|
{#if overallSignal !== 'n/a'}
|
||||||
<div class="text-white text-[1rem] sm:text-lg mt-3 mb-8 text-start">
|
<div class="text-white text-[1rem] sm:text-lg mt-3 mb-8 text-start">
|
||||||
|
|||||||
@ -39,10 +39,10 @@
|
|||||||
<div class="flex justify-start items-center w-full m-auto ">
|
<div class="flex justify-start items-center w-full m-auto ">
|
||||||
<table class="table table-sm table-compact text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr >
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Company Name</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] sm:bg-[#09090B]">Company Name</th>
|
||||||
<th class="text-white font-semibold text-sm text-center bg-[#000] sm:bg-[#09090B] border-b border-blue-400">Total Assets</th>
|
<th class="text-white font-semibold text-sm text-center bg-[#000] sm:bg-[#09090B]">Total Assets</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B] border-b border-blue-400">% of Fund</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] sm:bg-[#09090B]">% of Fund</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<div class="bg-[#000] h-auto w-screen">
|
<div class="bg-[#000] h-auto w-screen">
|
||||||
|
|
||||||
<!--Start Header-->
|
<!--Start Header-->
|
||||||
<div class="bg-[#191919] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
<div class="bg-[#27272A] w-full p-1 flex flex-col items-center pb-5 h-auto rounded-b-[30px]">
|
||||||
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
<h2 class="text-center m-auto text-[1.1rem] font-medium text-white mt-5">
|
||||||
Top ETFs Holder
|
Top ETFs Holder
|
||||||
</h2>
|
</h2>
|
||||||
@ -122,10 +122,10 @@
|
|||||||
<div class="flex justify-start items-center w-full m-auto mt-10 overflow-hidden">
|
<div class="flex justify-start items-center w-full m-auto mt-10 overflow-hidden">
|
||||||
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-bold text-sm text-start bg-[#000] border-b border-blue-400">Company</th>
|
<th class="text-white font-bold text-sm text-start bg-[#000]">Company</th>
|
||||||
<th class="text-white font-bold text-sm text-center bg-[#000] border-b border-blue-400">Total Assets</th>
|
<th class="text-white font-bold text-sm text-center bg-[#000]">Total Assets</th>
|
||||||
<th class="text-white font-bold text-sm text-end bg-[#000] border-b border-blue-400">% of Fund</th>
|
<th class="text-white font-bold text-sm text-end bg-[#000]">% of Fund</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -58,10 +58,10 @@ $: {
|
|||||||
<div class="flex justify-start items-center w-full m-auto overflow-hidden">
|
<div class="flex justify-start items-center w-full m-auto overflow-hidden">
|
||||||
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
<table class="table table-sm table-compact mt-3 text-start flex justify-start items-center w-full px-3 m-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="border-b border-blue-400">
|
<tr>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Company</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B]">Company</th>
|
||||||
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Market Value</th>
|
<th class="text-white font-semibold text-sm text-start bg-[#000] lg:bg-[#09090B]">Market Value</th>
|
||||||
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B] border-b border-blue-400">Portfolio</th>
|
<th class="text-white font-semibold text-sm text-end bg-[#000] lg:bg-[#09090B]">Portfolio</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -1167,6 +1167,7 @@ afterUpdate(async () => {
|
|||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
</Lazy>
|
</Lazy>
|
||||||
|
|
||||||
<Lazy>
|
<Lazy>
|
||||||
<div class="w-full sm:mt-5 m-auto sm:pl-6 sm:pb-6 sm:pt-6 {!$varComponent ? 'hidden' : ''}">
|
<div class="w-full sm:mt-5 m-auto sm:pl-6 sm:pb-6 sm:pt-6 {!$varComponent ? 'hidden' : ''}">
|
||||||
{#await import('$lib/components/VaR.svelte') then {default: Comp}}
|
{#await import('$lib/components/VaR.svelte') then {default: Comp}}
|
||||||
|
|||||||
@ -15,10 +15,7 @@
|
|||||||
|
|
||||||
let displayChartType = 'line';
|
let displayChartType = 'line';
|
||||||
|
|
||||||
let stockDeck = data?.getStockDeck ?? [];
|
|
||||||
let prePostData = {};
|
let prePostData = {};
|
||||||
let similarstock = [];
|
|
||||||
let topETFHolder = [];
|
|
||||||
let marketMoods = {}
|
let marketMoods = {}
|
||||||
let communitySentiment = {};
|
let communitySentiment = {};
|
||||||
|
|
||||||
@ -656,14 +653,9 @@ function changeChartType() {
|
|||||||
output = null;
|
output = null;
|
||||||
|
|
||||||
|
|
||||||
stockDeck = data?.getStockDeck;
|
|
||||||
marketMoods = data?.getBullBearSay;
|
marketMoods = data?.getBullBearSay;
|
||||||
communitySentiment = data?.getCommunitySentiment;
|
communitySentiment = data?.getCommunitySentiment;
|
||||||
|
|
||||||
similarstock = data?.getSimilarStock;
|
|
||||||
topETFHolder = data?.getTopETFHolder;
|
|
||||||
//previousClose = stockDeck?.at(0)?.previousClose;
|
|
||||||
|
|
||||||
|
|
||||||
const asyncFunctions = [
|
const asyncFunctions = [
|
||||||
getPrePostQuote(),
|
getPrePostQuote(),
|
||||||
@ -1195,9 +1187,6 @@ function changeChartType() {
|
|||||||
</h3>
|
</h3>
|
||||||
{#await import('$lib/components/StockKeyInformation.svelte') then {default: Comp}}
|
{#await import('$lib/components/StockKeyInformation.svelte') then {default: Comp}}
|
||||||
<svelte:component this={Comp}
|
<svelte:component this={Comp}
|
||||||
stockDeck={stockDeck}
|
|
||||||
similarstock={similarstock}
|
|
||||||
topETFHolder={topETFHolder}
|
|
||||||
data={data} />
|
data={data} />
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
@ -1441,9 +1430,9 @@ function changeChartType() {
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<Lazy>
|
<Lazy>
|
||||||
<div class="w-full pt-10 sm:pl-6 sm:pb-6 sm:pt-6 m-auto {stockDeck?.at(0)?.stockSplits?.length === 0 ? 'hidden' : ''}">
|
<div class="w-full pt-10 sm:pl-6 sm:pb-6 sm:pt-6 m-auto {data?.getStockDeck?.at(0)?.stockSplits?.length === 0 ? 'hidden' : ''}">
|
||||||
{#await import('$lib/components/StockSplits.svelte') then {default: Comp}}
|
{#await import('$lib/components/StockSplits.svelte') then {default: Comp}}
|
||||||
<svelte:component this={Comp} stockDeck={stockDeck}/>
|
<svelte:component this={Comp} stockDeck={data?.getStockDeck}/>
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
</Lazy>
|
</Lazy>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user