Browse Source

feat(admin-ui): Display tax description in OrderDetail tax summary

Michael Bromley 5 years ago
parent
commit
843bec26f3

+ 1 - 1
packages/admin-ui/src/lib/core/src/common/generated-types.ts

@@ -5337,7 +5337,7 @@ export type OrderDetailFragment = (
     ) }
   )>, taxSummary: Array<(
     { __typename?: 'OrderTaxSummary' }
-    & Pick<OrderTaxSummary, 'taxBase' | 'taxRate' | 'taxTotal'>
+    & Pick<OrderTaxSummary, 'description' | 'taxBase' | 'taxRate' | 'taxTotal'>
   )>, shippingAddress?: Maybe<(
     { __typename?: 'OrderAddress' }
     & OrderAddressFragment

+ 1 - 0
packages/admin-ui/src/lib/core/src/data/definitions/order-definitions.ts

@@ -152,6 +152,7 @@ export const ORDER_DETAIL_FRAGMENT = gql`
             }
         }
         taxSummary {
+            description
             taxBase
             taxRate
             taxTotal

+ 2 - 0
packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.html

@@ -232,6 +232,7 @@
             <table class="table">
                 <thead>
                 <tr>
+                    <th>{{ 'common.description' | translate }}</th>
                     <th>{{ 'order.tax-rate' | translate }}</th>
                     <th>{{ 'order.tax-base' | translate }}</th>
                     <th>{{ 'order.tax-total' | translate }}</th>
@@ -239,6 +240,7 @@
                 </thead>
                 <tbody>
                 <tr *ngFor="let row of order.taxSummary">
+                    <td>{{ row.description }}</td>
                     <td>{{ row.taxRate / 100 | percent }}</td>
                     <td>{{ row.taxBase / 100 | currency: order.currencyCode }}</td>
                     <td>{{ row.taxTotal / 100 | currency: order.currencyCode }}</td>