Compare commits

..

2 Commits

Author SHA1 Message Date
e8cfd91ad6 cap 2023-07-26 09:40:31 +02:00
b485e159eb cleanup 2023-07-26 09:39:15 +02:00
2 changed files with 10 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { iskFormat } from '@/utils';
import { iskFormater } from '@/utils';
import { ref } from 'vue';
import ReprocessInput from './ReprocessInput.vue';
import { ReprocessItemValues, reprocess } from './reprocess';
@@ -33,19 +33,19 @@ const send = async () => result.value = await reprocess(items.value, minerals.va
<thead>
<tr>
<th class="border bg-slate-200">Item</th>
<th class="border bg-slate-200">buy</th>
<th class="border bg-slate-200">buy reprocess</th>
<th class="border bg-slate-200">sell</th>
<th class="border bg-slate-200">sell reprocess</th>
<th class="border bg-slate-200">Buy</th>
<th class="border bg-slate-200">Buy reprocess</th>
<th class="border bg-slate-200">Sell</th>
<th class="border bg-slate-200">Sell reprocess</th>
</tr>
</thead>
<tbody>
<tr v-for="r in result" :key="r.typeID" :class="{'bg-green-200': r.buy_reprocess >= r.sell}">
<td class="border px-1">{{ r.typeID }}</td>
<td class="border text-right px-1">{{ iskFormat(r.buy) }}</td>
<td class="border text-right px-1">{{ iskFormat(r.buy_reprocess) }}</td>
<td class="border text-right px-1">{{ iskFormat(r.sell) }}</td>
<td class="border text-right px-1">{{ iskFormat(r.sell_reprocess) }}</td>
<td class="border text-right px-1">{{ iskFormater.format(r.buy) }}</td>
<td class="border text-right px-1">{{ iskFormater.format(r.buy_reprocess) }}</td>
<td class="border text-right px-1">{{ iskFormater.format(r.sell) }}</td>
<td class="border text-right px-1">{{ iskFormater.format(r.sell_reprocess) }}</td>
</tr>
</tbody>
</table>

View File

@@ -1,7 +1,5 @@
const iskFormater = new Intl.NumberFormat("is-IS", {
export const iskFormater = new Intl.NumberFormat("is-IS", {
style: "currency",
currency: "ISK",
minimumFractionDigits: 2,
});
export const iskFormat = iskFormater.format;