Skip to content

Commit

Permalink
- Added persistence of visible columns in local storage.
Browse files Browse the repository at this point in the history
- Removed IB index and market weights page.
- Removed console.log of company events data loaded from the web.
  • Loading branch information
PeterBlenessy committed Aug 1, 2024
1 parent f8586f0 commit 36e85b9
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 143 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

## v1.0.3 - 2024-08-01
- Added persistence of visible columns in local storage.
- Removed IB index and market weights page.
- Removed console.log of company events data loaded from the web.

## v1.0.2 - 2024-07-21
- Changed background color for expanded rows for better contrast compared to the rest of the table.
- Fixed scroll performance degradation due to sticky headers in tables.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stoqster",
"version": "1.0.2",
"version": "1.0.3",
"productName": "Stoqster",
"author": "Péter Blénessy",
"private": true,
Expand Down
13 changes: 9 additions & 4 deletions src/api/fiAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const funds = {
],
qTableConfig: {
columns: [
{ name: 'Fond_namn', label: 'Fondnamn', field: 'Fond_namn', align: 'left', required: true, sortable: true, style:'white-space: nowrap' },
{ name: 'Fond_namn', label: 'Fondnamn', field: 'Fond_namn', align: 'left', required: true, sortable: true,
style:'white-space: nowrap; max-width: 250px; overflow: hidden; text-overflow: ellipsis;'
},
{ name: 'Fond_ISIN-kod', label: 'ISIN-kod', field: 'Fond_ISIN-kod', align: 'left', required: false },
{
name: 'Fondförmögenhet', label: 'Fondförmögenhet', field: 'Fondförmögenhet', align: 'right', required: false, sortable: true,
Expand All @@ -83,7 +85,8 @@ const funds = {
{
name: 'Jämförelseindex', label: 'Jämförelseindex',
field: (val) => val['Jämförelseindex']['Jämförelseindex'],
align: 'left', required: false, sortable: true
align: 'left', required: false, sortable: true,
style:'white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis;'
},
{
name: 'Likvida_medel', label: 'Likvida medel', field: 'Likvida_medel', align: 'right', required: false, sortable: true,
Expand All @@ -103,7 +106,7 @@ const funds = {
style: val => setStyle(val['Övriga_tillgångar_och_skulder'], 'red', 'primary'),
},
],
visibleColumns: ['Fond_namn', 'Fondförmögenhet', 'Likvida_medel', 'Standardavvikelse_24_månader', 'Övriga_tillgångar_och_skulder']
visibleColumns: ['Fond_namn', 'Jämförelseindex', 'Fondförmögenhet', 'Likvida_medel', 'Standardavvikelse_24_månader', 'Övriga_tillgångar_och_skulder']
}
};

Expand All @@ -123,7 +126,9 @@ const fundHoldings = {
'Landkod_Emittent', 'Marknadsvärde_instrument', 'Nominellt_belopp', 'Tillgångsslag_enligt_LVF_5_kap', 'Valuta', 'Valutakurs_instrument' ],
qTableConfig: {
columns: [
{ name: 'Instrumentnamn', label: 'Instrumentnamn', field: 'Instrumentnamn', align: 'left', required: true, sortable: true },
{ name: 'Instrumentnamn', label: 'Instrumentnamn', field: 'Instrumentnamn', align: 'left', required: true, sortable: true,
style:'white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis;'
},
{ name: 'ISIN-kod_instrument', label: 'ISIN-kod', field: 'ISIN-kod_instrument', align: 'right', required: true, sortable: true },
{
name: 'Marknadsvärde_instrument', label: 'Marknadsvärde', field: 'Marknadsvärde_instrument', align: 'right', required: false, sortable: true,
Expand Down
50 changes: 3 additions & 47 deletions src/api/ibindexAPI.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,9 @@ const ibindex = {

// -----------------------------
getSpecialURL: {
getHoldings: {
},
getRebatePremiums: {
},
getEvents: {
}
getHoldings: {},
getRebatePremiums: {},
getEvents: {}
}
}

Expand Down Expand Up @@ -493,46 +490,5 @@ ibindex.se/ibi//company/getRelativePrice.req | "BURE" |-> [
---------------------------------------------------------------------------------------------------
ibindex.se/ibi//company/getEvents.req | "BURE" |-> [{"product":"BURE","productName":"Bure Equity","eventDate":1604534400000,"eventType":"THIRD_QUARTER_EARNINGS_RESULTS","eventName":"Q3 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1614211200000,"eventType":"FOURTH_QUARTER_EARNINGS_RESULTS","eventName":"Q4 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1618272000000,"eventType":"ANNUAL_REPORT","eventName":"Årsredovisning","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1619481600000,"eventType":"FIRST_QUARTER_EARNINGS_RESULTS","eventName":"Q1 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1620259200000,"eventType":"GENERAL_MEETING","eventName":"Årsstämma","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1620345600000,"eventType":"DIVIDEND","eventName":"Utdelning (X-dag)","eventDetails":"2 SEK"},{"product":"BURE","productName":"Bure Equity","eventDate":1629331200000,"eventType":"SECOND_QUARTER_EARNINGS_RESULTS","eventName":"Q2 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1636588800000,"eventType":"THIRD_QUARTER_EARNINGS_RESULTS","eventName":"Q3 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1645660800000,"eventType":"FOURTH_QUARTER_EARNINGS_RESULTS","eventName":"Q4 Rapport","eventDetails":""},{"product":"BURE","productName":"Bure Equity","eventDate":1651536000000,"eventType":"GENERAL_MEETING","eventName":"Årsstämma","eventDetails":""}]
---------------------------------------------------------------------------------------------------
\SPILTAN
BASEURL:
ibindex.se/ibi//spiltan/
---------------------------------------------------------------------------------------------------
ibindex.se/ibi//spiltan/getPrice.req |-> {"product":"SPILTAN","price":229.0,"previousPrice":229.0,"priceChange":0.0,"timestamp":1635785268000}
ibindex.se/ibi//spiltan/getChartDataPercent.req | {"interval":"30_DAYS"} |-> [{"date":1632182400000,"ibiIndexPrice":0.0,"omxIndexPrice":0.0,"productPrice":0.0,"product":"SPILTAN"},{"date":1632268800000,"ibiIndexPrice":0.28,"omxIndexPrice":1.07,"productPrice":0.0,"product":"SPILTAN"},{"date":1632355200000,"ibiIndexPrice":2.42,"omxIndexPrice":2.77,"productPrice":0.0,"product":"SPILTAN"},{"date":1632441600000,"ibiIndexPrice":1.23,"omxIndexPrice":1.69,"productPrice":0.0,"product":"SPILTAN"},{"date":1632700800000,"ibiIndexPrice":0.32,"omxIndexPrice":1.28,"productPrice":0.0,"product":"SPILTAN"},{"date":1632787200000,"ibiIndexPrice":-2.45,"omxIndexPrice":-0.92,"productPrice":0.0,"product":"SPILTAN"},{"date":1632873600000,"ibiIndexPrice":-2.29,"omxIndexPrice":-0.85,"productPrice":0.0,"product":"SPILTAN"},{"date":1632960000000,"ibiIndexPrice":-1.22,"omxIndexPrice":-0.69,"productPrice":0.0,"product":"SPILTAN"},{"date":1633046400000,"ibiIndexPrice":-1.12,"omxIndexPrice":-0.91,"productPrice":0.0,"product":"SPILTAN"},{"date":1633305600000,"ibiIndexPrice":-1.54,"omxIndexPrice":-1.83,"productPrice":0.0,"product":"SPILTAN"},{"date":1633392000000,"ibiIndexPrice":-1.03,"omxIndexPrice":-0.88,"productPrice":0.0,"product":"SPILTAN"},{"date":1633478400000,"ibiIndexPrice":-2.33,"omxIndexPrice":-2.37,"productPrice":0.0,"product":"SPILTAN"},{"date":1633564800000,"ibiIndexPrice":-0.86,"omxIndexPrice":-0.75,"productPrice":0.0,"product":"SPILTAN"},{"date":1633651200000,"ibiIndexPrice":-2.19,"omxIndexPrice":-1.52,"productPrice":0.0,"product":"SPILTAN"},{"date":1633910400000,"ibiIndexPrice":-3.24,"omxIndexPrice":-1.82,"productPrice":0.0,"product":"SPILTAN"},{"date":1633996800000,"ibiIndexPrice":-1.6,"omxIndexPrice":-1.05,"productPrice":0.0,"product":"SPILTAN"},{"date":1634083200000,"ibiIndexPrice":0.48,"omxIndexPrice":0.09,"productPrice":0.0,"product":"SPILTAN"},{"date":1634169600000,"ibiIndexPrice":1.92,"omxIndexPrice":0.96,"productPrice":0.0,"product":"SPILTAN"},{"date":1634256000000,"ibiIndexPrice":2.55,"omxIndexPrice":1.76,"productPrice":0.0,"product":"SPILTAN"},{"date":1634515200000,"ibiIndexPrice":2.67,"omxIndexPrice":1.62,"productPrice":0.0,"product":"SPILTAN"},{"date":1634601600000,"ibiIndexPrice":3.3,"omxIndexPrice":2.28,"productPrice":0.0,"product":"SPILTAN"},{"date":1634688000000,"ibiIndexPrice":3.93,"omxIndexPrice":2.26,"productPrice":0.0,"product":"SPILTAN"},{"date":1634774400000,"ibiIndexPrice":5.63,"omxIndexPrice":2.21,"productPrice":0.0,"product":"SPILTAN"},{"date":1634860800000,"ibiIndexPrice":7.22,"omxIndexPrice":3.25,"productPrice":0.0,"product":"SPILTAN"},{"date":1635120000000,"ibiIndexPrice":6.6,"omxIndexPrice":2.43,"productPrice":0.0,"product":"SPILTAN"},{"date":1635206400000,"ibiIndexPrice":6.95,"omxIndexPrice":3.05,"productPrice":14.5,"product":"SPILTAN"},{"date":1635292800000,"ibiIndexPrice":8.11,"omxIndexPrice":2.12,"productPrice":14.5,"product":"SPILTAN"},{"date":1635379200000,"ibiIndexPrice":7.97,"omxIndexPrice":1.69,"productPrice":14.5,"product":"SPILTAN"},{"date":1635465600000,"ibiIndexPrice":7.03,"omxIndexPrice":0.7,"productPrice":14.5,"product":"SPILTAN"},{"date":1635724800000,"ibiIndexPrice":7.22,"omxIndexPrice":1.2,"productPrice":14.5,"product":"SPILTAN"}]
ibindex.se/ibi//spiltan/getChartDataPrice.req | {"interval":"30_DAYS"} |-> [{"product":"SPILTAN","date":1632182400000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":209.62479363547018},{"product":"SPILTAN","date":1632268800000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":212.88697566521208},{"product":"SPILTAN","date":1632355200000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":215.5624166457777},{"product":"SPILTAN","date":1632441600000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":214.99134516969826},{"product":"SPILTAN","date":1632700800000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":213.72920977288766},{"product":"SPILTAN","date":1632787200000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":211.49297921770926},{"product":"SPILTAN","date":1632873600000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":207.98155565416562},{"product":"SPILTAN","date":1632960000000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":209.95102751553145},{"product":"SPILTAN","date":1633046400000,"productPrice":200.0,"netAssetValuePrice":236.9,"netAssetValueCalculatedPrice":205.897575192017},{"product":"SPILTAN","date":1633305600000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":206.6905606440939},{"product":"SPILTAN","date":1633392000000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":208.68617027167187},{"product":"SPILTAN","date":1633478400000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":206.54306590831717},{"product":"SPILTAN","date":1633564800000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":204.58583431653935},{"product":"SPILTAN","date":1633651200000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":205.64828075889528},{"product":"SPILTAN","date":1633910400000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":203.15419096607158},{"product":"SPILTAN","date":1633996800000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":203.31658166303373},{"product":"SPILTAN","date":1634083200000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":204.575158284838},{"product":"SPILTAN","date":1634169600000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":208.28812704131886},{"product":"SPILTAN","date":1634256000000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":207.18665882404716},{"product":"SPILTAN","date":1634515200000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":207.0353670350808},{"product":"SPILTAN","date":1634601600000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":211.2912516747209},{"product":"SPILTAN","date":1634688000000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":209.992163804997},{"product":"SPILTAN","date":1634774400000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":210.43818019846927},{"product":"SPILTAN","date":1634860800000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":211.54407210507273},{"product":"SPILTAN","date":1635120000000,"productPrice":200.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":211.21736469969332},{"product":"SPILTAN","date":1635206400000,"productPrice":229.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":207.01},{"product":"SPILTAN","date":1635292800000,"productPrice":229.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":206.14},{"product":"SPILTAN","date":1635379200000,"productPrice":229.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":206.72},{"product":"SPILTAN","date":1635465600000,"productPrice":229.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":206.11},{"product":"SPILTAN","date":1635724800000,"productPrice":229.0,"netAssetValuePrice":208.71,"netAssetValueCalculatedPrice":208.82}]
ibindex.se/ibi//spiltan/getHoldingsDate.req
ibindex.se/ibi//spiltan/getNetAssetValue.req
ibindex.se/ibi//spiltan/getHoldings.req |-> [{"holdingProduct":"1","holdingName":"Amhult 2","holdingValue":5.3E7,"holdingValuePrevious":5.3E7,"listed":false},{"holdingProduct":"2","holdingName":"Berkshire Hathaway (justerat 2021-11-01)","holdingValue":1.8389708085E8,"holdingValuePrevious":1.8389708085E8,"listed":false},{"holdingProduct":"3","holdingName":"KlaraBo","holdingValue":3.97E8,"holdingValuePrevious":3.97E8,"listed":false},{"holdingProduct":"5","holdingName":"P&E Fastigheter","holdingValue":2.45E8,"holdingValuePrevious":2.45E8,"listed":false},{"holdingProduct":"6","holdingName":"Spiltan Fonder","holdingValue":4.8E8,"holdingValuePrevious":4.8E8,"listed":false},{"holdingProduct":"7","holdingName":"Övriga noterade","holdingValue":4.07E8,"holdingValuePrevious":4.07E8,"listed":false},{"holdingProduct":"8","holdingName":"Övriga onoterade","holdingValue":7.02E8,"holdingValuePrevious":7.02E8,"listed":false},{"holdingProduct":"9","holdingName":"Kassa","holdingValue":5.36E8,"holdingValuePrevious":5.36E8,"listed":false},{"holdingProduct":"AJA B","holdingName":"Byggmästare A J Ahlström H","holdingValue":1.64066916E8,"holdingValuePrevious":1.685619E8,"listed":true},{"holdingProduct":"ALCA","holdingName":"Alcadon Group","holdingValue":1.75943981E8,"holdingValuePrevious":1.7015341960000002E8,"listed":true},{"holdingProduct":"BONAS","holdingName":"Bonäsudden Holding","holdingValue":1.03310426E8,"holdingValuePrevious":1.07172498E8,"listed":true},{"holdingProduct":"IDUN B","holdingName":"Idun Industrier B","holdingValue":1.00141108E8,"holdingValuePrevious":1.00484057E8,"listed":true},{"holdingProduct":"INSTAL","holdingName":"Instalco","holdingValue":9.25385634E7,"holdingValuePrevious":9.0626445E7,"listed":true},{"holdingProduct":"PDX","holdingName":"Paradox Interactive","holdingValue":2.3032400017000003E9,"holdingValuePrevious":2.227231314E9,"listed":true},{"holdingProduct":"SECARE","holdingName":"Swedencare","holdingValue":7.90041E7,"holdingValuePrevious":7.8284875E7,"listed":true},{"holdingProduct":"SLITE","holdingName":"Slitevind","holdingValue":5.60405222E7,"holdingValuePrevious":5.6486468E7,"listed":true},{"holdingProduct":"TEQ","holdingName":"Teqnion","holdingValue":2.54907324E8,"holdingValuePrevious":2.4234147E8,"listed":true},{"holdingProduct":"TRAIN B","holdingName":"Train Alliance Sweden B","holdingValue":1.5250695E8,"holdingValuePrevious":1.5311697779999998E8,"listed":true}]
ibindex.se/ibi//spiltan/getCurrentRebatePremium.req
ibindex.se/ibi//spiltan/getRebatePremiums.req
ibindex.se/ibi//spiltan/getRelativePrice.req
---------------------------------------------------------------------------------------------------
\FLAT CAPITAL
BASEURL:
ibindex.se/ibi//flatcapital/
---------------------------------------------------------------------------------------------------
ibindex.se/ibi//flatcapital/getPrice.req
...
---------------------------------------------------------------------------------------------------
\Byggmästare Anders Ahlström Holding AB
BASEURL:
ibindex.se/ibi//aja/
---------------------------------------------------------------------------------------------------
...
---------------------------------------------------------------------------------------------------
\VEF
BASEURL:
ibindex.se/ibi//vef/
---------------------------------------------------------------------------------------------------
ibindex.se/ibi//vef/getHoldings.req
...
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
*/
41 changes: 12 additions & 29 deletions src/components/ComponentFundHoldings.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
<template>
<q-table
dense
flat
color="primary"
:title="title"
:columns="columns"
:rows="rows"
:visible-columns="visibleColumns"
:filter="filter"
row-key="index"
:rows-per-page-options="[0]"
:binary-state-sort="true"
class="my-sticky-header-table-expanded"
wrap-cells
>

<q-table dense flat color="primary" :title="title" :columns="columns" :rows="rows" :visible-columns="visibleColumns"
:filter="filter" row-key="index" binary-state-sort class="my-sticky-header-table-expanded" wrap-cells
virtual-scroll virtual-scroll-slice-size="100" virtual-scroll-slice-ratio-before="2"
virtual-scroll-slice-ratio-after="2" virtual-scroll-sticky-size-start="49" virtual-scroll-item-size="33"
virtual-scroll-sticky-size-end="33" v-model:pagination="pagination" :rows-per-page-options="[0]">

<!-- Configure top-right part of the data table component -->
<template v-slot:top-right>
<!-- Search input -->
<q-input
dense
debounce="300"
v-model="filter"
placeholder="Filter list"
style="width: 500px"
>
<q-input dense debounce="300" v-model="filter" placeholder="Sök i listan" style="width: 500px">
<template v-slot:append>
<q-icon name="mdi-filter-variant" />
</template>
</q-input>
</template>


</q-table>
</template>

Expand Down Expand Up @@ -70,11 +53,11 @@ export default {
});
}
})
.catch(error => console.log(error))
.finally(() => {
loading.value = false;
console.timeEnd(`loadHoldingsFromDB(): ${fundName.value}`);
});
.catch(error => console.log(error))
.finally(() => {
loading.value = false;
console.timeEnd(`loadHoldingsFromDB(): ${fundName.value}`);
});
}
onMounted(() => {
Expand Down
Loading

0 comments on commit 36e85b9

Please sign in to comment.