Skip to content
Snippets Groups Projects
Commit 8b1781d0 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6720 Spinner in form

parent cf1bdddb
No related branches found
No related tags found
No related merge requests found
<ng-container *ngIf="organisationsEinheitStateResource$ | async as organisationsEinheitStateResource"> <ng-container *ngIf="organisationsEinheitStateResource$ | async as organisationsEinheitStateResource">
<ozgcloud-spinner [stateResource]="organisationsEinheitStateResource">
<h1 class="heading-1" data-test-id="organisations-form-container-headline">{{ organisationsEinheitStateResource.resource?.name }}</h1> <h1 class="heading-1" data-test-id="organisations-form-container-headline">{{ organisationsEinheitStateResource.resource?.name }}</h1>
<admin-organisationseinheit-form <admin-organisationseinheit-form
[organisationsEinheitStateResource]="organisationsEinheitStateResource" [organisationsEinheitStateResource]="organisationsEinheitStateResource"
data-test-id="organisations-form" data-test-id="organisations-form"
/> />
</ozgcloud-spinner>
</ng-container> </ng-container>
\ No newline at end of file
import { AdminOrganisationsEinheitResource, OrganisationsEinheitFormContainerComponent } from '@admin-client/admin-settings'; import { AdminOrganisationsEinheitResource, OrganisationsEinheitFormContainerComponent } from '@admin-client/admin-settings';
import { StateResource, createStateResource } from '@alfa-client/tech-shared'; import { StateResource, createStateResource } from '@alfa-client/tech-shared';
import { Mock, existsAsHtmlElement, getElementFromFixture, getMockComponent, mock } from '@alfa-client/test-utils'; import { Mock, existsAsHtmlElement, getElementFromFixture, getMockComponent, mock } from '@alfa-client/test-utils';
import { UiModule } from '@alfa-client/ui';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MockComponent } from 'ng-mocks'; import { MockComponent } from 'ng-mocks';
import { of } from 'rxjs'; import { of } from 'rxjs';
...@@ -28,7 +29,7 @@ describe('OrganisationsEinheitFormContainerComponent', () => { ...@@ -28,7 +29,7 @@ describe('OrganisationsEinheitFormContainerComponent', () => {
}; };
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [OrganisationsEinheitFormContainerComponent, MockComponent(OrganisationsEinheitFormComponent)], declarations: [OrganisationsEinheitFormContainerComponent, MockComponent(OrganisationsEinheitFormComponent), UiModule],
providers: [{ provide: OrganisationsEinheitService, useValue: organisationsEinheitService }], providers: [{ provide: OrganisationsEinheitService, useValue: organisationsEinheitService }],
}).compileComponents(); }).compileComponents();
......
import { StateResource } from '@alfa-client/tech-shared'; import { StateResource } from '@alfa-client/tech-shared';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { OrganisationsEinheitListLinkRel } from '../organisations-einheit.linkrel';
import { AdminOrganisationsEinheitResource } from '../organisations-einheit.model'; import { AdminOrganisationsEinheitResource } from '../organisations-einheit.model';
import { OrganisationsEinheitService } from '../organisationseinheit.service'; import { OrganisationsEinheitService } from '../organisationseinheit.service';
...@@ -16,4 +17,6 @@ export class OrganisationsEinheitFormContainerComponent implements OnInit { ...@@ -16,4 +17,6 @@ export class OrganisationsEinheitFormContainerComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.organisationsEinheitStateResource$ = this.organisationsEinheitService.get(); this.organisationsEinheitStateResource$ = this.organisationsEinheitService.get();
} }
protected readonly OrganisationsEinheitListLinkRel = OrganisationsEinheitListLinkRel;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment