Skip to content
Snippets Groups Projects
Commit 88e69076 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-531 styling for pending commands spinner

parent 7e4a2ca8
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,7 @@
max-width: 100%;
align-items: flex-start;
}
p {
color: #999;
}
<ng-container *ngIf="redirectStateResource$ | async as redirectStateResource">
<mat-spinner *ngIf="redirectStateResource.loaded"></mat-spinner>
<div *ngIf="pendingCommandsStateResource$ | async as pendingCommandsStateResource" class="spinner">
<p>Vorgang wird weitergeleitet</p>
<mat-spinner
*ngIf="redirectStateResource.loaded || pendingCommandsHasRedirectCommand(pendingCommandsStateResource); else form"
class="spinner"></mat-spinner>
</div>
<ng-template #form>
<form *ngIf="!redirectStateResource.loaded" class="form" [formGroup]="formService.form" (submit)="submit()">
<goofy-client-text-editor
......@@ -25,4 +32,5 @@
</goofy-client-button-with-spinner>
</form>
</ng-template>
</ng-container>
.form {
display: flex;
flex-direction: column;
position: relative;
max-width: 320px;
width: 100%;
::ng-deep {
mat-form-field {
width: 100%;
max-width: 320px;
}
}
}
.spinner {
display: inline-flex;
flex-direction: column;
align-items: center;
.mat-spinner {
margin: 8px;
}
p {
color: #999;
}
}
......@@ -14,12 +14,10 @@ import { VorgangRedirectFormService } from './vorgang-redirect.formservice';
})
export class VorgangRedirectComponent implements OnChanges {
@Input() private vorgang: VorgangResource;
@Input() private pendingCommandsStateResource$: Observable<StateResource<CommandListResource>>;
readonly formServiceClass = VorgangRedirectFormService;
redirectStateResource$: Observable<StateResource<CommandResource>> = of(createEmptyStateResource());
@Input() private vorgang: VorgangResource;
@Input() private pendingCommandsStateResource$: Observable<StateResource<CommandListResource>>;
constructor(public formService: VorgangRedirectFormService) { }
......@@ -32,4 +30,8 @@ export class VorgangRedirectComponent implements OnChanges{
submit(): void {
this.redirectStateResource$ = this.formService.submit();
}
pendingCommandsHasRedirectCommand(pendingCommandsStateResource: StateResource<CommandListResource>) {
console.log(pendingCommandsStateResource.resource)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment