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

Merge branch 'refs/heads/release'

# Conflicts:
#	alfa-client/pom.xml
#	alfa-server/pom.xml
#	alfa-service/pom.xml
#	alfa-xdomea/pom.xml
#	pom.xml
parents 6bf07d4e 82f0e2fa
No related branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,10 @@ import { ...@@ -9,10 +9,10 @@ import {
import { BinaryFileResource } from '@alfa-client/binary-file-shared'; import { BinaryFileResource } from '@alfa-client/binary-file-shared';
import { CommandLinkRel, CommandResource } from '@alfa-client/command-shared'; import { CommandLinkRel, CommandResource } from '@alfa-client/command-shared';
import { import {
createStateResource,
EMPTY_STRING, EMPTY_STRING,
formatForDatabase,
StateResource, StateResource,
createStateResource,
formatForDatabase,
} from '@alfa-client/tech-shared'; } from '@alfa-client/tech-shared';
import { Mock, mock, useFromMock } from '@alfa-client/test-utils'; import { Mock, mock, useFromMock } from '@alfa-client/test-utils';
import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
...@@ -114,6 +114,22 @@ describe('BescheidenFormService', () => { ...@@ -114,6 +114,22 @@ describe('BescheidenFormService', () => {
expect(service.sendByManual.value).toBeFalsy(); expect(service.sendByManual.value).toBeFalsy();
}); });
it('should not emit if value not changed', () => {
service.sendByManual.next(true);
service.sendByManual.next = jest.fn();
service.updateSendByManual(BescheidSendBy.MANUAL);
expect(service.sendByManual.next).not.toHaveBeenCalled();
});
it('should emit on value change', () => {
service.sendByManual.next(false);
service.sendByManual.next = jest.fn();
service.updateSendByManual(BescheidSendBy.MANUAL);
expect(service.sendByManual.next).toHaveBeenCalled();
});
}); });
describe('initializeFormChanges', () => { describe('initializeFormChanges', () => {
......
...@@ -10,14 +10,14 @@ import { BinaryFileResource } from '@alfa-client/binary-file-shared'; ...@@ -10,14 +10,14 @@ import { BinaryFileResource } from '@alfa-client/binary-file-shared';
import { CommandResource, tapOnCommandSuccessfullyDone } from '@alfa-client/command-shared'; import { CommandResource, tapOnCommandSuccessfullyDone } from '@alfa-client/command-shared';
import { import {
AbstractFormService, AbstractFormService,
convertToBoolean,
EMPTY_STRING, EMPTY_STRING,
formatForDatabase,
HttpError, HttpError,
StateResource,
convertToBoolean,
formatForDatabase,
isLoaded, isLoaded,
isNotEmpty, isNotEmpty,
isNotNil, isNotNil,
StateResource,
} from '@alfa-client/tech-shared'; } from '@alfa-client/tech-shared';
import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { Injectable, OnDestroy } from '@angular/core'; import { Injectable, OnDestroy } from '@angular/core';
...@@ -28,18 +28,18 @@ import { ...@@ -28,18 +28,18 @@ import {
UntypedFormControl, UntypedFormControl,
UntypedFormGroup, UntypedFormGroup,
} from '@angular/forms'; } from '@angular/forms';
import { getUrl, hasLink, Resource, ResourceUri } from '@ngxp/rest'; import { Resource, ResourceUri, getUrl, hasLink } from '@ngxp/rest';
import { isEmpty, isNil, isUndefined } from 'lodash-es'; import { isEmpty, isNil, isUndefined } from 'lodash-es';
import { import {
BehaviorSubject, BehaviorSubject,
Observable,
Subject,
Subscription,
combineLatest, combineLatest,
filter, filter,
first, first,
map, map,
Observable,
startWith, startWith,
Subject,
Subscription,
} from 'rxjs'; } from 'rxjs';
@Injectable() @Injectable()
...@@ -92,7 +92,8 @@ export class BescheidenFormService extends AbstractFormService implements OnDest ...@@ -92,7 +92,8 @@ export class BescheidenFormService extends AbstractFormService implements OnDest
} }
updateSendByManual(sendBy: BescheidSendBy): void { updateSendByManual(sendBy: BescheidSendBy): void {
this.sendByManual.next(sendBy === BescheidSendBy.MANUAL); const isSendByManual = sendBy === BescheidSendBy.MANUAL;
if (isSendByManual !== this.sendByManual.value) this.sendByManual.next(isSendByManual);
} }
initializeFormChanges(): void { initializeFormChanges(): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment