Fix orders table formatting and unit expectation

This commit is contained in:
Jeppe B
2026-07-08 17:02:59 +02:00
parent d26933b722
commit 19ce60fd0a
2 changed files with 9 additions and 6 deletions
@@ -1312,9 +1312,7 @@ const formatCashierName = (order) => {
:class="{ 'has-background-info-light': isSystemOrder(order) }"
>
<template v-if="props.invoiceView && props.allowSelectMultiple">
<td
class="is-narrow pos-orders-table-leading-control-cell pos-order-invoice-collection-selector-cell"
>
<td class="is-narrow pos-orders-table-leading-control-cell pos-order-invoice-collection-selector-cell">
<BCheckbox
class="pos-order-invoice-collection-selector"
:model-value="isInvoiceCollectionSelected(order.invoice_collection_id)"
@@ -1429,7 +1427,10 @@ const formatCashierName = (order) => {
/>
</div>
</td>
<td v-if="!props.isCustomerView" class="pos-orders-table-customer-cell pos-orders-table-compact-text-cell">
<td
v-if="!props.isCustomerView"
class="pos-orders-table-customer-cell pos-orders-table-compact-text-cell"
>
<ColorIndicator
v-bind:label="{
text: order.customer_name,
@@ -1552,7 +1553,9 @@ const formatCashierName = (order) => {
:permission-check-function="() => canEditTransaction(order)"
/>
<td class="pos-orders-table-date-cell">{{ order.created_at }}</td>
<td class="pos-orders-table-amount-cell">{{ SessionUser.functions.currency.toLocal(order.total_net_amount) }}</td>
<td class="pos-orders-table-amount-cell">
{{ SessionUser.functions.currency.toLocal(order.total_net_amount) }}
</td>
<!--<td>{{ order.completed_at }}</td>-->
<td class="is-narrow pos-orders-table-actions-cell">
<SuperuserInvoiceRowActions class="pos-order-list-actions">
+1 -1
View File
@@ -863,6 +863,6 @@ describe("OrdersTable", () => {
expect(row.find(".pos-orders-table-date-cell").text()).toBe("2026-04-13 11:00:00");
expect(row.find(".pos-orders-table-amount-cell").text()).toBe("100");
expect(row.find(".pos-orders-table-actions-cell").exists()).toBe(true);
expect(row.findAll(".pos-orders-table-compact-text-cell")).toHaveLength(4);
expect(row.findAll(".pos-orders-table-compact-text-cell")).toHaveLength(7);
});
});