Skip to content
Snippets Groups Projects
Commit 18237c58 authored by Alexander Reifschneider's avatar Alexander Reifschneider
Browse files

OZG-6185 Add styling to step 2

parent d6e250e3
No related branches found
No related tags found
2 merge requests!43Bescheid refactoring Schritte 2 und 3,!33OZG-6185 refactor dokumente hochladen
Showing
with 52 additions and 50 deletions
<div class="mt-4">
@if (bescheidResource | hasLink: BescheidLinkRel.CREATE_DOCUMENT) { @if (bescheidResource | hasLink: BescheidLinkRel.CREATE_DOCUMENT) {
<ods-button-card <ods-button-card
class="w-72" class="w-72"
...@@ -11,4 +10,3 @@ ...@@ -11,4 +10,3 @@
<ods-bescheid-generate-icon icon /> <ods-bescheid-generate-icon icon />
</ods-button-card> </ods-button-card>
} }
</div>
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<div class="flex flex-col gap-4">
<alfa-bescheid-wizard-create-document-button-container <alfa-bescheid-wizard-create-document-button-container
[bescheidResource]="bescheidResource" [bescheidResource]="bescheidResource"
data-test-id="create-document-button" data-test-id="create-document-button"
...@@ -42,3 +43,4 @@ ...@@ -42,3 +43,4 @@
data-test-id="weiter-button" data-test-id="weiter-button"
></alfa-bescheid-wizard-weiter-button> ></alfa-bescheid-wizard-weiter-button>
} }
</div>
...@@ -25,9 +25,15 @@ ...@@ -25,9 +25,15 @@
--> -->
@if (isBescheidDocumentMissing) { @if (isBescheidDocumentMissing) {
<p data-test-id="missing-bescheid-document-error-message" class="text-base text-error"> <p data-test-id="missing-bescheid-document-error-message" class="my-4 text-base text-error">
Bitte fügen Sie ein Bescheiddokument hinzu. Bitte fügen Sie ein Bescheiddokument hinzu.
</p> </p>
} }
<alfa-bescheid-wizard-document-file-container data-test-id="bescheid-document-file"></alfa-bescheid-wizard-document-file-container> <div class="my-4">
<alfa-bescheid-wizard-attachment-files-container data-test-id="bescheid-attachment-files"></alfa-bescheid-wizard-attachment-files-container> <alfa-bescheid-wizard-document-file-container data-test-id="bescheid-document-file">
</alfa-bescheid-wizard-document-file-container>
</div>
<div class="my-4">
<alfa-bescheid-wizard-attachment-files-container data-test-id="bescheid-attachment-files">
</alfa-bescheid-wizard-attachment-files-container>
</div>
<div [formGroup]="formService.form" class="mt-4"> <div [formGroup]="formService.form">
<ods-file-upload-editor <ods-file-upload-editor
[parentFormArrayName]="formServiceClass.FIELD_ATTACHMENTS" [parentFormArrayName]="formServiceClass.FIELD_ATTACHMENTS"
[uploadInProgress]="upload" [uploadInProgress]="upload"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
(clickEmitter)="clickEmitter.emit()" (clickEmitter)="clickEmitter.emit()"
variant="primary" variant="primary"
size="medium" size="medium"
class="mt-8 flex" class="mt-4 flex"
text="Weiter" text="Weiter"
dataTestId="bescheid-weiter-button" dataTestId="bescheid-weiter-button"
> >
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<button <button
*ngIf="deletable" *ngIf="deletable"
class="flex size-10 items-center justify-center rounded-md hover:border hover:border-grayborder hover:bg-background-50" class="flex size-10 items-center justify-center rounded-md hover:border hover:border-grayborder hover:bg-background-50"
(click)="deleteFile()" (click)="deleteFile($event)"
title="Anhang löschen" title="Anhang löschen"
aria-label="Anhang löschen Button" aria-label="Anhang löschen Button"
> >
......
...@@ -89,10 +89,11 @@ describe('BinaryFile2Component', () => { ...@@ -89,10 +89,11 @@ describe('BinaryFile2Component', () => {
describe('click on delete button', () => { describe('click on delete button', () => {
it('should emit delete', () => { it('should emit delete', () => {
const clickEvent = new Event('');
jest.spyOn(component.startDelete, 'emit'); jest.spyOn(component.startDelete, 'emit');
component.file = createBinaryFileResource(); component.file = createBinaryFileResource();
component.deleteFile(); component.deleteFile(clickEvent);
expect(component.startDelete.emit).toHaveBeenCalledWith(component.file); expect(component.startDelete.emit).toHaveBeenCalledWith(component.file);
}); });
......
...@@ -22,11 +22,7 @@ ...@@ -22,11 +22,7 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen. * unter der Lizenz sind dem Lizenztext zu entnehmen.
*/ */
import { ApiDownloadToken } from '@alfa-client/api-root-shared'; import { ApiDownloadToken } from '@alfa-client/api-root-shared';
import { import { BinaryFileIcon, BinaryFileLinkRel, BinaryFileResource } from '@alfa-client/binary-file-shared';
BinaryFileIcon,
BinaryFileLinkRel,
BinaryFileResource,
} from '@alfa-client/binary-file-shared';
import { StateResource, createEmptyStateResource } from '@alfa-client/tech-shared'; import { StateResource, createEmptyStateResource } from '@alfa-client/tech-shared';
import { HttpParams } from '@angular/common/http'; import { HttpParams } from '@angular/common/http';
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
...@@ -45,10 +41,8 @@ export class BinaryFile2Component { ...@@ -45,10 +41,8 @@ export class BinaryFile2Component {
readonly fileLinkRel = BinaryFileLinkRel; readonly fileLinkRel = BinaryFileLinkRel;
@Output() public startDownload: EventEmitter<BinaryFileResource> = @Output() public startDownload: EventEmitter<BinaryFileResource> = new EventEmitter<BinaryFileResource>();
new EventEmitter<BinaryFileResource>(); @Output() public startDelete: EventEmitter<BinaryFileResource> = new EventEmitter<BinaryFileResource>();
@Output() public startDelete: EventEmitter<BinaryFileResource> =
new EventEmitter<BinaryFileResource>();
@Output() public getDownloadToken: EventEmitter<void> = new EventEmitter<void>(); @Output() public getDownloadToken: EventEmitter<void> = new EventEmitter<void>();
get isDisabled(): boolean { get isDisabled(): boolean {
...@@ -71,7 +65,8 @@ export class BinaryFile2Component { ...@@ -71,7 +65,8 @@ export class BinaryFile2Component {
this.startDownload.emit(this.file); this.startDownload.emit(this.file);
} }
deleteFile(): void { deleteFile(e: Event): void {
e.stopPropagation();
this.startDelete.emit(this.file); this.startDelete.emit(this.file);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment