correction module

This commit is contained in:
Jean-Philippe Staelen 2026-01-20 12:29:31 +01:00
parent 26e35e6c68
commit ec0d7da5f9
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
* @param {string} hexColor - Couleur au format #RRGGBB
* @returns {number} - Luminosité entre 0 et 1
*/
function getLuminance(hexColor) {
export function getLuminance(hexColor) {
// Vérifier que hexColor n'est pas null ou undefined
if (!hexColor || typeof hexColor !== 'string') {
console.warn('⚠️ [getLuminance] Valeur hexColor invalide:', hexColor);
@ -28,7 +28,7 @@ function getLuminance(hexColor) {
* @param {string} backgroundColor - Couleur de fond au format #RRGGBB
* @returns {string} - Couleur de texte (#000000 ou #ffffff)
*/
function getTextColor(backgroundColor) {
export function getTextColor(backgroundColor) {
// Vérifier que backgroundColor n'est pas null ou undefined
if (!backgroundColor || typeof backgroundColor !== 'string') {
console.warn('⚠️ [getTextColor] Valeur backgroundColor invalide:', backgroundColor);

View File

@ -3,7 +3,7 @@ import { openModal } from './agenda-modal.js';
import { getEvents, updateEvent, getEvent } from './agenda-api.js';
import { notifyError } from './agenda-notifications.js';
import { initializeFilters } from './agenda-filters.js';
import { mapEventToFullCalendar } from './agenda-event-mapper.js';
import { mapEventToFullCalendar, getTextColor, getLuminance } from './agenda-event-mapper.js';
import toastr from 'toastr';
import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';