From 47110b8e08e70ea74ca5de46ce2e5f238dd4c015 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Thu, 18 May 2023 16:13:45 +0200 Subject: [PATCH 1/3] Updated ClarinItemViewBox --- .../clarin-item-box-view.component.html | 7 +++++-- .../clarin-item-box-view.component.scss | 11 ++++++++--- .../clarin-item-box-view.component.ts | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html index b38709fbfbd..2da6b9a1c74 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html @@ -28,12 +28,15 @@
- +
+ {{licenseType }}
- +
+
+
diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss index 6ad19d35700..b3c03e445a9 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss @@ -46,6 +46,8 @@ color: #fff; border-radius: 0 0.25em 0.25em 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + border: 1px solid #ddd; + border-bottom: none; } .label-icon { @@ -53,15 +55,18 @@ } .label-PUB { - background-color: #5cb811; + background-color: #dff0d8 !important; + color: #5cb811 !important;; } .label-RES { - background-color: #c62d1f; + color: #c62d1f !important; + background-color: #f2dede !important; } .label-ACA, .label-PDT { - background-color: #ffab23; + color: #ffab23 !important; + background-color: #fcf8e3 !important; } .label-license { diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts index a7befd62964..6908634edc1 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts @@ -203,7 +203,8 @@ export class ClarinItemBoxViewComponent implements OnInit { clarinLicense.extendedClarinLicenseLabels.forEach(extendedCll => { this.licenseLabelIcons.push(extendedCll?.icon); }); - this.licenseLabelIcons.push(clarinLicense?.clarinLicenseLabel?.icon); + // For now show only extended CLL icons + // this.licenseLabelIcons.push(clarinLicense?.clarinLicenseLabel?.icon); }); } From 3356679d11a1bc35d2dc6f7fe1e77ddda9b701ef Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Fri, 19 May 2023 14:10:47 +0200 Subject: [PATCH 2/3] Fixed NewHandleComponent tess --- .../new-handle-page.component.spec.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts index a81901b0ffe..6a92aaaa68c 100644 --- a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts +++ b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts @@ -1,4 +1,4 @@ -import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing'; +import {ComponentFixture, fakeAsync, TestBed, waitForAsync} from '@angular/core/testing'; import { NewHandlePageComponent } from './new-handle-page.component'; import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub'; import { of as observableOf } from 'rxjs'; @@ -13,6 +13,8 @@ import { getMockTranslateService } from '../../shared/mocks/translate.service.mo import { Store } from '@ngrx/store'; import { HandleDataService } from '../../core/data/handle-data.service'; import { mockCreatedHandleRD$ } from '../../shared/mocks/handle-mock'; +import { PaginationService } from '../../core/pagination/pagination.service'; +import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; /** * The test class for the NewHandlePageComponent. @@ -23,6 +25,7 @@ describe('NewHandlePageComponent', () => { let notificationService: NotificationsServiceStub; let handleDataService: HandleDataService; + let paginationService: PaginationServiceStub; const successfulResponse = { response: { @@ -31,6 +34,7 @@ describe('NewHandlePageComponent', () => { beforeEach(async () => { notificationService = new NotificationsServiceStub(); + paginationService = new PaginationServiceStub(); handleDataService = jasmine.createSpyObj('handleDataService', { create: mockCreatedHandleRD$, @@ -49,6 +53,8 @@ describe('NewHandlePageComponent', () => { providers: [ { provide: NotificationsService, useValue: notificationService }, { provide: HandleDataService, useValue: handleDataService }, + { provide: PaginationService, useValue: paginationService }, + { provide: TranslateService, useValue: getMockTranslateService() }, { provide: Store, useValue: { // tslint:disable-next-line:no-empty @@ -77,12 +83,12 @@ describe('NewHandlePageComponent', () => { }); // TODO fix this failing test later. It fails in the Github but locally it works. - // it('should notify after successful request', () => { + // it('should notify after successful request',waitForAsync(() => { // component.onClickSubmit('new handle'); // // fixture.whenStable().then(() => { // expect((component as any).notificationsService.success).toHaveBeenCalled(); // expect((component as any).notificationsService.error).not.toHaveBeenCalled(); // }); - // }); + // })); }); From 4ced43dfaeae7fc0b3cb218f8e51993579761e82 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Fri, 19 May 2023 14:11:41 +0200 Subject: [PATCH 3/3] Removed unused imports --- .../new-handle-page/new-handle-page.component.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts index 6a92aaaa68c..390885e89f7 100644 --- a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts +++ b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts @@ -1,4 +1,4 @@ -import {ComponentFixture, fakeAsync, TestBed, waitForAsync} from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NewHandlePageComponent } from './new-handle-page.component'; import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub'; import { of as observableOf } from 'rxjs'; @@ -7,7 +7,6 @@ import { CommonModule } from '@angular/common'; import { ReactiveFormsModule } from '@angular/forms'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; -import { RequestService } from '../../core/data/request.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { getMockTranslateService } from '../../shared/mocks/translate.service.mock'; import { Store } from '@ngrx/store';