Skip to content

Commit

Permalink
Fixed component type label in WorkgroupItem. #18
Browse files Browse the repository at this point in the history
  • Loading branch information
breity committed Mar 25, 2021
1 parent 70b599a commit 3d369f0
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { TeacherProjectService } from '../../../../services/teacherProjectService';
import * as angular from 'angular';
import { UtilService } from '../../../../services/utilService';

class WorkgroupItemController {
$translate: any;
Expand All @@ -22,9 +23,13 @@ class WorkgroupItemController {
statusClass: any;
statusText: string;
workgroupId: number;
static $inject = ['$filter', 'ProjectService'];
static $inject = ['$filter', 'ProjectService', 'UtilService'];

constructor($filter: any, private ProjectService: TeacherProjectService) {
constructor(
$filter: any,
private ProjectService: TeacherProjectService,
private UtilService: UtilService
) {
this.$translate = $filter('translate');
}

Expand Down Expand Up @@ -58,6 +63,10 @@ class WorkgroupItemController {
return !this.hiddenComponents.includes(componentId);
}

getComponentTypeLabel(componentType) {
return this.UtilService.getComponentTypeLabel(componentType);
}

update() {
switch (this.status) {
case -1:
Expand Down

0 comments on commit 3d369f0

Please sign in to comment.