feat: Booker atom read only fields (#16904)

* refactor: include user-readonly in BookingFields

* feat: add read only name and email booking fields

* feat: Booker atom prop for read only name and email

* refactor: simplify props type
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2024-10-07 15:03:07 +05:30
1 parent ba5b9e951a
commit b0bfec7247
4 files changed
+61 -12

No files matched your search

@@ -40,11 +40,15 @@ export const BookingFields = ({
// During reschedule by default all system fields are readOnly. Make them editable on case by case basis.
// Allowing a system field to be edited might require sending emails to attendees, so we need to be careful
let readOnly =
const rescheduleReadOnly =
(field.editable === "system" || field.editable === "system-but-optional") &&
!!rescheduleUid &&
bookingData !== null;
const bookingReadOnly = field.editable === "user-readonly";
let readOnly = bookingReadOnly || rescheduleReadOnly;
let hidden = !!field.hidden;
const fieldViews = field.views;