partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 81c469cd88272543cf9ae19488d29f3a57373bda
parent e4cd430f39d079039af91ef094bbaa227c0725ef
Author: Felicia Hummel <felicia@partkeepr.com>
Date:   Tue, 13 Jun 2017 16:24:56 +0200

Fixed quantity display if project quantities are not available

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/QuantityRenderer.js | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/QuantityRenderer.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/QuantityRenderer.js @@ -23,13 +23,19 @@ Ext.define("PartKeepr.Components.ProjectReport.Renderers.QuantityRenderer", { { projectQuantities = rec.get("projectQuantities"); - for (i=0;i<projectQuantities.length;i++) { + if (projectQuantities instanceof Array) + { + for (i = 0; i < projectQuantities.length; i++) + { - titleParts.push(projectQuantities[i].projectName + ": "+ projectQuantities[i].quantity); - } + titleParts.push(projectQuantities[i].projectName + ": " + projectQuantities[i].quantity); + } - title = titleParts.join("&#013;&#010;"); - return '<span class="web-icon fugue-icon information-small-white" title="' + title + '"></span> '+v; + title = titleParts.join("&#013;&#010;"); + return '<span class="web-icon fugue-icon information-small-white" title="' + title + '"></span> ' + v; + } else { + return v; + } } },