Compare commits

...

2 Commits

Author SHA1 Message Date
3a2926e6fc cleanup 2023-07-26 09:38:37 +02:00
d5a7fe010f green line 2023-07-26 09:31:26 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ const send = async () => result.value = await reprocess(items.value, minerals.va
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="r in result" :key="r.typeID"> <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 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) }}</td>
<td class="border text-right px-1">{{ iskFormat(r.buy_reprocess) }}</td> <td class="border text-right px-1">{{ iskFormat(r.buy_reprocess) }}</td>

View File

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