-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): EditDescriptionOnly field to display additional text in f…
…orms (#1945) Co-authored-by: Simon <simon@aam-digital.com>
- Loading branch information
1 parent
656af2d
commit 87a1c4d
Showing
4 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ils/dynamic-form-components/edit-description-only/edit-description-only.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { EditDescriptionOnlyComponent } from "./edit-description-only.component"; | ||
|
||
describe("EditDescriptionOnlyComponent", () => { | ||
let component: EditDescriptionOnlyComponent; | ||
let fixture: ComponentFixture<EditDescriptionOnlyComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [EditDescriptionOnlyComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(EditDescriptionOnlyComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
...ty-utils/dynamic-form-components/edit-description-only/edit-description-only.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, Input } from "@angular/core"; | ||
import { DynamicComponent } from "../../../../view/dynamic-components/dynamic-component.decorator"; | ||
import { FormFieldConfig } from "../../../entity-form/entity-form/FormConfig"; | ||
|
||
@DynamicComponent("EditDescriptionOnly") | ||
@Component({ | ||
selector: "app-edit-description-only", | ||
template: "{{formFieldConfig?.label}}", | ||
standalone: true, | ||
}) | ||
export class EditDescriptionOnlyComponent { | ||
@Input() formFieldConfig: FormFieldConfig; | ||
} |