-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editor): support resourceUpdated field in record form
- Loading branch information
1 parent
d797a6c
commit d803315
Showing
6 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
...rd-form/form-field/form-field-resource-updated/form-field-resource-updated.component.html
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,4 @@ | ||
<gn-ui-date-picker | ||
[date]="control.value" | ||
(dateChange)="control.setValue($event)" | ||
></gn-ui-date-picker> |
25 changes: 25 additions & 0 deletions
25
...form/form-field/form-field-resource-updated/form-field-resource-updated.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,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing' | ||
import { FormControl } from '@angular/forms' | ||
import { FormFieldResourceUpdatedComponent } from './form-field-resource-updated.component' | ||
|
||
describe('FormFieldResourceUpdatedComponent', () => { | ||
let component: FormFieldResourceUpdatedComponent | ||
let fixture: ComponentFixture<FormFieldResourceUpdatedComponent> | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [FormFieldResourceUpdatedComponent], | ||
}).compileComponents() | ||
|
||
fixture = TestBed.createComponent(FormFieldResourceUpdatedComponent) | ||
component = fixture.componentInstance | ||
const control = new FormControl() | ||
control.setValue(new Date()) | ||
component.control = control | ||
fixture.detectChanges() | ||
}) | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy() | ||
}) | ||
}) |
15 changes: 15 additions & 0 deletions
15
...cord-form/form-field/form-field-resource-updated/form-field-resource-updated.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,15 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core' | ||
import { FormControl } from '@angular/forms' | ||
import { DatePickerComponent } from '@geonetwork-ui/ui/inputs' | ||
|
||
@Component({ | ||
selector: 'gn-ui-form-field-resource-updated', | ||
templateUrl: './form-field-resource-updated.component.html', | ||
styleUrls: ['./form-field-resource-updated.component.css'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
imports: [DatePickerComponent], | ||
}) | ||
export class FormFieldResourceUpdatedComponent { | ||
@Input() control!: FormControl | ||
} |
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