Skip to content

Commit

Permalink
add error message for limit participation reached (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay authored Sep 26, 2023
1 parent 0ac9d6b commit bf54673
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

}

.error-message-limit-participation {
text-align: center;
color: red;
margin-top: 3%;
}

.input-amount {
-webkit-appearance: none;
appearance: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ <h3 class="send_title">{{ 'monetize_your_post' | translate }}</h3>
</div>
</div>
</div>

<div *ngIf="errorMessageLimitParticipation === 'Limit participation reached'">
<p class="error-message-limit-participation">{{ 'error_limit_participation' | translate }}</p>
</div>
<div class="row send-block ">
<button
class="send-button "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class ParticiperComponent implements OnInit, AfterContentChecked {
gazproblem: boolean = false;
embedTiktokVideo: any;
privacy: string = 'public';
errorMessageLimitParticipation: string = '';
constructor(
private profilService: ProfileService,
private router: Router,
Expand Down Expand Up @@ -1465,6 +1466,7 @@ export class ParticiperComponent implements OnInit, AfterContentChecked {
//}

applyCampaign(): void {
this.errorMessageLimitParticipation = '';
let application = this.application;
if (!application) {
application = {};
Expand Down Expand Up @@ -1526,6 +1528,9 @@ export class ParticiperComponent implements OnInit, AfterContentChecked {
(error) => {
this.loadingButton = false;
this.showButtonSend = true;
if(error.error.code === 401 && error.error.error === "Limit participation reached") {
this.errorMessageLimitParticipation = error.error.error;
}
if (
error.error.code === 402 &&
error.error.error === 'Returned error: already known'
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@
"create_campaign_form.import_cover_image_mobile": "Add a mobile cover",
"create_campaign_form.max_weight": "Max weight",
"create_campaign_form.activate_limit_reach": "Activate reach max",
"error_limit_participation": "Sorry, the maximum number of participants for this campaign has been reached.",
"create_campaign_form.choose_price": "Choose the price of the publication according to the notoriety of your creators",
"create_campaign_form.followers_min": "Followers min",
"create_campaign_form.followers_max": "Followers max",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@
"insert_link_validation": "Un nouveau lien attend votre approbation pour",
"insert_link_reject":"Un nouveau lien a été rejeté pour",
"insert_link_accept":"Un nouveau lien a été accepté pour",
"error_limit_participation": "Désolé, le nombre maximal de participants à cette campagne a été atteint.",
"accept_link":"AdPool a été approuvé",
"more_reason":"Lire la raison >",
"i_understand": "J’ai compris",
Expand Down

0 comments on commit bf54673

Please sign in to comment.