Skip to content

Commit

Permalink
feat(editor): add resourceUpdated to fields config
Browse files Browse the repository at this point in the history
  • Loading branch information
LHBruneton-C2C committed May 2, 2024
1 parent 6629f0c commit d797a6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/common/fixtures/src/lib/records.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const DATASET_RECORDS: DatasetRecord[] = deepFreeze([
status: 'ongoing',
recordCreated: new Date('2022-02-01T15:12:00'),
recordUpdated: new Date('2022-02-01T15:12:00'),
datasetCreated: new Date('2022-09-01T14:18:19'),
datasetUpdated: new Date('2022-12-04T15:12:00'),
resourceCreated: new Date('2022-09-01T14:18:19'),
resourceUpdated: new Date('2022-12-04T15:12:00'),
title: 'A very interesting dataset (un jeu de données très intéressant)',
abstract: `# Introduction
This dataset has been established for testing purposes.
Expand Down
4 changes: 4 additions & 0 deletions libs/feature/editor/src/lib/+state/editor.selectors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ describe('Editor Selectors', () => {
config: DEFAULT_FIELDS[4],
value: DATASET_RECORDS[0].licenses,
},
{
config: DEFAULT_FIELDS[5],
value: DATASET_RECORDS[0].resourceUpdated,
},
])
})
})
Expand Down
7 changes: 7 additions & 0 deletions libs/feature/editor/src/lib/fields.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,11 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
type: 'list',
},
},
{
model: 'resourceUpdated',
formFieldConfig: {
labelKey: marker('editor.record.form.resourceUpdated'),
type: 'date',
},
},
]

0 comments on commit d797a6c

Please sign in to comment.