Skip to content

Commit

Permalink
fixed UI bugs for reward-dist
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj6939 committed Jan 10, 2023
1 parent 95e23c4 commit 0c071c2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default {
{
href: "/admin/marketplace",
title: "Marketplace",
icon: "fa fa-trophy",
icon: "fas fa-store",
exactPath: true,
},
{
Expand Down
10 changes: 5 additions & 5 deletions src/components/admin/marketPlaceSlider/marketPlaceSlide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ allButtons {
<label for="placeHolder" class="col-form-label">Total:</label>
</div>
<div class="col-lg-6 col-md-6 px-0">
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{ getFriendlyValue(feeStructure.totalAmountToDistribute) - getFriendlyValue(feeStructure.fyrePlatformCommision)}}
<span v-if="feeStructure.fyrePlatformCommision!==''" style="float:right">{{ (getFriendlyValue(feeStructure.totalAmountToDistribute) - getFriendlyValue(feeStructure.fyrePlatformCommision)).toFixed(4)}}
{{feeStructure.symbol}} Tokens</span>
</div>
</div>
Expand Down Expand Up @@ -427,9 +427,9 @@ export default {
selectedProjectId:{
deep:true,
handler: function () {
if (this.$route.query.projectId) {
// this.selectedProjectId = this.$route.query.projectId
this.selectedEvent = this.$route.query.projectId
if (this.$route.params.project) {
// this.selectedProjectId = this.$route.params.project
this.selectedEvent = this.$route.params.project
this.flash = null
this.showContractField = false
this.prizeList = [];
Expand Down Expand Up @@ -772,7 +772,7 @@ export default {
this.showContractField = true
}
},
selectOption(e) {
selectOption() {
this.isCheckEveryThing = false
this.flash = null
this.simpleData = ''
Expand Down
18 changes: 5 additions & 13 deletions src/views/admin/Events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,20 +379,9 @@ i {
<span
title="Click to Distribute Reward"
style="cursor: pointer"
v-if="project.isDistributed"
@click="goToMarketPlace(project._id)"
>
<a :href="`/admin/marketplace?projectId=${project._id}`" target="_blank" class="card-body-custom">
<i class="fa fa-trophy" style="color: #39ff14"></i>
</a>
</span>
<span
title="Click to Reward Distribution"
style="cursor: pointer"
v-else
>
<a :href="`/admin/marketplace?projectId=${project._id}`" target="_blank" class="card-body-custom">
<i class="fa fa-trophy" ></i>
</a>
<i class="fa fa-trophy"></i>
</span>
<span
@click="editProject(project)"
Expand Down Expand Up @@ -645,6 +634,9 @@ export default {
},
methods: {
goToMarketPlace(projectId) {
this.$router.push({name: 'MarketPlace', params: { project: projectId }})
},
isEventExpired(d1) {
const ToDate = new Date();
if (new Date(d1).getTime() <= ToDate.getTime()) {
Expand Down
15 changes: 7 additions & 8 deletions src/views/admin/MarketPlace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,13 @@ async mounted() {
_id: null,
projectName: "Select an event",
});
await this.getDistributerDetails()
//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])
}
await this.getDistributerDetails()
if(this.$route.params.project){
const projectId = this.$route.params.project
this.selectedProjectId = projectId
//Hardcoding tool since we have only 1 tool for now
this.openMPSidebar(this.tools[0])
}
},
methods: {
async getDistributerDetails() {
Expand Down

0 comments on commit 0c071c2

Please sign in to comment.