Skip to content
Snippets Groups Projects
Commit 4675fab3 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5590 OZG-5596 Bescheiddaten

parent a2e09003
Branches
Tags
No related merge requests found
Showing
with 141 additions and 64 deletions
<ozgcloud-spinner [stateResource]="bescheidStateResource"> <ozgcloud-spinner [stateResource]="bescheidStateResource">
<ng-container *ngIf="bescheidStateResource.resource as bescheid"> <ng-container *ngIf="bescheidStateResource.resource as bescheid">
<ozgcloud-expansion-panel headline="Bescheid"> <ozgcloud-expansion-panel headline="Bescheid">
<p class="flex text-text"> <div class="flex max-w-xl flex-col gap-4">
<span *ngIf="bescheidBewilligt" class="flex items-center gap-2" <ods-bescheid-status-text [dateText]="bescheid.beschiedenAm | formatFullDatePipe" />
><span>[stamp]</span> Bewilligt am {{ bescheid.beschiedenAm | formatFullDatePipe }}</span
> <alfa-binary-file2-container
<span *ngIf="bescheidAbgelehnt" class="flex items-center gap-2">
<span>[close]</span> Abgelehnt am
{{ bescheid.beschiedenAm | formatFullDatePipe }}
</span>
<span *ngIf="hasBescheidDraft" class="flex items-center gap-2">(Entwurf)</span>
</p>
<alfa-binary-file-container
*ngIf="bescheidDocumentFile.resource && bescheidDocumentFile.loaded" *ngIf="bescheidDocumentFile.resource && bescheidDocumentFile.loaded"
[file]="bescheidDocumentFile.resource" [file]="bescheidDocumentFile.resource"
data-test-id="bescheid-document-in-vorgang-binary-file" data-test-id="bescheid-document-in-vorgang-binary-file"
> >
</alfa-binary-file-container> </alfa-binary-file2-container>
</div>
</ozgcloud-expansion-panel> </ozgcloud-expansion-panel>
</ng-container> </ng-container>
</ozgcloud-spinner> </ozgcloud-spinner>
<ul> <div class="flex max-w-xl flex-col gap-4">
<li <ods-bescheid-container
*ngFor="let bescheid of bescheidList | toEmbeddedResources: bescheidListLinkRel.BESCHEID_LIST" *ngFor="let bescheid of bescheidList | toEmbeddedResources: bescheidListLinkRel.BESCHEID_LIST"
> >
<div class="flex flex-row"> <div class="flex flex-row">
<!-- TODO Nach Umstellung der Componenten <alfa-vorgang-detail-bescheiden-result-status> nutzen --> <!-- TODO Nach Umstellung der Componenten <alfa-vorgang-detail-bescheiden-result-status> nutzen -->
<p class="flex text-text"> <p class="flex gap-2 text-base font-medium text-text">
<span class="flex items-center gap-2" *ngIf="bescheid.bewilligt" <span class="flex items-center gap-2" *ngIf="bescheid.bewilligt"
><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am ><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am
{{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }} {{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }}
...@@ -13,11 +13,13 @@ ...@@ -13,11 +13,13 @@
><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am ><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am
{{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }} {{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }}
</span> </span>
</p> <span
<!-- --> class="flex items-center text-error"
<span *ngIf="bescheid.status === bescheidStatus.DRAFT" data-test-class="bescheid-status-text" *ngIf="bescheid.status === bescheidStatus.DRAFT"
data-test-class="bescheid-status-text"
>(Entwurf)</span >(Entwurf)</span
> >
</p>
</div> </div>
<alfa-document-in-bescheid-container <alfa-document-in-bescheid-container
*ngIf="bescheid | hasLink: bescheidLinkRel.BESCHEID_DOCUMENT" *ngIf="bescheid | hasLink: bescheidLinkRel.BESCHEID_DOCUMENT"
...@@ -32,5 +34,5 @@ ...@@ -32,5 +34,5 @@
[resource]="bescheid" [resource]="bescheid"
[linkRel]="bescheidLinkRel.ATTACHMENTS" [linkRel]="bescheidLinkRel.ATTACHMENTS"
></alfa-binary-file-list-container> ></alfa-binary-file-list-container>
</li> </ods-bescheid-container>
</ul> </div>
<ng-container *ngIf="documentStateResource$ | async as documentStateResource"> <ng-container *ngIf="documentStateResource$ | async as documentStateResource">
<ods-attachment-container>
<alfa-binary-file-uri-container <alfa-binary-file-uri-container
*ngIf="documentStateResource.resource | hasLink: documentLinkRel.FILE" *ngIf="documentStateResource.resource | hasLink: documentLinkRel.FILE"
data-test-class="binary-file-uri-container" data-test-class="binary-file-uri-container"
[binaryFileUri]="documentStateResource.resource | getUrl: documentLinkRel.FILE" [binaryFileUri]="documentStateResource.resource | getUrl: documentLinkRel.FILE"
></alfa-binary-file-uri-container> ></alfa-binary-file-uri-container>
</ods-attachment-container>
</ng-container> </ng-container>
...@@ -15,6 +15,8 @@ import { BeschiedenDateInVorgangContainerComponent } from './beschieden-date-in- ...@@ -15,6 +15,8 @@ import { BeschiedenDateInVorgangContainerComponent } from './beschieden-date-in-
import { CreateBescheidButtonContainerComponent } from './create-bescheid-button-container/create-bescheid-button-container.component'; import { CreateBescheidButtonContainerComponent } from './create-bescheid-button-container/create-bescheid-button-container.component';
import { CreateBescheidButtonComponent } from './create-bescheid-button-container/create-bescheid-button/create-bescheid-button.component'; import { CreateBescheidButtonComponent } from './create-bescheid-button-container/create-bescheid-button/create-bescheid-button.component';
import { BescheidContainerComponent, BescheidStatusTextComponent } from '@ods/system';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
...@@ -23,6 +25,8 @@ import { CreateBescheidButtonComponent } from './create-bescheid-button-containe ...@@ -23,6 +25,8 @@ import { CreateBescheidButtonComponent } from './create-bescheid-button-containe
TechSharedModule, TechSharedModule,
UiModule, UiModule,
CommandSharedModule, CommandSharedModule,
BescheidStatusTextComponent,
BescheidContainerComponent,
], ],
declarations: [ declarations: [
CreateBescheidButtonContainerComponent, CreateBescheidButtonContainerComponent,
......
<ng-container *ngIf="bescheid$ | async as bescheid"> <ng-container *ngIf="bescheid$ | async as bescheid">
<p class="flex text-text"> <div class="flex items-center gap-1 text-text">
<span class="flex items-center gap-2">
<mat-icon <mat-icon
*ngIf="bescheid.bewilligt" *ngIf="bescheid.bewilligt"
data-test-id="bewilligt-icon" data-test-id="bewilligt-icon"
svgIcon="stamp" svgIcon="stamp"
class="text-bewilligt" class="text-bewilligt"
></mat-icon> ></mat-icon>
<!-- TODO UI/UX: "close" als svgIcon bereitstellen -->
<mat-icon *ngIf="!bescheid.bewilligt" data-test-id="abgelehnt-icon" class="text-abgelehnt" <mat-icon *ngIf="!bescheid.bewilligt" data-test-id="abgelehnt-icon" class="text-abgelehnt"
>close</mat-icon >close</mat-icon
> >
</span>
{{ bescheid.beschiedenAm | formatFullDatePipe }} {{ bescheid.beschiedenAm | formatFullDatePipe }}
</p> </div>
</ng-container> </ng-container>
<ods-attachment-container>
<alfa-binary-file-list <alfa-binary-file-list
[binaryFileListStateResource]="binaryFileListStateResource$ | async" [binaryFileListStateResource]="binaryFileListStateResource$ | async"
></alfa-binary-file-list> ></alfa-binary-file-list>
</ods-attachment-container>
<ng-container *ngIf="binaryFileStateResource$ | async as binaryFileStateResource"> <ng-container *ngIf="binaryFileStateResource$ | async as binaryFileStateResource">
<ods-attachment-container>
<alfa-binary-file2-container <alfa-binary-file2-container
*ngIf="binaryFileStateResource.resource as binaryFile" *ngIf="binaryFileStateResource.resource as binaryFile"
data-test-class="binary-file-container" data-test-class="binary-file-container"
...@@ -6,4 +7,5 @@ ...@@ -6,4 +7,5 @@
[isLoading]="binaryFileStateResource.loading" [isLoading]="binaryFileStateResource.loading"
[deletable]="false" [deletable]="false"
></alfa-binary-file2-container> ></alfa-binary-file2-container>
</ods-attachment-container>
</ng-container> </ng-container>
export * from './lib/attachment-container/attachment-container.component'; export * from './lib/attachment-container/attachment-container.component';
export * from './lib/attachment/attachment.component'; export * from './lib/attachment/attachment.component';
export * from './lib/bescheid-container/bescheid-container.component';
export * from './lib/bescheid-status-text/bescheid-status-text.component';
export * from './lib/button-card/button-card.component'; export * from './lib/button-card/button-card.component';
export * from './lib/button/button.component'; export * from './lib/button/button.component';
export * from './lib/form/error-message/error-message.component'; export * from './lib/form/error-message/error-message.component';
......
...@@ -6,7 +6,7 @@ import { Component } from '@angular/core'; ...@@ -6,7 +6,7 @@ import { Component } from '@angular/core';
standalone: true, standalone: true,
imports: [CommonModule], imports: [CommonModule],
template: `<div template: `<div
class="mb-6 block overflow-hidden rounded-md border border-black/25 shadow empty:hidden" class="block overflow-hidden rounded-md border border-black/25 shadow empty:hidden"
> >
<ng-content></ng-content> <ng-content></ng-content>
</div>`, </div>`,
......
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BescheidContainerComponent } from './bescheid-container.component';
describe('BescheidContainerComponent', () => {
let component: BescheidContainerComponent;
let fixture: ComponentFixture<BescheidContainerComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [BescheidContainerComponent],
}).compileComponents();
fixture = TestBed.createComponent(BescheidContainerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
@Component({
selector: 'ods-bescheid-container',
standalone: true,
imports: [CommonModule],
template: ` <article class="flex flex-col gap-4 rounded-lg bg-background-200 p-4">
<ng-content></ng-content>
</article>`,
})
export class BescheidContainerComponent {}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BescheidStatusTextComponent } from './bescheid-status-text.component';
describe('BescheidStatusTextComponent', () => {
let component: BescheidStatusTextComponent;
let fixture: ComponentFixture<BescheidStatusTextComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [BescheidStatusTextComponent],
}).compileComponents();
fixture = TestBed.createComponent(BescheidStatusTextComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
@Component({
selector: 'ods-bescheid-status-text',
standalone: true,
imports: [CommonModule],
template: ` <p class="flex justify-center text-base font-bold text-text">
<span class="flex items-center gap-2" *ngIf="bewilligt"
><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am
{{ dateText }}
</span>
<span class="flex items-center gap-2" *ngIf="!bewilligt"
><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am
{{ dateText }}
</span>
<span *ngIf="hasBescheidDraft" class="flex items-center gap-2">(Entwurf)</span>
</p>`,
})
export class BescheidStatusTextComponent {
@Input({ required: true }) dateText: string = '';
@Input() bewilligt: boolean = false;
@Input() hasBescheidDraft: boolean = false;
}
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
[vorgangWithEingang]="vorgangResource" [vorgangWithEingang]="vorgangResource"
></alfa-vorgang-detail-formular-daten> ></alfa-vorgang-detail-formular-daten>
<div class="section" *ngIf="vorgangResource | hasLink: vorgangWithEingangLinkRel.BESCHEIDE"> <div *ngIf="vorgangResource | hasLink: vorgangWithEingangLinkRel.BESCHEIDE">
<ozgcloud-expansion-panel headline="Bescheid"> <ozgcloud-expansion-panel headline="Bescheid">
<alfa-bescheid-list-in-vorgang-container <alfa-bescheid-list-in-vorgang-container
data-test-id="bescheid-container-in-vorgang" data-test-id="bescheid-container-in-vorgang"
......
...@@ -25,15 +25,13 @@ ...@@ -25,15 +25,13 @@
--> -->
<alfa-vorgang-status-dot [status]="vorgang.status" class="status-dot"></alfa-vorgang-status-dot> <alfa-vorgang-status-dot [status]="vorgang.status" class="status-dot"></alfa-vorgang-status-dot>
<div class="status"> <div class="flex flex-row items-center gap-7">
<alfa-vorgang-status-text <alfa-vorgang-status-text
[status]="vorgang.status" [status]="vorgang.status"
data-test-id="status-text" data-test-id="status-text"
class="status-text" class="status-text"
></alfa-vorgang-status-text> ></alfa-vorgang-status-text>
<alfa-beschieden-date-in-vorgang-container <alfa-beschieden-date-in-vorgang-container></alfa-beschieden-date-in-vorgang-container>
class="beschieden-date"
></alfa-beschieden-date-in-vorgang-container>
</div> </div>
<div class="initial-date" data-test-id="created-at"> <div class="initial-date" data-test-id="created-at">
......
...@@ -108,9 +108,5 @@ mat-icon { ...@@ -108,9 +108,5 @@ mat-icon {
.status { .status {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
}
.beschieden-date {
padding-left: 2rem;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment