diff --git a/src/market/acquisition/AcquisitionResultTable.vue b/src/market/acquisition/AcquisitionResultTable.vue index 4938b9f..fa4bd22 100644 --- a/src/market/acquisition/AcquisitionResultTable.vue +++ b/src/market/acquisition/AcquisitionResultTable.vue @@ -26,6 +26,7 @@ interface Props { items?: AcquiredType[]; infoOnly?: boolean; showAll?: boolean; + ignoredColums?: string[] | string; } interface Emits { @@ -36,15 +37,25 @@ interface Emits { const props = withDefaults(defineProps(), { items: () => [], infoOnly: false, - showAll: false + showAll: false, + ignoredColums: () => [] }); defineEmits(); +const columnsToIgnore = computed(() => { + const ic = typeof props.ignoredColums === 'string' ? [props.ignoredColums] : props.ignoredColums; + + if (props.infoOnly && !ic.includes('buttons')) { + return [...ic, 'buttons']; + } + return ic; +}); + const marketTaxStore = useMarketTaxStore(); const threshold = useStorage('market-acquisition-threshold', 10); const filter = ref(""); -const { sortedArray, headerProps } = useSort(computed(() => { +const { sortedArray, headerProps, showColumn } = useSort(computed(() => { const filteredItems = props.items.filter(r => r.type.name.toLowerCase().includes(filter.value.toLowerCase())); if (props.showAll) { @@ -99,7 +110,8 @@ const { sortedArray, headerProps } = useSort(computed(() => { return list; }), { defaultSortKey: 'precentProfit', - defaultSortDirection: 'desc' + defaultSortDirection: 'desc', + ignoredColums: columnsToIgnore }) const getLineColor = (result: Result) => { if (result.precentProfit >= (threshold.value / 100)) { @@ -135,24 +147,24 @@ const getLineColor = (result: Result) => { Remaining Amount Profit (%) Profit (ISK) - + - +
- {{ formatIsk(r.buy) }} - {{ formatIsk(r.sell) }} - {{ formatIsk(r.price) }} - {{ r.remaining }}/{{ r.quantity }} - {{ percentFormater.format(r.precentProfit) }} - {{ formatIsk(r.iskProfit) }} - + {{ formatIsk(r.buy) }} + {{ formatIsk(r.sell) }} + {{ formatIsk(r.price) }} + {{ r.remaining }}/{{ r.quantity }} + {{ percentFormater.format(r.precentProfit) }} + {{ formatIsk(r.iskProfit) }} + diff --git a/src/market/tracking/TrackingResultTable.vue b/src/market/tracking/TrackingResultTable.vue index a4ea06c..bb02317 100644 --- a/src/market/tracking/TrackingResultTable.vue +++ b/src/market/tracking/TrackingResultTable.vue @@ -24,7 +24,7 @@ type Result = { interface Props { items?: TrackingResult[]; infoOnly?: boolean; - ignoredColums?: string[]; + ignoredColums?: string[] | string; } interface Emits { @@ -50,10 +50,12 @@ const threshold = useStorage('market-tracking-threshold', 10); const filter = ref(""); const onlyCheap = ref(false); const columnsToIgnore = computed(() => { - if (props.infoOnly && !props.ignoredColums.includes('buttons')) { - return [...props.ignoredColums, 'buttons']; + const ic = typeof props.ignoredColums === 'string' ? [props.ignoredColums] : props.ignoredColums; + + if (props.infoOnly && !ic.includes('buttons')) { + return [...ic, 'buttons']; } - return props.ignoredColums; + return ic; }); const { sortedArray, headerProps, showColumn } = useSort(computed(() => props.items .filter(r => r.type.name.toLowerCase().includes(filter.value.toLowerCase())) @@ -125,7 +127,7 @@ const getLineColor = (result: Result) => { Q3 Profit Score - + diff --git a/src/pages/market/TypeInfo.vue b/src/pages/market/TypeInfo.vue index 0bdc635..0ec9e85 100644 --- a/src/pages/market/TypeInfo.vue +++ b/src/pages/market/TypeInfo.vue @@ -103,11 +103,11 @@ watch(useRoute(), async route => {
Market Info: - +
Acquisitions: - +