Skip to content
Snippets Groups Projects
Verified Commit 3d189962 authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-7473 add name field

Sub task: OZG-7882
parent 7c35ff0a
Branches
Tags
1 merge request!104Administration: Neu hinzugefügte Felder für Statistik speichern
...@@ -2,17 +2,24 @@ ...@@ -2,17 +2,24 @@
<div class="flex max-w-4xl flex-col gap-4"> <div class="flex max-w-4xl flex-col gap-4">
<form class="form flex-col" [formGroup]="formService.form" class="flex flex-col gap-2"> <form class="form flex-col" [formGroup]="formService.form" class="flex flex-col gap-2">
<ods-text-editor
[formControlName]="StatistikFieldsFormService.FIELD_NAME"
label="Name *"
placeholder=""
data-test-id="statistik-name-text-editor"
dataTestId="statistik-name"
></ods-text-editor>
<div [formGroupName]="StatistikFieldsFormService.FIELD_FORM_IDENTIFIER" class="flex flex-col gap-4"> <div [formGroupName]="StatistikFieldsFormService.FIELD_FORM_IDENTIFIER" class="flex flex-col gap-4">
<ods-text-editor <ods-text-editor
[formControlName]="StatistikFieldsFormService.FIELD_FORM_ENGINE_NAME" [formControlName]="StatistikFieldsFormService.FIELD_FORM_ENGINE_NAME"
label="Formengine" label="Formengine *"
placeholder="Tragen Sie hier die Formengine des Formulars ein." placeholder="Tragen Sie hier die Formengine des Formulars ein."
data-test-id="form-engine-name" data-test-id="form-engine-name"
dataTestId="form-engine-name" dataTestId="form-engine-name"
></ods-text-editor> ></ods-text-editor>
<ods-text-editor <ods-text-editor
[formControlName]="StatistikFieldsFormService.FIELD_FORM_ID" [formControlName]="StatistikFieldsFormService.FIELD_FORM_ID"
label="FormID" label="FormID *"
placeholder="Tragen Sie hier die FormID des Formulars ein." placeholder="Tragen Sie hier die FormID des Formulars ein."
data-test-id="form-id" data-test-id="form-id"
dataTestId="form-id" dataTestId="form-id"
......
...@@ -6,18 +6,19 @@ import { Observable } from 'rxjs'; ...@@ -6,18 +6,19 @@ import { Observable } from 'rxjs';
@Injectable() @Injectable()
export class StatistikFieldsFormService extends AbstractFormService<AggregationMappingResource> { export class StatistikFieldsFormService extends AbstractFormService<AggregationMappingResource> {
private service = inject(AggregationMappingService); public static readonly FIELD_NAME: string = 'name';
public static readonly FIELD_FORM_IDENTIFIER: string = 'formIdentifier'; public static readonly FIELD_FORM_IDENTIFIER: string = 'formIdentifier';
public static readonly FIELD_FORM_ENGINE_NAME: string = 'formEngineName'; public static readonly FIELD_FORM_ENGINE_NAME: string = 'formEngineName';
public static readonly FIELD_FORM_ID: string = 'formId'; public static readonly FIELD_FORM_ID: string = 'formId';
public static readonly FIELD_MAPPINGS: string = 'mappings'; public static readonly FIELD_MAPPINGS: string = 'mappings';
public static readonly FIELD_MAPPING_SOURCE_PATH = 'sourcePath'; public static readonly FIELD_MAPPING_SOURCE_PATH = 'sourcePath';
public static readonly FIELD_MAPPING_TARGET_PATH = 'targetPath'; public static readonly FIELD_MAPPING_TARGET_PATH = 'targetPath';
private service = inject(AggregationMappingService);
protected initForm(): UntypedFormGroup { protected initForm(): UntypedFormGroup {
return this.formBuilder.group({ return this.formBuilder.group({
[StatistikFieldsFormService.FIELD_NAME]: new FormControl(EMPTY_STRING),
[StatistikFieldsFormService.FIELD_FORM_IDENTIFIER]: this.formBuilder.group({ [StatistikFieldsFormService.FIELD_FORM_IDENTIFIER]: this.formBuilder.group({
[StatistikFieldsFormService.FIELD_FORM_ENGINE_NAME]: new FormControl(EMPTY_STRING), [StatistikFieldsFormService.FIELD_FORM_ENGINE_NAME]: new FormControl(EMPTY_STRING),
[StatistikFieldsFormService.FIELD_FORM_ID]: new FormControl(EMPTY_STRING), [StatistikFieldsFormService.FIELD_FORM_ID]: new FormControl(EMPTY_STRING),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment