From bbb76911399edbff3bbe05cc00e2335db791c349 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Sun, 26 May 2019 17:25:38 +0800 Subject: [PATCH] support buildingBlocks with a price as an expression --- src/config/projectWizard/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/projectWizard/index.js b/src/config/projectWizard/index.js index 228c54b07..fca95a9fc 100644 --- a/src/config/projectWizard/index.js +++ b/src/config/projectWizard/index.js @@ -596,7 +596,8 @@ export function getProductEstimate(projectTemplate, projectData) { maxTime = _.get(projectTemplate, 'scope.baseTimeEstimateMax', 0) } else { _.forEach(matchedBlocks, bb => { - price += bb.price + const bbPrice = _.isString(bb.price) ? evaluate(bb.price, flatProjectData) : bb.price + price += bbPrice minTime += bb.minTime maxTime += bb.maxTime })