diff --git a/screens/Proximo/ProximoListScreen.js b/screens/Proximo/ProximoListScreen.js index d1300c1..f3fabb3 100644 --- a/screens/Proximo/ProximoListScreen.js +++ b/screens/Proximo/ProximoListScreen.js @@ -132,6 +132,17 @@ export default class ProximoListScreen extends React.Component { this.setSortMode(this.state.currentSortMode, this.state.isSortReversed); } + getStockColor(availableStock: number) { + let color : string; + if (availableStock > 3) + color = ThemeManager.getCurrentThemeVariables().brandSuccess; + else if (availableStock > 0) + color = ThemeManager.getCurrentThemeVariables().brandWarning; + else + color = ThemeManager.getCurrentThemeVariables().brandDanger; + return color; + } + /** * Set the sort menu icon based on the given mode. * @@ -221,7 +232,9 @@ export default class ProximoListScreen extends React.Component { {item.name} - + {item.quantity + ' ' + i18n.t('proximoScreen.inStock')}