update table component

This commit is contained in:
MuslemRahimi 2024-11-14 23:06:44 +01:00
parent 271867b5ef
commit 71c9e06ac9
3 changed files with 20 additions and 2 deletions

View File

@ -20,6 +20,8 @@
"marketCap", "marketCap",
]); ]);
export let specificRows = [];
export let defaultList = [ export let defaultList = [
{ name: "Market Cap", rule: "marketCap" }, { name: "Market Cap", rule: "marketCap" },
{ name: "Price", rule: "price" }, { name: "Price", rule: "price" },
@ -80,7 +82,11 @@
rule: "growthGrossProfit", rule: "growthGrossProfit",
type: "percentSign", type: "percentSign",
}, },
{ name: "Net Income Growth", rule: "growthNetIncome", type: "percentSign" }, {
name: "Net Income Growth",
rule: "growthNetIncome",
type: "percentSign",
},
{ name: "EBITDA Growth", rule: "growthEBITDA", type: "percentSign" }, { name: "EBITDA Growth", rule: "growthEBITDA", type: "percentSign" },
{ name: "EPS Growth", rule: "growthEPS", type: "percentSign" }, { name: "EPS Growth", rule: "growthEPS", type: "percentSign" },
{ name: "Total Debt", rule: "totalDebt", type: "int" }, { name: "Total Debt", rule: "totalDebt", type: "int" },
@ -126,9 +132,10 @@
rule: "institutionalOwnership", rule: "institutionalOwnership",
type: "percent", type: "percent",
}, },
{ name: "Sentiment", rule: "sentiment", type: "sentiment" },
]; ];
allRows = [...allRows, ...specificRows];
const proOnlyItems = new Set( const proOnlyItems = new Set(
allRows allRows
?.filter((item) => !excludedRules?.has(item?.rule)) // Exclude the items based on the rule ?.filter((item) => !excludedRules?.has(item?.rule)) // Exclude the items based on the rule

View File

@ -0,0 +1,6 @@
// +page.ts
import { redirect } from '@sveltejs/kit';
export function load() {
throw redirect(302, '/market-mover/premarket/gainers');
}

View File

@ -24,6 +24,10 @@
{ name: "Sentiment", rule: "sentiment" }, { name: "Sentiment", rule: "sentiment" },
]; ];
const specificRows = [
{ name: "Sentiment", rule: "sentiment", type: "sentiment" },
];
const hideLastRow = true; const hideLastRow = true;
</script> </script>
@ -103,6 +107,7 @@
{excludedRules} {excludedRules}
{defaultList} {defaultList}
{hideLastRow} {hideLastRow}
{specificRows}
/> />
<UpgradeToPro <UpgradeToPro