diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.html b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.html index 298c59138de6107079d0e2c83e2991958d6912ef..e706958af00fc6823fbb39313ae387056fe11dcf 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.html +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.html @@ -4,28 +4,38 @@ | hasLink: collaborationListLinkRel.CREATE_COLLABORATION_REQUEST " > - <ng-template #anfrageErstellenButton> - <ods-button - variant="outline" - text="Anfrage erstellen" - dataTestId="anfrage-erstellen-button" - (clickEmitter)="showRequestForm.emit()" - > - <ods-collaboration-icon icon /> - </ods-button> - </ng-template> + <ng-container *ngIf="!collaboration" data-test-id="collaboration-in-progres"> + <ng-template #anfrageErstellenButton> + <ods-button + variant="outline" + text="Anfrage erstellen" + dataTestId="anfrage-erstellen-button" + (clickEmitter)="showRequestForm.emit()" + > + <ods-collaboration-icon icon /> + </ods-button> + </ng-template> - <ng-container *ngIf="isRequestFormVisible; else anfrageErstellenButton"> - <alfa-collaboration-request-form - data-test-id="collaboration-request-form" - [collaborationListResource]="collaborationStateListResource.resource" - (hide)="hideRequestForm.emit()" - (showResult)="setCollaboration($event)" - ></alfa-collaboration-request-form> + <ng-container *ngIf="isRequestFormVisible; else anfrageErstellenButton"> + <alfa-collaboration-request-form + data-test-id="collaboration-request-form" + [collaborationListResource]="collaborationStateListResource.resource" + (hide)="hideRequestForm.emit()" + (showResult)="setCollaboration($event)" + ></alfa-collaboration-request-form> + </ng-container> </ng-container> </ng-container> <ng-container *ngIf="collaboration"> <div data-test-id="collaboration-request-result"> - Result: {{ collaboration | json }} OrganisationsEinheit: {{ organisationsEinheit | json }} + <div class="flex items-center gap-3"> + <ods-office-icon size="large" class="fill-text" /> + <alfa-organisations-einheit + data-test-id="organisations-einheit-in-collaboration" + [organisationsEinheitResource]="organisationsEinheit" + ></alfa-organisations-einheit> + </div> + <h4 class="my-6 text-xl font-medium">{{ collaboration.titel }}</h4> + <p class="text-base">{{ collaboration.anfrage }}</p> </div> </ng-container> diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.spec.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.spec.ts index 71ed93f04ed34882a1a0b8bf62ea74fc11382b13..5f7ca53507fd8c029eb3454a6c1461ed5523d39c 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.spec.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang/collaboration-in-vorgang.component.spec.ts @@ -13,7 +13,7 @@ import { triggerEvent, } from '@alfa-client/test-utils'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ButtonComponent, CollaborationIconComponent } from '@ods/system'; +import { ButtonComponent, CollaborationIconComponent, OfficeIconComponent } from '@ods/system'; import { createCollaboration, createCollaborationListResource, @@ -21,6 +21,7 @@ import { import { getDataTestIdAttributeOf, getDataTestIdOf } from 'libs/tech-shared/test/data-test'; import { MockComponent } from 'ng-mocks'; import { CollaborationRequestFormComponent } from '../collaboration-request-form/collaboration-request-form.component'; +import { OrganisationsEinheitComponent } from '../collaboration-request-form/organisations-einheit-container/organisations-einheit/organisations-einheit.component'; import { CollaborationInVorgangComponent } from './collaboration-in-vorgang.component'; describe('CollaborationInVorgangComponent', () => { @@ -30,6 +31,7 @@ describe('CollaborationInVorgangComponent', () => { const anfrageErstellenButton: string = getDataTestIdAttributeOf('anfrage-erstellen-button'); const collaborationRequestForm: string = getDataTestIdOf('collaboration-request-form'); const collaborationRequestResult: string = getDataTestIdOf('collaboration-request-result'); + const collaborationInProgress: string = getDataTestIdOf('collaboration-in-progress'); const collaborationListResource: CollaborationListResource = createCollaborationListResource(); @@ -41,6 +43,8 @@ describe('CollaborationInVorgangComponent', () => { MockComponent(ButtonComponent), MockComponent(CollaborationRequestFormComponent), MockComponent(CollaborationIconComponent), + MockComponent(OfficeIconComponent), + MockComponent(OrganisationsEinheitComponent), ], }).compileComponents(); @@ -164,6 +168,14 @@ describe('CollaborationInVorgangComponent', () => { existsAsHtmlElement(fixture, collaborationRequestResult); }); + + it('should not show collaboration in progress', () => { + component.collaboration = undefined; + + fixture.detectChanges(); + + notExistsAsHtmlElement(fixture, collaborationRequestResult); + }); }); describe('set collaboration', () => { diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-form/organisations-einheit-container/organisations-einheit-container.component.html b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-form/organisations-einheit-container/organisations-einheit-container.component.html index 76fb67a05d142c765f76eaf2413abc1af5454901..26bf7894a39f4bc7fb5d5d1e07d51dc2cd2976cd 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-form/organisations-einheit-container/organisations-einheit-container.component.html +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-form/organisations-einheit-container/organisations-einheit-container.component.html @@ -2,7 +2,7 @@ *ngIf="organisationsEinheitResource$ | async as organisationsEinheitResource; else searchButton" > <div class="flex items-center gap-3"> - <ods-office-icon size="large" class="flex-none" /> + <ods-office-icon size="large" class="fill-text" /> <alfa-organisations-einheit data-test-id="organisations-einheit-in-collaboration" [organisationsEinheitResource]="organisationsEinheitResource"