Skip to content
Snippets Groups Projects
Commit 213e1f99 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5009 minor cleanup

parent be8de619
No related merge requests found
...@@ -40,10 +40,6 @@ describe('BescheidFacade', () => { ...@@ -40,10 +40,6 @@ describe('BescheidFacade', () => {
const vorgangWithEingang: VorgangWithEingangResource = createVorgangWithEingangResource(); const vorgangWithEingang: VorgangWithEingangResource = createVorgangWithEingangResource();
const createCommand: CreateCommand = createCreateCommand(CommandOrder.CREATE_BESCHEID); const createCommand: CreateCommand = createCreateCommand(CommandOrder.CREATE_BESCHEID);
beforeEach(() => {
jest.resetAllMocks();
});
describe('with both Links', () => { describe('with both Links', () => {
it('should dispatch "createCommand" to CREATE_BESCHEID', () => { it('should dispatch "createCommand" to CREATE_BESCHEID', () => {
var vorgang = createVorgangWithEingangResource([ var vorgang = createVorgangWithEingangResource([
......
import { Injectable } from '@angular/core';
import { CommandResource, CreateCommand } from '@alfa-client/command-shared'; import { CommandResource, CreateCommand } from '@alfa-client/command-shared';
import { StateResource } from '@alfa-client/tech-shared'; import { StateResource } from '@alfa-client/tech-shared';
import { VorgangWithEingangLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangWithEingangLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { Observable, throwError } from 'rxjs'; import { Observable, throwError } from 'rxjs';
import * as CommandActions from '../../../../command-shared/src/lib/+state/command.actions'; import * as CommandActions from '../../../../command-shared/src/lib/+state/command.actions';
import * as BescheidSelectors from './bescheid.selectors'; import * as BescheidSelectors from './bescheid.selectors';
import { hasLink } from '@ngxp/rest'; import { hasLink } from '@ngxp/rest';
...@@ -41,4 +42,17 @@ export class BescheidFacade { ...@@ -41,4 +42,17 @@ export class BescheidFacade {
}), }),
); );
} }
public createBescheidDraft(
vorgangWithEingang: VorgangWithEingangResource,
command: CreateCommand,
): void {
this.store.dispatch(
CommandActions.createCommand({
resource: vorgangWithEingang,
linkRel: VorgangWithEingangLinkRel.CREATE_BESCHEID_DRAFT,
command,
}),
);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment