Skip to content

Commit

Permalink
feat(admin-ui): Display original quantity after order has been modified
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Sep 27, 2023
1 parent 8452300 commit a36c6e0
Show file tree
Hide file tree
Showing 21 changed files with 173 additions and 139 deletions.
78 changes: 39 additions & 39 deletions packages/admin-ui/i18n-coverage.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
{
"generatedOn": "2023-09-26T12:56:03.801Z",
"lastCommit": "fee995c967c5487e979e374802f651ce3120db6d",
"generatedOn": "2023-09-26T14:59:13.502Z",
"lastCommit": "8452300ac7407d04794507cee99cf4436e4fce71",
"translationStatus": {
"ar": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"cs": {
"tokenCount": 760,
"translatedCount": 564,
"percentage": 74
"tokenCount": 761,
"translatedCount": 570,
"percentage": 75
},
"de": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"en": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"es": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"fr": {
"tokenCount": 760,
"translatedCount": 753,
"tokenCount": 761,
"translatedCount": 757,
"percentage": 99
},
"he": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"it": {
"tokenCount": 760,
"translatedCount": 756,
"percentage": 99
"tokenCount": 761,
"translatedCount": 759,
"percentage": 100
},
"pl": {
"tokenCount": 760,
"tokenCount": 761,
"translatedCount": 399,
"percentage": 53
"percentage": 52
},
"pt_BR": {
"tokenCount": 760,
"translatedCount": 756,
"percentage": 99
"tokenCount": 761,
"translatedCount": 759,
"percentage": 100
},
"pt_PT": {
"tokenCount": 760,
"translatedCount": 598,
"percentage": 79
"tokenCount": 761,
"translatedCount": 608,
"percentage": 80
},
"ru": {
"tokenCount": 760,
"translatedCount": 757,
"tokenCount": 761,
"translatedCount": 760,
"percentage": 100
},
"uk": {
"tokenCount": 760,
"translatedCount": 588,
"percentage": 77
"tokenCount": 761,
"translatedCount": 595,
"percentage": 78
},
"zh_Hans": {
"tokenCount": 760,
"translatedCount": 534,
"percentage": 70
"tokenCount": 761,
"translatedCount": 540,
"percentage": 71
},
"zh_Hant": {
"tokenCount": 760,
"translatedCount": 380,
"percentage": 50
"tokenCount": 761,
"translatedCount": 386,
"percentage": 51
}
}
}
192 changes: 96 additions & 96 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export const ORDER_LINE_FRAGMENT = gql`
proratedUnitPrice
proratedUnitPriceWithTax
quantity
orderPlacedQuantity
linePrice
lineTax
linePriceWithTax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@
font-size: var(--font-size-xs);
margin-inline-end: 2px;
}
.order-placed-quantity {
text-decoration: line-through;
color: var(--color-text-300);
margin-inline-end: 2px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@
<vdr-dt2-column [heading]="'order.quantity' | translate" id="quantity" [optional]="false">
<ng-template let-line="item">
<ng-container *ngIf="!isDraft; else draft">
{{ line.quantity }}
<div class="flex">
<div
*ngIf="line.orderPlacedQuantity && line.quantity !== line.orderPlacedQuantity"
class="order-placed-quantity"
[title]="'order.original-quantity-at-checkout' | translate"
>
{{ line.orderPlacedQuantity }}
</div>
<div>{{ line.quantity }}</div>
</div>
</ng-container>
<ng-template #draft>
<div class="flex">
Expand All @@ -62,7 +71,10 @@
></vdr-line-fulfillment>
</ng-template>
</vdr-dt2-column>
<vdr-dt2-custom-field-column *ngFor="let customField of orderLineCustomFields" [customField]="customField"/>
<vdr-dt2-custom-field-column
*ngFor="let customField of orderLineCustomFields"
[customField]="customField"
/>
<vdr-order-total-column [heading]="'order.total' | translate" id="total" [optional]="false">
<ng-template let-line="item">
<div class="unit-price">
Expand All @@ -81,7 +93,7 @@
<div class="line-promotion" *ngFor="let discount of discounts">
<a class="promotion-name" [routerLink]="getPromotionLink(discount)">{{
discount.description
}}</a>
}}</a>
<div class="promotion-amount">
{{ discount.amountWithTax | localeCurrency : order.currencyCode }}
<div class="net-price" [title]="'order.net-price' | translate">
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "عادي",
"order-type-seller": "تاجر",
"orders": "طلبيات",
"original-quantity-at-checkout": "الكمية الأصلية عند الخروج",
"payment": "قسط",
"payment-amount": "مبلغ الدفع",
"payment-metadata": "بيانات تعريف الدفع",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "Původní množství při pokladně",
"payment": "Platba",
"payment-amount": "Částka platby",
"payment-metadata": "Data platby",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Standard",
"order-type-seller": "Verkäufer",
"orders": "Bestellungen",
"original-quantity-at-checkout": "Ursprüngliche Menge beim Checkout",
"payment": "Zahlung",
"payment-amount": "Zahlungsbetrag",
"payment-metadata": "Metadaten zur Bezahlung",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Regular",
"order-type-seller": "Seller",
"orders": "Orders",
"original-quantity-at-checkout": "Original quantity at checkout",
"payment": "Payment",
"payment-amount": "Payment amount",
"payment-metadata": "Payment metadata",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Regular",
"order-type-seller": "Vendedor",
"orders": "Pedidos",
"original-quantity-at-checkout": "Cantidad original en la compra",
"payment": "Pago",
"payment-amount": "Importe del pago",
"payment-metadata": "Metadatos de pago",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Normal",
"order-type-seller": "Vendeur",
"orders": "Commandes",
"original-quantity-at-checkout": "Quantité d'origine au moment du paiement",
"payment": "Paiement",
"payment-amount": "Montant à payer",
"payment-metadata": "Métadonnées de paiement",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "רגיל",
"order-type-seller": "מוכר",
"orders": "הזמנות",
"original-quantity-at-checkout": "כמות המקורית בתקלוט",
"payment": "תשלום",
"payment-amount": "סכום תשלום",
"payment-metadata": "מטה נתונים של התשלום",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Regolare",
"order-type-seller": "Venditore",
"orders": "Ordini",
"original-quantity-at-checkout": "Quantità originale al checkout",
"payment": "Pagamento",
"payment-amount": "Importo pagamento",
"payment-metadata": "Metadati pagamento",
Expand Down
3 changes: 2 additions & 1 deletion packages/admin-ui/src/lib/static/i18n-messages/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "Oryginalna ilość przy kasie",
"payment": "Płatność",
"payment-amount": "Wartość płatności",
"payment-metadata": "Metadane płatności",
Expand Down Expand Up @@ -791,4 +792,4 @@
"job-state-pending": "Oczekujące",
"job-state-running": "Uruchomione"
}
}
}
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Regular",
"order-type-seller": "Vendedor",
"orders": "Pedidos",
"original-quantity-at-checkout": "Quantidade original no checkout",
"payment": "Pagamento",
"payment-amount": "Valor do pagamento",
"payment-metadata": "Dados do pagamento",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "Quantidade original no checkout",
"payment": "Pagamento",
"payment-amount": "Valor do pagamento",
"payment-metadata": "Dados do pagamento",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "Обычный",
"order-type-seller": "Продавец",
"orders": "Заказы",
"original-quantity-at-checkout": "Исходное количество при оформлении заказа",
"payment": "Оплата",
"payment-amount": "Сумма к оплате",
"payment-metadata": "Метаданные платежа",
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/lib/static/i18n-messages/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "Початкова кількість при оформленні замовлення",
"payment": "Оплата",
"payment-amount": "Сума до оплати",
"payment-metadata": "Метадані платежу",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "结账时的原始数量",
"payment": "付款信息",
"payment-amount": "付款金额",
"payment-metadata": "付款元数据",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@
"order-type-regular": "",
"order-type-seller": "",
"orders": "",
"original-quantity-at-checkout": "結帳時的原始數量",
"payment": "付款信息",
"payment-amount": "付款金額",
"payment-metadata": "付款元數據",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/api/schema/common/order.type.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ type OrderLine implements Node {
proratedUnitPrice: Money!
"The proratedUnitPrice including tax"
proratedUnitPriceWithTax: Money!
"The quantity of items purchased"
quantity: Int!
"The quantity at the time the Order was placed"
orderPlacedQuantity: Int!
Expand Down

0 comments on commit a36c6e0

Please sign in to comment.