Adds helper functions to check for holdable or holder Facet of a need
@@ -120,6 +120,20 @@ export function hasGroupFacet(need) {
);
}
+export function hasHoldableFacet(need) {
+ return (
+ getIn(need, ["content", "facets"]) &&
+ getIn(need, ["content", "facets"]).contains(won.WON.HoldableFacetCompacted)
+ );
+}
+
+export function hasHolderFacet(need) {
+ return (
+ getIn(need, ["content", "facets"]) &&
+ getIn(need, ["content", "facets"]).contains(won.WON.HolderFacetCompacted)
+ );
+}
+
export function hasSuggestedConnections(need) {
return (
get(need, "connections") &&
