From 8136826c6d6c979d6c20a8c2b0ec3d0936dcf064 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 13 Apr 2023 16:12:49 +0200 Subject: [PATCH] Added missing typedoc --- .../shared/badges/badges.component.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/app/shared/object-collection/shared/badges/badges.component.ts b/src/app/shared/object-collection/shared/badges/badges.component.ts index f1e2302815..c66fed35fc 100644 --- a/src/app/shared/object-collection/shared/badges/badges.component.ts +++ b/src/app/shared/object-collection/shared/badges/badges.component.ts @@ -2,6 +2,9 @@ import { Component, Input } from '@angular/core'; import { Context } from 'src/app/core/shared/context.model'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; +/** + * List of MyDSpace Status Contexts + */ const MY_DSPACE_STATUS_CONTEXTS = [ Context.MyDSpaceArchived, Context.MyDSpaceWorkspace, @@ -11,15 +14,33 @@ const MY_DSPACE_STATUS_CONTEXTS = [ Context.MyDSpaceWaitingController, Context.MyDSpaceValidation ]; + +/** + * Component that renders all the badges for a listable object + */ @Component({ selector: 'ds-badges', templateUrl: './badges.component.html', styleUrls: ['./badges.component.scss'] }) export class BadgesComponent { + /** + * The DSpaceObject to render the badge for + */ @Input() object: DSpaceObject; + /** + * The context that the badge is rendered in + */ @Input() context?: Context; + + /** + * Whether or not to show the access status + */ @Input() showAccessStatus = false; + + /** + * Returns whether or not this context is a MyDSpace status context + */ get isMyDSpaceStatus(): boolean { return MY_DSPACE_STATUS_CONTEXTS.includes(this.context); }