fix: booking field name (#23508)

* Revert "fix: dutch appearing in booking field name (#23364)"

This reverts commit 67befea66e.

* fix: dont mutate default booking field
This commit is contained in:
Lauris Skraucis
2025-09-02 10:32:31 +00:00
committed by GitHub
parent 6c069a4afe
commit 9a2705c84c
4 changed files with 4 additions and 10 deletions
@@ -90,7 +90,7 @@ function getBaseProperties(field: InputBookingField): CustomField | SystemField
}
if (fieldIsCustomSystemName(field)) {
const systemName = { ...systemBeforeFieldName };
const systemName = structuredClone(systemBeforeFieldName);
if (systemName.variantsConfig?.variants?.fullName?.fields?.[0]) {
systemName.variantsConfig.variants.fullName.fields[0].label = field.label;
}
@@ -110,7 +110,7 @@ function getBaseProperties(field: InputBookingField): CustomField | SystemField
}
if (fieldIsCustomSystemNameSplit(field)) {
const systemNameSplit = { ...systemBeforeFieldNameSplit };
const systemNameSplit = structuredClone(systemBeforeFieldNameSplit);
const firstNameField = systemNameSplit.variantsConfig?.variants?.firstAndLastName?.fields?.find(
(field) => field.name === "firstName"
@@ -520,8 +520,6 @@ export const systemBeforeFieldName: NameSystemField = {
name: "fullName",
type: "text",
required: true,
label: "",
placeholder: "",
},
],
},
@@ -292,8 +292,8 @@ describe("transformBookingFieldsInternalToApi", () => {
isDefault: true,
required: true,
disableOnPrefill: false,
label: "",
placeholder: "",
label: undefined,
placeholder: undefined,
},
];
@@ -725,8 +725,6 @@ describe("Organizations Event Types Endpoints", () => {
isDefault: true,
type: "name",
slug: "name",
label: "",
placeholder: "",
required: true,
disableOnPrefill: false,
},
@@ -823,8 +821,6 @@ describe("Organizations Event Types Endpoints", () => {
isDefault: true,
type: "name",
slug: "name",
label: "",
placeholder: "",
required: true,
disableOnPrefill: false,
},