rajah 7 ماه پیش
والد
کامیت
8d548f2603
31فایلهای تغییر یافته به همراه196 افزوده شده و 92 حذف شده
  1. 5 5
      src/app/app.routes.ts
  2. 1 1
      src/app/composants/account-update/account-update.component.ts
  3. 2 2
      src/app/composants/categorie-create/categorie-create.component.ts
  4. 1 1
      src/app/composants/categorie-details/categorie-details.component.ts
  5. 17 4
      src/app/composants/categorie-list/categorie-list.component.ts
  6. 3 3
      src/app/composants/categorie-update/categorie-update.component.ts
  7. 5 1
      src/app/composants/chat/chat.component.ts
  8. 14 14
      src/app/composants/menu/menu.component.html
  9. 2 2
      src/app/composants/participant-create/participant-create.component.ts
  10. 1 1
      src/app/composants/participant-details/participant-details.component.ts
  11. 15 3
      src/app/composants/participant-list/participant-list.component.ts
  12. 3 3
      src/app/composants/participant-update/participant-update.component.ts
  13. 2 2
      src/app/composants/production-create/production-create.component.ts
  14. 1 1
      src/app/composants/production-details/production-details.component.html
  15. 1 1
      src/app/composants/production-details/production-details.component.ts
  16. 1 1
      src/app/composants/production-list/production-list.component.html
  17. 20 6
      src/app/composants/production-list/production-list.component.ts
  18. 3 3
      src/app/composants/production-update/production-update.component.ts
  19. 6 4
      src/app/composants/production-upload/production-upload.component.ts
  20. 1 1
      src/app/composants/show-links/show-links.component.ts
  21. 2 2
      src/app/composants/show-list/show-list.component.html
  22. 15 5
      src/app/composants/show-list/show-list.component.ts
  23. 27 6
      src/app/composants/show-upload/show-upload.component.html
  24. 17 6
      src/app/composants/show-upload/show-upload.component.ts
  25. 2 2
      src/app/composants/variable-create/variable-create.component.ts
  26. 3 3
      src/app/composants/variable-details/variable-details.component.ts
  27. 18 4
      src/app/composants/variable-list/variable-list.component.ts
  28. 3 3
      src/app/composants/variable-update/variable-update.component.ts
  29. 1 1
      src/app/composants/webcam-list/webcam-list.component.ts
  30. 2 1
      src/app/interfaces/production.ts
  31. 2 0
      src/app/services/presentation.service.ts

+ 5 - 5
src/app/app.routes.ts

