16 lines
395 B
JavaScript
16 lines
395 B
JavaScript
export const getCustomAttributeInputType = key => {
|
|
const customAttributeMap = {
|
|
date: 'date',
|
|
text: 'plain_text',
|
|
list: 'search_select',
|
|
checkbox: 'search_select',
|
|
};
|
|
|
|
return customAttributeMap[key] || 'plain_text';
|
|
};
|
|
|
|
export const isACustomAttribute = (customAttributes, key) => {
|
|
return customAttributes.find(attr => {
|
|
return attr.attribute_key === key;
|
|
});
|
|
};
|