string value of not/filled is now case insensitive

This commit is contained in:
Alex H
2023-04-19 02:36:00 +00:00
parent cc82536970
commit d6eab70ca6

View File

@@ -27,8 +27,8 @@ export default {
myVehicles: [], myVehicles: [],
selectedVehicle: null, selectedVehicle: null,
invertFullTank: false, invertFullTank: false,
filledValueString: null, filledValueString: '',
notFilledValueString: null, notFilledValueString: '',
isFullTankString: false, isFullTankString: false,
fileHeadingMap: { fileHeadingMap: {
fuelQuantity: null, fuelQuantity: null,
@@ -100,9 +100,9 @@ export default {
} }
const setFullTank = (row) => { const setFullTank = (row) => {
if (row[this.fileHeadingMap.isTankFull] === this.filledValueString) { if (row[this.fileHeadingMap.isTankFull].toLowerCase() === this.filledValueString.toLowerCase()) {
return true return true
} else if (row[this.fileHeadingMap.isTankFull] === this.notFilledValueString) { } else if (row[this.fileHeadingMap.isTankFull].toLowerCase() === this.notFilledValueString.toLowerCase()) {
return false return false
} else { } else {
// TODO: need to handle errors better // TODO: need to handle errors better