<%= moment(listOfWeeks[currentWeekId].dayFrom, 'YYYY-MM-DD').format('DD MMMM YYYY') %> - <%= moment(listOfWeeks[currentWeekId].dayTo, 'YYYY-MM-DD').format('DD MMMM YYYY') %>
<% if (!_.isUndefined(listOfWeeks[currentWeekId].emailsSent)) { %>
<% sentLabel = ((listOfWeeks[currentWeekId].emailsSent > 1) ? _.isUndefined(i18n['emails']) ? 'emails':i18n['emails'] : _.isUndefined(i18n['email']) ? 'email':i18n['email'])%>
/ <%= listOfWeeks[currentWeekId].emailsSent + ' '+ _.isUndefined(i18n['emails']) ? 'emails':i18n['emails'] +' '+ sentLabel %>
<% } %>
<% if (!_.isUndefined(listOfWeeks[currentWeekId].smsSent)) { %>
<% sentLabel = _.isUndefined(i18n['sms']) ? 'sms':i18n['sms']%>
/ <%= listOfWeeks[currentWeekId].smsSent + ' '+ _.isUndefined(i18n['sms']) ? 'sms':i18n['sms'] +' '+ sentLabel %>
<% } %>
<% if (!_.isUndefined(listOfWeeks[currentWeekId].emailsDelayed)) { %>
<% upcomingLabel = ((listOfWeeks[currentWeekId].emailsDelayed > 1) ? _.isUndefined(i18n['emails']) ? 'emails':i18n['emails'] : _.isUndefined(i18n['email']) ? 'email':i18n['email'] )%>
/ <%= listOfWeeks[currentWeekId].emailsDelayed + ' upcoming '+ upcomingLabel %>
<% } %>
<% if (!_.isUndefined(listOfWeeks[currentWeekId].smsDelayed)) { %>
<% upcomingLabel = _.isUndefined(i18n['sms']) ? 'sms':i18n['sms']%>
/ <%= listOfWeeks[currentWeekId].smsDelayed + ' upcoming '+ upcomingLabel %>
<% } %>
|
<%= _.isUndefined(i18n['Time']) ? 'Time':i18n['Time'] %> |
<%= _.isUndefined(i18n['Sequence']) ? 'Sequence':i18n['Sequence'] %> |
<%= _.isUndefined(i18n['Email/SMS']) ? 'Email/SMS':i18n['Email/SMS'] %> |
<%= _.isUndefined(i18n['Actions']) ? 'Actions':i18n['Actions'] %> |
<% } %>
<% noRecordsClass = '' %>
<% upcomingEmailsClass = ''%>
<% if(!_.isUndefined(item.emailsData)) { %>
<% noRecordsClass = 'email-sequence-log-exists'%>
<% } %>
<% currentDate = moment(dateNow) %>
<% recordDate = moment(item.day) %>
<% if (currentDate < recordDate) { %>
<% upcomingEmailsClass = 'email-sequence-upcoming-days' %>
<% } %>
<% recordClassToday = '' %>
<% if(dateNow == item.day) { %>
<% recordClassToday = 'email-sequence-log-today'%>
<% } %>
<%= item.weekAbbreviation %> |
<%= moment(item.day, 'YYYY-MM-DD').format('DD MMMM YYYY') %> <%= ((dateNow == item.day) ? (_.isUndefined(i18n[' (today)']) ? ' (today)':i18n[' (today)']) : '') %>
|
<% if(!_.isUndefined(item.emailsData)) { %>
<% $.each(item.emailsData, function(id, singleEmail) { %>
<% if (singleEmail.status === '0') { %>
<%= moment(singleEmail.delayedTo, 'YYYY-MM-DD HH:mm:ss').format('HH:mm:ss') + ' ' + currentUserTimeZone%>
<% } else { %>
<%= moment(singleEmail.sentAt, 'YYYY-MM-DD HH:mm:ss').format('HH:mm:ss') + ' ' + currentUserTimeZone %>
<% } %>
<% }) %>
<% } %>
|
<% if(!_.isUndefined(item.emailsData)) { %>
<% $.each(item.emailsData, function(id, singleEmail) { %>
<% if(!_.isNull(singleEmail.sequenceName)) { %>
<%= singleEmail.sequenceName %>
<% } else { %>
<%= _.isUndefined(i18n['This sequence has been deleted']) ? 'This sequence has been deleted':i18n['This sequence has been deleted'] %>
<% } %>
<% }) %>
<% } %>
|
<% if(!_.isUndefined(item.emailsData)) { %>
<% $.each(item.emailsData, function(id, singleEmail) { %>
<% if(_.isNull(singleEmail.triggerName) || singleEmail.triggerName == '') { %>
<% } else { %>
<%= singleEmail.triggerName %> <%= singleEmail.type %>
<% } %>
<% }) %>
<% } %>
|
<% if(!_.isUndefined(item.emailsData)) { %>
<% $.each(item.emailsData, function(id, singleEmail) { %>
<% msg = 'Click to receive that ' + singleEmail.type%>
<% }) %>
<% } %>
|