overal cleanup
This commit is contained in:
@@ -16,7 +16,7 @@ type Result = {
|
||||
q1: number;
|
||||
mmedian: number;
|
||||
q3: number;
|
||||
percent: number;
|
||||
profit: number;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -49,14 +49,14 @@ const { sortedArray, headerProps } = useSort<Result>(computed(() => props.items
|
||||
q1: quartils.q1,
|
||||
mmedian: quartils.median,
|
||||
q3: quartils.q3,
|
||||
percent: quartils.q3 / quartils.q1
|
||||
profit: (quartils.q3 / quartils.q1) -1
|
||||
};
|
||||
})), {
|
||||
defaultSortKey: 'name',
|
||||
defaultSortDirection: 'asc'
|
||||
})
|
||||
const getLineColor = (result: Result) => {
|
||||
if (result.percent < 1.1) {
|
||||
if (result.profit < 0.1) {
|
||||
return 'line-red';
|
||||
} else if (result.sell <= result.q1) {
|
||||
return 'line-blue';
|
||||
@@ -92,7 +92,7 @@ const getLineColor = (result: Result) => {
|
||||
<SortableHeader v-bind="headerProps" sortKey="q1">Q1</SortableHeader>
|
||||
<SortableHeader v-bind="headerProps" sortKey="median">Median</SortableHeader>
|
||||
<SortableHeader v-bind="headerProps" sortKey="q3">Q3</SortableHeader>
|
||||
<SortableHeader v-bind="headerProps" sortKey="percent">Percent</SortableHeader>
|
||||
<SortableHeader v-bind="headerProps" sortKey="profit">Profit</SortableHeader>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -106,7 +106,7 @@ const getLineColor = (result: Result) => {
|
||||
<td class="text-right">{{ formatIsk(r.q1) }}</td>
|
||||
<td class="text-right">{{ formatIsk(r.mmedian) }}</td>
|
||||
<td class="text-right">{{ formatIsk(r.q3) }}</td>
|
||||
<td class="text-right">{{ percentFormater.format(r.percent) }}</td>
|
||||
<td class="text-right">{{ percentFormater.format(r.profit) }}</td>
|
||||
<td class="text-right">
|
||||
<button class="btn-icon-stroke" @click="$emit('relaod', r.type)"><ArrowPathIcon /></button>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user