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:
1 parent
ba5b9e951a
commit
b0bfec7247
4 files changed
+61
-12
No files matched your search
@@ -227,7 +227,7 @@ const CustomFieldsSchema = z.object({
|
||||
const SystemFieldSchema = z.object({
|
||||
defaultLabel: z.string(),
|
||||
label: z.string().optional(),
|
||||
editable: z.enum(["system-but-optional", "system"]),
|
||||
editable: z.enum(["system-but-optional", "system", "user-readonly"]),
|
||||
sources: z.array(
|
||||
z.object({
|
||||
id: z.literal("default"),
|
||||
@@ -352,6 +352,21 @@ export const systemBeforeFieldName: NameSystemField = {
|
||||
],
|
||||
};
|
||||
|
||||
export const systemBeforeFieldNameReadOnly: NameSystemField = {
|
||||
type: "name",
|
||||
name: "name",
|
||||
editable: "user-readonly",
|
||||
defaultLabel: "your_name",
|
||||
required: true,
|
||||
sources: [
|
||||
{
|
||||
label: "Default",
|
||||
id: "default",
|
||||
type: "default",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const systemBeforeFieldEmail: EmailSystemField = {
|
||||
defaultLabel: "email_address",
|
||||
type: "email",
|
||||
@@ -367,6 +382,21 @@ export const systemBeforeFieldEmail: EmailSystemField = {
|
||||
],
|
||||
};
|
||||
|
||||
export const systemBeforeFieldEmailReadOnly: EmailSystemField = {
|
||||
defaultLabel: "email_address",
|
||||
type: "email",
|
||||
name: "email",
|
||||
required: true,
|
||||
editable: "user-readonly",
|
||||
sources: [
|
||||
{
|
||||
label: "Default",
|
||||
id: "default",
|
||||
type: "default",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const systemBeforeFieldLocation: LocationReasonSystemField = {
|
||||
defaultLabel: "location",
|
||||
type: "radioInput",
|
||||
|
||||
Reference in new issue
Block a user