Skip to content
Snippets Groups Projects
Commit 332c6f9b authored by Albert Bruns's avatar Albert Bruns
Browse files

OZG-7472-7772 add organisationsEinheitId

parent 382d356f
No related branches found
No related tags found
1 merge request!62OZG-7472-7772
Showing
with 16 additions and 1 deletion
......@@ -39,6 +39,7 @@ describe('AdminOrganisationsEinheitRepository', () => {
(group: GroupRepresentation): AdminOrganisationsEinheit => ({
name: group.name,
id: group.id,
attributes: group.attributes,
}),
);
......@@ -63,6 +64,7 @@ describe('AdminOrganisationsEinheitRepository', () => {
const organisationsEinheit: AdminOrganisationsEinheit = {
name: groupRep.name,
id: groupRep.id,
attributes: groupRep.attributes,
};
beforeEach(() => {
......
......@@ -40,6 +40,7 @@ export class AdminOrganisationsEinheitRepository {
return {
id: group.id,
name: group.name,
attributes: group.attributes,
};
}
}
......@@ -24,4 +24,5 @@
export interface AdminOrganisationsEinheit {
id?: string;
name: string;
attributes: { [key: string]: string[] };
}
......@@ -29,6 +29,9 @@ export function createAdminOrganisationsEinheit(): AdminOrganisationsEinheit {
return {
id: faker.string.uuid(),
name: faker.lorem.word(),
attributes: {
organisationseinheitId: [faker.string.uuid()],
},
};
}
......
......@@ -152,7 +152,10 @@ describe('OrganisationsEinheitContainerComponent', () => {
it('should call organisationsEinheitService create', () => {
component.handleDialogResponse(organisationsEinheitResource);
expect(organisationsEinheitService.create).toHaveBeenCalledWith({ name: organisationsEinheitResource.name });
expect(organisationsEinheitService.create).toHaveBeenCalledWith({
name: organisationsEinheitResource.name,
attributes: { organisationseinheitId: [organisationsEinheitResource.organisationEinheitId] },
});
});
it('should set createOrganisationsEinheitProgress$', () => {
......
......@@ -80,6 +80,9 @@ export class OrganisationsEinheitContainerComponent implements OnInit, OnDestroy
mapToAdminOrganisationsEinheit(organisationsEinheitResource: OrganisationsEinheitResource): AdminOrganisationsEinheit {
return {
name: organisationsEinheitResource.name,
attributes: {
organisationseinheitId: [organisationsEinheitResource.organisationEinheitId],
},
};
}
}
......
......@@ -27,6 +27,7 @@ import { Resource } from '@ngxp/rest';
export interface OrganisationsEinheit {
name: string;
anschrift: Anschrift;
organisationEinheitId: string;
}
export interface Anschrift {
......
......@@ -45,6 +45,7 @@ export function createOrganisationsEinheit(): OrganisationsEinheit {
return {
name: faker.word.sample(),
anschrift: createAnschrift(),
organisationEinheitId: faker.string.uuid(),
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment