show rounded decimals for default values; handle zero as normal input

This commit is contained in:
Bilal Catic
2020-01-09 02:26:35 +01:00
parent 1a21e91796
commit aafd046063
3 changed files with 6 additions and 6 deletions

View File

@@ -86,7 +86,7 @@ const updateUnscheduledIncidentsById = (incidentFees) => {
const asyncUpdateActions = [];
incidentIds.forEach((incidentId) => {
const newFeeCharge = incidentFees[incidentId] ? parseFloat(incidentFees[incidentId]) : null;
const newFeeCharge = parseFloat(incidentFees[incidentId]);
if (newFeeCharge || (newFeeCharge === 0)){
asyncUpdateActions.push(db.unscheduledIncident.update({
@@ -150,7 +150,7 @@ const updateUnlockedIncidentsById = (incidentFees) => {
const asyncUpdateActions = [];
incidentIds.forEach((incidentId) => {
const newFeeCharge = incidentFees[incidentId] ? parseFloat(incidentFees[incidentId]) : null;
const newFeeCharge = parseFloat(incidentFees[incidentId]);
if (newFeeCharge || (newFeeCharge === 0)){
asyncUpdateActions.push(db.unlockedIncident.update({incidentLevelPrice: newFeeCharge}, {where: {id: incidentId}}));