Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/actions/email-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const normalizeEntity = (entity) => {
return normalizedEntity;
};

export const queryTemplates = debounce(async (input, callback) => {
export const queryTemplates = debounce(async (input, callback, onError) => {
const accessToken = await getAccessTokenSafely();

const endpoint = URI(`${window.EMAIL_API_BASE_URL}/api/v1/mail-templates`);
Expand All @@ -274,7 +274,10 @@ export const queryTemplates = debounce(async (input, callback) => {

callback(options);
})
.catch(fetchErrorHandler);
.catch((err) => {
fetchErrorHandler(err);
if (onError) onError(err);
});
}, DEBOUNCE_WAIT);

/** ********************************************************************************************************* */
Expand Down
5 changes: 4 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3265,6 +3265,7 @@
}
},
"emails": {
"emails": "Emails",
"email_templates": "Email Templates",
"sent": "Sent",
"templates": "Templates",
Expand Down Expand Up @@ -3319,6 +3320,9 @@
"email_logs": "Email Logs",
"email_list": "Email List",
"apply_filters": "Apply Filters",
"enabled_filters": "Enabled Filters",
"all": "All",
"not_sent": "Not Sent",
"email_templates": "Email Templates",
"subject": "Subject",
"from_email": "From Email",
Expand All @@ -3328,7 +3332,6 @@
"payload": "Payload",
"select_fields": "Show Columns",
"placeholders": {
"select_fields": "Select data to display",
"template": "Filter by Template",
"sent_date_from": "Filter Sent Date from",
"sent_date_to": "Filter Sent Date to"
Expand Down
Loading
Loading