2
0

cms.lottery-inscrits.php 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. $lottery = lottery::getFiche(core::getGet("id"));
  3. $dataLottery = lottery::getInscriptionData(core::getGet("id"));
  4. $jsonTarget = "/json.php?jsonData=lottery-inscrits&id=" . core::getGet("id");
  5. if(core::isDebug()){
  6. debug::log(debug::getBadge($jsonTarget, "OUVRIR LE JSON : ".$jsonTarget), "JSON chargé en arrière plan");
  7. }
  8. ?>
  9. <div style="float:right; margin-top: -60px;">
  10. <?php
  11. if ($lottery["sortDate"] == NULL) {
  12. ?>
  13. <a href="/?p=lottery-upload-excel&id=<?php echo core::getGet("id") ?>"><button type="submit" class="btn btn-outline-success btn-sm"><span data-feather="download"></span> Importer les inscrits</button></a>
  14. <?php } ?>
  15. </div>
  16. <?php
  17. if($dataLottery["inscrits"] > 0) {
  18. ?>
  19. <div class="card text-center">
  20. <div class="card-header" style="font-size: 1.3em;">
  21. Informations sur les inscrits
  22. </div>
  23. <div class="card-body">
  24. <div class="row">
  25. <div class="col">
  26. <label style="color: gray;">Nombre d'inscrits</label>
  27. <input type="text" value="<?php
  28. if (isset($dataLottery["inscrits"])) {
  29. echo $dataLottery["inscrits"];
  30. }
  31. ?>" class="form-control text-center" disabled>
  32. </div>
  33. <div class="col">
  34. <label style="color: gray;">Eligible(s)</label>
  35. <input type="text" value="<?php
  36. if (isset($dataLottery["eligible"])) {
  37. echo $dataLottery["eligible"];
  38. } else { echo "0";}
  39. ?>" style="background-color:#d4edda; color:green;" class="form-control text-center" disabled>
  40. </div>
  41. <div class="col">
  42. <label style="color: gray;">Non éligible(s)</label>
  43. <input type="text" value="<?php
  44. if (isset($dataLottery["ineligible"])) {
  45. echo $dataLottery["ineligible"];
  46. } else { echo "0";}
  47. ?>" style="background-color:#f8d7da; color:red;" class="form-control text-center" disabled>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <br />
  53. <?php
  54. }
  55. ?>
  56. <div class="card text-center">
  57. <div class="card-header" style="font-size: 1.3em;">
  58. Liste des inscrits
  59. </div>
  60. <div class="card-body">
  61. <table id="table" class="table-striped table-hover table-sm" data-page-size="25" data-toggle="table" data-show-columns="true" data-search="true" data-buttons-align="left" data-pagination="true" data-filter-control="true" data-flat="true" data-url="<?php echo $jsonTarget ?>">
  62. <thead>
  63. <tr>
  64. <th data-sortable="true" data-field="id_presta" data-width="50" data-formatter="selectPrestation">Prestation</th>
  65. <th data-sortable="true" data-field="id_dossier" data-filter-control="input" data-width="50" data-formatter="selectDossier">Dossier</th>
  66. <th data-sortable="true" data-field="id_salarie" data-filter-control="input" data-width="50">Id Salarié</th>
  67. <th data-sortable="true" data-field="actif" data-filter-control="select" data-width="50">Base RH</th>
  68. <th data-sortable="true" data-field="valide" data-filter-control="select" data-width="50">Eligible</th>
  69. <th data-sortable="true" data-field="login" data-filter-control="input" data-width="150">Login</th>
  70. <th data-sortable="true" data-field="prenom" data-filter-control="input" data-width="150">Prénom</th>
  71. <th data-sortable="true" data-field="nom" data-filter-control="input" data-width="150">Nom</th>
  72. <th data-sortable="true" data-field="lieu" data-filter-control="input" data-width="175">Rattachement</th>
  73. <th data-sortable="true" data-field="admin" data-filter-control="select">Chargé par</th>
  74. <th data-sortable="true" data-field="cree" data-width="175">Le</th>
  75. </tr>
  76. </thead>
  77. </table>
  78. </div>
  79. </div>
  80. <script>
  81. function selectDossier(value) {
  82. return '<a href="https://www.cse-invent.com/gestion/prestations/dossiers/' + value + '/edit?pagesize=20&page=1" target="_blank"><button type="submit" class="btn btn-outline-primary btn-sm">' + value + '</button></a>';
  83. }
  84. function selectPrestation(value, row) {
  85. return '<a href="https://www.cse-invent.com/gestion/prestations/' + value + '/edit?search=avance&page=1&pagesize=20" target="_blank"><button type="submit" class="btn btn-outline-primary btn-sm">' + value + '</button></a>';
  86. }
  87. </script>