Skip to content

Commit

Permalink
Merge pull request #271 from TransbankDevelopers/fix/kiuwan-report
Browse files Browse the repository at this point in the history
fix: reduce nested callbacks
  • Loading branch information
mastudillot authored Nov 29, 2024
2 parents b2fd46d + 670b581 commit 9edf2f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ jQuery(function($) {

const fieldValue = document.createElement('span');
fieldValue.className = 'tbk-field-value';
fieldValue.textContent = value.toString();
fieldValue.textContent = value;

if(key == 'status') {
fieldValue.classList.add('tbk-badge');
fieldValue.classList.add(getBadgeColorFromStatus(value.toString()));
fieldValue.classList.add(getBadgeColorFromStatus(value));
}

if(key == 'cardNumber') {
Expand Down Expand Up @@ -139,7 +139,7 @@ jQuery(function($) {
'Reversada': 'tbk-badge-info',
'Parcialmente anulada': 'tbk-badge-info'
};

return statusColorsDictionary[status] ?? 'tbk-badge-default';
}

Expand Down

0 comments on commit 9edf2f2

Please sign in to comment.