adds some notes to the setVariantStatusColor

This commit is contained in:
Shannon
2018-04-20 13:44:20 +10:00
parent d99beb0c8b
commit 9325d30e7c

View File

@@ -225,18 +225,23 @@ Use this directive to construct a header inside the main editor window.
});
}
//TODO: This doesn't really affect any UI currently, need some feedback from mads
function setVariantStatusColor(variants) {
angular.forEach(variants, function (variant) {
angular.forEach(variant.states, function(state){
switch (state.name) {
case "Published":
case "Published +":
state.stateColor = "success";
break;
default:
state.stateColor = "gray";
}
});
//TODO: What about variant.exists? If we are applying colors/styles, this should be one of them
switch (variant.state) {
case "Published":
variant.stateColor = "success";
break;
case "Unpublished":
//TODO: Not sure if these statuses will ever bubble up to the UI?
case "Publishing":
case "Unpublishing":
default:
variant.stateColor = "gray";
}
});
}