Closed dospromptman closed 2 months ago
@lmeerkatz this is WIP code, but just pushing it up so it can be visible while it is being worked on. I'll close this PR and open a new one with the actual feature branch when/if this should ever be merged.
Closing this WIP review-only PR in favor of #56
Do not rely on this commit being stable-- this is work in progress and this commit will be discarded (i.e. do not merge this commit or build upon this commit).
This includes current progress for ad-hoc email functionality (#34), including:
Email specific functionality
emails
directory, which contains functionality strictly limited to sending emails. Theoretically, this can be broken out to a new package eventually, but currently dependencies would not allow this-- this needs some changes to enable that.sendEmailsAction
component which accepts awhatId
andtargetObjectIds
list of Contact ids and will display an action modal dialog to the user allowing them to compose an email to these recipients. This component usessendEmailsForm
component for UI.SendEmailsService
Apex service which provides supporting functionality forsendEmailsAction
to get additional information about related records, recipients, and to actually send the email. Currently only supports sending using a list of SingleEmailMessages. Future work will include sending using MassEmailMessage.Volunteers specific functionality
sendVolunteersEmailAction
component, which can be invoked as a record level action for volunteer related records (it should work with anything which has a related volunteer assignment record). This component handles no UI itself, but retrieves the appropriate list of assigned volunteers and delegates tosendEmailsAction
component.VolunteerAssignmentService
Apex service, which will return a list of assigned volunteer ids for a given volunteer record.Demo of standard email action
bccEmailVolunteersAction
component, which is an experiment in creating a standalone LWC which queries for related volunteers for a volunteer shift record and delegates to the standard SendEmail global quick action. This component has no other dependencies (on other components or on any Apex classes), and is intended only to demonstrate how this can be done without other custom code to send emails.Supporting quick actions and page layouts
VolunteerShift__c.EmailVolunteers
andVolunteerShift__c.EmailVolunteersBcc
actions, which are added toVolunteerShift__c-Volunteer Shift Layout
, and invoke the appropriate LWC action (sendVolunteersEmailAction
orbccEmailVolunteersAction
respectively).