From 4b972fd9d36b1eb1ded617e12a49084f27f5b8e8 Mon Sep 17 00:00:00 2001 From: raj6939 Date: Fri, 6 Jan 2023 18:01:26 +0530 Subject: [PATCH] fixed issues/1838 --- .../admin/marketPlaceSlider/marketPlaceSlide.vue | 3 ++- .../participant/ActionInputs/RewardClaimAction.vue | 9 ++++++--- src/views/admin/Events.vue | 13 +++++++++++++ src/views/participant/Event.vue | 2 +- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue b/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue index 852762dd..a78b0c51 100644 --- a/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue +++ b/src/components/admin/marketPlaceSlider/marketPlaceSlide.vue @@ -425,7 +425,8 @@ export default { this.data.inputData = [...locations] const url = `${this.$config.studioServer.BASE_URL}api/v1/reward/distribution/serviceFee`; let data = {} - data = { ...this.data } + data = { ...this.data } + data["eventId"] = this.eventToAirdrop._id const headers = { "Content-Type": "application/json", Authorization: `Bearer ${this.authToken}`, diff --git a/src/components/participant/ActionInputs/RewardClaimAction.vue b/src/components/participant/ActionInputs/RewardClaimAction.vue index 88cd362f..54f46f79 100644 --- a/src/components/participant/ActionInputs/RewardClaimAction.vue +++ b/src/components/participant/ActionInputs/RewardClaimAction.vue @@ -153,7 +153,7 @@ export default { `ABCD`; element.forEach((element, index) => { */ - console.log(list); + const groupByMake = (list = []) => { let result = []; result = list.reduce((r, a) => { @@ -166,8 +166,11 @@ export default { list = groupByMake(json) var swal_html = `
`; var groupName = `
` - this.claimData.forEach((el) => { - let ele = list[el._id] + this.claimData.forEach((el) => { + let ele = list[el._id] + if(ele === undefined) { + return + } ele.forEach((x,index)=>{ groupName = el.title swal_html = swal_html + ``+ groupName +`` diff --git a/src/views/admin/Events.vue b/src/views/admin/Events.vue index 4d904472..faf1aec6 100644 --- a/src/views/admin/Events.vue +++ b/src/views/admin/Events.vue @@ -1077,6 +1077,19 @@ export default { if(indexToFindNotification > -1) { this.eventActionList.splice(indexToFindNotification, 1); } + this.eventActionList.forEach((action)=>{ + if(action.type === "PRIZE_CARD") { + const parsedData = JSON.parse(action.value) + if(parsedData.type ==="Tokens" && parsedData.isDistributed===true) { + delete parsedData["isDistributed"]; + delete parsedData["externalRecordId"]; + delete parsedData["contractAddress"]; + delete parsedData["appBaseUrl"]; + delete parsedData["chainId"]; + return action.value = JSON.stringify(parsedData); + } + } + }) this.tagsTemp = project.tags; await this.saveProject(); }, diff --git a/src/views/participant/Event.vue b/src/views/participant/Event.vue index a850f3d5..2d311385 100644 --- a/src/views/participant/Event.vue +++ b/src/views/participant/Event.vue @@ -29,7 +29,7 @@