« 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-18 22:56:01 -0300
commit94bdc5e8356834e2cc22695e196ba4f50014d05f (patch)
tree29968ab17f5f00ccd8718b0aff5f80116bd1703b /src/data/things
parent6d0ad85bc718c2429d8dc124bba1329cc9615d12 (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: [