diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-21 10:15:46 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-21 10:47:46 -0300 |
commit | 57e898032afce1715f1493592c7d5d21efc7f6e4 (patch) | |
tree | cf17febc283f0edce1918382b94c7af5819faeb8 /src/data/composite/wiki-data | |
parent | df5f6048e6a177b5ce3920d10a1249129c669a1f (diff) |
data: withParsedCommentaryEntries: accessDate, accessKind
Diffstat (limited to 'src/data/composite/wiki-data')
-rw-r--r-- | src/data/composite/wiki-data/withParsedCommentaryEntries.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/data/composite/wiki-data/withParsedCommentaryEntries.js b/src/data/composite/wiki-data/withParsedCommentaryEntries.js index f0404a5d..f70a3ee9 100644 --- a/src/data/composite/wiki-data/withParsedCommentaryEntries.js +++ b/src/data/composite/wiki-data/withParsedCommentaryEntries.js @@ -95,6 +95,8 @@ export default templateCompositeFrom({ 'artistDisplayText', 'annotation', 'date', + 'accessDate', + 'accessKind', ]), }), @@ -150,11 +152,28 @@ export default templateCompositeFrom({ }, { + dependencies: ['#entries.accessDate'], + compute: (continuation, { + ['#entries.accessDate']: accessDate, + }) => continuation({ + ['#entries.accessDate']: + accessDate.map(date => date ? new Date(date) : null), + }), + }, + + fillMissingListItems({ + list: '#entries.accessKind', + fill: input.value(null), + }), + + { dependencies: [ '#entries.artists', '#entries.artistDisplayText', '#entries.annotation', '#entries.date', + '#entries.accessDate', + '#entries.accessKind', '#entries.body', ], @@ -163,6 +182,8 @@ export default templateCompositeFrom({ ['#entries.artistDisplayText']: artistDisplayText, ['#entries.annotation']: annotation, ['#entries.date']: date, + ['#entries.accessDate']: accessDate, + ['#entries.accessKind']: accessKind, ['#entries.body']: body, }) => continuation({ ['#parsedCommentaryEntries']: @@ -171,6 +192,8 @@ export default templateCompositeFrom({ artistDisplayText, annotation, date, + accessDate, + accessKind, body, }), }), |