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
Branches
Tags
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) {
<ods-button-card
class="w-72"
......@@ -11,4 +10,3 @@
<ods-bescheid-generate-icon icon />
</ods-button-card>
}
</div>
......@@ -23,6 +23,7 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<div class="flex flex-col gap-4">
<alfa-bescheid-wizard-create-document-button-container
[bescheidResource]="bescheidResource"
data-test-id="create-document-button"
......@@ -42,3 +43,4 @@
data-test-id="weiter-button"
></alfa-bescheid-wizard-weiter-button>
}
</div>
......@@ -25,9 +25,15 @@
-->
@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.
</p>
}
<alfa-bescheid-wizard-document-file-container data-test-id="bescheid-document-file"></alfa-bescheid-wizard-document-file-container>
<alfa-bescheid-wizard-attachment-files-container data-test-id="bescheid-attachment-files"></alfa-bescheid-wizard-attachment-files-container>
<div class="my-4">
<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
[parentFormArrayName]="formServiceClass.FIELD_ATTACHMENTS"
[uploadInProgress]="upload"
......
......@@ -28,7 +28,7 @@
(clickEmitter)="clickEmitter.emit()"
variant="primary"
size="medium"
class="mt-8 flex"
class="mt-4 flex"
text="Weiter"
dataTestId="bescheid-weiter-button"
>
......
......@@ -37,7 +37,7 @@
<button
*ngIf="deletable"
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"
aria-label="Anhang löschen Button"
>
......
......@@ -89,10 +89,11 @@ describe('BinaryFile2Component', () => {
describe('click on delete button', () => {
it('should emit delete', () => {
const clickEvent = new Event('');
jest.spyOn(component.startDelete, 'emit');
component.file = createBinaryFileResource();
component.deleteFile();
component.deleteFile(clickEvent);
expect(component.startDelete.emit).toHaveBeenCalledWith(component.file);
});
......
......@@ -22,11 +22,7 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { ApiDownloadToken } from '@alfa-client/api-root-shared';
import {
BinaryFileIcon,
BinaryFileLinkRel,
BinaryFileResource,
} from '@alfa-client/binary-file-shared';
import { BinaryFileIcon, BinaryFileLinkRel, BinaryFileResource } from '@alfa-client/binary-file-shared';
import { StateResource, createEmptyStateResource } from '@alfa-client/tech-shared';
import { HttpParams } from '@angular/common/http';
import { Component, EventEmitter, Input, Output } from '@angular/core';
......@@ -45,10 +41,8 @@ export class BinaryFile2Component {
readonly fileLinkRel = BinaryFileLinkRel;
@Output() public startDownload: EventEmitter<BinaryFileResource> =
new EventEmitter<BinaryFileResource>();
@Output() public startDelete: EventEmitter<BinaryFileResource> =
new EventEmitter<BinaryFileResource>();
@Output() public startDownload: EventEmitter<BinaryFileResource> = new EventEmitter<BinaryFileResource>();
@Output() public startDelete: EventEmitter<BinaryFileResource> = new EventEmitter<BinaryFileResource>();
@Output() public getDownloadToken: EventEmitter<void> = new EventEmitter<void>();
get isDisabled(): boolean {
......@@ -71,7 +65,8 @@ export class BinaryFile2Component {
this.startDownload.emit(this.file);
}
deleteFile(): void {
deleteFile(e: Event): void {
e.stopPropagation();
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