Skip to content

Commit

Permalink
feat: adapt order history and order details for recurring orders
Browse files Browse the repository at this point in the history
  • Loading branch information
shauke committed Sep 12, 2024
1 parent cad4ab4 commit 32d7780
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/core/models/order/order.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface OrderBaseData extends BasketBaseData {
status: string;
basket: string;
requisitionDocumentNo?: string;
recurringOrderID?: string;
attributes?: Attribute[];
taxIdentificationNumber?: string;
}
Expand Down
1 change: 1 addition & 0 deletions src/app/core/models/order/order.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class OrderMapper {
statusCode: data.statusCode,
status: data.status,
requisitionNo: data.requisitionDocumentNo,
recurringOrderID: data.recurringOrderID,
approval:
data.attributes &&
AttributeHelper.getAttributeValueByAttributeName(
Expand Down
1 change: 1 addition & 0 deletions src/app/core/models/order/order.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export interface Order extends OrderBasket {
date: number;
};
requisitionNo?: string;
recurringOrderID?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ <h1>{{ 'account.orderdetails.heading.default' | translate }}</h1>
<span class="badge badge-info">{{ order.status }}</span>
</dd>
</dl>
<span
[ishServerHtml]="
'account.orderdetails.recurring_order.info'
| translate : { link: 'route://account/recurring-orders/' + order.recurringOrderID }
"
></span>
</div>

<ng-container *ngIf="order">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
</th>
<td cdk-cell *cdkCellDef="let order" [attr.data-label]="'account.orderlist.table.date_of_order' | translate">
{{ order.creationDate | ishDate }}
<fa-icon
*ngIf="order.recurringOrderID"
[icon]="['fas', 'repeat']"
[title]="'account.orderlist.table.recurring.icon.title' | translate"
class="ml-1"
/>
</td>
</ng-container>

Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
"account.orderdetails.order_number.label": "Bestellnr.",
"account.orderdetails.order_status.label": "Bestellstatus",
"account.orderdetails.print_link.text": "Drucken",
"account.orderdetails.recurring_order.info": "This order has been created based on a <a href=\"{{link}}\" >recurring order</a>.",
"account.orderlist.no_orders_message": "Derzeit sind keine Bestellungen vorhanden.",
"account.orderlist.no_placed_orders_message": "Sie haben noch keine Bestellung aufgegeben.",
"account.orderlist.table.buyer": "Einkäufer",
Expand All @@ -288,6 +289,7 @@
"account.orderlist.table.order_number": "Bestellnr.",
"account.orderlist.table.order_status": "Status",
"account.orderlist.table.order_total": "Gesamtsumme",
"account.orderlist.table.recurring.icon.title": "Recurring order",
"account.ordertemplates.heading": "Bestellvorlagen",
"account.ordertemplates.link": "Bestellvorlagen",
"account.ordertemplates.widget.heading": "Meine Bestellvorlagen",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
"account.orderdetails.order_number.label": "Order no.",
"account.orderdetails.order_status.label": "Order status",
"account.orderdetails.print_link.text": "Print",
"account.orderdetails.recurring_order.info": "This order has been created based on a <a href=\"{{link}}\" >recurring order</a>.",
"account.orderlist.no_orders_message": "Currently there are no orders.",
"account.orderlist.no_placed_orders_message": "You have not placed an order yet.",
"account.orderlist.table.buyer": "Buyer",
Expand All @@ -288,6 +289,7 @@
"account.orderlist.table.order_number": "Order no.",
"account.orderlist.table.order_status": "Status",
"account.orderlist.table.order_total": "Order total",
"account.orderlist.table.recurring.icon.title": "Recurring order",
"account.ordertemplates.heading": "Order templates",
"account.ordertemplates.link": "Order templates",
"account.ordertemplates.widget.heading": "My order templates",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
"account.orderdetails.order_number.label": "N° de commande",
"account.orderdetails.order_status.label": "Statut de la commande",
"account.orderdetails.print_link.text": "Imprimer",
"account.orderdetails.recurring_order.info": "This order has been created based on a <a href=\"{{link}}\" >recurring order</a>.",
"account.orderlist.no_orders_message": "Actuellement il n’y a aucune commande.",
"account.orderlist.no_placed_orders_message": "Vous n’avez pas encore passé de commande.",
"account.orderlist.table.buyer": "Acheteur",
Expand All @@ -288,6 +289,7 @@
"account.orderlist.table.order_number": "N° de la commande",
"account.orderlist.table.order_status": "Statut",
"account.orderlist.table.order_total": "Total de la commande",
"account.orderlist.table.recurring.icon.title": "Recurring order",
"account.ordertemplates.heading": "Modèles de commande",
"account.ordertemplates.link": "Modèles de commande",
"account.ordertemplates.widget.heading": "Mes modèles de commande",
Expand Down

0 comments on commit 32d7780

Please sign in to comment.