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

OZG-7971 replace forwarding buttons

parent b4ec43ea
No related branches found
No related tags found
No related merge requests found
...@@ -41,14 +41,13 @@ ...@@ -41,14 +41,13 @@
> >
</ozgcloud-text-editor> </ozgcloud-text-editor>
<ozgcloud-stroked-button-with-spinner <ods-button-with-spinner
dataTestId="forward-button" dataTestId="forward-button"
toolTip="Vorgang weiterleiten" variant="outline"
tooltipAriaType="aria-labelledby"
icon="forward"
type="submit" type="submit"
text="Weiterleiten" text="Weiterleiten"
[stateResource]="forwardStateResource" [stateResource]="forwardStateResource"
> >
</ozgcloud-stroked-button-with-spinner> <ods-icon icon name="forward-vorgang" />
</ods-button-with-spinner>
</form> </form>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* unter der Lizenz sind dem Lizenztext zu entnehmen. * unter der Lizenz sind dem Lizenztext zu entnehmen.
*/ */
import { mock } from '@alfa-client/test-utils'; import { mock } from '@alfa-client/test-utils';
import { OzgcloudStrokedButtonWithSpinnerComponent, OzgcloudTextEditorComponent } from '@alfa-client/ui'; import { OzgcloudTextEditorComponent } from '@alfa-client/ui';
import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { ReactiveFormsModule, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
...@@ -30,6 +30,8 @@ import { MatFormFieldModule } from '@angular/material/form-field'; ...@@ -30,6 +30,8 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIcon } from '@angular/material/icon'; import { MatIcon } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ButtonWithSpinnerComponent } from '@ods/component';
import { IconComponent } from '@ods/system';
import { createVorgangWithEingangResource } from 'libs/vorgang-shared/test/vorgang'; import { createVorgangWithEingangResource } from 'libs/vorgang-shared/test/vorgang';
import { MockComponent } from 'ng-mocks'; import { MockComponent } from 'ng-mocks';
import { ForwardingByEmailFormComponent } from './forwarding-by-email-form.component'; import { ForwardingByEmailFormComponent } from './forwarding-by-email-form.component';
...@@ -53,7 +55,8 @@ describe('ForwardingByEmailFormComponent', () => { ...@@ -53,7 +55,8 @@ describe('ForwardingByEmailFormComponent', () => {
declarations: [ declarations: [
ForwardingByEmailFormComponent, ForwardingByEmailFormComponent,
MatIcon, MatIcon,
MockComponent(OzgcloudStrokedButtonWithSpinnerComponent), MockComponent(ButtonWithSpinnerComponent),
MockComponent(IconComponent),
MockComponent(OzgcloudTextEditorComponent), MockComponent(OzgcloudTextEditorComponent),
], ],
imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule, BrowserAnimationsModule], imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule, BrowserAnimationsModule],
......
...@@ -23,46 +23,39 @@ ...@@ -23,46 +23,39 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<p *ngIf="forwarding | hasLink: linkRel.MARK_AS_SUCCESS"> <p *ngIf="forwarding | hasLink: linkRel.MARK_AS_SUCCESS">Wurde die Weiterleitung des Vorgangs bestätigt?</p>
Wurde die Weiterleitung des Vorgangs bestätigt?
</p>
<div <div *ngIf="forwarding | hasLink: linkRel.SUCCESSFUL" class="confirmation" data-test-id="successfull-message">
*ngIf="forwarding | hasLink: linkRel.SUCCESSFUL"
class="confirmation"
data-test-id="successfull-message"
>
<span>Die Weiterleitung des Vorgangs wurde bestätigt.</span> <span>Die Weiterleitung des Vorgangs wurde bestätigt.</span>
<mat-icon>check_circle_outline</mat-icon> <mat-icon>check_circle_outline</mat-icon>
</div> </div>
<div <div *ngIf="forwarding | hasLink: linkRel.FAILED" class="confirmation" data-test-id="failed-message">
*ngIf="forwarding | hasLink: linkRel.FAILED"
class="confirmation"
data-test-id="failed-message"
>
<span>Die Weiterleitung des Vorgangs war nicht erfolgreich.</span> <span>Die Weiterleitung des Vorgangs war nicht erfolgreich.</span>
<mat-icon>info_outline</mat-icon> <mat-icon>info_outline</mat-icon>
</div> </div>
<div class="buttons"> <div class="flex gap-2">
<ozgcloud-stroked-button-with-spinner @if (forwarding | hasLink: linkRel.MARK_AS_SUCCESS) {
*ngIf="forwarding | hasLink: linkRel.MARK_AS_SUCCESS" <ods-button-with-spinner
data-test-id="mark-as-success-button" dataTestId="mark-as-success-button"
text="Bestätigen" text="Bestätigen"
icon="check_circle_outline"
[stateResource]="markAsSuccessCommandStateResource$ | async" [stateResource]="markAsSuccessCommandStateResource$ | async"
(clickEmitter)="markAsSuccess()" (clickEmitter)="markAsSuccess()"
> >
</ozgcloud-stroked-button-with-spinner> <ods-icon icon name="check-circle" fill="whitetext" />
</ods-button-with-spinner>
<ozgcloud-stroked-button-with-spinner }
*ngIf="forwarding | hasLink: linkRel.MARK_AS_FAIL"
data-test-id="mark-as-fail-button" @if (forwarding | hasLink: linkRel.MARK_AS_FAIL) {
<ods-button-with-spinner
variant="outline"
dataTestId="mark-as-fail-button"
text="Widerrufen" text="Widerrufen"
icon="info_outline"
[stateResource]="markAsFailCommandStateResource$ | async" [stateResource]="markAsFailCommandStateResource$ | async"
(clickEmitter)="markAsFail()" (clickEmitter)="markAsFail()"
> >
</ozgcloud-stroked-button-with-spinner> <ods-icon icon name="info" />
</ods-button-with-spinner>
}
</div> </div>
...@@ -27,15 +27,6 @@ ...@@ -27,15 +27,6 @@
align-items: center; align-items: center;
} }
.buttons {
margin: 16px -8px;
display: flex;
ozgcloud-stroked-button-with-spinner {
margin: 0 8px;
}
}
p { p {
margin-top: 4px; margin-top: 4px;
} }
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
import { ForwardingLinkRel, ForwardingResource, ForwardingService } from '@alfa-client/forwarding-shared'; import { ForwardingLinkRel, ForwardingResource, ForwardingService } from '@alfa-client/forwarding-shared';
import { HasLinkPipe } from '@alfa-client/tech-shared'; import { HasLinkPipe } from '@alfa-client/tech-shared';
import { mock } from '@alfa-client/test-utils'; import { mock } from '@alfa-client/test-utils';
import { OzgcloudStrokedButtonWithSpinnerComponent } from '@alfa-client/ui';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatIcon } from '@angular/material/icon'; import { MatIcon } from '@angular/material/icon';
import { ButtonWithSpinnerComponent } from '@ods/component';
import { IconComponent } from '@ods/system';
import { createForwardingResource } from 'libs/forwarding-shared/test/forwarding'; import { createForwardingResource } from 'libs/forwarding-shared/test/forwarding';
import { MockComponent } from 'ng-mocks'; import { MockComponent } from 'ng-mocks';
import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-email-zustellen-container.component'; import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-email-zustellen-container.component';
...@@ -51,7 +52,8 @@ describe('ForwardingByEmailZustellenContainerComponent', () => { ...@@ -51,7 +52,8 @@ describe('ForwardingByEmailZustellenContainerComponent', () => {
HasLinkPipe, HasLinkPipe,
ForwardingByEmailZustellenContainerComponent, ForwardingByEmailZustellenContainerComponent,
MatIcon, MatIcon,
MockComponent(OzgcloudStrokedButtonWithSpinnerComponent), MockComponent(ButtonWithSpinnerComponent),
MockComponent(IconComponent),
], ],
providers: [ providers: [
{ {
......
...@@ -24,11 +24,13 @@ ...@@ -24,11 +24,13 @@
import { CommandSharedModule } from '@alfa-client/command-shared'; import { CommandSharedModule } from '@alfa-client/command-shared';
import { ForwardingSharedModule } from '@alfa-client/forwarding-shared'; import { ForwardingSharedModule } from '@alfa-client/forwarding-shared';
import { FormatDateWithTimePipe, HasLinkPipe, ToEmbeddedResourcesPipe } from '@alfa-client/tech-shared'; import { FormatDateWithTimePipe, HasLinkPipe, ToEmbeddedResourcesPipe } from '@alfa-client/tech-shared';
import { ExpansionPanelComponent, OzgcloudStrokedButtonWithSpinnerComponent, OzgcloudTextEditorComponent, SpinnerComponent, } from '@alfa-client/ui'; import { ExpansionPanelComponent, OzgcloudTextEditorComponent, SpinnerComponent } from '@alfa-client/ui';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms';
import { MatIcon } from '@angular/material/icon'; import { MatIcon } from '@angular/material/icon';
import { ButtonWithSpinnerComponent } from '@ods/component';
import { IconComponent } from '@ods/system';
import { ForwardingByEmailContainerComponent } from './forwarding-by-email-container/forwarding-by-email-container.component'; import { ForwardingByEmailContainerComponent } from './forwarding-by-email-container/forwarding-by-email-container.component';
import { ForwardingByEmailFormComponent } from './forwarding-by-email-container/forwarding-by-email-formular/forwarding-by-email-form/forwarding-by-email-form.component'; import { ForwardingByEmailFormComponent } from './forwarding-by-email-container/forwarding-by-email-formular/forwarding-by-email-form/forwarding-by-email-form.component';
import { ForwardingByEmailFormularComponent } from './forwarding-by-email-container/forwarding-by-email-formular/forwarding-by-email-formular.component'; import { ForwardingByEmailFormularComponent } from './forwarding-by-email-container/forwarding-by-email-formular/forwarding-by-email-formular.component';
...@@ -42,7 +44,6 @@ import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-em ...@@ -42,7 +44,6 @@ import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-em
ForwardingSharedModule, ForwardingSharedModule,
CommandSharedModule, CommandSharedModule,
OzgcloudTextEditorComponent, OzgcloudTextEditorComponent,
OzgcloudStrokedButtonWithSpinnerComponent,
SpinnerComponent, SpinnerComponent,
FormatDateWithTimePipe, FormatDateWithTimePipe,
MatIcon, MatIcon,
...@@ -50,6 +51,8 @@ import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-em ...@@ -50,6 +51,8 @@ import { ForwardingByEmailZustellenContainerComponent } from './forwarding-by-em
ToEmbeddedResourcesPipe, ToEmbeddedResourcesPipe,
ExpansionPanelComponent, ExpansionPanelComponent,
ReactiveFormsModule, ReactiveFormsModule,
ButtonWithSpinnerComponent,
IconComponent,
], ],
declarations: [ declarations: [
ForwardingByEmailZustellenContainerComponent, ForwardingByEmailZustellenContainerComponent,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment