fix(oms-data-access): simplify return receipt values schema

Replace separate type extension with direct schema definition by adding
otherProduct field to the ReturnReceiptValuesSchema. This eliminates
redundant type definition and improves type safety by ensuring all
fields are properly validated through the Zod schema.

Ref: #5082
This commit is contained in:
Nino
2025-05-12 14:32:59 +02:00
parent a978f94519
commit 0ec1457ffc

View File

@@ -12,8 +12,5 @@ export const ReturnReceiptValuesSchema = z.object({
returnDetails: z.string().optional(),
returnReason: z.string().optional(),
receiptItem: ReceiptItemSchema,
otherProduct: z.custom<Product>().optional(),
});
export type ReturnReceiptValues = z.infer<typeof ReturnReceiptValuesSchema> & {
otherProduct: Product;
};