menu2.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <!-- ========== MAIN CONTENT ========== -->
  2. <!-- Breadcrumb -->
  3. <div class="sticky top-0 inset-x-0 z-20 bg-white border-y border-gray-200 px-4 sm:px-6 lg:px-8 lg:hidden dark:bg-gray-900 dark:border-neutral-700">
  4. <div class="flex items-center py-2">
  5. <!-- Navigation Toggle -->
  6. <button type="button" class="size-8 flex justify-center items-center gap-x-2 border border-gray-200 text-gray-800 hover:text-gray-500 rounded-lg focus:outline-hidden focus:text-gray-500 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-neutral-200 dark:hover:text-neutral-500 dark:focus:text-neutral-500" aria-haspopup="dialog" aria-expanded="false" aria-controls="hs-application-sidebar" aria-label="Toggle navigation" data-hs-overlay="#hs-application-sidebar">
  7. <span class="sr-only">Toggle Navigation</span>
  8. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M15 3v18"/><path d="m8 9 3 3-3 3"/></svg>
  9. </button>
  10. <!-- End Navigation Toggle -->
  11. <!-- Breadcrumb -->
  12. <ol class="ms-3 flex items-center whitespace-nowrap">
  13. <li class="flex items-center text-sm text-gray-800 dark:text-neutral-400">
  14. SIPA Automobiles
  15. <svg class="shrink-0 mx-3 overflow-visible size-2.5 text-gray-400 dark:text-neutral-500" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  16. <path d="M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
  17. </svg>
  18. </li>
  19. <li class="text-sm font-semibold text-gray-800 truncate dark:text-neutral-400" aria-current="page">
  20. SIPA - Dashboard
  21. </li>
  22. </ol>
  23. <!-- End Breadcrumb -->
  24. </div>
  25. </div>
  26. <!-- End Breadcrumb -->
  27. <!-- Sidebar -->
  28. <div id="hs-application-sidebar" class="hs-overlay [--auto-close:lg]
  29. hs-overlay-open:translate-x-0
  30. -translate-x-full transition-all duration-300 transform
  31. w-64 h-full
  32. hidden
  33. fixed inset-y-0 start-0 z-60
  34. bg-gray-900
  35. lg:block lg:translate-x-0 lg:end-auto lg:bottom-0
  36. dark:bg-neutral-800 dark:border-neutral-700" role="dialog" tabindex="-1" aria-label="Sidebar">
  37. <div class="relative flex flex-col h-full max-h-full">
  38. <div class="px-8 pt-4">
  39. <!-- Logo -->
  40. <a class="flex-none rounded-xl text-xl inline-block font-semibold focus:outline-hidden focus:opacity-80" href="index.php" aria-label="SIPA Automobiles">
  41. <img src="assets/images/logo.webp" alt="Logo SIPA Automobiles" class="h-12 w-auto" onerror="this.style.display='none'; this.nextElementSibling.style.display='block';">
  42. <span class="text-xl font-bold text-white" style="display:none;">SIPA</span>
  43. </a>
  44. <!-- End Logo -->
  45. </div>
  46. <!-- Content -->
  47. <div class="flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500">
  48. <nav class="hs-accordion-group p-3 w-full flex flex-col flex-wrap" data-hs-accordion-always-open>
  49. <ul class="flex flex-col space-y-1">
  50. <li>
  51. <a class="flex items-center gap-x-3.5 py-2 px-2.5 bg-white/10 text-sm text-white rounded-lg hover:bg-white/10 focus:outline-hidden focus:bg-white/10 dark:bg-neutral-700 dark:text-white" href="#dashboard">
  52. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
  53. Accueil
  54. </a>
  55. </li>
  56. <li class="hs-accordion" id="dashboards-accordion">
  57. <button type="button" class="hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 focus:outline-hidden focus:bg-white/10" aria-expanded="true" aria-controls="dashboards-accordion-child">
  58. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><rect width="18" height="18" x="3" y="3" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="21" x2="9" y2="9"/></svg>
  59. Mes dashboards
  60. <svg class="hs-accordion-active:block ms-auto hidden size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>
  61. <svg class="hs-accordion-active:hidden ms-auto block size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
  62. </button>
  63. <div id="dashboards-accordion-child" class="hs-accordion-content w-full overflow-hidden transition-[height] duration-300 hidden" role="region">
  64. <ul class="pt-1 space-y-1">
  65. <li>
  66. <a class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 focus:outline-hidden focus:bg-white/10 dark:bg-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300" href="directeur.php" target="_parent">
  67. Dashboard Directeur
  68. </a>
  69. </li>
  70. <li>
  71. <a class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 focus:outline-hidden focus:bg-white/10 dark:bg-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300" href="it.php" target="_parent">
  72. Dashboard IT
  73. </a>
  74. </li>
  75. <li>
  76. <a class="flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 focus:outline-hidden focus:bg-white/10 dark:bg-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300" href="rh.php" target="_parent">
  77. Dashboard RH
  78. </a>
  79. </li>
  80. </ul>
  81. </div>
  82. </li>
  83. <li>
  84. <a class="w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 dark:hover:bg-neutral-700 dark:text-white" href="#nouvelle-demande">
  85. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>
  86. Nouvelle demande
  87. </a>
  88. </li>
  89. <li>
  90. <a class="w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 dark:hover:bg-neutral-700 dark:text-white" href="#nouvelle-demande-avenant">
  91. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20h16"/><path d="M6 16l6-6 6 6"/><path d="M12 4v12"/></svg>
  92. Nouvelle demande d'avenant
  93. </a>
  94. </li>
  95. <li>
  96. <a class="w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 dark:hover:bg-neutral-700 dark:text-white" href="#nouveau-recrutement">
  97. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
  98. Nouveau recrutement
  99. </a>
  100. </li>
  101. <li>
  102. <a class="w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 dark:hover:bg-neutral-700 dark:text-white" href="#mes-demandes">
  103. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/><path d="M16 13H8"/><path d="M16 17H8"/><path d="M10 9H8"/></svg>
  104. Mes demandes
  105. </a>
  106. </li>
  107. <li>
  108. <a class="w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-white rounded-lg hover:bg-white/10 dark:hover:bg-neutral-700 dark:text-white" href="#demandes-archivees">
  109. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="5" x="2" y="4" rx="2"/><path d="M4 9v9.5A2.5 2.5 0 0 0 6.5 21h11a2.5 2.5 0 0 0 2.5-2.5V9"/><path d="M4 9h16"/><path d="M10 13h4"/></svg>
  110. Demandes archivées
  111. </a>
  112. </li>
  113. </ul>
  114. </nav>
  115. </div>
  116. <!-- End Content -->
  117. <!-- Menu Label -->
  118. <div class="px-3 py-3 mt-auto border-t border-white/20 dark:border-neutral-700">
  119. <button type="button" onclick="toggleMenu(1)" class="w-full text-left">
  120. <span class="text-xs text-white/50 dark:text-neutral-500 font-mono hover:text-white/70 dark:hover:text-neutral-400 transition-colors">menu</span>
  121. </button>
  122. <button type="button" onclick="toggleMenu(2)" class="w-full text-left mt-1">
  123. <span class="text-xs text-white font-mono font-semibold">menu2</span>
  124. </button>
  125. </div>
  126. <!-- End Menu Label -->
  127. </div>
  128. </div>
  129. <!-- End Sidebar -->
  130. <script>
  131. function toggleMenu(menuNum) {
  132. window.location.href = '?menu=' + menuNum;
  133. }
  134. // Script pour s'assurer que l'accordéon fonctionne
  135. (function() {
  136. function initAccordions() {
  137. const accordionButtons = document.querySelectorAll('.hs-accordion-toggle');
  138. accordionButtons.forEach(function(button) {
  139. const accordion = button.closest('.hs-accordion');
  140. const content = accordion ? accordion.querySelector('.hs-accordion-content') : null;
  141. if (!content) return;
  142. // Vérifier si un gestionnaire d'événements existe déjà
  143. if (button.dataset.accordionInitialized) return;
  144. button.dataset.accordionInitialized = 'true';
  145. button.addEventListener('click', function(e) {
  146. e.preventDefault();
  147. e.stopPropagation();
  148. const isExpanded = button.getAttribute('aria-expanded') === 'true';
  149. const newExpanded = !isExpanded;
  150. // Toggle l'état aria
  151. button.setAttribute('aria-expanded', newExpanded);
  152. // Toggle la classe active sur l'accordéon et le bouton pour les styles Preline UI
  153. accordion.classList.toggle('active', newExpanded);
  154. button.classList.toggle('hs-accordion-active', newExpanded);
  155. // Gérer l'affichage du contenu avec animation
  156. if (newExpanded) {
  157. // Ouvrir l'accordéon
  158. content.classList.remove('hidden');
  159. // Calculer la hauteur réelle
  160. const height = content.scrollHeight;
  161. // Définir la hauteur initiale à 0
  162. content.style.height = '0px';
  163. // Forcer le reflow
  164. content.offsetHeight;
  165. // Animer vers la hauteur réelle
  166. content.style.height = height + 'px';
  167. // Nettoyer après l'animation
  168. setTimeout(function() {
  169. content.style.height = '';
  170. }, 300);
  171. } else {
  172. // Fermer l'accordéon
  173. const height = content.scrollHeight;
  174. content.style.height = height + 'px';
  175. // Forcer le reflow
  176. content.offsetHeight;
  177. // Animer vers 0
  178. content.style.height = '0px';
  179. // Cacher après l'animation
  180. setTimeout(function() {
  181. content.classList.add('hidden');
  182. content.style.height = '';
  183. }, 300);
  184. }
  185. });
  186. });
  187. }
  188. // Essayer plusieurs fois pour s'assurer que le DOM est prêt
  189. if (document.readyState === 'loading') {
  190. document.addEventListener('DOMContentLoaded', function() {
  191. setTimeout(initAccordions, 100);
  192. });
  193. } else {
  194. setTimeout(initAccordions, 100);
  195. }
  196. // Réinitialiser après un délai pour capturer les éléments chargés dynamiquement
  197. setTimeout(initAccordions, 500);
  198. })();
  199. </script>
  200. <!-- Content -->
  201. <div class="w-full pt-10 px-4 sm:px-6 md:px-8 lg:ps-64">
  202. <!-- your content goes here ... -->
  203. <table>
  204. <tbody>
  205. <tr>
  206. <td class="size-px whitespace-nowrap">
  207. <button type="button" class="block" aria-haspopup="dialog" aria-expanded="false" aria-controls="hs-ai-invoice-modal" data-hs-overlay="#hs-ai-invoice-modal">
  208. <span class="px-6 py-1.5">
  209. <span class="py-1 px-2 inline-flex justify-center items-center gap-2 rounded-lg border border-gray-200 font-medium bg-white text-gray-700 shadow-2xs align-middle hover:bg-gray-50 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-400 dark:hover:text-white dark:focus:ring-offset-gray-800">
  210. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
  211. <path d="M1.92.506a.5.5 0 0 1 .434.14L3 1.293l.646-.647a.5.5 0 0 1 .708 0L5 1.293l.646-.647a.5.5 0 0 1 .708 0L7 1.293l.646-.647a.5.5 0 0 1 .708 0L9 1.293l.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .708 0l.646.647.646-.647a.5.5 0 0 1 .801.13l.5 1A.5.5 0 0 1 15 2v12a.5.5 0 0 1-.053.224l-.5 1a.5.5 0 0 1-.8.13L13 14.707l-.646.647a.5.5 0 0 1-.708 0L11 14.707l-.646.647a.5.5 0 0 1-.708 0L9 14.707l-.646.647a.5.5 0 0 1-.708 0L7 14.707l-.646.647a.5.5 0 0 1-.708 0L5 14.707l-.646.647a.5.5 0 0 1-.708 0L3 14.707l-.646.647a.5.5 0 0 1-.801-.13l-.5-1A.5.5 0 0 1 1 14V2a.5.5 0 0 1 .053-.224l.5-1a.5.5 0 0 1 .367-.27zm.217 1.338L2 2.118v11.764l.137.274.51-.51a.5.5 0 0 1 .707 0l.646.647.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.646.646.646-.646a.5.5 0 0 1 .708 0l.509.509.137-.274V2.118l-.137-.274-.51.51a.5.5 0 0 1-.707 0L12 1.707l-.646.647a.5.5 0 0 1-.708 0L10 1.707l-.646.647a.5.5 0 0 1-.708 0L8 1.707l-.646.647a.5.5 0 0 1-.708 0L6 1.707l-.646.647a.5.5 0 0 1-.708 0L4 1.707l-.646.647a.5.5 0 0 1-.708 0l-.509-.51z"/>
  212. <path d="M3 4.5a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 1 1 0 1h-6a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5zm8-6a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5z"/>
  213. </svg>
  214. View
  215. </span>
  216. </span>
  217. </button>
  218. </td>
  219. </tr>
  220. </tbody>
  221. </table>
  222. </div>
  223. <!-- End Content -->
  224. <!-- ========== END MAIN CONTENT ========== -->