-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Migrate Domain Field to the new Link Field Type #5759
Comments
Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).
// src/models/company.js
{
name: 'domain',
type: 'Link',
multiple: true,
...
}
// src/services/emailSync.js
const domains = company.domain; // Assuming domain is now an array
emails.forEach(email => {
if (domains.some(domain => email.endsWith(`@${domain}`))) {
// Sync email
}
});
// src/components/CompanyForm.js
<Field name="domain" component={LinkField} multiple /> References |
I can work on this next @Bonapara |
Sure @pacyL2K19, thanks for contributing! |
Starting work on this @Bonapara |
Done! Thanks @pacyL2K19 |
@ijreilly is it related to what you're working on? |
vision: add settings on fields to be able to add business logic executed at save. |
Current Behavior
The domain field on the company object uses a "Text" field type.
Desired Behavior
We want to migrate the domain field to the newly introduced linked field type, allowing users to specify multiple values (several domains).
We should adapt the email syncing logic to account for companies having different domains attached. We should sync emails from any matching domain name (e.g., [email protected] or [email protected]).
We should keep the custom logic for the domain field, such as fetching the favicon.
The text was updated successfully, but these errors were encountered: