diff --git a/public/locales/bg/marketing.json b/public/locales/bg/marketing.json index a1d91ae86..54cfa08cd 100644 --- a/public/locales/bg/marketing.json +++ b/public/locales/bg/marketing.json @@ -4,7 +4,8 @@ "sendConsentEmail": "Изпращане на емайл за съгласие", "common": { "templateId": "Идентификатор на Sendgrid шаблон", - "listId": "Идентифицатор на Sendgrid списък с контакти" + "listId": "Идентифицатор на Sendgrid списък с контакти", + "subject": "Тема на емайл" } } } diff --git a/public/locales/en/marketing.json b/public/locales/en/marketing.json index 35a56c394..43bc2206b 100644 --- a/public/locales/en/marketing.json +++ b/public/locales/en/marketing.json @@ -4,7 +4,8 @@ "sendConsentEmail": "Send newsletter consent email", "common": { "templateId": "ID of Sendgrid template", - "listId": "ID of Sendgrid contact list" + "listId": "ID of Sendgrid contact list", + "subject": "Email subject" } } } diff --git a/src/components/admin/marketing/EmailConsent/SendEmailConsentForm.tsx b/src/components/admin/marketing/EmailConsent/SendEmailConsentForm.tsx index 83c2c4ff1..0e8b5fa53 100644 --- a/src/components/admin/marketing/EmailConsent/SendEmailConsentForm.tsx +++ b/src/components/admin/marketing/EmailConsent/SendEmailConsentForm.tsx @@ -21,12 +21,14 @@ export default function SendConsentEmailForm() { const initialValues: SendNewsLetterConsent = { templateId: '', listId: '', + subject: '', dateThreshold: new Date().toISOString(), } const validationSchema: yup.SchemaOf = yup.object().defined().shape({ templateId: yup.string().required(), listId: yup.string().required(), + subject: yup.string().required(), dateThreshold: yup.string().optional(), }) @@ -60,6 +62,7 @@ export default function SendConsentEmailForm() { const data: SendNewsLetterConsent = { templateId: values.templateId, listId: values.listId, + subject: values.subject, dateThreshold: values.dateThreshold, } await mutation.mutateAsync(data) @@ -86,6 +89,9 @@ export default function SendConsentEmailForm() { + + +