add completed Date for dahsboard table

pull/2282/head
sylflo 2021-08-11 21:54:31 +02:00 committed by Sylvain Chateau
parent 060b09ea0c
commit 097a6dd800
2 changed files with 10 additions and 7 deletions

View File

@ -303,23 +303,23 @@ $(document).ready(function () {
},
{
className: "color-sent",
targets: [2]
},
{
className: "color-opened",
targets: [3]
},
{
className: "color-clicked",
className: "color-opened",
targets: [4]
},
{
className: "color-success",
className: "color-clicked",
targets: [5]
},
{
className: "color-reported",
className: "color-success",
targets: [6]
},
{
className: "color-reported",
targets: [7]
}
],
order: [
@ -329,6 +329,7 @@ $(document).ready(function () {
campaignRows = []
$.each(campaigns, function (i, campaign) {
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
var completed_date = () => (campaign.status === "Completed" ? moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a') : '')
var label = statuses[campaign.status].label || "label-default";
//section for tooltips on the status of a campaign to show some quick stats
var launchDate;
@ -343,6 +344,7 @@ $(document).ready(function () {
campaignRows.push([
escapeHtml(campaign.name),
campaign_date,
completed_date,
campaign.stats.sent,
campaign.stats.opened,
campaign.stats.clicked,

View File

@ -40,6 +40,7 @@
<tr>
<th class="col-md-2 col-sm-2">Name</th>
<th class="col-md-2 col-sm-2">Created Date</th>
<th class="col-md-2 col-sm-2">Completed Date</th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-envelope-o"></i>
</th>