Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
micnori committed Apr 10, 2024
2 parents a38a323 + 2764a01 commit d7b27cb
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 28 deletions.
4 changes: 4 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ <h1 class="warning-user-not-valid">
<h2 style="margin-left: 20px;">{{'loading' | translate}}...</h2>
</div>
</div>
<div class="footer" #footer>
<button mat-button (click)="privacy($event)">{{"privacy" | translate}}</button>

</div>
</div>
<mat-menu #menu="matMenu">
<div style="padding: 5px;">
Expand Down
19 changes: 18 additions & 1 deletion src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
float: left;
z-index: -30;
margin-top: 60px;
padding-bottom: 64px;

}

.loading-container {
Expand Down Expand Up @@ -124,4 +126,19 @@
.lang{
width: 60%;
max-width: 200px;
}
}

.footer {
position: fixed;
bottom: 0;
width: 100%;
height: 32px;
background-color:#01579b;
color: #ffffff;
text-align: center;
margin: 0px;
display: flex;
align-items: center;
flex-direction: row-reverse;
z-index: 999;
}
19 changes: 6 additions & 13 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from "@angular/core";
import { Component, ElementRef, OnInit, ViewChild } from "@angular/core";
import { TranslateService } from "@ngx-translate/core";
import { LoadingService } from "./shared/services/loading.service";
import { delay } from "rxjs/operators";
Expand Down Expand Up @@ -32,6 +32,8 @@ export interface Tile {
styleUrls: ["./app.component.scss"],
})
export class AppComponent implements OnInit {
@ViewChild("footer") footer: ElementRef;

title = "backOfficeConsolePlayGo";
loading: boolean = false;
territories: TerritoryClass[];
Expand Down Expand Up @@ -195,17 +197,8 @@ export class AppComponent implements OnInit {
logout(event: any){
this.authService.logout();
}


// waitForRoles() {
// if (typeof Worker !== 'undefined') {
// //
// const worker = new Worker('../src/app/shared/workers/role.worker.ts', { type: 'module' });
// worker.onmessage = ({ data }) => {
// this.roles = data;
// };
// } else {
// }
// }
privacy(event:any) {
window.open("https://playngo.it/privacy-cookies/", "_blank");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,21 @@ export class ConsoleControllerService {
);
}

public revalidateSoftTrackUsingGET(args: {
trackedInstanceId: string;
}): Observable<any> {
const { trackedInstanceId } = args;
return this.http.request<any>(
"get",
environment.serverUrl.api + `/playandgo/api/console/track/validate`,
{
params: removeNullOrUndefined({
trackedInstanceId,
}),
}
);
}

/**
* searchPlayersByTerritory
*
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/campaign/rewards/rewards.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h1 class="full-width">{{ 'weeklyPrizes'| translate}}</h1>
translate}} </th>
<td mat-cell *matCellDef="let element">
<p *ngFor="let item of element.rewards;let i =index">
{{i+1}}°: {{item.desc[selectedLang]}}
{{i+1}}°: {{item.label[selectedLang]}} --- {{item.desc[selectedLang]}}
</p>
</td>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</mat-paginator>
</div>
<div class="info-track">
<mat-card class="card-normal full-dimension" style="height: auto;" *ngIf="!!selectedTrack">
<mat-card class="card-normal full-dimension" style="height: auto; padding-bottom: 64px;" *ngIf="!!selectedTrack">
<div class="header-detatils">
<div class="left-header">
<mat-card class="card-normal full-dimension"
Expand Down Expand Up @@ -589,6 +589,14 @@
</mat-icon>
{{'modifyTrack' | translate}}
</button>
<button class="margin-5" mat-flat-button color="primary" (click)="revalidateSoft()">
<mat-icon>
<span class="material-icons-outlined">
verified
</span>
</mat-icon>
{{'revalidateSoftTrack' | translate}}
</button>
</mat-card-content>
</mat-card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,24 @@ export class ValidationTrackComponent implements OnInit {
});
}

revalidateSoft() {
var check = confirm("Confermi?");
if(check) {
this.trackingServiceInternal.revalidateSoftTrackUsingGET({
trackedInstanceId: this.selectedTrack.trackedInstance.id,
})
.subscribe((res) => {
this._snackBar.open(
this.translate.instant("rivalidationInProgress"),
this.translate.instant("close"),
{
duration: 7500,
}
);
});
}
}

valueOfCheck(value): boolean {
if (value === null) {
return true;
Expand Down Expand Up @@ -1248,7 +1266,9 @@ export class ValidationTrackComponent implements OnInit {
campaign.campaignId,
this.selectedTrack.trackedInstance.id
);
this.trackingServiceInternal
var check = confirm("Confermi?");
if(check) {
this.trackingServiceInternal
.revalidateTrackUsingGET({
territoryId: this.territoryId,
campaignId: campaign.campaignId,
Expand All @@ -1263,6 +1283,7 @@ export class ValidationTrackComponent implements OnInit {
}
);
});
}
}

createDate(timestamp: number, secondsDisplay = true): string {
Expand Down
20 changes: 10 additions & 10 deletions src/assets/files/rewDownload.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
settimana,posizione,desc_it,desc_en,note_premio_it,note_premio_en,nome_sponsor,descrizione_sponsor_it,descrizione_sponsor_en,website_sponsor,assegnato_a
1,1,"premio 1° classificato it","premio 1° classificato en","nota premio it","nota premio en","Sponsor srl","desc sponsor it","desc sponsor en","http://www.test.it",
1,2,"premio 2° classificato it","premio 2° classificato en",,,,,,,
1,3,"premio 3° classificato it","premio 3° classificato en",,,,,,,
2,1,"premio 1° classificato it","premio 1° classificato en",,,,,,,
2,2,"premio 2° classificato it","premio 2° classificato en",,,,,,,
2,3,"premio 3° classificato it","premio 3° classificato en",,,,,,,
3,1,"premio 1° classificato it","premio 1° classificato en",,,,,,,
3,2,"premio 2° classificato it","premio 2° classificato en",,,,,,,
3,3,"premio 3° classificato it","premio 3° classificato en",,,,,,,
settimana,posizione,label_it,label_en,desc_it,desc_en,note_premio_it,note_premio_en,nome_sponsor,descrizione_sponsor_it,descrizione_sponsor_en,website_sponsor,assegnato_a
1,1,"classifica generale it","classifica generale en","premio 1° classificato it","premio 1° classificato en","nota premio it","nota premio en","Sponsor srl","desc sponsor it","desc sponsor en","http://www.test.it",
1,2,"classifica generale it","classifica generale en","premio 2° classificato it","premio 2° classificato en",,,,,,,
1,3,"classifica generale it","classifica generale en","premio 3° classificato it","premio 3° classificato en",,,,,,,
2,1,"classifica generale it","classifica generale en","premio 1° classificato it","premio 1° classificato en",,,,,,,
2,2,"classifica generale it","classifica generale en","premio 2° classificato it","premio 2° classificato en",,,,,,,
2,3,"classifica generale it","classifica generale en","premio 3° classificato it","premio 3° classificato en",,,,,,,
3,1,"classifica generale it","classifica generale en","premio 1° classificato it","premio 1° classificato en",,,,,,,
3,2,"classifica generale it","classifica generale en","premio 2° classificato it","premio 2° classificato en",,,,,,,
3,3,"classifica generale it","classifica generale en","premio 3° classificato it","premio 3° classificato en",,,,,,,
3 changes: 3 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
"currentBanner":"Current banner",
"newBanner":"New banner",
"modifyTrack":"Edit trip",
"revalidateSoftTrack":"Revalidate trip",
"newTime":"Bew time",
"newModeType":"New mean",
"notes":"Notes",
Expand Down Expand Up @@ -295,6 +296,7 @@
"selectAll":"Select all",
"publicTransportAvailable":"public transport available for the selected track",
"alwaysActive":"Always active",
"revalidateTrack":"Revalidate",
"currentTime":"Current time",
"allPlayers":"All the players",
"save_new_track":"Save modified track",
Expand Down Expand Up @@ -351,6 +353,7 @@
"hideCompanyDesc":"Hide company descriptions",
"registrationCompanyDesc":"Registration form message",
"limitCompanyDesc":"Limit popup message",
"privacy":"Privacy policy",
"":"",
"":"",
"":"",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"currentBanner":"Banner in uso",
"newBanner":"Nuovo banner",
"modifyTrack":"Modifica viaggio",
"revalidateSoftTrack":"Rivalida viaggio",
"newTime":"Tempo nuovo",
"newModeType":"Nuovo mezzo",
"notes":"Note",
Expand Down Expand Up @@ -356,7 +357,7 @@
"hideCompanyDesc":"Nascondi dati aziendali",
"registrationCompanyDesc":"Messaggio form iscrizione",
"limitCompanyDesc":"Messaggio popup limiti",
"":"",
"privacy":"Privacy policy",
"":"",
"":"",
"":"",
Expand Down

0 comments on commit d7b27cb

Please sign in to comment.