UNPKG

@websolutespa/payload-plugin-bowl

Version:

Bowl PayloadCms plugin of the BOM Repository

84 lines (83 loc) 2.29 kB
export const EmailConfig = (options)=>({ type: 'withCollection', slug: options.slug.emailConfig, admin: { group: options.group.config, useAsTitle: 'id', defaultColumns: [ 'id', 'name' ] }, fields: [ { type: 'withId', required: true }, { type: 'withName', required: true, localized: false }, { type: 'select', name: 'action', options: (()=>{ const selectOptions = options.actions.map((slug)=>({ value: slug, label: slug })); if (selectOptions.length > 0) { return selectOptions; } else { return [ { value: '', label: 'none' } ]; } })() }, { type: 'withText', name: 'subject', localized: true }, { type: 'withText', name: 'fromAddress' }, { type: 'array', name: 'to', fields: [ { type: 'withText', name: 'address' } ] }, { type: 'array', name: 'cc', fields: [ { type: 'withText', name: 'address' } ] }, { type: 'array', name: 'bcc', fields: [ { type: 'withText', name: 'address' } ] } ] }); //# sourceMappingURL=EmailConfig.js.map