mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(checkout): complete reward order confirmation with reusable product info component
- Extract reusable ProductInfoComponent from ProductInfoRedemptionComponent - Implement order confirmation item list with product, action card, and destination info - Add completed shopping carts tracking to checkout metadata service - Create Storybook stories for product info component variants - Update checkout completion orchestrator to store shopping cart data - Extract COMPLETED_SHOPPING_CARTS_METADATA_KEY constant for consistency
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
export * from './display-addressee.schema';
|
||||
export * from './display-branch.schema';
|
||||
export * from './display-logistician.schema';
|
||||
export * from './display-order-item.schema';
|
||||
export * from './display-order-payment.schema';
|
||||
export * from './display-order.schema';
|
||||
export * from './environment-channel.schema';
|
||||
export * from './fetch-return-details.schema';
|
||||
export * from './linked-record.schema';
|
||||
export * from './order-type.schema';
|
||||
export * from './price.schema';
|
||||
export * from './product.schema';
|
||||
export * from './promotion.schema';
|
||||
export * from './query-token.schema';
|
||||
export * from './return-process-question-answer.schema';
|
||||
export * from './return-receipt-values.schema';
|
||||
export * from './shipping-type.schema';
|
||||
export * from './terms-of-delivery.schema';
|
||||
export * from './type-of-delivery.schema';
|
||||
export * from './display-addressee.schema';
|
||||
export * from './display-branch.schema';
|
||||
export * from './display-logistician.schema';
|
||||
export * from './display-order-item.schema';
|
||||
export * from './display-order-payment.schema';
|
||||
export * from './display-order.schema';
|
||||
export * from './environment-channel.schema';
|
||||
export * from './fetch-return-details.schema';
|
||||
export * from './linked-record.schema';
|
||||
export * from './order-type.schema';
|
||||
export * from './price.schema';
|
||||
export * from './product.schema';
|
||||
export * from './promotion.schema';
|
||||
export * from './query-token.schema';
|
||||
export * from './return-process-question-answer.schema';
|
||||
export * from './return-receipt-values.schema';
|
||||
export * from './shipping-type.schema';
|
||||
export * from './terms-of-delivery.schema';
|
||||
export * from './type-of-delivery.schema';
|
||||
|
||||
@@ -8,19 +8,28 @@ import z from 'zod';
|
||||
export class OmsMetadataService {
|
||||
#tabService = inject(TabService);
|
||||
|
||||
getDisplayOrders(tabId: number): DisplayOrder[] | undefined {
|
||||
getDisplayOrders(tabId: number) {
|
||||
return getMetadataHelper(
|
||||
tabId,
|
||||
OMS_DISPLAY_ORDERS_KEY,
|
||||
z.array(DisplayOrderSchema).optional(),
|
||||
z
|
||||
.array(DisplayOrderSchema.extend({ shoppingCartId: z.number() }))
|
||||
.optional(),
|
||||
this.#tabService.entityMap(),
|
||||
);
|
||||
}
|
||||
|
||||
addDisplayOrders(tabId: number, orders: DisplayOrder[]) {
|
||||
addDisplayOrders(
|
||||
tabId: number,
|
||||
orders: DisplayOrder[],
|
||||
shoppingCartId: number,
|
||||
) {
|
||||
const existingOrders = this.getDisplayOrders(tabId) || [];
|
||||
this.#tabService.patchTabMetadata(tabId, {
|
||||
[OMS_DISPLAY_ORDERS_KEY]: [...existingOrders, ...orders],
|
||||
[OMS_DISPLAY_ORDERS_KEY]: [
|
||||
...existingOrders,
|
||||
...orders.map((order) => ({ ...order, shoppingCartId })),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user