Skip to content

Commit fcbcdb2

Browse files
Merge branch 'fix/dashboard-failed-log-status-SMTPSUPORT-430' into release/3.1.4
2 parents c4181cd + 4c7f1cd commit fcbcdb2

File tree

3 files changed

+52
-48
lines changed

3 files changed

+52
-48
lines changed

Postman/Dashboard/assets/css/app.css

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Postman/Dashboard/assets/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Postman/Dashboard/includes/rest-api/v1/class-psd-rest-api.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,16 @@ function( $log ) {
122122
'id' => $log->id,
123123
'subject' => $log->original_subject,
124124
'sent_to' => $log->to_header,
125-
'status' => 1 === absint( $log->success ) ? 'success' : 'failed',
126125
'delivery_time' => gmdate( 'F d, Y h:i a', $log->time ),
127126
);
128127

129-
if ( 1 !== absint( $log->success ) ) {
130-
$data['error'] = $log->success;
128+
if ( 1 === absint( $log->success ) ) {
129+
$data['status'] = 'success';
130+
} elseif ( 'In Queue' === $log->success ) {
131+
$data['status'] = 'in_queue';
132+
} else {
133+
$data['status'] = 'failed';
134+
$data['error'] = $log->success;
131135
}
132136

133137
return $data;
@@ -314,7 +318,7 @@ public function email_count( $request ) {
314318

315319
$failed = $logs;
316320
$failed = array_filter($failed, function ($log) {
317-
return 1 !== absint($log->success);
321+
return 1 !== absint($log->success) && 'In Queue' !== $log->success;
318322
});
319323

320324

0 commit comments

Comments
 (0)