membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
40 stars 23 forks source link

CSV Export not working #215

Open proffalken opened 10 months ago

proffalken commented 10 months ago

Describe the bug

When trying to export the list of members as a CSV file, I get an error in the browser console:

TypeError: Cannot read properties of undefined (reading 'call')
    at es.Q (Members.7f122ddb.js:10:18546)
    at new X (Members.7f122ddb.js:10:40370)
    at new es (Members.7f122ddb.js:13:3918)
    at ts (Members.7f122ddb.js:13:4763)
    at Proxy.exportCsv (Members.7f122ddb.js:13:6874)
    at Sr (index.9c0efd21.js:6:35424)
    at Ft (index.9c0efd21.js:6:35503)
    at dp (index.9c0efd21.js:6:37486)
    at y (index.9c0efd21.js:10:47124)
    at I (index.9c0efd21.js:10:51725)
sp @ index.9c0efd21.js:6
Mo @ index.9c0efd21.js:6
Sr @ index.9c0efd21.js:6
Ft @ index.9c0efd21.js:6
dp @ index.9c0efd21.js:6
y @ index.9c0efd21.js:10
I @ index.9c0efd21.js:10
Sr @ index.9c0efd21.js:6
Ft @ index.9c0efd21.js:6
r @ index.9c0efd21.js:6

The code appears to be failing on the following block, however as this is generated JS I'm not sure if the line numbers are relevant:

        exportCsv() {
            ts(this.displayMemberList, {
                columns: ["name.full", "email", "state"]
            }, (e,t)=>{
                ui("member-export.csv", t, "text/csv") !== !0 && this.$q.notify({
                    message: this.$t("error.downloadFailed"),
                    color: "negative",
                    icon: "warning"
                })
            }
            )
        },

To Reproduce Steps to reproduce the behavior:

  1. Log in to MM as an admin
  2. Click on Admin Tools -> Members
  3. Select a group of members
  4. Click Export CSV

Expected behavior

A CSV file should be produced as coded in #34