|
@@ -53,6 +53,31 @@
|
|
|
<th>{{ 'order.product-sku' | translate }}</th>
|
|
<th>{{ 'order.product-sku' | translate }}</th>
|
|
|
<th>{{ 'order.unit-price' | translate }}</th>
|
|
<th>{{ 'order.unit-price' | translate }}</th>
|
|
|
<th>{{ 'order.quantity' | translate }}</th>
|
|
<th>{{ 'order.quantity' | translate }}</th>
|
|
|
|
|
+ <ng-container *ngFor="let customField of visibileOrderLineCustomFields">
|
|
|
|
|
+ <th class="order-line-custom-field">
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="custom-field-header-button"
|
|
|
|
|
+ (click)="toggleOrderLineCustomFields()"
|
|
|
|
|
+ [title]="'common.hide-custom-fields' | translate"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ customField | customFieldLabel }}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </th>
|
|
|
|
|
+ </ng-container>
|
|
|
|
|
+ <ng-container *ngIf="showElided">
|
|
|
|
|
+ <th>
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="custom-field-header-button"
|
|
|
|
|
+ (click)="toggleOrderLineCustomFields()"
|
|
|
|
|
+ [title]="'common.display-custom-fields' | translate"
|
|
|
|
|
+ >
|
|
|
|
|
+ <clr-icon
|
|
|
|
|
+ shape="ellipsis-horizontal"
|
|
|
|
|
+ class="custom-field-ellipsis"
|
|
|
|
|
+ ></clr-icon>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </th>
|
|
|
|
|
+ </ng-container>
|
|
|
<th>{{ 'order.total' | translate }}</th>
|
|
<th>{{ 'order.total' | translate }}</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
@@ -68,67 +93,123 @@
|
|
|
<td class="align-middle sku">{{ line.productVariant.sku }}</td>
|
|
<td class="align-middle sku">{{ line.productVariant.sku }}</td>
|
|
|
<td class="align-middle unit-price">
|
|
<td class="align-middle unit-price">
|
|
|
{{ line.unitPriceWithTax / 100 | currency: order.currencyCode }}
|
|
{{ line.unitPriceWithTax / 100 | currency: order.currencyCode }}
|
|
|
- <div class="net-price" [title]="'order.net-price' | translate">{{ line.unitPrice / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div class="net-price" [title]="'order.net-price' | translate">
|
|
|
|
|
+ {{ line.unitPrice / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
</td>
|
|
</td>
|
|
|
<td class="align-middle quantity">
|
|
<td class="align-middle quantity">
|
|
|
{{ line.quantity }}
|
|
{{ line.quantity }}
|
|
|
<vdr-line-refunds [line]="line"></vdr-line-refunds>
|
|
<vdr-line-refunds [line]="line"></vdr-line-refunds>
|
|
|
<vdr-line-fulfillment [line]="line" [orderState]="order.state"></vdr-line-fulfillment>
|
|
<vdr-line-fulfillment [line]="line" [orderState]="order.state"></vdr-line-fulfillment>
|
|
|
</td>
|
|
</td>
|
|
|
|
|
+ <ng-container *ngFor="let customField of visibileOrderLineCustomFields">
|
|
|
|
|
+ <td class="order-line-custom-field align-middle">
|
|
|
|
|
+ <ng-container [ngSwitch]="customField.type">
|
|
|
|
|
+ <ng-template [ngSwitchCase]="'datetime'">
|
|
|
|
|
+ <span [title]="line.customFields[customField.name]">{{
|
|
|
|
|
+ line.customFields[customField.name] | date: 'short'
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ </ng-template>
|
|
|
|
|
+ <ng-template [ngSwitchCase]="'boolean'">
|
|
|
|
|
+ <ng-template [ngIf]="line.customFields[customField.name] === true">
|
|
|
|
|
+ <clr-icon shape="check"></clr-icon>
|
|
|
|
|
+ </ng-template>
|
|
|
|
|
+ <ng-template [ngIf]="line.customFields[customField.name] === false">
|
|
|
|
|
+ <clr-icon shape="times"></clr-icon>
|
|
|
|
|
+ </ng-template>
|
|
|
|
|
+ </ng-template>
|
|
|
|
|
+ <ng-template ngSwitchDefault>
|
|
|
|
|
+ {{ line.customFields[customField.name] }}
|
|
|
|
|
+ </ng-template>
|
|
|
|
|
+ </ng-container>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </ng-container>
|
|
|
|
|
+ <ng-container *ngIf="showElided"
|
|
|
|
|
+ ><td class="order-line-custom-field align-middle">
|
|
|
|
|
+ <clr-icon
|
|
|
|
|
+ shape="ellipsis-horizontal"
|
|
|
|
|
+ class="custom-field-ellipsis"
|
|
|
|
|
+ ></clr-icon></td
|
|
|
|
|
+ ></ng-container>
|
|
|
<td class="align-middle total">
|
|
<td class="align-middle total">
|
|
|
{{ line.totalPrice / 100 | currency: order.currencyCode }}
|
|
{{ line.totalPrice / 100 | currency: order.currencyCode }}
|
|
|
- <div class="net-price" [title]="'order.net-price' | translate">{{ (line.unitPrice * line.quantity) / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div class="net-price" [title]="'order.net-price' | translate">
|
|
|
|
|
+ {{ (line.unitPrice * line.quantity) / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<ng-container *ngIf="getLinePromotions(line) as promotions">
|
|
<ng-container *ngIf="getLinePromotions(line) as promotions">
|
|
|
<vdr-dropdown *ngIf="promotions.length">
|
|
<vdr-dropdown *ngIf="promotions.length">
|
|
|
- <div class="promotions-label" vdrDropdownTrigger>{{ 'order.promotions-applied' | translate }}</div>
|
|
|
|
|
|
|
+ <div class="promotions-label" vdrDropdownTrigger>
|
|
|
|
|
+ {{ 'order.promotions-applied' | translate }}
|
|
|
|
|
+ </div>
|
|
|
<vdr-dropdown-menu>
|
|
<vdr-dropdown-menu>
|
|
|
- <div class="line-promotion" *ngFor="let promotion of getLinePromotions(line)">
|
|
|
|
|
- <a class="promotion-name" [routerLink]="getPromotionLink(promotion)">{{ promotion.description }}</a>
|
|
|
|
|
- <div class="promotion-amount">{{ promotion.amount / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="line-promotion"
|
|
|
|
|
+ *ngFor="let promotion of getLinePromotions(line)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a
|
|
|
|
|
+ class="promotion-name"
|
|
|
|
|
+ [routerLink]="getPromotionLink(promotion)"
|
|
|
|
|
+ >{{ promotion.description }}</a
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="promotion-amount">
|
|
|
|
|
+ {{ promotion.amount / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</vdr-dropdown-menu>
|
|
</vdr-dropdown-menu>
|
|
|
</vdr-dropdown>
|
|
</vdr-dropdown>
|
|
|
</ng-container>
|
|
</ng-container>
|
|
|
-
|
|
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="sub-total">
|
|
<tr class="sub-total">
|
|
|
<td class="left clr-align-middle">{{ 'order.sub-total' | translate }}</td>
|
|
<td class="left clr-align-middle">{{ 'order.sub-total' | translate }}</td>
|
|
|
<td></td>
|
|
<td></td>
|
|
|
- <td></td>
|
|
|
|
|
- <td></td>
|
|
|
|
|
- <td></td>
|
|
|
|
|
|
|
+ <td [attr.colspan]="3 + visibileOrderLineCustomFields.length"></td>
|
|
|
|
|
+ <ng-container *ngIf="showElided"><td></td></ng-container>
|
|
|
<td class="clr-align-middle">
|
|
<td class="clr-align-middle">
|
|
|
{{ order.subTotal / 100 | currency: order.currencyCode }}
|
|
{{ order.subTotal / 100 | currency: order.currencyCode }}
|
|
|
- <div class="net-price" [title]="'order.net-price' | translate">{{ order.subTotalBeforeTax / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div class="net-price" [title]="'order.net-price' | translate">
|
|
|
|
|
+ {{ order.subTotalBeforeTax / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="order-ajustment" *ngFor="let adjustment of order.adjustments">
|
|
<tr class="order-ajustment" *ngFor="let adjustment of order.adjustments">
|
|
|
- <td colspan="5" class="left clr-align-middle">
|
|
|
|
|
|
|
+ <td
|
|
|
|
|
+ [attr.colspan]="5 + visibileOrderLineCustomFields.length"
|
|
|
|
|
+ class="left clr-align-middle"
|
|
|
|
|
+ >
|
|
|
<a [routerLink]="getPromotionLink(adjustment)">{{ adjustment.description }}</a>
|
|
<a [routerLink]="getPromotionLink(adjustment)">{{ adjustment.description }}</a>
|
|
|
- <vdr-chip *ngIf="getCouponCodeForAdjustment(order, adjustment) as couponCode">{{ couponCode }}</vdr-chip>
|
|
|
|
|
|
|
+ <vdr-chip *ngIf="getCouponCodeForAdjustment(order, adjustment) as couponCode">{{
|
|
|
|
|
+ couponCode
|
|
|
|
|
+ }}</vdr-chip>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <ng-container *ngIf="showElided"><td></td></ng-container>
|
|
|
|
|
+ <td class="clr-align-middle">
|
|
|
|
|
+ {{ adjustment.amount / 100 | currency: order.currencyCode }}
|
|
|
</td>
|
|
</td>
|
|
|
- <td class="clr-align-middle">{{ adjustment.amount / 100 | currency: order.currencyCode }}</td>
|
|
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="shipping">
|
|
<tr class="shipping">
|
|
|
<td class="left clr-align-middle">{{ 'order.shipping' | translate }}</td>
|
|
<td class="left clr-align-middle">{{ 'order.shipping' | translate }}</td>
|
|
|
<td class="clr-align-middle">{{ order.shippingMethod?.description }}</td>
|
|
<td class="clr-align-middle">{{ order.shippingMethod?.description }}</td>
|
|
|
- <td colspan="3"></td>
|
|
|
|
|
|
|
+ <td [attr.colspan]="3 + visibileOrderLineCustomFields.length"></td>
|
|
|
|
|
+ <ng-container *ngIf="showElided"><td></td></ng-container>
|
|
|
<td class="clr-align-middle">
|
|
<td class="clr-align-middle">
|
|
|
{{ order.shippingWithTax / 100 | currency: order.currencyCode }}
|
|
{{ order.shippingWithTax / 100 | currency: order.currencyCode }}
|
|
|
- <div class="net-price" [title]="'order.net-price' | translate">{{ order.shipping / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div class="net-price" [title]="'order.net-price' | translate">
|
|
|
|
|
+ {{ order.shipping / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="total">
|
|
<tr class="total">
|
|
|
<td class="left clr-align-middle">{{ 'order.total' | translate }}</td>
|
|
<td class="left clr-align-middle">{{ 'order.total' | translate }}</td>
|
|
|
<td></td>
|
|
<td></td>
|
|
|
- <td></td>
|
|
|
|
|
- <td></td>
|
|
|
|
|
- <td></td>
|
|
|
|
|
|
|
+ <td [attr.colspan]="3 + visibileOrderLineCustomFields.length"></td>
|
|
|
|
|
+ <ng-container *ngIf="showElided"><td></td></ng-container>
|
|
|
<td class="clr-align-middle">
|
|
<td class="clr-align-middle">
|
|
|
{{ order.total / 100 | currency: order.currencyCode }}
|
|
{{ order.total / 100 | currency: order.currencyCode }}
|
|
|
- <div class="net-price" [title]="'order.net-price' | translate">{{ order.totalBeforeTax / 100 | currency: order.currencyCode }}</div>
|
|
|
|
|
|
|
+ <div class="net-price" [title]="'order.net-price' | translate">
|
|
|
|
|
+ {{ order.totalBeforeTax / 100 | currency: order.currencyCode }}
|
|
|
|
|
+ </div>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
@@ -140,8 +221,10 @@
|
|
|
></vdr-order-history>
|
|
></vdr-order-history>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="clr-col-lg-4 order-cards">
|
|
<div class="clr-col-lg-4 order-cards">
|
|
|
- <vdr-order-custom-fields-card [customFieldsConfig]="customFields"
|
|
|
|
|
- [customFieldValues]="order.customFields"></vdr-order-custom-fields-card>
|
|
|
|
|
|
|
+ <vdr-order-custom-fields-card
|
|
|
|
|
+ [customFieldsConfig]="customFields"
|
|
|
|
|
+ [customFieldValues]="order.customFields"
|
|
|
|
|
+ ></vdr-order-custom-fields-card>
|
|
|
<div class="card">
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
|
{{ 'order.customer' | translate }}
|
|
{{ 'order.customer' | translate }}
|