@@ -46,24 +46,24 @@ export const routes: Routes = [
   {path: 'account-details', component: AccountDetailsComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'account-update', component: AccountUpdateComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'account-password', component: AccountPasswordComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
-  {path: 'variable-list', component: VariableListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always'},
+  {path: 'variable-list/:refresh', component: VariableListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always'},
   {path: 'variable-create', component: VariableCreateComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always'},
   {path: 'variable-details/:numeroVariable', component: VariableDetailsComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always'},
   {path: 'variable-update/:numeroVariable', component: VariableUpdateComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always'},
-  {path: 'categorie-list', component: CategorieListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
+  {path: 'categorie-list/:refresh', component: CategorieListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
   {path: 'categorie-create', component: CategorieCreateComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
   {path: 'categorie-details/:numeroCategorie', component: CategorieDetailsComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
   {path: 'categorie-update/:numeroCategorie', component: CategorieUpdateComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
-  {path: 'participant-list', component: ParticipantListComponent, canActivate: [OrgaGuard], runGuardsAndResolvers: 'always' },
+  {path: 'participant-list/:refresh', component: ParticipantListComponent, canActivate: [OrgaGuard], runGuardsAndResolvers: 'always' },
   {path: 'participant-create', component: ParticipantCreateComponent, canActivate: [OrgaGuard], runGuardsAndResolvers: 'always' },
   {path: 'participant-details/:numeroParticipant', component: ParticipantDetailsComponent, canActivate: [OrgaGuard], runGuardsAndResolvers: 'always' },
   {path: 'participant-update/:numeroParticipant', component: ParticipantUpdateComponent, canActivate: [OrgaGuard], runGuardsAndResolvers: 'always' },
-  {path: 'production-list', component: ProductionListComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
+  {path: 'production-list/:refresh', component: ProductionListComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'production-create', component: ProductionCreateComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'production-details/:numeroProduction', component: ProductionDetailsComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'production-update/:numeroProduction', component: ProductionUpdateComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
   {path: 'production-upload/:numeroProduction', component: ProductionUploadComponent, canActivate: [UserGuard], runGuardsAndResolvers: 'always' },
-  {path: 'show-list', component: ShowListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
+  {path: 'show-list/:refresh', component: ShowListComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
   {path: 'show-links/:numeroCategorie', component: ShowLinksComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
   {path: 'show-upload/:numeroProduction', component: ShowUploadComponent, canActivate: [AdminGuard], runGuardsAndResolvers: 'always' },
 ];

+ 1 - 1
src/app/composants/account-update/account-update.component.ts

@@ -40,7 +40,7 @@ export class AccountUpdateComponent implements OnInit
     this.accountService.getProfil().subscribe(data => { this.participant = data; });
   }
 
-  updateConfirmed() { if (this.participantForm.valid) { this.accountService.updateProfil(this.participant).subscribe(); this.goToHome(); } }
+  updateConfirmed() { if (this.participantForm.valid) { this.accountService.updateProfil(this.participant).subscribe(() => { this.goToHome(); });  } }
 
   goToHome() { this.router.navigate(['/'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
 

+ 2 - 2
src/app/composants/categorie-create/categorie-create.component.ts

@@ -17,10 +17,10 @@ export class CategorieCreateComponent implements OnInit
 
   ngOnInit() { }
 
-  private saveCategorie() { this.categorieService.createCategorie(this.categorie).subscribe(); this.goToListCategorie(); }
+  private saveCategorie() { this.categorieService.createCategorie(this.categorie).subscribe(() => { this.goToListCategorie(); }); }
 
   addCategorie() { if (this.categorieForm.valid) { this.saveCategorie(); } }
 
-  goToListCategorie() {this.router.navigate(['/categorie-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListCategorie() { this.router.navigate(['/categorie-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/categorie-details/categorie-details.component.ts

@@ -26,6 +26,6 @@ export class CategorieDetailsComponent implements OnInit
 
   updateCategorie(id: number) { this.router.navigate(['/categorie-update', id]); }
 
-  goToListCategorie(){ this.router.navigate(['/categorie-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListCategorie() { this.router.navigate(['/categorie-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 17 - 4
src/app/composants/categorie-list/categorie-list.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
 
 import { MenuComponent } from '../menu/menu.component';
 import { Categorie } from '../../interfaces/categorie';
@@ -9,12 +9,25 @@ import { CategorieService } from '../../services/categorie.service';
 
 export class CategorieListComponent implements OnInit
 {
+  refresh: number = 0;
 
   categories: Categorie[] = [];
 
-  constructor(private categorieService: CategorieService, private router: Router) { }
-
-  ngOnInit() { this.retreiveDatas(); }
+  constructor(
+    private categorieService: CategorieService,
+    private router: Router,
+    private route: ActivatedRoute
+  )
+  {
+    this.router.routeReuseStrategy.shouldReuseRoute = function() { return false; }
+    this.router.events.subscribe((evt) => { if (evt instanceof NavigationEnd) { this.router.navigated = false; window.scrollTo(0, 0); } });
+  }
+
+  ngOnInit()
+  {
+    this.refresh = this.route.snapshot.params['refresh'];
+    this.goToRefreshListCategorie();
+  }
 
   private retreiveDatas() { this.categorieService.getListCategorie().subscribe(data => { this.categories = data; }); }
 

+ 3 - 3
src/app/composants/categorie-update/categorie-update.component.ts

@@ -23,10 +23,10 @@ export class CategorieUpdateComponent implements OnInit
     this.categorieService.getByIdCategorie(this.numeroCategorie).subscribe(data => { this.categorie = data; });
   }
 
-  updateConfirmed() { if (this.categorieForm.valid) { this.categorieService.updateCategorie(this.numeroCategorie, this.categorie).subscribe(); this.goToListCategorie(); } }
+  updateConfirmed() { if (this.categorieForm.valid) { this.categorieService.updateCategorie(this.numeroCategorie, this.categorie).subscribe(() => { this.goToListCategorie(); }); } }
 
-  deleteConfirmed() { this.categorieService.deleteCategorie(this.numeroCategorie).subscribe(); this.goToListCategorie(); }
+  deleteConfirmed() { this.categorieService.deleteCategorie(this.numeroCategorie).subscribe(() => { this.goToListCategorie(); }); }
 
-  goToListCategorie(){ this.router.navigate(['/categorie-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListCategorie() { this.router.navigate(['/categorie-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 5 - 1
src/app/composants/chat/chat.component.ts

@@ -25,7 +25,11 @@ export class ChatComponent implements OnInit
 
   pseudonymes: PseudonymeList[] = [];
 
-  constructor(private chatService: ChatService, private accountService: AccountService, private router: Router) { }
+  constructor(
+    private chatService: ChatService,
+    private accountService: AccountService,
+    private router: Router
+  ) { }
 
   ngOnInit()
   {

+ 14 - 14
src/app/composants/menu/menu.component.html

@@ -21,9 +21,9 @@
 
 		<li><a routerLink="/chat" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Messagerie" placement="right" container="body"><i class="fa-solid fa-comments"></i></a></li>
 
-    <li><a routerLink="/production-list" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
-		<li><a routerLink="/vote-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
-		<li><a routerLink="/result-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
+    <li><a routerLink="/production-list/0" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
+		<li><a routerLink="/vote-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
+		<li><a routerLink="/result-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
 
 	</ul>
 </div>
@@ -40,11 +40,11 @@
 
 		<li><a routerLink="/chat" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Messagerie" placement="right" container="body"><i class="fa-solid fa-comments"></i></a></li>
 
-    <li><a routerLink="/participant-list" routerLinkActive="active" #usersicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Participants" placement="right" container="body"><i class="fa-solid fa-users"></i></a></li>
+    <li><a routerLink="/participant-list/0" routerLinkActive="active" #usersicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Participants" placement="right" container="body"><i class="fa-solid fa-users"></i></a></li>
 
-    <li><a routerLink="/production-list" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
-		<li><a routerLink="/vote-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
-		<li><a routerLink="/result-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
+    <li><a routerLink="/production-list/0" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
+		<li><a routerLink="/vote-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
+		<li><a routerLink="/result-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
 	</ul>
 </div>
 
@@ -60,15 +60,15 @@
 
 		<li><a routerLink="/chat" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Messagerie" placement="right" container="body"><i class="fa-solid fa-comments"></i></a></li>
 
-    <li><a routerLink="/participant-list" routerLinkActive="active" #usersicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Participants" placement="right" container="body"><i class="fa-solid fa-users"></i></a></li>
+    <li><a routerLink="/participant-list/0" routerLinkActive="active" #usersicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Participants" placement="right" container="body"><i class="fa-solid fa-users"></i></a></li>
 
-    <li><a routerLink="/categorie-list" routerLinkActive="active" #compoicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Catégories" placement="right" container="body"><i class="fa-solid fa-layer-group"></i></a></li>
-    <li><a routerLink="/production-list" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
-		<li><a routerLink="/show-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Présentations" placement="right" container="body"><i class="fa-solid fa-display"></i></a></li>
-		<li><a routerLink="/poll-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
-		<li><a routerLink="/result-list" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
+    <li><a routerLink="/categorie-list/0" routerLinkActive="active" #compoicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Catégories" placement="right" container="body"><i class="fa-solid fa-layer-group"></i></a></li>
+    <li><a routerLink="/production-list/0" routerLinkActive="active" #prodsicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Productions" placement="right" container="body"><i class="fa-solid fa-save"></i></a></li>
+		<li><a routerLink="/show-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Présentations" placement="right" container="body"><i class="fa-solid fa-display"></i></a></li>
+		<li><a routerLink="/poll-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Voter" placement="right" container="body"><i class="fa-solid fa-vote-yea"></i></a></li>
+		<li><a routerLink="/result-list/0" routerLinkActive="active" class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Résultats" placement="right" container="body"><i class="fa-solid fa-trophy"></i></a></li>
 
-    <li><a routerLink="/variable-list" routerLinkActive="active" #variaicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Paramétrages" placement="right" container="body"><i class="fa-solid fa-sliders-h"></i></a></li>
+    <li><a routerLink="/variable-list/0" routerLinkActive="active" #variaicon class="nav-link rounded-0 bg-gradient" i18n-tooltip tooltip="Paramétrages" placement="right" container="body"><i class="fa-solid fa-sliders-h"></i></a></li>
 	</ul>
 </div>
 

+ 2 - 2
src/app/composants/participant-create/participant-create.component.ts

@@ -42,10 +42,10 @@ export class ParticipantCreateComponent implements OnInit
     this.diversService.getJournees().subscribe(data => { this.journees = data; });
   }
 
-  private saveParticipant() { this.participantService.createParticipant(this.participant).subscribe(); this.goToListParticipant(); }
+  private saveParticipant() { this.participantService.createParticipant(this.participant).subscribe(() => { this.goToListParticipant(); }); }
 
   addParticipant() { if (this.participantForm.valid) { this.saveParticipant(); } }
 
-  goToListParticipant() { this.router.navigate(['/participant-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListParticipant() { this.router.navigate(['/participant-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/participant-details/participant-details.component.ts

@@ -48,6 +48,6 @@ export class ParticipantDetailsComponent implements OnInit
 
   updateParticipant(id: number) { this.router.navigate(['/participant-update', id]); }
 
-  goToListParticipant() { this.router.navigate(['/participant-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListParticipant() { this.router.navigate(['/participant-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 15 - 3
src/app/composants/participant-list/participant-list.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
 import { FormsModule, NgForm } from '@angular/forms';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
 
@@ -13,6 +13,7 @@ import { DiversService } from '../../services/divers.service'
 
 export class ParticipantListComponent implements OnInit
 {
+  refresh: number = 0;
 
   journees: Journees = new Journees();
 
@@ -25,14 +26,25 @@ export class ParticipantListComponent implements OnInit
 
   participants: ParticipantList[] = [];
 
-  constructor(private diversService: DiversService, private participantService: ParticipantService, private router: Router) { }
+  constructor(
+    private diversService: DiversService,
+    private participantService: ParticipantService,
+    private router: Router,
+    private route: ActivatedRoute
+  )
+  {
+    this.router.routeReuseStrategy.shouldReuseRoute = function() { return false; }
+    this.router.events.subscribe((evt) => { if (evt instanceof NavigationEnd) { this.router.navigated = false; window.scrollTo(0, 0); } });
+  }
 
   ngOnInit()
   {
+    this.refresh = this.route.snapshot.params['refresh'];
+
     this.journees = new Journees();
     this.diversService.getJournees().subscribe(data => { this.journees = data; });
 
-    this.retreiveDatas();
+    this.goToRefreshListParticipant();
   }
 
   private retreiveDatas() { this.participantService.getListParticipant(this.nomFiltre, this.statutFiltre, this.arriveFiltre, this.listeTri).subscribe(data => { this.participants = data; }); }

+ 3 - 3
src/app/composants/participant-update/participant-update.component.ts

@@ -47,10 +47,10 @@ export class ParticipantUpdateComponent implements OnInit
     this.participantService.getByIdParticipant(this.numeroParticipant).subscribe(data => { this.participant = data; });
   }
 
-  updateConfirmed() { if (this.participantForm.valid) { this.participantService.updateParticipant(this.numeroParticipant, this.participant).subscribe(); this.goToListParticipant(); } }
+  updateConfirmed() { if (this.participantForm.valid) { this.participantService.updateParticipant(this.numeroParticipant, this.participant).subscribe(() => { this.goToListParticipant(); }); } }
 
-  deleteConfirmed() { this.participantService.deleteParticipant(this.numeroParticipant).subscribe(); this.goToListParticipant(); }
+  deleteConfirmed() { this.participantService.deleteParticipant(this.numeroParticipant).subscribe(() => { this.goToListParticipant(); }); }
 
-  goToListParticipant() { this.router.navigate(['/participant-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListParticipant() { this.router.navigate(['/participant-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 2 - 2
src/app/composants/production-create/production-create.component.ts

@@ -67,10 +67,10 @@ export class ProductionCreateComponent implements OnInit
 		}
   }
 
-  private saveProduction() { this.productionService.createProduction(this.production).subscribe(); this.goToListProduction(); }
+  private saveProduction() { this.productionService.createProduction(this.production).subscribe(() => { this.goToListProduction(); }); }
 
   addProduction() { if (this.productionForm.valid) { this.saveProduction(); } }
 
-  goToListProduction() {this.router.navigate(['/production-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListProduction() { this.router.navigate(['/production-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/production-details/production-details.component.html

@@ -92,7 +92,7 @@
 		<div class="form-group row">
 			<label class="col-sm-4 col-form-label col-form-label-sm label-nobr"><span i18n>Vignette</span></label>
 			<div class="col-sm-8">
-				<img src="{{ production.vignette }}" alt="" class="img-fluid rounded-2">
+				<img [src]="production.vignette" alt="" class="img-fluid rounded-2">
 			</div>
 		</div>
 

+ 1 - 1
src/app/composants/production-details/production-details.component.ts

@@ -30,6 +30,6 @@ export class ProductionDetailsComponent implements OnInit
 
   updateProduction(id: number) { this.router.navigate(['/production-update', id]); }
 
-  goToListProduction() {this.router.navigate(['/production-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListProduction() { this.router.navigate(['/production-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/production-list/production-list.component.html

@@ -34,7 +34,7 @@
 <div class="d-flex flex-wrap">
 	@for (production of productions; track production.numeroProduction) {
   	<div class="card shadow" style="max-width:17rem;">
-			<img src="{{ production.vignette }}" class="img-fluid card-img-top pointeur-souris" (click)="formProduction(production.numeroProduction)">
+			<img [src]="production.vignette" class="img-fluid card-img-top pointeur-souris" (click)="formProduction(production.numeroProduction)">
 			<div class="card-header">
   			<span class="card-title">@if (production.type === types[0].key) { <i class="fa-solid fa-square-binary"></i> } @else if (production.type === types[1].key) { <i class="fa-solid fa-image"></i> } @else if (production.type === types[2].key) { <i class="fa-solid fa-music"></i> } @else if (production.type === types[3].key) { <i class="fa-solid fa-video"></i> } @else if (production.type === types[4].key) { <i class="fa-solid fa-comment"></i> } @else { <i class="fa-solid fa-question"></i> }
 	  		<a (click)="formProduction(production.numeroProduction)" class="text-primary pointeur-souris" style="margin-left:7px;">{{ production.titre }}</a></span><br/>

+ 20 - 6
src/app/composants/production-list/production-list.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
 import { FormsModule, NgForm } from '@angular/forms';
 import { saveAs } from 'file-saver';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
@@ -12,24 +12,38 @@ import { ProductionService } from '../../services/production.service';
 
 export class ProductionListComponent implements OnInit
 {
+  refresh: number = 0;
+
   productions: ProductionShort[] = [];
 
   types: ProductionEnum[] = ProductionTypeList;
   typeFiltre: string = "";
   soloFiltre: number = 0;
 
-  constructor(private productionService: ProductionService, private router: Router) { }
-
-  ngOnInit() { this.retreiveDatas(); }
+  constructor(
+    private productionService: ProductionService,
+    private router: Router,
+    private route: ActivatedRoute
+  )
+  {
+    this.router.routeReuseStrategy.shouldReuseRoute = function() { return false; }
+    this.router.events.subscribe((evt) => { if (evt instanceof NavigationEnd) { this.router.navigated = false; window.scrollTo(0, 0); } });
+  }
+
+  ngOnInit()
+  {
+    this.refresh = this.route.snapshot.params['refresh'];
+    this.goToRefreshListProduction();
+  }
 
   private retreiveDatas() { this.productionService.getListProduction(this.typeFiltre, this.soloFiltre).subscribe(data => { this.productions = data; }); }
 
   filtrageParType(event: any) { this.typeFiltre = event.target.value; this.goToRefreshListProduction(); }
   filtrageParSolo(event: any) { this.soloFiltre = event.target.value; this.goToRefreshListProduction(); }
 
-  goToRefreshListProduction(){ this.retreiveDatas(); }
+  goToRefreshListProduction() { this.retreiveDatas(); }
 
-  goToNewProduction(){ this.router.navigate(['/production-create']); }
+  goToNewProduction() { this.router.navigate(['/production-create']); }
 
   formProduction(id: number) { this.router.navigate(['/production-details', id]); }
 

+ 3 - 3
src/app/composants/production-update/production-update.component.ts

@@ -48,12 +48,12 @@ export class ProductionUpdateComponent implements OnInit
 		}
   }
 
-  private saveProduction() { this.productionService.updateProduction(this.numeroProduction, this.production).subscribe(); this.goToListProduction(); }
+  private saveProduction() { this.productionService.updateProduction(this.numeroProduction, this.production).subscribe(() => { this.goToListProduction(); }); }
 
   updateConfirmed() { if (this.productionForm.valid) { this.saveProduction(); } }
 
-  deleteConfirmed() { this.productionService.deleteProduction(this.numeroProduction).subscribe(); this.goToListProduction(); }
+  deleteConfirmed() { this.productionService.deleteProduction(this.numeroProduction).subscribe(() => { this.goToListProduction(); }); }
 
-  goToListProduction() {this.router.navigate(['/production-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListProduction() { this.router.navigate(['/production-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 6 - 4
src/app/composants/production-upload/production-upload.component.ts

@@ -1,6 +1,6 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
 import { ActivatedRoute, Router } from '@angular/router';
-import { FormsModule } from '@angular/forms';
+import { FormsModule, NgForm } from '@angular/forms';
 
 import { MenuComponent } from '../menu/menu.component';
 import { ProductionFile } from '../../interfaces/production';
@@ -11,6 +11,8 @@ import { ProductionService } from '../../services/production.service';
 export class ProductionUploadComponent implements OnInit
 {
 
+  @ViewChild('formRef') productionForm!: NgForm;
+
   production: ProductionFile = new ProductionFile();
 
   numeroProduction: number = 0;
@@ -40,10 +42,10 @@ export class ProductionUploadComponent implements OnInit
 		}
   }
 
-  private saveProduction() { this.productionService.uploadProductionFile(this.numeroProduction, this.production).subscribe(); this.goToListProduction(); }
+  private saveProduction() { this.productionService.uploadProductionFile(this.numeroProduction, this.production).subscribe(() => { this.goToListProduction(); });  }
 
   addProductionFile() { this.saveProduction(); }
 
-  goToListProduction() {this.router.navigate(['/production-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListProduction() { this.router.navigate(['/production-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/show-links/show-links.component.ts

@@ -57,7 +57,7 @@ export class ShowLinksComponent implements OnInit
   resetLettre() { this.indexLettre = 0; }
   nextLettre(): string { if ((this.indexLettre >= 0) && (this.indexLettre < 26)) { this.indexLettre++; return "#" + this.lettresOrdre[this.indexLettre - 1];  } return ""; }
 
-  goToListPresentations() { this.router.navigate(['/show-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListPresentations() { this.router.navigate(['/show-list', this.menu.getRandomInteger(1, 100000)]); }
 
   changeEtatBoutonsUnlinked(event: any)
   {

+ 2 - 2
src/app/composants/show-list/show-list.component.html

@@ -25,7 +25,7 @@
   <div class="card-body hstack align-items-baseline show_row">
 {{ resetLettre() }} @for (production of productions; track production.numeroProduction) { @if (categorie.numeroCategorie == production.numeroCategorie) {
     <div class="card shadow show_item" [class.show_red]="production.etatMedia === 0">
-      <img src="{{ production.vignette }}" class="img-fluid card-img-top pointeur-souris" (click)="formPresentation(production.numeroProduction)">
+      <img [src]="production.vignette" class="img-fluid card-img-top pointeur-souris" (click)="formPresentation(production.numeroProduction)">
       <div class="card-header">
         <span class="card-title">{{ nextLettre() }} -<a (click)="formPresentation(production.numeroProduction)" class="text-primary pointeur-souris" style="margin-left:7px;">{{ production.titre }}</a></span><br/>
         <small><span class="text-muted">par</span> {{ production.auteurs }} @if (production.groupes) { @if (production.groupes.length > 0) { &nbsp;/&nbsp;{{ production.groupes }} } }</small>
@@ -39,7 +39,7 @@
         <i class="fa-solid fa-download text-primary pointeur-souris" (click)="getFile(production.numeroProduction, production.nomArchive)" tooltip="{{ production.nomArchive }} (v{{ production.numeroVersion }})" placement="top" container="body"></i>
         <i class="fa-solid fa-user-tie text-muted" style="margin-left:7px;" i18n-tootip tooltip="géré par {{ production.nomGestionnaire }}" placement="top" container="body"></i>
         @if (production.etatMedia === 0) { <i class="fa-solid fa-circle-xmark text-danger ms-auto" style="margin-left:7px;" (click)="formPresentation(production.numeroProduction)" i18n-tootip tooltip="nécessite le média pour présentation" placement="top" container="body"></i> }
-        @else if (production.etatMedia === 1) { <i class="fa-solid fa-circle-check text-success ms-auto" style="margin-left:7px;" (click)="formPresentation(production.numeroProduction)" i18n-tootip tooltip="média présent" placement="top" container="body"></i> }
+        @else if (production.etatMedia === 1) { <i class="fa-solid fa-square-check text-success ms-auto" style="margin-left:7px;" (click)="formPresentation(production.numeroProduction)" i18n-tootip tooltip="média présent" placement="top" container="body"></i> }
         @else if (production.etatMedia === 2) { <i class="fa-solid fa-square-arrow-up-right text-success ms-auto" style="margin-left:7px;" (click)="formPresentation(production.numeroProduction)" i18n-tootip tooltip="média hors fichier de présentation" placement="top" container="body"></i> }
       </div>
     </div>

+ 15 - 5
src/app/composants/show-list/show-list.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
 import { FormsModule, NgForm } from '@angular/forms';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
 import { saveAs } from 'file-saver';
@@ -16,6 +16,7 @@ import { ProductionService } from '../../services/production.service';
 
 export class ShowListComponent implements OnInit
 {
+  refresh: number = 0;
 
   categories: Categorie[] = [];
 
@@ -26,10 +27,19 @@ export class ShowListComponent implements OnInit
     private categorieService: CategorieService,
     private presentationService: PresentationService,
     private productionService: ProductionService,
-    private router: Router
-  ) { }
+    private router: Router,
+    private route: ActivatedRoute
+  )
+  {
+    this.router.routeReuseStrategy.shouldReuseRoute = function() { return false; }
+    this.router.events.subscribe((evt) => { if (evt instanceof NavigationEnd) { this.router.navigated = false; window.scrollTo(0, 0); } });
+  }
 
-  ngOnInit() { this.retreiveDatas(); }
+  ngOnInit()
+  {
+    this.refresh = this.route.snapshot.params['refresh'];
+    this.goToRefreshListCategorie();
+  }
 
   private retreiveDatas()
   {
@@ -43,7 +53,7 @@ export class ShowListComponent implements OnInit
   resetLettre() { this.indexLettre = 0; }
   nextLettre(): string { if ((this.indexLettre >= 0) && (this.indexLettre < 26)) { this.indexLettre++; return "#" + this.lettresOrdre[this.indexLettre - 1];  } return ""; }
 
-  goToRefreshListCategorie(){ this.retreiveDatas(); }
+  goToRefreshListCategorie() { this.retreiveDatas(); }
 
   getVersionPDF() { this.presentationService.getPresentationPDF().subscribe(response => { this.savePDF(response.body, 'presentations.pdf'); }); }
 

+ 27 - 6
src/app/composants/show-upload/show-upload.component.html

@@ -65,7 +65,7 @@
   		<div class="form-group row">
   			<label class="col-sm-4 col-form-label col-form-label-sm label-nobr"><span i18n>Gestionnaire</span></label>
   			<div class="col-sm-8">
-  				<input type="text" class="form-control form-control-sm field-separate" id="gestionnaire" name="gestionnaire" [(ngModel)]="production.nomGestionnaire" disabled>
+  				<input type="text" class="form-control form-control-sm field-separate" id="gestionnaire" name="gestionnaire" [(ngModel)]="production.nomGestionnaire" disabled><hr/>
   			</div>
   		</div>
 
@@ -73,15 +73,15 @@
         <label class="col-sm-4 col-form-label col-form-label-sm label-nobr"></label>
   			<div class="col-sm-8">
           <div class="form-check form-control-sm field-separate">
-            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia0">
+            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia0" value="0" [checked]="media.etatMedia == 0" (change)="setEtatMedia(0)">
             <label class="form-check-label" for="radioEtatMedia0"><span i18n class="text-danger">Aucun média à présenter</span></label>
           </div>
           <div class="form-check form-control-sm field-separate">
-            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia2">
+            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia2" value="2" [checked]="media.etatMedia=== 2" (change)="setEtatMedia(2)">
             <label class="form-check-label" for="radioEtatMedia2"><span i18n>Le média est externe (exécutable à lancer sur machine spécifique, fichier trop gros, etc)</span></label>
           </div>
           <div class="form-check form-control-sm field-separate">
-            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia1">
+            <input class="form-check-input" type="radio" name="radioEtatMedia" id="radioEtatMedia1" value="1" [checked]="media.etatMedia == 1" (change)="setEtatMedia(1)">
             <label class="form-check-label" for="radioEtatMedia1"><span i18n>Le média est interne à la présentation, à téléverser</span></label>
           </div>
         </div>
@@ -91,13 +91,34 @@
         <label class="col-sm-4 col-form-label col-form-label-sm label-nobr"><span i18n>Média</span></label>
 				<div class="col-sm-8">
           <input type="file" class="form-control form-control-sm field-separate" id="media" name="media" accept="audio/*,video/*,image/*" (change)="onMediaSelected($event)">
-          <div class="form-text field-separate"><span i18n>La taille du média est limitée à 2 Go.</span></div>
+          <div class="form-text field-separate"><span i18n>La taille du média est limitée à 2 Go.</span><hr/></div>
 				</div>
 			</div>
 
+@if (etatInitial === 1) {
+
+     <div class="form-group row">
+       <label class="col-sm-4 col-form-label col-form-label-sm label-nobr"><span i18n>Média actuellement chargé</span></label>
+       <div class="col-sm-8">
+         @if (media.mediaMime.startsWith("image/")) { <img [src]="media.mediaData" alt="" class="img-fluid rounded-2" width="100%"> }
+         @else if (media.mediaMime.startsWith("audio/")) {  <audio controls><source [src]="media.mediaData" [type]="media.mediaMime" i18n/>Le tag HTML audio n'est pas supporté par ce navigateur.</audio>  }
+         @else if (media.mediaMime.startsWith("video/")) {  <video controls width="480" height="240"><source [src]="media.mediaData" [type]="media.mediaMime" i18n/>Le tag HTML video n'est pas supporté par ce navigateur.</video>  }
+       </div>
+     </div>
+
+    <div class="form-group row">
+      <label class="col-sm-4 col-form-label col-form-label-sm label-nobr"><span i18n>Type</span></label>
+      <div class="col-sm-8">
+        <input type="text" class="form-control form-control-sm field-separate" id="mediaMime" name="mediaMime" [(ngModel)]="media.mediaMime" disabled>
+      </div>
+    </div>
+
+}
+
   	</div>
   	<div class="card-footer">
-      <button type="button" class="btn bg-gradient btn-success btn-sm text-left" type="submit" [disabled]="formRef.invalid"><i class="fa-solid fa-plus"></i>&nbsp;<span i18n>Valider</span></button>
+      @if (etatInitial === 0) { <button type="button" class="btn bg-gradient btn-success btn-sm text-left" type="submit" [disabled]="formRef.invalid"><i class="fa-solid fa-plus"></i>&nbsp;<span i18n>Valider</span></button> }
+      @else { <button type="button" class="btn bg-gradient btn-warning btn-sm text-left" type="submit" [disabled]="formRef.invalid"><i class="fa-solid fa-check"></i>&nbsp;<span i18n>Valider</span></button> }
   	</div>
   </div>
 

+ 17 - 6
src/app/composants/show-upload/show-upload.component.ts

@@ -1,6 +1,6 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
 import { ActivatedRoute, Router } from '@angular/router';
-import { FormsModule } from '@angular/forms';
+import { FormsModule, NgForm } from '@angular/forms';
 
 import { MenuComponent } from '../menu/menu.component';
 import { PresentationFile } from '../../interfaces/production';
@@ -14,6 +14,8 @@ import { ProductionService } from '../../services/production.service';
 export class ShowUploadComponent implements OnInit
 {
 
+  @ViewChild('formRef') productionForm!: NgForm;
+
   numeroProduction: number = 0;
 
   types: ProductionEnum[] = ProductionTypeList;
@@ -21,16 +23,25 @@ export class ShowUploadComponent implements OnInit
   production: ProductionShort = new ProductionShort();
 
   media: PresentationFile = new PresentationFile();
+  etatInitial: number = 0;
 
-  constructor(private productionService: ProductionService, private presentationService: PresentationService, private route: ActivatedRoute, private router: Router, private menu: MenuComponent) { }
+  constructor(
+    private productionService: ProductionService,
+    private presentationService: PresentationService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private menu: MenuComponent
+  ) { }
 
   ngOnInit()
   {
     this.numeroProduction = this.route.snapshot.params['numeroProduction'];
     this.production = new ProductionShort();
     this.productionService.getByIdProduction(this.numeroProduction).subscribe( data => { this.production = data; });
+    this.presentationService.getByIdPresentationFile(this.numeroProduction).subscribe( data => { this.media = data; this.etatInitial = this.media.etatMedia; });
   }
 
+  setEtatMedia(e: number) { this.media.etatMedia = e; }
 
   onMediaSelected(event: any)
   {
@@ -41,16 +52,16 @@ export class ShowUploadComponent implements OnInit
     {
       const file = et.files[0];
 
-      reader.onloadend = async (e: any) => { if (e.target.result) { this.media.mediaData = e.target.result; } }
+      reader.onloadend = async (e: any) => { if (e.target.result) { this.media.mediaData = e.target.result; this.media.mediaName = file.name; this.media.etatMedia = 1; } }
 
       reader.readAsDataURL(file);
 		}
   }
 
-  private saveMedia() { this.presentationService.uploadMediaFile(this.numeroProduction, this.media).subscribe(); this.goToListPresentation(); }
+  private saveMedia() { this.presentationService.uploadMediaFile(this.numeroProduction, this.media).subscribe(() => { this.goToListPresentation(); }); }
 
   addPresentationFile() { this.saveMedia(); }
 
-  goToListPresentation() {this.router.navigate(['/show-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListPresentation() { this.router.navigate(['/show-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 2 - 2
src/app/composants/variable-create/variable-create.component.ts

@@ -20,10 +20,10 @@ export class VariableCreateComponent implements OnInit
 
   ngOnInit() { }
 
-  private saveVariable() { this.variableService.createVariable(this.variable).subscribe(); this.goToListVariable(); }
+  private saveVariable() { this.variableService.createVariable(this.variable).subscribe(() => { this.goToListVariable(); }); }
 
   addVariable() { if (this.variableForm.valid) { this.saveVariable(); } }
 
-  goToListVariable() {this.router.navigate(['/variable-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListVariable() { this.router.navigate(['/variable-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 3 - 3
src/app/composants/variable-details/variable-details.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
+import { Router, ActivatedRoute } from '@angular/router';
 import { MenuComponent } from '../menu/menu.component';
 import { Variable } from '../../interfaces/variable';
 import { VariableService } from '../../services/variable.service';
@@ -14,7 +14,7 @@ export class VariableDetailsComponent implements OnInit
 
   variable: Variable = new Variable();
 
-  constructor(private variableService: VariableService, private route: ActivatedRoute, private router: Router, private menu: MenuComponent) { }
+  constructor(private variableService: VariableService, private router: Router, private route: ActivatedRoute, private menu: MenuComponent) { }
 
   ngOnInit(): void
   {
@@ -25,6 +25,6 @@ export class VariableDetailsComponent implements OnInit
 
   updateVariable(id: number) { this.router.navigate(['/variable-update', id]); }
 
-  goToListVariable() { this.router.navigate(['/variable-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListVariable() { this.router.navigate(['/variable-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 18 - 4
src/app/composants/variable-list/variable-list.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
 import { MenuComponent } from '../menu/menu.component';
 import { Variable, VariableType } from '../../interfaces/variable';
 import { VariableService } from '../../services/variable.service';
@@ -9,15 +9,29 @@ import { FormsModule, NgForm } from '@angular/forms';
 
 export class VariableListComponent implements OnInit
 {
+  refresh: number = 0;
 
   types: VariableType[] = [];
   typeFiltre: string = "";
 
   variables: Variable[] = [];
 
-  constructor(private variableService: VariableService, private router: Router, private menu: MenuComponent) { }
-
-  ngOnInit() { this.goToRefreshListVariable(); }
+  constructor(
+    private variableService: VariableService,
+    private route: ActivatedRoute,
+    private router: Router,
+    private menu: MenuComponent
+  )
+  {
+    this.router.routeReuseStrategy.shouldReuseRoute = function() { return false; }
+    this.router.events.subscribe((evt) => { if (evt instanceof NavigationEnd) { this.router.navigated = false; window.scrollTo(0, 0); } });
+  }
+
+  ngOnInit()
+  {
+    this.refresh = this.route.snapshot.params['refresh'];
+    this.goToRefreshListVariable();
+  }
 
   private retreiveDatas() { this.variableService.getListVariable(this.typeFiltre).subscribe(data => { this.variables = data; }); }
   private retreiveTypes() { this.variableService.getOptionListVariableType().subscribe(data => { this.types = data; }); }

+ 3 - 3
src/app/composants/variable-update/variable-update.component.ts

@@ -24,10 +24,10 @@ export class VariableUpdateComponent implements OnInit
     this.variableService.getByIdVariable(this.numeroVariable).subscribe(data => { this.variable = data; });
   }
 
-  updateConfirmed() { if (this.variableForm.valid) { this.variableService.updateVariable(this.numeroVariable, this.variable).subscribe(); this.goToListVariable(); } }
+  updateConfirmed() { if (this.variableForm.valid) { this.variableService.updateVariable(this.numeroVariable, this.variable).subscribe(() => { this.goToListVariable(); }); } }
 
-  deleteConfirmed() { this.variableService.deleteVariable(this.numeroVariable).subscribe(); this.goToListVariable(); }
+  deleteConfirmed() { this.variableService.deleteVariable(this.numeroVariable).subscribe(() => { this.goToListVariable(); });  }
 
-  goToListVariable(){ this.router.navigate(['/variable-list'], { queryParams: { 'refresh': this.menu.getRandomInteger(1, 100000) } }); }
+  goToListVariable() { this.router.navigate(['/variable-list', this.menu.getRandomInteger(1, 100000)]); }
 
 }

+ 1 - 1
src/app/composants/webcam-list/webcam-list.component.ts

@@ -37,7 +37,7 @@ export class WebcamListComponent implements OnInit
       this.webcamu.crc32 = this.webcams[i].crc32;
       this.webcamu.vue = "";
 
-      this.webcamService.updateVue(this.webcamu).subscribe(data => { this.webcamu = data; });
+      this.webcamService.updateVue(this.webcamu).subscribe((data) => { this.webcamu = data; });
 
       if (this.webcamu.vue !== "")
       {

+ 2 - 1
src/app/interfaces/production.ts

@@ -75,6 +75,7 @@ export class PresentationFile
 {
   numeroProduction: number = 0;
   etatMedia: number = 0;
-  mediaMime: string = "application/octet-stream";
+  mediaMime: string = "";
   mediaData!: string | any;
+  mediaName!: string | any;
 }

+ 2 - 0
src/app/services/presentation.service.ts

@@ -71,6 +71,8 @@ export class PresentationService
     return this.httpClient.get(`${this.baseURL}/down`, { params: params });
   }
 
+  getByIdPresentationFile(id: number): Observable<PresentationFile>{ return this.httpClient.get<PresentationFile>(`${this.baseURL}/formfile/${id}`); }
+
   uploadMediaFile(id: number, media: PresentationFile): Observable<Object>{ return this.httpClient.put(`${this.baseURL}/upload/${id}`, media); }
 
 }