From 753f90d66858a6e091b7372ebe710dd11e9d4300 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 8 Aug 2024 15:16:18 +0200 Subject: [PATCH] add back corporate lobbying component --- src/lib/components/CorporateLobbying.svelte | 248 ++++++++++++++++++++ src/lib/components/Lobbying.svelte | 173 -------------- src/lib/store.ts | 2 +- src/routes/stocks/[tickerID]/+page.svelte | 9 +- 4 files changed, 257 insertions(+), 175 deletions(-) create mode 100644 src/lib/components/CorporateLobbying.svelte delete mode 100644 src/lib/components/Lobbying.svelte diff --git a/src/lib/components/CorporateLobbying.svelte b/src/lib/components/CorporateLobbying.svelte new file mode 100644 index 00000000..7bbea095 --- /dev/null +++ b/src/lib/components/CorporateLobbying.svelte @@ -0,0 +1,248 @@ + + + + + +
+
+ +
+ + +
+ + {#if data?.user?.tier === 'Pro'} + {#if isLoaded} + {#if rawData?.length !== 0} +
+ +
+
+ Explore {$displayCompanyName}'s lobbying strategy by analyzing their annual spending to influence lawmakers towards favorable regulation and legislation alignment. +
+
+ + + +
+ +
+ +
+ The company allocated an average of {abbreviateNumber(avgAmount,true)} annually towards lobbying efforts, reaching its peak at {abbreviateNumber(displayMaxLobbying,true)} in {displayYear}. +
+
+ + {:else} +

+ No data available + +

+ + {/if} + + {:else} +
+
+ +
+
+ {/if} + + {:else} +
+ + Unlock content with Pro Subscription +
+ {/if} + + +
+
+ + + + + \ No newline at end of file diff --git a/src/lib/components/Lobbying.svelte b/src/lib/components/Lobbying.svelte deleted file mode 100644 index e9c05978..00000000 --- a/src/lib/components/Lobbying.svelte +++ /dev/null @@ -1,173 +0,0 @@ - - - - - -
-
- -
- - -
- - {#if lobbyingList?.length !== 0} -
- -
-
- Explore {$displayCompanyName}'s lobbying strategy by analyzing their annual spending to influence lawmakers towards favorable regulation and legislation alignment. -
-
- - - - -
- -
-
- -
- The company allocated an average of {abbreviateNumber(avgTotalValue,true)} annually towards lobbying efforts, reaching its peak at {abbreviateNumber(displayMaxLobbying,true)} in {displayYear}. -
-
- - {:else} -

- No data available - -

- - {/if} - -
-
- - - - - \ No newline at end of file diff --git a/src/lib/store.ts b/src/lib/store.ts index eab81b4e..6ffa8c5f 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -82,7 +82,7 @@ export const swapComponent= writable((false)); export const taRatingComponent= writable((false)); export const dcfComponent= writable((false)); export const correlationComponent = writable((false)); - +export const corporateLobbyingComponent = writable((false)); export const strategyId = writable( ("")); diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index ab91f6e9..d8ab131b 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -3,7 +3,7 @@ import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts'; - import {getCache, setCache, taRatingComponent, swapComponent, analystInsightComponent, governmentContractComponent, optionsNetFlowComponent, impliedVolatilityComponent, borrowedShareComponent, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; + import {getCache, setCache, corporateLobbyingComponent, taRatingComponent, swapComponent, analystInsightComponent, governmentContractComponent, optionsNetFlowComponent, impliedVolatilityComponent, borrowedShareComponent, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import BullBearSay from '$lib/components/BullBearSay.svelte'; import CommunitySentiment from '$lib/components/CommunitySentiment.svelte'; @@ -1275,6 +1275,13 @@ function changeChartType() { + +
+ {#await import('$lib/components/CorporateLobbying.svelte') then {default: Comp}} + + {/await} +
+