-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing advanced payout - Default to Bountied Amount for Payment, etc. #2365
Conversation
…Guidance on Overage
@@ -68,8 +68,11 @@ $(document).ready(function($) { | |||
|
|||
$(document).on('click', '.remove', function(event) { | |||
event.preventDefault(); | |||
var position = ($(this).parents('tr').index()+2).toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected blank line after variable declarations. (newline-after-var)
Infix operators must be spaced. (space-infix-ops)
@@ -68,8 +68,11 @@ $(document).ready(function($) { | |||
|
|||
$(document).on('click', '.remove', function(event) { | |||
event.preventDefault(); | |||
var position = ($(this).parents('tr').index()+2).toString(); | |||
$("#transaction_registry tr:nth-child(" + position + ")").remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings must use singlequote. (quotes)
@@ -212,11 +224,26 @@ $(document).ready(function($) { | |||
var denomination = $('#token_name').text(); | |||
var original_amount = $('#original_amount').val(); | |||
var net = round(original_amount - tc, 2); | |||
var over = round(((original_amount) - (get_total_cost()))*-1, 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infix operators must be spaced. (space-infix-ops)
if (over > 0) { | ||
$('.overageAlert').css('display', 'inline-block'); | ||
$('.overagePreview').css('display', 'inline-block'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please run make fix-eslint
on this to resolve stickler comments?
Additionally, can you resolve the merge conflict? |
Edit: All issues have been resolved. Thanks! |
@@ -68,8 +68,12 @@ $(document).ready(function($) { | |||
|
|||
$(document).on('click', '.remove', function(event) { | |||
event.preventDefault(); | |||
var position = ($(this).parents('tr').index()+2).toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infix operators must be spaced. (space-infix-ops)
@@ -212,11 +225,25 @@ $(document).ready(function($) { | |||
var denomination = $('#token_name').text(); | |||
var original_amount = $('#original_amount').val(); | |||
var net = round(original_amount - tc, 2); | |||
var over = round((original_amount - get_total_cost())*-1, 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infix operators must be spaced. (space-infix-ops)
Codecov Report
@@ Coverage Diff @@
## master #2365 +/- ##
==========================================
- Coverage 29.48% 29.47% -0.02%
==========================================
Files 146 146
Lines 11771 11777 +6
Branches 1597 1599 +2
==========================================
Hits 3471 3471
- Misses 8182 8188 +6
Partials 118 118
Continue to review full report at Codecov.
|
float: left; | ||
padding-right: 10px; | ||
} | ||
.overageAlert> div:last-child { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>
- cosmetic whitespace missing 😄
LGTM; Just that one cosmetic one-liner to fix 😄 |
Recommended by @pixiebell. Thanks for the review!
Thanks for the review! Just pushed out the fix in the new commit :). Edit: Apologies for misspelling your Github username in the commit log. Edit 2: Codecov errors are not related to these commits. Branch is safe to merge. |
@@ -166,7 +170,16 @@ $(document).ready(function($) { | |||
_alert('You do not have any transactions to payout. Please add payees to the form.', 'error'); | |||
return; | |||
} | |||
var usernames = $('.username'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encourage moving to let / const as opposed to var ?
cause we've got the ES6 support coming in this week
var usernames = $('.username'); | ||
|
||
for (var i = 0; i < usernames.length; i++) { | ||
var username = usernames[i].textContent.trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -120,6 +153,15 @@ <h5>{% trans 'Payout Preview' %}</h5> | |||
</a> | |||
</div> | |||
</div> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the extra line ?
@thelostone-mc I had to add those since there seemed to be a merge error otherwise. I can rebase from default, restructure, and push out another commit tonight. And, sure, I'll change variable declaration to follow ES6 standards as well. |
Description
This PR resolves #2294 by introducing:
See it in action!
Checklist
Affected core subsystem(s)
UI is the only core system affected, since all changes are aesthetic.
Testing
Tested across two environments across two platforms (W10, Mojave). Feel free to test yourself as well.
Refers/Fixes
Fixes #2294.