-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See minimal donation details on click
also... - load donations/requests on App load - store configuration returns a function to avoid test pollution
- Loading branch information
Showing
12 changed files
with
177 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import actions from './actions'; | ||
import mutations from './mutations'; | ||
|
||
export default { | ||
export default () => ({ | ||
state: { | ||
isSignedIn: false, | ||
requests: [], | ||
donations: [], | ||
}, | ||
actions, | ||
mutations, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
<template> | ||
<div> | ||
<div class="donation-list"> | ||
<ul> | ||
<li v-for="donation in donations" :key="donation.id"> | ||
{{donation.donorName}} | ||
<li v-for="donation in donations" :key="donation.id" @click="focusOnDonation(donation)"> | ||
<div>{{donation.category}}</div> | ||
<div>{{donation.subCategory}}</div> | ||
<div>{{donation.donorName}}</div> | ||
</li> | ||
</ul> | ||
<div class="donation-details" v-if="focusedDonation"> | ||
{{focusedDonation.details}} | ||
</div> | ||
<div></div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapActions, mapState } from 'vuex'; | ||
import { mapState } from 'vuex'; | ||
export default { | ||
name: 'donation-list', | ||
mounted() { | ||
this.fetchDonations(); | ||
data() { | ||
return { | ||
focusedDonation: undefined, | ||
}; | ||
}, | ||
computed: mapState(['donations']), | ||
methods: { | ||
...mapActions(['fetchDonations']), | ||
focusOnDonation(donation) { | ||
this.focusedDonation = donation; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.donation-list { | ||
display: grid; | ||
grid-template-columns: 2fr 5fr 5fr; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.