Update SendEmail activity property UI hints

This commit is contained in:
Sipke Schoorstra 2021-03-05 22:03:13 +01:00
parent 21ac6866ea
commit dc95276abb
3 changed files with 8 additions and 8 deletions

View file

@ -30,13 +30,13 @@ namespace Elsa.Activities.Email
[ActivityProperty(Hint = "The sender's email address.")]
public string? From { get; set; }
[ActivityProperty(Hint = "The recipients email addresses.")]
[ActivityProperty(Hint = "The recipients email addresses.", UIHint = ActivityPropertyUIHints.MultiText)]
public ICollection<string> To { get; set; } = new List<string>();
[ActivityProperty(Hint = "The cc recipients email addresses. (Optional)")]
[ActivityProperty(Hint = "The cc recipients email addresses. (Optional)", UIHint = ActivityPropertyUIHints.MultiText)]
public ICollection<string> Cc { get; set; } = new List<string>();
[ActivityProperty(Hint = "The Bcc recipients email addresses. (Optional)")]
[ActivityProperty(Hint = "The Bcc recipients email addresses. (Optional)", UIHint = ActivityPropertyUIHints.MultiText)]
public ICollection<string> Bcc { get; set; } = new List<string>();
[ActivityProperty(Hint = "The subject of the email message.")]
@ -48,7 +48,7 @@ namespace Elsa.Activities.Email
protected override async ValueTask<IActivityExecutionResult> OnExecuteAsync(ActivityExecutionContext context)
{
var message = new MimeMessage();
var from = From is null or "" ? _options.DefaultSender : From;
var from = From is null or "" ? _options.DefaultSender : From;
message.From.Add(MailboxAddress.Parse(from));
message.Subject = Subject;
@ -61,7 +61,7 @@ namespace Elsa.Activities.Email
SetRecipientsEmailAddresses(message.To, To);
SetRecipientsEmailAddresses(message.Cc, Cc);
SetRecipientsEmailAddresses(message.Bcc, Bcc);
await _smtpService.SendAsync(message, context.CancellationToken);
return Done();

View file

@ -18,7 +18,7 @@
}
public string Name { get; set; } = default!;
public string Syntax { get; set; } = default!;
public string Expression { get; set; } = default!;
public string? Syntax { get; set; }
public string? Expression { get; set; }
}
}

View file

@ -28,7 +28,7 @@ export class ElsaDropdownProperty {
const fieldName = propertyName;
const fieldLabel = propertyDescriptor.label || propertyName;
const fieldHint = propertyDescriptor.hint;
const options = propertyDescriptor.options as Array<any>;
const options = propertyDescriptor.options as Array<any> || [];
const value = this.currentValue;
return (