Skip to content
Snippets Groups Projects
Commit 505b78e1 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5596 use ods-bescheid-status-text component

parent 6ebc765f
No related branches found
No related tags found
No related merge requests found
...@@ -2,25 +2,12 @@ ...@@ -2,25 +2,12 @@
<ods-bescheid-container <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"> <ods-bescheid-status-text
<!-- TODO Nach Umstellung der Componenten <alfa-vorgang-detail-bescheiden-result-status> nutzen --> [bewilligt]="bescheid.bewilligt"
<p class="flex gap-2 text-base font-medium text-text"> [dateText]="bescheid.beschiedenAm | date: 'dd.MM.yyyy'"
<span class="flex items-center gap-2" *ngIf="bescheid.bewilligt" [hasBescheidDraft]="bescheid.status === bescheidStatus.DRAFT"
><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am ></ods-bescheid-status-text>
{{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }}
</span>
<span class="flex items-center gap-2" *ngIf="!bescheid.bewilligt"
><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am
{{ bescheid.beschiedenAm | date: 'dd.MM.yyyy' }}
</span>
<span
class="flex items-center text-error"
*ngIf="bescheid.status === bescheidStatus.DRAFT"
data-test-class="bescheid-status-text"
>(Entwurf)</span
>
</p>
</div>
<alfa-document-in-bescheid-container <alfa-document-in-bescheid-container
*ngIf="bescheid | hasLink: bescheidLinkRel.BESCHEID_DOCUMENT" *ngIf="bescheid | hasLink: bescheidLinkRel.BESCHEID_DOCUMENT"
data-test-class="document-in-bescheid-container" data-test-class="document-in-bescheid-container"
......
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { CloseIconComponent } from '../icons/close-icon/close-icon.component';
import { StampIconComponent } from '../icons/stamp-icon/stamp-icon.component';
@Component({ @Component({
selector: 'ods-bescheid-status-text', selector: 'ods-bescheid-status-text',
standalone: true, standalone: true,
imports: [CommonModule], imports: [CommonModule, StampIconComponent, CloseIconComponent],
template: ` <p class="flex justify-center text-base font-bold text-text"> template: ` <p class="flex gap-2 text-base font-medium text-text">
<span class="flex items-center gap-2" *ngIf="bewilligt" <span class="flex items-center gap-2" *ngIf="bewilligt"
><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am ><ods-stamp-icon size="medium" class="fill-bewilligt" />Bewilligt am {{ dateText }}</span
{{ dateText }} >
</span>
<span class="flex items-center gap-2" *ngIf="!bewilligt" <span class="flex items-center gap-2" *ngIf="!bewilligt"
><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am ><ods-close-icon size="medium" class="fill-abgelehnt" />Abgelehnt am
{{ dateText }} {{ dateText }}
</span> </span>
<span *ngIf="hasBescheidDraft" class="flex items-center gap-2">(Entwurf)</span> <span *ngIf="hasBescheidDraft" class="flex items-center text-error">(Entwurf)</span>
</p>`, </p>`,
}) })
export class BescheidStatusTextComponent { export class BescheidStatusTextComponent {
......
...@@ -12,13 +12,13 @@ import { IconVariants, iconVariants } from '../IconClasses'; ...@@ -12,13 +12,13 @@ import { IconVariants, iconVariants } from '../IconClasses';
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
[ngClass]="[twMerge(iconVariants({ size }), 'fill-bewilligt', class)]" [ngClass]="[twMerge(iconVariants({ size }), 'fill-bewilligt', class)]"
aria-hidden="true" aria-hidden="true"
viewBox="0 0 28 28" viewBox="0 0 24 24"
fill="none" fill="none"
> >
<path <path
fill-rule="evenodd" fill-rule="evenodd"
d="M2.742 21.213h-.409a.872.872 0 0 1-.63-.252.873.873 0 0 1-.253-.631v-3.333A2.557 2.557 0 0 1 4 14.447h4.667a.786.786 0 0 0 .783-.784v-.366c0-1.823-.434-3.522-1.315-4.907a4.388 4.388 0 0 1-.685-2.393c0-1.291.571-2.544 1.511-3.372a4.534 4.534 0 0 1 3.568-1.141c2.01.227 3.678 1.823 3.982 3.802a4.755 4.755 0 0 1-.527 2.973l-.012.02c-.945 1.575-1.422 3.212-1.422 4.818v.566c0 .43.353.784.783.784H20a2.557 2.557 0 0 1 2.55 2.55v3.333a.873.873 0 0 1-.253.63.873.873 0 0 1-.63.253h-.066a2.666 2.666 0 0 1-2.3 1.334H5.032a2.642 2.642 0 0 1-2.29-1.334Zm18.041-1.766v-2.45a.787.787 0 0 0-.783-.784h-4.667a2.557 2.557 0 0 1-2.55-2.55v-.566c0-1.925.555-3.817 1.635-5.7.307-.557.452-1.198.34-1.845-.195-1.196-1.196-2.17-2.415-2.308a2.8 2.8 0 0 0-1.949.51l-.246.202c-.606.496-.93 1.269-.93 2.04 0 .53.137 1.03.417 1.479 1.017 1.648 1.582 3.647 1.582 5.822v.366a2.557 2.557 0 0 1-2.55 2.55H4a.786.786 0 0 0-.783.784v2.45h17.566Z"
clip-rule="evenodd" clip-rule="evenodd"
d="M2.4277 25.5162H1.91645C1.77079 25.5191 1.62603 25.4927 1.49076 25.4386C1.35549 25.3844 1.23246 25.3037 1.12895 25.2012C1.0261 25.0976 0.945118 24.9744 0.890792 24.8389C0.836467 24.7034 0.809911 24.5584 0.812699 24.4125V20.2462C0.815008 19.4015 1.15157 18.5921 1.74885 17.9949C2.34612 17.3976 3.15553 17.061 4.0002 17.0587H9.83395C10.0934 17.0577 10.342 16.9541 10.5254 16.7705C10.7088 16.5869 10.812 16.3382 10.8127 16.0787V15.6212C10.8127 13.3425 10.2702 11.2187 9.16895 9.48747C8.60079 8.59394 8.3034 7.55505 8.3127 6.49622C8.3127 4.88247 9.02645 3.31622 10.2014 2.28122C10.8003 1.73945 11.5081 1.33193 12.2773 1.08595C13.0465 0.839975 13.8593 0.761221 14.6614 0.854967C17.174 1.13872 19.2589 3.13372 19.6389 5.60747C19.829 6.88489 19.5978 8.18946 18.9802 9.32372L18.9652 9.34997C17.7839 11.3175 17.1877 13.3637 17.1877 15.3712V16.0787C17.1877 16.6175 17.629 17.0587 18.1665 17.0587H24.0002C24.8449 17.061 25.6543 17.3976 26.2516 17.9949C26.8488 18.5921 27.1854 19.4015 27.1877 20.2462V24.4125C27.1905 24.5584 27.1639 24.7034 27.1096 24.8389C27.0553 24.9744 26.9743 25.0976 26.8715 25.2012C26.7679 25.3037 26.6449 25.3844 26.5096 25.4386C26.3744 25.4927 26.2296 25.5191 26.084 25.5162H26.0014C25.7099 26.0216 25.2909 26.4416 24.7861 26.7343C24.2814 27.0269 23.7086 27.1819 23.1252 27.1837H5.29145C4.70952 27.1827 4.13818 27.028 3.63528 26.7352C3.13239 26.4423 2.7158 26.0218 2.4277 25.5162ZM24.979 23.3087V20.2462C24.9783 19.9867 24.875 19.738 24.6916 19.5544C24.5083 19.3708 24.2597 19.2672 24.0002 19.2662H18.1665C17.3218 19.2639 16.5124 18.9273 15.9151 18.3301C15.3178 17.7328 14.9813 16.9234 14.9789 16.0787V15.3712C14.9789 12.965 15.6727 10.6 17.0227 8.24747C17.4065 7.54997 17.5877 6.74872 17.4464 5.93997C17.2039 4.44497 15.9527 3.22747 14.4289 3.05497C13.5657 2.95832 12.6974 3.18598 11.9927 3.69372L11.6852 3.94497C10.9277 4.56497 10.5214 5.53122 10.5214 6.49622C10.5214 7.15747 10.6939 7.78372 11.0439 8.34372C12.3152 10.4037 13.0214 12.9025 13.0214 15.6212V16.0787C13.0191 16.9234 12.6826 17.7328 12.0853 18.3301C11.488 18.9273 10.6786 19.2639 9.83395 19.2662H4.0002C3.74071 19.2672 3.49214 19.3708 3.30877 19.5544C3.1254 19.738 3.02211 19.9867 3.02145 20.2462V23.3087H24.979Z"
/> />
</svg>`, </svg>`,
}) })
......
<p class="flex text-base font-bold text-text"> <ods-bescheid-status-text
<!-- TODO Tests ergaenzen --> [bewilligt]="bescheid.bewilligt"
<span class="flex items-center gap-2" *ngIf="bescheid.bewilligt" [dateText]="bescheid.beschiedenAm | date: 'dd.MM.yyyy'"
><mat-icon svgIcon="stamp" class="text-bewilligt"></mat-icon>Bewilligt am [hasBescheidDraft]="false"
{{ bescheid.beschiedenAm | formatFullDatePipe }} ></ods-bescheid-status-text>
</span>
<span class="flex items-center gap-2" *ngIf="!bescheid.bewilligt"
><mat-icon class="text-abgelehnt">close</mat-icon>Abgelehnt am
{{ bescheid.beschiedenAm | formatFullDatePipe }}
</span>
</p>
...@@ -52,6 +52,7 @@ import { ...@@ -52,6 +52,7 @@ import {
AttachmentContainerComponent, AttachmentContainerComponent,
AttachmentErrorComponent, AttachmentErrorComponent,
BescheidGenerateIconComponent, BescheidGenerateIconComponent,
BescheidStatusTextComponent,
BescheidUploadIconComponent, BescheidUploadIconComponent,
ButtonCardComponent, ButtonCardComponent,
CloseIconComponent, CloseIconComponent,
...@@ -158,6 +159,7 @@ const routes: Routes = [ ...@@ -158,6 +159,7 @@ const routes: Routes = [
SingleFileUploadEditorComponent, SingleFileUploadEditorComponent,
TextEditorComponent, TextEditorComponent,
TextareaEditorComponent, TextareaEditorComponent,
BescheidStatusTextComponent,
], ],
declarations: [ declarations: [
VorgangDetailPageComponent, VorgangDetailPageComponent,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment