-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: location change during rescheduling #15810
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -391,7 +391,7 @@ export const Components: Record<FieldType, Component> = { | |||
if (!value) { | ||||
setValue({ | ||||
value: options[0]?.value, | ||||
optionValue: "", | ||||
optionValue: options[0]?.optionValue || "", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this and other change in this component.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The booking view expects the
Currently the |
||||
}); | ||||
} | ||||
}, [options, setValue, value]); | ||||
|
@@ -429,7 +429,7 @@ export const Components: Record<FieldType, Component> = { | |||
onChange={(e) => { | ||||
setValue({ | ||||
value: e.target.value, | ||||
optionValue: "", | ||||
optionValue: option?.optionValue || "", | ||||
}); | ||||
}} | ||||
checked={value?.value === option.value} | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,12 @@ const fieldTypeEnum = z.enum([ | |
export type FieldType = z.infer<typeof fieldTypeEnum>; | ||
|
||
export const EditableSchema = z.enum([ | ||
"system", // Can't be deleted, can't be hidden, name can't be edited, can't be marked optional | ||
"system-but-optional", // Can't be deleted. Name can't be edited. But can be hidden or be marked optional | ||
"system-but-hidden", // Can't be deleted, name can't be edited, will be shown | ||
"user", // Fully editable | ||
"system", // Deletable-No, CanChangeIdentifier-No, Toggleable-No, CanMarkOptional-No. | ||
"system-but-optional", // Deletable-No, CanChangeIdentifier-No, Toggleable-Yes, CanMarkOptional-Yes | ||
// TODO: Seems to be unused and could probably be deleted | ||
"system-but-hidden", // Deletable-No, CanChangeIdentifier-No, Always Hidden and thus Optional | ||
"user", // Fully editable. Deletable-Yes, CanChangeIdentifier-Yes, Toggleable-Yes, CanMarkOptional-Yes | ||
// TODO: Seems to be unused and could probably be deleted | ||
Comment on lines
+31
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the comments to make it more readable. |
||
"user-readonly", // All fields are readOnly. | ||
]); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this change because
if (locationResponse?.value === "attendeeInPerson" || "phone") {
condition is faulty.It is always truthy. So, it seems like location change is enabled for attendeeInPerson and phone but in fact it is enabled in all cases.
Introduced in #11651
I think with this PR we should intend to be able to make any change to location field and test it accordingly.