fix(recommendation): use displayed skin age across reports and admin
This commit is contained in:
@@ -181,6 +181,10 @@
|
||||
// Refresh only presentation for old snapshots: scores, selected care order,
|
||||
// product and original stored objects are never rewritten/recomputed.
|
||||
function forDisplay(vm, result, saved) {
|
||||
if (saved && vm.recommendation && vm.recommendation.ageBasis === 'display') {
|
||||
var product=products.filter(function(p){return p.tier === vm.recommendation.tier;})[0] || null;
|
||||
if(saved.product!==product)saved = Object.assign({}, saved, { product: product });
|
||||
}
|
||||
if (!saved || (saved.gradeRule === gradeRule && saved.copyRule === copyRule)) return saved || build(vm, result);
|
||||
var current = build(vm, result);
|
||||
var care = (saved.care || []).map(function(item) {
|
||||
|
||||
Reference in New Issue
Block a user