phone/email fields details

This commit is contained in:
Yuri Kuznetsov
2025-03-23 12:01:07 +02:00
parent 8f2ccb45a2
commit ce6abcd3f0
@@ -201,6 +201,7 @@ export default class ViewDetailsModalView extends ModalView {
{
name: this.field + 'Name',
type: 'string',
notStorable: true,
readOnly: true,
},
];
@@ -428,6 +429,41 @@ export default class ViewDetailsModalView extends ModalView {
];
}
if (this.fieldType === 'email') {
return [
{
name: this.field,
type: 'string',
notStorable: this.fieldDefs.notStorable || false,
readOnly: this.fieldDefs.readOnly || false,
},
{
name: this.field + 'Data',
type:
'{emailAddress: string, lower: string, primary: boolean, optOut: boolean, invalid: boolean}[]',
notStorable: this.fieldDefs.notStorable || false,
readOnly: this.fieldDefs.readOnly || false,
},
];
}
if (this.fieldType === 'phone') {
return [
{
name: this.field,
type: 'string',
notStorable: this.fieldDefs.notStorable || false,
readOnly: this.fieldDefs.readOnly || false,
},
{
name: this.field + 'Data',
type: '{phoneNumber: string, primary: boolean, optOut: boolean, invalid: boolean}[]',
notStorable: this.fieldDefs.notStorable || false,
readOnly: this.fieldDefs.readOnly || false,
},
];
}
return undefined;
}
}