participant-list.component.html 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <app-menu></app-menu>
  2. <div id="main">
  3. <div class="card shadow">
  4. <div class="card-header">Table des participants</div>
  5. <div class="card-header shadow-sm">
  6. <div class="row justify-content-between">
  7. <div class="form-group col-sm-2 label-nobr">
  8. <button type="button" (click)="goToRefreshListParticipant()" class="btn bg-gradient btn-primary btn-sm field-separate" style="margin-right: 5px;"><i class="fa-solid fa-rotate"></i>&nbsp;Actualiser</button>
  9. <button type="button" (click)="goToNewParticipant()" class="btn bg-gradient btn-primary btn-sm field-separate" style="margin-right: 5px;"><i class="fa-solid fa-plus"></i>&nbsp;Créer</button>
  10. </div>
  11. <div class="form-group col-sm-2 label-nobr">
  12. <div class="input-group input-group-sn">
  13. <button type="button" class="btn bg-gradient btn-secondary btn-sm field-separate" disabled>Tri</button>
  14. <select class="form-select form-select-sm field-separate" id="select_tri" [(ngModel)]="listeTri" (change)="trier($event)" placement="bottom">
  15. <option value="0">par nom</option>
  16. <option value="1">inscription</option>
  17. </select>
  18. </div>
  19. </div>
  20. <div class="form-group col-sm-2 label-nobr">
  21. <div class="input-group input-group-sn">
  22. <button type="button" (click)="filtrageParNom()" class="btn bg-gradient btn-primary btn-sm field-separate"><i class="fa-solid fa-filter"></i>&nbsp;Filtrer</button>
  23. <input type="text" (keydown.enter)="filtrageParNom()" class="form-control form-control-sm field-separate" id="input_nom" [(ngModel)]="nomFiltre" tooltip="Filtrer par nom, prenom, pseudonyme ou adresse email" placement="bottom">
  24. </div>
  25. </div>
  26. <div class="form-group col-sm-2 label-nobr">
  27. <div class="input-group input-group-sn">
  28. <button type="button" class="btn bg-gradient btn-secondary btn-sm field-separate" disabled>Réglement</button>
  29. <select class="form-select form-select-sm field-separate" id="select_statut" [(ngModel)]="statutFiltre" (change)="filtrageParStatut($event)">
  30. <option value="0"></option>
  31. <option value="1">En attente</option>
  32. </select>
  33. </div>
  34. </div>
  35. <div class="form-group col-sm-2 label-nobr">
  36. <div class="input-group input-group-sn">
  37. <button type="button" class="btn bg-gradient btn-secondary btn-sm field-separate" disabled>Arrivé(s)</button>
  38. <select class="form-select form-select-sm field-separate" id="select_arrive" [(ngModel)]="arriveFiltre" (change)="filtrageParArrive($event)">
  39. <option value="0"></option>
  40. <option value="1">Non</option>
  41. <option value="2">Oui</option>
  42. </select>
  43. </div>
  44. </div>
  45. <div class="form-group col-sm-2 label-nobr">
  46. <button type="button" (click)="filtrageReset()" class="btn bg-gradient btn-secondary btn-sm field-separate"><i class="fa-solid fa-filter-circle-xmark"></i>&nbsp;Retirer les filtres</button>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="card-body">
  51. <table class="table table-sm">
  52. <thead class="thead-dark">
  53. <tr>
  54. <th class="fs-6 label-nobr"><small>Nom</small></th>
  55. <th class="fs-6 label-nobr"><small>Pseudonyme</small></th>
  56. <th class="fs-6 label-nobr"><small>Status</small></th>
  57. <th class="fs-6 label-nobr"><small>Arrivé</small></th>
  58. <th class="fs-6 label-nobr"><small>Journées</small></th>
  59. <th class="fs-6 label-nobr"><small>Adresse email</small></th>
  60. </tr>
  61. </thead>
  62. <tbody>
  63. @for (participant of participants; track participant.numeroParticipant) {
  64. <tr>
  65. <td class="label-nobr text-truncate" style="max-width:200px;"><a (click)="formParticipant(participant.numeroParticipant)" class="link-primary pointeur-souris text-decoration-none">{{ participant.nom }}&nbsp;{{ participant.prenom }}</a>&nbsp;&nbsp;</td>
  66. <td class="label-nobr text-truncate" style="max-width:200px;"><a (click)="formParticipant(participant.numeroParticipant)" class="link-primary pointeur-souris text-decoration-none">{{ participant.pseudonyme }}</a>@if (participant.groupe) { / {{ participant.groupe }} }&nbsp;&nbsp;</td>
  67. <td>
  68. @if (participant.statut === PS[0].key) { <i class="fa-solid fa-circle-xmark text-danger" title="{{ PS[0].value }}"></i> }
  69. @else if (participant.statut === PS[1].key) { <i class="fa-solid fa-circle-check text-success" title="{{ PS[1].value }}"></i> }
  70. @else if (participant.statut === PS[2].key) { <i class="fa-solid fa-circle-check text-success" title="{{ PS[2].value }}"></i> }
  71. @else if (participant.statut === PS[3].key) { <i class="fa-solid fa-circle-check text-success" title="{{ PS[3].value }}"></i> }
  72. @else if (participant.statut === PS[4].key) { <i class="fa-solid fa-circle-check text-success" title="{{ PS[4].value }}"></i> }
  73. @else if (participant.statut === PS[5].key) { <i class="fa-solid fa-circle-check text-primary" title="{{ PS[5].value }}"></i> }
  74. @else if (participant.statut === PS[6].key) { <i class="fa-solid fa-circle-check text-primary" title="{{ PS[6].value }}"></i> }
  75. </td>
  76. <td>
  77. @if (participant.arrived) { <i class="fa-solid fa-circle-check text-success"></i> }
  78. @else { <i class="fa-solid fa-circle-xmark text-danger"></i> }&nbsp;&nbsp;
  79. </td>
  80. <td>{{ getNombreJours(participant.hereDay1, participant.hereDay2, participant.hereDay3) }} @if(participant.sleepingOnSite) { + <i class="fa-solid fa-bed"></i> }</td>
  81. <td class="label-nobr">{{ participant.email }}&nbsp;&nbsp;</td>
  82. </tr>
  83. }
  84. </tbody>
  85. </table>
  86. </div>
  87. </div>
  88. </div>