mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-6171] Item status type badge colors
This commit is contained in:
@@ -55,34 +55,34 @@ describe('MyDSpaceItemStatusComponent', () => {
|
||||
component.status = MyDspaceItemStatusType.VALIDATION;
|
||||
fixture.detectChanges();
|
||||
expect(component.badgeContent).toBe(MyDspaceItemStatusType.VALIDATION);
|
||||
expect(component.badgeClass).toBe('text-light badge badge-warning');
|
||||
expect(component.badgeClass).toBe('text-light badge badge-validation');
|
||||
});
|
||||
|
||||
it('should init badge content and class', () => {
|
||||
component.status = MyDspaceItemStatusType.WAITING_CONTROLLER;
|
||||
fixture.detectChanges();
|
||||
expect(component.badgeContent).toBe(MyDspaceItemStatusType.WAITING_CONTROLLER);
|
||||
expect(component.badgeClass).toBe('text-light badge badge-info');
|
||||
expect(component.badgeClass).toBe('text-light badge badge-waiting-controller');
|
||||
});
|
||||
|
||||
it('should init badge content and class', () => {
|
||||
component.status = MyDspaceItemStatusType.WORKSPACE;
|
||||
fixture.detectChanges();
|
||||
expect(component.badgeContent).toBe(MyDspaceItemStatusType.WORKSPACE);
|
||||
expect(component.badgeClass).toBe('text-light badge badge-primary');
|
||||
expect(component.badgeClass).toBe('text-light badge badge-workspace');
|
||||
});
|
||||
|
||||
it('should init badge content and class', () => {
|
||||
component.status = MyDspaceItemStatusType.ARCHIVED;
|
||||
fixture.detectChanges();
|
||||
expect(component.badgeContent).toBe(MyDspaceItemStatusType.ARCHIVED);
|
||||
expect(component.badgeClass).toBe('text-light badge badge-success');
|
||||
expect(component.badgeClass).toBe('text-light badge badge-archived');
|
||||
});
|
||||
|
||||
it('should init badge content and class', () => {
|
||||
component.status = MyDspaceItemStatusType.WORKFLOW;
|
||||
fixture.detectChanges();
|
||||
expect(component.badgeContent).toBe(MyDspaceItemStatusType.WORKFLOW);
|
||||
expect(component.badgeClass).toBe('text-light badge badge-info');
|
||||
expect(component.badgeClass).toBe('text-light badge badge-workflow');
|
||||
});
|
||||
});
|
||||
|
@@ -34,19 +34,19 @@ export class MyDSpaceItemStatusComponent implements OnInit {
|
||||
this.badgeClass = 'text-light badge ';
|
||||
switch (this.status) {
|
||||
case MyDspaceItemStatusType.VALIDATION:
|
||||
this.badgeClass += 'badge-warning';
|
||||
this.badgeClass += 'badge-validation';
|
||||
break;
|
||||
case MyDspaceItemStatusType.WAITING_CONTROLLER:
|
||||
this.badgeClass += 'badge-info';
|
||||
this.badgeClass += 'badge-waiting-controller';
|
||||
break;
|
||||
case MyDspaceItemStatusType.WORKSPACE:
|
||||
this.badgeClass += 'badge-primary';
|
||||
this.badgeClass += 'badge-workspace';
|
||||
break;
|
||||
case MyDspaceItemStatusType.ARCHIVED:
|
||||
this.badgeClass += 'badge-success';
|
||||
this.badgeClass += 'badge-archived';
|
||||
break;
|
||||
case MyDspaceItemStatusType.WORKFLOW:
|
||||
this.badgeClass += 'badge-info';
|
||||
this.badgeClass += 'badge-workflow';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -204,3 +204,27 @@ ds-dynamic-form-control-container.d-none {
|
||||
}
|
||||
|
||||
|
||||
|
||||
.badge-validation {
|
||||
background-color: #{map-get($theme-colors, warning)};
|
||||
}
|
||||
|
||||
.badge-waiting-controller {
|
||||
background-color: #{map-get($theme-colors, info)};
|
||||
}
|
||||
|
||||
.badge-workspace {
|
||||
background-color: #{map-get($theme-colors, primary)};
|
||||
}
|
||||
|
||||
.badge-archived {
|
||||
background-color: #{map-get($theme-colors, success)};
|
||||
}
|
||||
|
||||
.badge-workflow {
|
||||
background-color: #{map-get($theme-colors, info)};
|
||||
}
|
||||
|
||||
.badge-item-type {
|
||||
background-color: #{map-get($theme-colors, info)};
|
||||
}
|
||||
|
Reference in New Issue
Block a user