diff --git a/src/js/controllerCombustibles.js b/src/js/controllerCombustibles.js index 8aa4d6d..91a8c06 100644 --- a/src/js/controllerCombustibles.js +++ b/src/js/controllerCombustibles.js @@ -4,12 +4,38 @@ angular.module('focaCrearFactura') '$scope', '$uibModalInstance', 'parametros', - function($filter, $scope, $uibModalInstance, parametros) { + function ($filter, $scope, $uibModalInstance, parametros) { $scope.mangueras = []; - + $scope.nombreProducto = parametros.nombreProducto; + $scope.colorTexto = { color: 'black' }; var productosByMangera = []; + setColorNombreProducto(); + + //TODO: Cambiar switch case con los casos de nombres de productos axion + function setColorNombreProducto() { + + // Diesel #FF852E | Euro+Diesel #6C389A | Premium #00A857 | Super #175AA5 + switch ($scope.nombreProducto) { + case 'NAFTA SUPER XXI': + $scope.colorTexto = { color: '#FF852E' }; + break; + case 'GO-INFINIA DIESEL': + $scope.colorTexto = { color: '#6C389A' }; + break; + case 'ULTRADIESEL XXI - RED': + $scope.colorTexto = { color: '#00A857' }; + break; + case 'NAFTA INFINIA': + $scope.colorTexto = { color: '#175AA5' }; + break; + default: + $scope.colorTexto = { color: 'black' }; + break; + } + } + parametros.despachos.forEach(function (despacho) { var findCsu = productosByMangera.filter(function (csu) { diff --git a/src/views/modal-combustibles.html b/src/views/modal-combustibles.html index e80e991..ef87266 100644 --- a/src/views/modal-combustibles.html +++ b/src/views/modal-combustibles.html @@ -1,41 +1,59 @@
+ + {{nombreProducto}} + +
+- | - | - | - - | -
+ | + | + | + + | +