mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user