Skip to content

Commit

Permalink
BugFix: 🐞MarketPlaceSlider Auto Select on ProjectID on url
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramide committed Jan 8, 2023
1 parent 88a60a1 commit 289d6e5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
36 changes: 22 additions & 14 deletions src/components/admin/marketPlaceSlider/marketPlaceSlide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ allButtons {
<b-card :style="buttonThemeCss">
<b-card-title>{{stickyNoteTitle}}</b-card-title>
<b-card-text>
Bank tool is set of tools to manage tokens developed by Finance.vote,
We have integrated the Bulk airdrop to reduce gas cost.
This tool is to distribute ERC20 reward developed by Finance.vote,
It can help to send reward to large number of wallets at low cost.
</b-card-text>
<b-card-text class="small text-muted">
<b-link target="_blank" href="https://finance.vote/">Website</b-link> |
Expand Down Expand Up @@ -160,7 +160,7 @@ allButtons {
</div>
<div class="row g-3 align-items-center w-100 mt-4 ml-2" v-if="showContractField">
<div class="col-lg-12 col-md-12 px-0">
<label for="placeHolder" class="col-form-label">Recipients and Amounts (in Wei): </label>
<label for="placeHolder" class="col-form-label">Recipients and Amounts <a target="_blank" href="https://www.eth-to-wei.com/">(in Wei):</a></label>
<b-alert v-model="showDismissibleAlert.status" variant="danger" dismissible>
{{ showDismissibleAlert.text }}
</b-alert>
Expand Down Expand Up @@ -414,18 +414,25 @@ export default {
this.$root.$on("resetMarketPlaceSlide", () => {
this.resetAllValues();
});
console.log(this.selectedProjectId, 'selectedProjectId')
console.log(this.selectedEvent, 'selectedEvent')
if (this.selectedProjectId){
this.selectedEvent = this.selectedProjectId
console.log(this.selectedEvent,'selectedEvent')
this.flash = null
this.showContractField = false
this.prizeList = [];
this.setPrizeList()
}
console.log(this.$route.query.projectId, 'this.$route.query.projectId')
},
watch: {
selectedProjectId:{
deep:true,
handler: function () {
if (this.$route.query.projectId) {
// this.selectedProjectId = this.$route.query.projectId
this.selectedEvent = this.$route.query.projectId
console.log(this.selectedEvent, 'selectedEvent')
this.flash = null
this.showContractField = false
this.prizeList = [];
this.setPrizeList()
}
}
},
selectedTool:{
deep:true,
handler: function(newValue) {
Expand All @@ -442,7 +449,7 @@ export default {
})
}
}
},
},
methods: {
resetAllValues () {
//To Do
Expand Down Expand Up @@ -730,6 +737,7 @@ export default {
if (JSON.parse(prize.value).isDistributed === true) {
return this.notifyErr('Reward distribution is already created')
}
this.isCheckEveryThing = false
this.flash = prize
if (this.selectedEvent !== null) {
this.showContractField = true
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/Events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ i {

<small style="float: right">
<span
title="Click to Reward Distribution"
title="Click to Distribute Reward"
style="cursor: pointer"
v-if="project.isDistributed"
>
Expand Down
3 changes: 2 additions & 1 deletion src/views/admin/MarketPlace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
errors: [],
authToken: null,
accessToken: null,
selectedProjectId:'',
selectedProjectId:null,
};
},
async mounted() {
Expand All @@ -160,6 +160,7 @@ async mounted() {
//Hardcoding tool since we have only 1 tool for now
if (this.$route.query.projectId) {
this.selectedProjectId = this.$route.query.projectId;
console.log(this.selectedProjectId,'pid')
this.openMPSidebar(this.tools[0])
}
Expand Down

0 comments on commit 289d6e5

Please sign in to comment.