From f0f156378caf42063f97c3fc0d75a59d16163445 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 17 Jan 2025 18:44:46 +0100 Subject: [PATCH] add transcripts back --- .../stocks/[tickerID]/insider/+layout.svelte | 12 + .../insider/transcripts/+page.svelte | 332 ++++++++++++++++++ 2 files changed, 344 insertions(+) create mode 100644 src/routes/stocks/[tickerID]/insider/transcripts/+page.svelte diff --git a/src/routes/stocks/[tickerID]/insider/+layout.svelte b/src/routes/stocks/[tickerID]/insider/+layout.svelte index 06c222d2..18295eab 100644 --- a/src/routes/stocks/[tickerID]/insider/+layout.svelte +++ b/src/routes/stocks/[tickerID]/insider/+layout.svelte @@ -42,6 +42,7 @@ const sectionMap = { institute: "institute", "congress-trading": "congress-trading", + transcripts: "transcripts", }; const foundSection = parts?.find((part) => @@ -58,6 +59,7 @@ const subSectionMap = { "congress-trading": "/insider/congress-trading", institute: "/insider/institute", + transcripts: "/insider/transcripts", }; if (state !== "insider" && subSectionMap[state]) { @@ -112,6 +114,16 @@ > Congress Trading + changeSubSection("transcripts")} + class="p-2 px-5 cursor-pointer {displaySubSection === + 'transcripts' + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" + > + Transcripts + diff --git a/src/routes/stocks/[tickerID]/insider/transcripts/+page.svelte b/src/routes/stocks/[tickerID]/insider/transcripts/+page.svelte new file mode 100644 index 00000000..438f4901 --- /dev/null +++ b/src/routes/stocks/[tickerID]/insider/transcripts/+page.svelte @@ -0,0 +1,332 @@ + + + + + + + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} + {$displayCompanyName} ({$stockTicker}) · Q{quarter} + {year} · Earnings Call Transcript · Stocknear + + + + + + + + + + + + + + + + +
+
+
+
+
+

+ Transcripts +

+ +
+
+ + + + + + + Select Year + + + + {#each yearRange as index} + { + year = index; + getTranscripts(); + }} + class="cursor-pointer hover:bg-primary" + > + {index} + + {/each} + + + +
+
+ + + + + + + Select Quarter + + + + {#each [1, 2, 3, 4] as index} + { + quarter = index; + getTranscripts(); + }} + class="cursor-pointer hover:bg-primary" + > + Q{index} + + {/each} + + + +
+
+
+ + {#if isLoaded} + {#if chats?.length !== 0} +
+ + Q{displayQuarter} + {displayYear} · Earnings Call Transcript + + + {new Date(date).toLocaleDateString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + })} + +
+ + {#each chats as item} + {#if item?.name === "Operator"} +
+
+
+ + {item?.name} + +
+
+ +
+
+
+

+ {@html item?.description} +

+
+
+ {:else} +
+
+
+ + {item?.name?.slice(0, 1)} + +
+
+ + {item?.name} + +
+
+
+

+ {@html item?.description} +

+
+
+ {/if} + {/each} + + + {:else} + + {/if} + {:else} +
+
+ +
+
+ {/if} +
+
+
+