From 1da897882759ab963190ea85c27c36b711d16628 Mon Sep 17 00:00:00 2001 From: Abdulhakeem Mustapha Date: Mon, 24 Aug 2020 14:16:12 +0100 Subject: [PATCH 1/2] Always cast hour input to int before running calcValues --- app/assets/v2/js/pages/new_bounty.js | 4 ++++ app/dashboard/templates/bounty/new_bounty.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index 3b539830460..3fd7d894247 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -8,6 +8,10 @@ window.addEventListener('dataWalletReady', function(e) { Vue.component('v-select', VueSelect.VueSelect); Vue.mixin({ methods: { + estHoursValidator: function() { + this.form.hours = parseInt(this.form.hours || 0); + this.calcValues('token'); + }, getIssueDetails: function(url) { let vm = this; diff --git a/app/dashboard/templates/bounty/new_bounty.html b/app/dashboard/templates/bounty/new_bounty.html index cdd13d553bc..d34079e1b12 100644 --- a/app/dashboard/templates/bounty/new_bounty.html +++ b/app/dashboard/templates/bounty/new_bounty.html @@ -390,7 +390,7 @@

Fund Issue

- +
From 009b1dfd370ce957dd98a7d6cd2f493a93cef041 Mon Sep 17 00:00:00 2001 From: Abdulhakeem Mustapha Date: Mon, 7 Sep 2020 10:34:20 +0100 Subject: [PATCH 2/2] Make hours round up --- app/assets/v2/js/pages/new_bounty.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index 3fd7d894247..0b6056104ab 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -9,7 +9,8 @@ Vue.component('v-select', VueSelect.VueSelect); Vue.mixin({ methods: { estHoursValidator: function() { - this.form.hours = parseInt(this.form.hours || 0); + this.form.hours = parseFloat(this.form.hours || 0); + this.form.hours = Math.ceil(this.form.hours); this.calcValues('token'); }, getIssueDetails: function(url) {