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

Merge branch 'master' into OZG-5789-required-fields

parents 94c20ebb d47b4d4b
No related branches found
No related tags found
No related merge requests found
...@@ -10,13 +10,13 @@ import { BinaryFileResource } from '@alfa-client/binary-file-shared'; ...@@ -10,13 +10,13 @@ import { BinaryFileResource } from '@alfa-client/binary-file-shared';
import { tapOnCommandSuccessfullyDone } from '@alfa-client/command-shared'; import { tapOnCommandSuccessfullyDone } from '@alfa-client/command-shared';
import { import {
AbstractFormService, AbstractFormService,
EMPTY_STRING,
HttpError,
StateResource,
convertToBoolean, convertToBoolean,
EMPTY_STRING,
formatForDatabase, formatForDatabase,
HttpError,
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';
...@@ -27,16 +27,16 @@ import { ...@@ -27,16 +27,16 @@ import {
UntypedFormControl, UntypedFormControl,
UntypedFormGroup, UntypedFormGroup,
} from '@angular/forms'; } from '@angular/forms';
import { Resource, ResourceUri, getUrl, hasLink } from '@ngxp/rest'; import { getUrl, hasLink, Resource, ResourceUri } 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,
map, map,
Observable,
startWith, startWith,
Subject,
Subscription,
} from 'rxjs'; } from 'rxjs';
@Injectable() @Injectable()
...@@ -54,13 +54,13 @@ export class BescheidenFormService extends AbstractFormService implements OnDest ...@@ -54,13 +54,13 @@ export class BescheidenFormService extends AbstractFormService implements OnDest
static readonly BETREFF_DEFAULT: string = 'Ihr Bescheid zum Antrag'; static readonly BETREFF_DEFAULT: string = 'Ihr Bescheid zum Antrag';
static readonly NACHRICHTENTEXT_BEWILLIGT_DEFAULT: string = [ static readonly NACHRICHTENTEXT_BEWILLIGT_DEFAULT: string = [
'Sehr geehrte/r Antragsteller/in,', 'Sehr geehrte/r Antragsteller/in,',
'ihr Antrag wurde bewilligt.', 'Ihr Antrag wurde bewilligt.',
'Mit freundlichen Grüßen', 'Mit freundlichen Grüßen',
'Ihre Verwaltung', 'Ihre Verwaltung',
].join('\n\n'); ].join('\n\n');
static readonly NACHRICHTENTEXT_ABGELEHNT_DEFAULT: string = [ static readonly NACHRICHTENTEXT_ABGELEHNT_DEFAULT: string = [
'Sehr geehrte/r Antragsteller/in,', 'Sehr geehrte/r Antragsteller/in,',
'ihr Antrag wurde abgelehnt.', 'Ihr Antrag wurde abgelehnt.',
'Mit freundlichen Grüßen', 'Mit freundlichen Grüßen',
'Ihre Verwaltung', 'Ihre Verwaltung',
].join('\n\n'); ].join('\n\n');
...@@ -269,6 +269,7 @@ export class BescheidenFormService extends AbstractFormService implements OnDest ...@@ -269,6 +269,7 @@ export class BescheidenFormService extends AbstractFormService implements OnDest
private setNachrichtSubject(value: string): void { private setNachrichtSubject(value: string): void {
this.form.controls[BescheidenFormService.FIELD_NACHRICHT_SUBJECT].patchValue(value); this.form.controls[BescheidenFormService.FIELD_NACHRICHT_SUBJECT].patchValue(value);
} }
private setNachrichtText(value: string): void { private setNachrichtText(value: string): void {
this.form.controls[BescheidenFormService.FIELD_NACHRICHT_TEXT].patchValue(value); this.form.controls[BescheidenFormService.FIELD_NACHRICHT_TEXT].patchValue(value);
} }
......
...@@ -167,7 +167,7 @@ describe('VorgangSearchComponent', () => { ...@@ -167,7 +167,7 @@ describe('VorgangSearchComponent', () => {
}); });
describe('ngOnInit', () => { describe('ngOnInit', () => {
it('should set focus if path is "/alle/search"', () => { it('should set focus if path ends with "/search"', () => {
component.focus = jest.fn(); component.focus = jest.fn();
routerEvents.next(new NavigationEnd(1, '/alle/search', '')); routerEvents.next(new NavigationEnd(1, '/alle/search', ''));
...@@ -176,7 +176,7 @@ describe('VorgangSearchComponent', () => { ...@@ -176,7 +176,7 @@ describe('VorgangSearchComponent', () => {
expect(component.focus).toHaveBeenCalled(); expect(component.focus).toHaveBeenCalled();
}); });
it('should not set focus if path is not "/alle/search"', () => { it('should not set focus if path does not end with "/search"', () => {
component.focus = jest.fn(); component.focus = jest.fn();
routerEvents.next(new NavigationEnd(1, '/alle', '')); routerEvents.next(new NavigationEnd(1, '/alle', ''));
......
...@@ -36,7 +36,7 @@ export function getEmpfaenger(vorgangWithEingangResource: VorgangWithEingangReso ...@@ -36,7 +36,7 @@ export function getEmpfaenger(vorgangWithEingangResource: VorgangWithEingangReso
} }
export function isVorgangSearchRoute(navigationEnd: NavigationEnd): boolean { export function isVorgangSearchRoute(navigationEnd: NavigationEnd): boolean {
return navigationEnd.url === '/alle/search'; return navigationEnd.url.endsWith('/search');
} }
function getVorname(vorgangWithEingangResource: VorgangWithEingangResource): string { function getVorname(vorgangWithEingangResource: VorgangWithEingangResource): string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment