From 788b6ddca0d7881f06f43bb5d7b2e96eea72617f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4hnlein?= Date: Thu, 6 Feb 2020 15:50:36 +0100 Subject: [PATCH] fix: show quote item availability on quote detail page (#51) --- .../quote-edit/quote-edit.component.html | 2 +- .../line-item-description.component.html | 66 +++++++++++-------- .../line-item-description.component.ts | 2 +- .../line-item-list.component.ts | 2 +- 4 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/app/extensions/quoting/shared/quote/quote-edit/quote-edit.component.html b/src/app/extensions/quoting/shared/quote/quote-edit/quote-edit.component.html index 30023fe2f5..23307dd32a 100644 --- a/src/app/extensions/quoting/shared/quote/quote-edit/quote-edit.component.html +++ b/src/app/extensions/quoting/shared/quote/quote-edit/quote-edit.component.html @@ -164,7 +164,7 @@

{{ 'quote.items.table.heading' | translate }}

*ngIf="quote.items" [lineItems]="quote.items" [editable]="quote.state === 'New'" - lineItemViewType="simple" + lineItemViewType="availability" [total]="quote.total" (updateItem)="onUpdateItem($event)" (deleteItem)="onDeleteItem($event)" diff --git a/src/app/shared/components/basket/line-item-description/line-item-description.component.html b/src/app/shared/components/basket/line-item-description/line-item-description.component.html index 1d5c45c022..2351f49564 100644 --- a/src/app/shared/components/basket/line-item-description/line-item-description.component.html +++ b/src/app/shared/components/basket/line-item-description/line-item-description.component.html @@ -13,35 +13,47 @@ [productBundleSKU]="pli.product.sku" > - - - + + + + - - + + + + - - + + + + - -
- {{ surcharge.displayName }} {{ surcharge.text }} - {{ surcharge.amount | ishPrice }} - - - {{ 'shopping_cart.detail.text' | translate }} - - -
+ + + + + + + +
+ {{ surcharge.displayName }} {{ surcharge.text }} + {{ surcharge.amount | ishPrice }} + + + {{ 'shopping_cart.detail.text' | translate }} + + +
+
diff --git a/src/app/shared/components/basket/line-item-description/line-item-description.component.ts b/src/app/shared/components/basket/line-item-description/line-item-description.component.ts index 3793c5ee6b..9ccb7392e4 100644 --- a/src/app/shared/components/basket/line-item-description/line-item-description.component.ts +++ b/src/app/shared/components/basket/line-item-description/line-item-description.component.ts @@ -24,7 +24,7 @@ import { ProductHelper } from 'ish-core/models/product/product.model'; export class LineItemDescriptionComponent { @Input() pli: LineItemView; @Input() editable = true; - @Input() lineItemViewType?: 'simple'; + @Input() lineItemViewType?: 'simple' | 'availability'; @Output() updateItem = new EventEmitter(); isVariationProduct = ProductHelper.isVariationProduct; diff --git a/src/app/shared/components/basket/line-item-list/line-item-list.component.ts b/src/app/shared/components/basket/line-item-list/line-item-list.component.ts index 02a7d9ccc5..296d8d029f 100644 --- a/src/app/shared/components/basket/line-item-list/line-item-list.component.ts +++ b/src/app/shared/components/basket/line-item-list/line-item-list.component.ts @@ -33,7 +33,7 @@ export class LineItemListComponent implements OnChanges, OnDestroy { @Input() lineItems: LineItemView[]; @Input() editable = true; @Input() total: Price; - @Input() lineItemViewType?: 'simple'; + @Input() lineItemViewType?: 'simple' | 'availability'; @Output() updateItem = new EventEmitter(); @Output() deleteItem = new EventEmitter();