Skip to content

Commit

Permalink
feat(fulfilment): add order reference to the fulfilment view
Browse files Browse the repository at this point in the history
  • Loading branch information
belsman committed Oct 29, 2024
1 parent 4b6ce8b commit 1dc6761
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ fragment FulfillmentFragment on IoRestorecommerceFulfillmentFulfillment {
exportDescription
exportType
}
references {
instanceType
instanceId
}
fulfillmentState
meta {
...MetaFragment
Expand Down
24 changes: 24 additions & 0 deletions packages/core/graphql/src/lib/generated/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6070,6 +6070,11 @@ export type FulfillmentFragmentFragment = {
} | null;
} | null;
} | null;
references?: Array<{
__typename?: 'IoRestorecommerceReferenceReference';
instanceType?: string | null;
instanceId?: string | null;
}> | null;
meta?: {
__typename?: 'IoRestorecommerceMetaMeta';
created?: unknown | null;
Expand Down Expand Up @@ -7410,6 +7415,11 @@ export type FulfillmentFulfillmentMutateMutation = {
} | null;
} | null;
} | null;
references?: Array<{
__typename?: 'IoRestorecommerceReferenceReference';
instanceType?: string | null;
instanceId?: string | null;
}> | null;
meta?: {
__typename?: 'IoRestorecommerceMetaMeta';
created?: unknown | null;
Expand Down Expand Up @@ -7565,6 +7575,11 @@ export type FulfillmentFulfillmentReadQuery = {
} | null;
} | null;
} | null;
references?: Array<{
__typename?: 'IoRestorecommerceReferenceReference';
instanceType?: string | null;
instanceId?: string | null;
}> | null;
meta?: {
__typename?: 'IoRestorecommerceMetaMeta';
created?: unknown | null;
Expand Down Expand Up @@ -7695,6 +7710,11 @@ export type FulfillmentFulfillmentSubmitMutation = {
} | null;
} | null;
} | null;
references?: Array<{
__typename?: 'IoRestorecommerceReferenceReference';
instanceType?: string | null;
instanceId?: string | null;
}> | null;
meta?: {
__typename?: 'IoRestorecommerceMetaMeta';
created?: unknown | null;
Expand Down Expand Up @@ -10841,6 +10861,10 @@ export const FulfillmentFragmentFragmentDoc = gql`
exportDescription
exportType
}
references {
instanceType
instanceId
}
fulfillmentState
meta {
...MetaFragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<span>{{ '' }}</span>
</div>

<div class="row justify-content-between align-items-center">
<span>Fulfilment order</span>
<span>{{ fulfillment.references?.[0]?.instanceId }}</span>
</div>

<div class="row justify-content-between align-items-center">
<span>Fulfilment product</span>
<span>{{ fulfillment.packaging?.parcels?.[0]?.productId }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@
</div>
<ul class="data-list-body no-border">
<li class="row data-list-item justify-between">
<div class="flex text">Order number:</div>
<div class="flex text">Customer order number:</div>
<div class="flex text align-right rc-lv-label">
<ng-container *ngIf="order.customerOrderNr; else naTemplate">{{
order.customerOrderNr
}}</ng-container>
</div>
</li>

<!-- TODO is this a commercial or private or governmental customer??
A giant view of some sort.
-->
<li class="row data-list-item justify-between">
<div class="flex text">Customer:</div>
<div class="flex text align-right rc-lv-label">
<ng-container *ngIf="customer; else naTemplate">{{
customer.firstName + ' ' + customer.lastName
<ng-container *ngIf="order.customerId; else naTemplate">{{
order.customerId
}}</ng-container>
</div>
</li>
Expand Down

0 comments on commit 1dc6761

Please sign in to comment.