Skip to content

Commit

Permalink
Merge pull request #296 from ncosd/dev-1.15.0
Browse files Browse the repository at this point in the history
Dev 1.15.0
  • Loading branch information
dherbst authored Jan 31, 2024
2 parents f51e517 + afe2d37 commit ed0df43
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
20 changes: 20 additions & 0 deletions web/admin/src/components/VolunteerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ const updateInactive = async id => {
console.log("error " + err)
}
}
const download = (event) => {
const anchor = document.createElement('a')
let data = '"First-name","Last-Name","email","isDriver","isApprovedDriver"\n'
for (let i=0; i<props.volunteers.length; i++) {
let v = props.volunteers[i]
let row = [v.firstname, v.lastname, v.email, v.isDriver, v.isApprovedDriver].join(',') + '\n'
data = data + row
}
anchor.href = 'data:text/csv;charset=utf-8,' + encodeURIComponent(data)
anchor.target = '_blank'
anchor.download = 'volunteers.csv'
anchor.click()
}
</script>

<template>
Expand Down Expand Up @@ -97,5 +113,9 @@ const updateInactive = async id => {
</tbody>
</table>
</div>

<div class="mt-3">
<button class="btn btn-secondary" @click="download"><i class="bi bi-filetype-csv"></i> Download CSV</button>
</div>
</div>
</template>
2 changes: 1 addition & 1 deletion web/admin/src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export let config = {
version: "1.14.0",
version: "1.15.0",
adminAppNavName: import.meta.env.VITE_ADMIN_APP_NAV_NAME || 'ADMIN_APP_NAV_NAME',
adminAppNavImg: import.meta.env.VITE_ADMIN_APP_NAV_IMG || null,
appNavName: import.meta.env.VITE_APP_NAV_NAME || 'APP_NAV_NAME',
Expand Down
4 changes: 4 additions & 0 deletions web/admin/src/views/ReleaseNotesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<template>
<div class="container">
<h1>Release Notes</h1>
<h2 id="1.15.0">January 31, 2024 - 1.15.0</h2>
<ul>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/290">#290</a> Admin can download volunteer list as csv</li>
</ul>
<h2 id="1.14.0">January 24, 2024 - 1.14.0</h2>
<ul>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/287">#287</a> Add delivery section for admins.</li>
Expand Down
2 changes: 1 addition & 1 deletion web/app/src/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export let config = {
version: "1.14.0",
version: "1.15.0",
appNavName: import.meta.env.VITE_APP_NAV_NAME || 'APP_NAV_NAME',
OrganizationName: import.meta.env.VITE_ORGANIZATION_NAME || 'ORGANIZATION_NAME',
ProjectLongName: import.meta.env.VITE_PROJECT_LONG_NAME || 'PROJECT_LONG_NAME',
Expand Down
4 changes: 4 additions & 0 deletions web/app/src/views/ReleaseNotesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<template>
<div class="container">
<h1>Release Notes</h1>
<h2 id="1.15.0">January 31, 2024 - 1.15.0</h2>
<ul>
<li></li>
</ul>
<h2 id="1.14.0">January 24, 2024 - 1.14.0</h2>
<ul>
<li></li>
Expand Down

0 comments on commit ed0df43

Please sign in to comment.