Merged in fix/rateCodes (pull request #1315)

fix: taking care of missing rateDefinitions

* fix: taking care of missing rateDefinitions


Approved-by: Linus Flood
This commit is contained in:
Simon.Emanuelsson
2025-02-12 08:52:08 +00:00
committed by Linus Flood
parent 8d6f4b82f3
commit 4a06162f79
5 changed files with 108 additions and 27 deletions

View File

@@ -13,4 +13,10 @@ export const productTypePriceSchema = z.object({
rateCode: z.string(),
rateType: z.string().optional(),
requestedPrice: priceSchema.optional(),
// This is only used when a product is filtered out
// so that we can still map out the correct titles a.so.
oldRateCode: z.string().default(""),
// Used to set the rate that we use to chose
// titles etc.
rate: z.string().default(""),
})

View File

@@ -53,9 +53,11 @@ export const roomConfigurationSchema = z
productType: {
member: {
rateCode: "",
oldRateCode: product.productType.member?.rateCode,
},
public: {
rateCode: "",
oldRateCode: product.productType.public.rateCode,
},
},
})