Skip to content

Commit

Permalink
fix(ordermode): show shipment label when printed from backoffice (#227)
Browse files Browse the repository at this point in the history
INT-627
  • Loading branch information
joerivanveen authored Dec 16, 2024
1 parent 98f30e8 commit 32b3368
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" />

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

<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';
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';
const {query, order} = useOrderData();
const data = computed(() => toValue(query.data));
const {order} = useOrderData();
const shipments = computed(() => toValue(data)?.shipments ?? []);
const showExportedOrderAction = instantiateAction(orderViewInBackofficeAction);
Expand Down

0 comments on commit 32b3368

Please sign in to comment.