Skip to content

Commit

Permalink
fix(admin-ui): Use the ShippingMethod name in fulfillment dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Nov 13, 2020
1 parent 5f6f9ff commit ca2ed58
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5134,7 +5134,7 @@ export type OrderDetailFragment = (
& Pick<Promotion, 'id' | 'couponCode'>
)>, shippingMethod?: Maybe<(
{ __typename?: 'ShippingMethod' }
& Pick<ShippingMethod, 'id' | 'code' | 'description'>
& Pick<ShippingMethod, 'id' | 'code' | 'name' | 'description'>
)>, shippingAddress?: Maybe<(
{ __typename?: 'OrderAddress' }
& OrderAddressFragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const ORDER_DETAIL_FRAGMENT = gql`
shippingMethod {
id
code
name
description
}
shippingAddress {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="shipping-details">
<vdr-formatted-address [address]="order.shippingAddress"></vdr-formatted-address>
<h6>{{ 'order.shipping-method' | translate }}</h6>
{{ order.shippingMethod?.description }}
{{ order.shippingMethod?.name }}
<strong>{{ order.shipping / 100 | currency: order.currencyCode }}</strong>
<clr-input-container>
<label>{{ 'order.fulfillment-method' | translate }}</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class FulfillOrderDialogComponent implements Dialog<FulfillOrderInput>, O
});

if (this.order.shippingMethod) {
this.method = this.order.shippingMethod.description;
this.method = this.order.shippingMethod.name;
}
}

Expand Down
7 changes: 1 addition & 6 deletions packages/dev-server/dev-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ export const devConfig: VendureConfig = {
paymentOptions: {
paymentMethodHandlers: [examplePaymentHandler],
},
customFields: {
ShippingMethod: [
{ name: 'isGood', type: 'boolean' },
{ name: 'localName', type: 'localeString' },
],
},
customFields: {},
logger: new DefaultLogger({ level: LogLevel.Info }),
importExportOptions: {
importAssetsDir: path.join(__dirname, 'import-assets'),
Expand Down

0 comments on commit ca2ed58

Please sign in to comment.