« get me outta code hell

data: contribution: countIn{Contribution,Duration}Totals - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-04 20:34:01 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:26:33 -0300
commit61a666d547b25581f52bc8f5976419e8ce3658bd (patch)
tree6d4471688401f40376c6fcc1d859f9aaf81e61c1 /src/data/things
parent6a33ef641ee51772fa64cf09595c73ee058f28f8 (diff)
data: contribution: countIn{Contribution,Duration}Totals
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/contribution.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/data/things/contribution.js b/src/data/things/contribution.js
index 6b7f050f..5594055c 100644
--- a/src/data/things/contribution.js
+++ b/src/data/things/contribution.js
@@ -9,8 +9,10 @@ import {isStringNonEmpty, isThing, validateReference} from '#validators';
 
 import {exposeDependency} from '#composite/control-flow';
 import {withResolvedReference} from '#composite/wiki-data';
+import {flag} from '#composite/wiki-properties';
 
 import {
+  inheritFromContributionPresets,
   withContributionArtist,
   withContributionContext,
   withMatchingContributionPresets,
@@ -47,6 +49,22 @@ export class Contribution extends Thing {
       update: {validate: isStringNonEmpty},
     },
 
+    countInContributionTotals: [
+      inheritFromContributionPresets({
+        property: input.thisProperty(),
+      }),
+
+      flag(true),
+    ],
+
+    countInDurationTotals: [
+      inheritFromContributionPresets({
+        property: input.thisProperty(),
+      }),
+
+      flag(true),
+    ],
+
     // Expose only
 
     context: [