chore: add some comments on what's left to do

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-09-30 11:38:25 +02:00
committed by Johan Haals
parent 8cb5d89e37
commit fa6bc2aa97
@@ -33,10 +33,8 @@ const errorFilter = (i: UNSTABLE_EntityStatusItem) =>
i.type === ENTITY_STATUS_CATALOG_PROCESSING_TYPE;
export const hasCatalogProcessingErrors = async (entity: Entity) => {
// go grab ancestors and check all items, not just the current entity
return entity?.status?.items?.filter(errorFilter).length! > 0;
const catalogApi = useApi(catalogApiRef);
const { status } = await catalogApi.getEntityStatus(entity.id);
return status.some(errorFilter);
};
/**
@@ -60,6 +58,7 @@ export const EntityProcessingErrorsPanel = () => {
* Displays a list of errors from the ancestors of the current entity.
*/
export const EntityAncestorsProcessingErrorsPanel = () => {
// move this logic into the existing component
const { entity } = useEntity();
const catalogApi = useApi(catalogApiRef);