Skip to content

Commit

Permalink
added donation count on frontpage
Browse files Browse the repository at this point in the history
  • Loading branch information
mirmahathir1 committed Apr 6, 2024
1 parent b55c94a commit 59ee931
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .env.localproduction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#VUE_APP_BADHAN_API_BASE_URL=https://badhan-web.herokuapp.com
VUE_APP_BADHAN_API_BASE_URL=http://localhost:3000
VUE_APP_FRONTEND_BASE=http://localhost:8080
NODE_ENV=production
VUE_APP_DATAINPUT_URL=https://badhan-datainput.netlify.app
VUE_APP_ADMIN_CONSOLE_URL=https://badhan-admin.web.app/
VUE_APP_ENVIRONMENT=production
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"serve:local": "vue-cli-service serve --mode local",
"serve:testing": "npm run build:testing && http-server dist",
"serve:production": "npm run build && http-server dist",
"serve:localproduction": "vue-cli-service serve --mode localproduction",
"build": "vue-cli-service build",
"build:testing": "vue-cli-service build --mode testing",
"build:development": "vue-cli-service build --mode development",
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const handleGETLogs = async () => {

const handleGETLogsDonations = async () => {
try {
return await badhanAxios.get('/log/donations')
return await badhanAxios.get(`/log/donations`)
} catch (e) {
return (e as BadhanAxiosErrorInterface<BadhanAxiosResponseDataInterface>).response
}
Expand Down
4 changes: 0 additions & 4 deletions src/views/Statistics/DonationReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
</template>
</v-simple-table>
<v-card-text>
<p>New Donors Added: {{newDonorCount}}</p>
<p>Count of Donors who Donated for the First Time: {{ firstDonationOfDonorCount }}</p>
</v-card-text>
</v-card-text>
Expand Down Expand Up @@ -111,7 +110,6 @@ export default {
endDateMenu: false,
endDate: '',
headers: ['Name of Month', ...bloodGroups, 'Total'],
newDonorCount: 0,
firstDonationOfDonorCount: 0
}
},
Expand All @@ -133,8 +131,6 @@ export default {
this.reportLoader = false
if (response.status !== 200) return
this.newDonorCount = response.data.newDonorCreated
const reportObject = {}
response.data.report.forEach(bloodGroupData=>{
Expand Down

0 comments on commit 59ee931

Please sign in to comment.