This commit is contained in:
2023-07-26 13:01:59 +02:00
parent 0d9b47c69d
commit c862288b37
2 changed files with 4 additions and 3 deletions

View File

@@ -16,9 +16,9 @@ const computedResult = computed(() => props.result.map(r =>({
...r, ...r,
buy_ratio: (r.buy_reprocess / r.buy) - 1, buy_ratio: (r.buy_reprocess / r.buy) - 1,
sell_ratio: (r.sell_reprocess / r.sell) - 1 sell_ratio: (r.sell_reprocess / r.sell) - 1
}))) })).sort((a, b) => a.name.localeCompare(b.name)))
const threshold = useStorage('reprocess-threshold', 90); const threshold = useStorage('reprocess-threshold', 100);
</script> </script>
<template> <template>
@@ -40,7 +40,7 @@ const threshold = useStorage('reprocess-threshold', 90);
</thead> </thead>
<tbody> <tbody>
<tr v-for="r in computedResult" :key="r.typeID" :class="{'bg-emerald-500': r.buy_ratio * threshold >= 100 }"> <tr v-for="r in computedResult" :key="r.typeID" :class="{'bg-emerald-500': r.buy_ratio * threshold >= 100 }">
<td>{{ r.typeID }}</td> <td>{{ r.name }}</td>
<td class="text-right">{{ iskFormater.format(r.buy) }}</td> <td class="text-right">{{ iskFormater.format(r.buy) }}</td>
<td class="text-right">{{ iskFormater.format(r.buy_reprocess) }} ({{percentFormater.format(r.buy_ratio)}})</td> <td class="text-right">{{ iskFormater.format(r.buy_reprocess) }} ({{percentFormater.format(r.buy_ratio)}})</td>
<td class="text-right">{{ iskFormater.format(r.sell) }}</td> <td class="text-right">{{ iskFormater.format(r.sell) }}</td>

View File

@@ -2,6 +2,7 @@ import { apiAxiosInstance } from "@/service";
export type ReprocessItemValues = { export type ReprocessItemValues = {
typeID: number; typeID: number;
name: string;
buy: number; buy: number;
buy_reprocess: number; buy_reprocess: number;
sell: number; sell: number;