mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(checkout): implement reward order confirmation UI
Implement the complete UI for the reward order confirmation page including address displays, order item lists, and supporting helper functions. Features: - Add order confirmation addresses component displaying billing, delivery, and pickup branch addresses - Implement order confirmation item list with order type icons and item details - Add helper functions for order type feature checking and address/branch deduplication - Integrate store computed properties for payers, shipping addresses, and target branches - Apply responsive layout with Tailwind CSS styling
This commit is contained in:
@@ -1,26 +1,32 @@
|
||||
import { EntitySchema, QuantityUnitTypeSchema } from '@isa/common/data-access';
|
||||
import { z } from 'zod';
|
||||
import { PriceSchema } from './price.schema';
|
||||
import { ProductSchema } from './product.schema';
|
||||
import { PromotionSchema } from './promotion.schema';
|
||||
|
||||
// Forward declaration for circular reference
|
||||
export const DisplayOrderItemSchema: z.ZodType<any> = z
|
||||
.object({
|
||||
buyerComment: z.string().describe('Buyer comment').optional(),
|
||||
description: z.string().describe('Description text').optional(),
|
||||
features: z.record(z.string().describe('Features'), z.string()).optional(),
|
||||
order: z.lazy(() => z.any()).describe('Order').optional(), // Circular reference to DisplayOrder
|
||||
orderDate: z.string().describe('Order date').optional(),
|
||||
orderItemNumber: z.string().describe('OrderItem number').optional(),
|
||||
price: PriceSchema.describe('Price information').optional(),
|
||||
product: ProductSchema.describe('Product').optional(),
|
||||
promotion: PromotionSchema.describe('Promotion information').optional(),
|
||||
quantity: z.number().describe('Quantity').optional(),
|
||||
quantityUnit: z.string().describe('Quantity unit').optional(),
|
||||
quantityUnitType: QuantityUnitTypeSchema.describe('QuantityUnit type'),
|
||||
subsetItems: z.array(z.lazy(() => z.any())).describe('Subset items').optional(), // Circular reference to DisplayOrderItemSubset
|
||||
})
|
||||
.extend(EntitySchema.shape);
|
||||
|
||||
export type DisplayOrderItem = z.infer<typeof DisplayOrderItemSchema>;
|
||||
import { EntitySchema, QuantityUnitTypeSchema } from '@isa/common/data-access';
|
||||
import { z } from 'zod';
|
||||
import { PriceSchema } from './price.schema';
|
||||
import { ProductSchema } from './product.schema';
|
||||
import { PromotionSchema } from './promotion.schema';
|
||||
|
||||
// Forward declaration for circular reference
|
||||
export const DisplayOrderItemSchema = z
|
||||
.object({
|
||||
buyerComment: z.string().describe('Buyer comment').optional(),
|
||||
description: z.string().describe('Description text').optional(),
|
||||
features: z.record(z.string().describe('Features'), z.string()).optional(),
|
||||
order: z
|
||||
.lazy(() => z.any())
|
||||
.describe('Order')
|
||||
.optional(), // Circular reference to DisplayOrder
|
||||
orderDate: z.string().describe('Order date').optional(),
|
||||
orderItemNumber: z.string().describe('OrderItem number').optional(),
|
||||
price: PriceSchema.describe('Price information').optional(),
|
||||
product: ProductSchema.describe('Product').optional(),
|
||||
promotion: PromotionSchema.describe('Promotion information').optional(),
|
||||
quantity: z.number().describe('Quantity').optional(),
|
||||
quantityUnit: z.string().describe('Quantity unit').optional(),
|
||||
quantityUnitType: QuantityUnitTypeSchema.describe('QuantityUnit type'),
|
||||
subsetItems: z
|
||||
.array(z.lazy(() => z.any()))
|
||||
.describe('Subset items')
|
||||
.optional(), // Circular reference to DisplayOrderItemSubset
|
||||
})
|
||||
.extend(EntitySchema.shape);
|
||||
|
||||
export type DisplayOrderItem = z.infer<typeof DisplayOrderItemSchema>;
|
||||
|
||||
Reference in New Issue
Block a user