diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e50e1b..4618e82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to wuttaweb will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.30.3 (2026-05-06) + +### Fix + +- add basic "Show Totals" feature for main index grids + ## v0.30.2 (2026-03-22) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 7483aaf..2733d71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "WuttaWeb" -version = "0.30.2" +version = "0.30.3" description = "Web App for Wutta Framework" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}] diff --git a/src/wuttaweb/templates/grids/vue_template.mako b/src/wuttaweb/templates/grids/vue_template.mako index aaa19fd..3d58e7e 100644 --- a/src/wuttaweb/templates/grids/vue_template.mako +++ b/src/wuttaweb/templates/grids/vue_template.mako @@ -328,6 +328,7 @@ const ${grid.vue_component} = { template: '#${grid.vue_tagname}-template', + mixins: [WuttaRequestMixin], computed: { recordCount() { @@ -658,8 +659,13 @@ // fetch new data params.filter = true this.fetchData(params) + ## nb. this is used for "show totals" feature in master/index template + this.appliedFiltersHook() }, + ## nb. for now each grid can have "just one" (or no) hook + appliedFiltersHook() {}, + getFilterParams() { const params = {} for (let filter of this.filters) { diff --git a/src/wuttaweb/templates/master/index.mako b/src/wuttaweb/templates/master/index.mako index 9b3c3c7..bd9aeb9 100644 --- a/src/wuttaweb/templates/master/index.mako +++ b/src/wuttaweb/templates/master/index.mako @@ -31,6 +31,30 @@ ${parent.modify_vue_vars()}