From 84ef1818e10deddc89ad15a0d3ea9c69a7a2bb7d Mon Sep 17 00:00:00 2001 From: kachourihassen <60717797+kachourihassen@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:45:26 +0100 Subject: [PATCH] Limit participation reached (#553) Co-authored-by: haythem --- .../components/participer/participer.component.ts | 14 ++++++++++++++ src/assets/i18n/en.json | 1 + src/assets/i18n/fr.json | 1 + 3 files changed, 16 insertions(+) diff --git a/src/app/campaigns/components/participer/participer.component.ts b/src/app/campaigns/components/participer/participer.component.ts index 8f32a3733..7b051eded 100755 --- a/src/app/campaigns/components/participer/participer.component.ts +++ b/src/app/campaigns/components/participer/participer.component.ts @@ -1598,6 +1598,15 @@ export class ParticiperComponent implements OnInit, AfterContentChecked { this.error = 'wallet not found'; this.success = ''; this.loadingButton = false; + } else if (error.error.code === 'Limit participation reached'){ + this.error = 'Limit_participation_reached'; + this.success = ''; + this.loadingButton = false; + this.router.navigate([], { + queryParams: { + errorMessage: 'error' + } + }); } } else { this.error = 'error-message'; @@ -1738,6 +1747,11 @@ export class ParticiperComponent implements OnInit, AfterContentChecked { this.error = 'Lien_déjà_envoyé'; this.success = ''; this.loadingButton = false; + } + else if (err.error.text === '{error:"Limit participation reached"}') { + this.error = 'Limit_participation_reached'; + this.success = ''; + this.loadingButton = false; } else if (err.error.text === '{error:"account not linked"}') { this.connectValue = 'facebook'; this.errorResponse = 'facebook'; diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index ec55e3296..f4100ceb2 100755 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -875,6 +875,7 @@ "invite_friends_notif": "Invite your friends", "problem_faq": "problem ? Consult the FAQ", "link_already_exist": "This link already exist please try with another one!", + "Limit_participation_reached":"Limit participation reached", "oracle_not_selected_error": "You are posting a link with a social media that is not supported by this campaign, please check your link before applying!", "welcome_title": "Welcome to Post Farming", "more_info": "More info about Ad Pool", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index ea2cc9eaa..b1a0ee8bf 100755 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -20,6 +20,7 @@ "remaining_budget_notification":"Votre budget restant est actuellement de", "Aide.L’Open_Source": "L’Open Source", "copieWallet.copier": "Copier", + "Limit_participation_reached":"Limite de participation atteinte", "notification_pools_retireive_now_budget": "Vous pouvez maintenant le récupérer", "notification_pools_retreive_waiting_budget":"Vous pouvez le récupérer dans", "notification_pools_retreive_waiting_budget_days": "Jours",