Skip to content

Commit

Permalink
Merge pull request #81 from button-inc/mk-genericmat-fix
Browse files Browse the repository at this point in the history
small fix for using wrong generic material image path
  • Loading branch information
monicakochofar authored Sep 21, 2023
2 parents c979757 + b0316e6 commit 566e551
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app_vue/src/utils/mapMarkerHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ const getBinIconName = (sensor) => {

export const getMaterialTypeIconURL = (materialType) => {
const directory = 'src/assets/images/materialTypeIcons';
const genericMaterialIconPath = `${directory}/generic-material.svg`;
if (!materialType) {
return 'src/assets/images/generic-material.png';
return genericMaterialIconPath;
}
const materialMap = {
'Cardboard': `${directory}/cardboard.svg`, //confirmed
Expand All @@ -32,7 +33,7 @@ export const getMaterialTypeIconURL = (materialType) => {
'Gas Oil': `${directory}/oil-drum.svg`,
'Mixed waste': `${directory}/trash.svg`
};
return materialMap[materialType] || 'src/assets/images/generic-material.png';
return materialMap[materialType] || genericMaterialIconPath;
}

// linearProgressColor -> used by Vuetify to determine progress bar color
Expand Down Expand Up @@ -70,4 +71,4 @@ export const getIconAndProgressColor = (sensor) => {
return { iconUrl, linearProgressColor };
}

export default getIconAndProgressColor
export default getIconAndProgressColor

0 comments on commit 566e551

Please sign in to comment.