refactor: remove refresh from stores
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import {SliderCheckbox} from '@/components';
|
||||
import {SortableHeader, useSort, VirtualScrollTable} from '@/components/table';
|
||||
import {MarketType, MarketTypeLabel, TaxInput, useMarketOrdersStore, useMarketTaxStore} from "@/market";
|
||||
import {getListedSellTypeIds, MarketType, MarketTypeLabel, TaxInput, useMarketTaxStore} from "@/market";
|
||||
import {MinusIcon, PlusIcon} from '@heroicons/vue/24/outline';
|
||||
import {useStorage} from '@vueuse/core';
|
||||
import {computedAsync, useStorage} from '@vueuse/core';
|
||||
import {computed, ref} from 'vue';
|
||||
import {AcquiredType} from './AcquiredType';
|
||||
import AcquisitionQuartilesTooltip from './AcquisitionQuartilesTooltip.vue';
|
||||
@@ -66,14 +66,15 @@ const columnsToIgnore = computed(() => {
|
||||
|
||||
const marketTaxStore = useMarketTaxStore();
|
||||
const ledgersStore = useLedgersStore();
|
||||
const marketOrdersStore = useMarketOrdersStore();
|
||||
|
||||
const listedTypeIds = computedAsync(getListedSellTypeIds, new Set<number>());
|
||||
|
||||
const threshold = useStorage('market-acquisition-threshold', 10);
|
||||
const filter = ref("");
|
||||
const unlistedOnly = ref(false);
|
||||
const matchesFilter = (r: AcquiredType) =>
|
||||
r.type.name.toLowerCase().includes(filter.value.toLowerCase())
|
||||
&& (!unlistedOnly.value || !marketOrdersStore.listedTypeIds.has(r.type.id));
|
||||
&& (!unlistedOnly.value || !listedTypeIds.value.has(r.type.id));
|
||||
const { sortedArray, headerProps, showColumn } = useSort<Result>(computed(() => {
|
||||
const filteredItems = props.items.filter(matchesFilter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user