From bc4685aa6fa092113b8d7848a6e4da238d5ac0e9 Mon Sep 17 00:00:00 2001 From: Bello Babakolo Date: Thu, 24 Oct 2024 11:20:43 +0100 Subject: [PATCH] feat(fulfilment): query more fulfilment data --- .../lib/documents/fragments/fulfillment.gql | 47 +++++++++++++++++++ .../+state/fulfillment/fulfillment.facade.ts | 2 + .../fulfillment-template.component.ts | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/packages/core/graphql/src/lib/documents/fragments/fulfillment.gql b/packages/core/graphql/src/lib/documents/fragments/fulfillment.gql index f88443d2..60e6186c 100644 --- a/packages/core/graphql/src/lib/documents/fragments/fulfillment.gql +++ b/packages/core/graphql/src/lib/documents/fragments/fulfillment.gql @@ -3,6 +3,53 @@ fragment FulfillmentFragment on IoRestorecommerceFulfillmentFulfillment { customerId shopId userId + packaging { + exportType + notify + invoiceNumber + exportDescription + parcels { + id + productId + items { + productId + variantId + quantity + } + package { + rotatable + sizeInCm { + height + width + length + } + } + } + sender { + address { + id + postcode + } + contact { + name + email + phone + } + comments + } + recipient { + address { + id + postcode + countryId + } + } + notify + invoiceNumber + exportDescription + exportType + } + fulfillmentState meta { ...MetaFragment } diff --git a/packages/core/state/src/lib/+state/fulfillment/fulfillment.facade.ts b/packages/core/state/src/lib/+state/fulfillment/fulfillment.facade.ts index e24e90c3..3fce3858 100644 --- a/packages/core/state/src/lib/+state/fulfillment/fulfillment.facade.ts +++ b/packages/core/state/src/lib/+state/fulfillment/fulfillment.facade.ts @@ -49,5 +49,7 @@ export class FulfillmentFacade { fulfillmentActions.fulfillmentRemoveRequest({ payload }) ); + // TODO Submit a fulfilment. + constructor(private readonly store: Store) {} } diff --git a/packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.ts b/packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.ts index 0f16b321..503499ce 100644 --- a/packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.ts +++ b/packages/modules/fulfillment/src/lib/components/template/fulfillment-template.component.ts @@ -65,7 +65,7 @@ export class FulfillmentTemplateComponent implements OnInit, OnDestroy { return; } - // this.orderFacade.createFulfilment(id); + // TODO this.fulfillmentFacade.submitFulfilment(id); }) );