Skip to content

Commit

Permalink
fix(ordermode): show barcode when printed from backoffice
Browse files Browse the repository at this point in the history
INT-627
  • Loading branch information
joerivanveen committed Dec 10, 2024
1 parent 98f30e8 commit 9ed1c0d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<template>
<DeliveryOptionsExcerpt />
<DeliveryOptionsExcerpt v-if="shipments.length === 0" />

Check warning on line 2 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L2

Added line #L2 was not covered by tests

<ShipmentLabel
v-for="shipment in data?.shipments ?? []"
:key="`${data?.externalIdentifier}_${shipment.id}`"
:shipment-id="shipment.id" />

Check warning on line 7 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L4-L7

Added lines #L4 - L7 were not covered by tests

<PdkButtonGroup v-test="[$.type.__name, order?.externalIdentifier]">
<template v-if="order?.exported">
Expand All @@ -18,13 +23,19 @@
</template>

<script lang="ts" setup>
import {computed, toValue} from 'vue';

Check warning on line 26 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L26

Added line #L26 was not covered by tests
import {Size} from '@myparcel-pdk/common';
import {ActionButton, DeliveryOptionsExcerpt} from '../common';
import {instantiateAction, instantiateActions} from '../../services';
import {useOrderData} from '../../composables';
import {orderExportAction, ordersEditAction, orderViewInBackofficeAction} from '../../actions';
import ShipmentLabel from './ShipmentLabel.vue';

Check warning on line 32 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L32

Added line #L32 was not covered by tests
const {query, order} = useOrderData();

Check warning on line 34 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L34

Added line #L34 was not covered by tests
const data = computed(() => toValue(query.data));

Check warning on line 36 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L36

Added line #L36 was not covered by tests
const {order} = useOrderData();
const shipments = computed(() => toValue(data)?.shipments ?? []);

Check warning on line 38 in apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue

View check run for this annotation

Codecov / codecov/patch

apps/admin/src/components/OrderListItem/OrderModeOrderListItem.vue#L38

Added line #L38 was not covered by tests
const showExportedOrderAction = instantiateAction(orderViewInBackofficeAction);
Expand Down

0 comments on commit 9ed1c0d

Please sign in to comment.