correction module
This commit is contained in:
parent
26e35e6c68
commit
ec0d7da5f9
@ -6,7 +6,7 @@
|
|||||||
* @param {string} hexColor - Couleur au format #RRGGBB
|
* @param {string} hexColor - Couleur au format #RRGGBB
|
||||||
* @returns {number} - Luminosité entre 0 et 1
|
* @returns {number} - Luminosité entre 0 et 1
|
||||||
*/
|
*/
|
||||||
function getLuminance(hexColor) {
|
export function getLuminance(hexColor) {
|
||||||
// Vérifier que hexColor n'est pas null ou undefined
|
// Vérifier que hexColor n'est pas null ou undefined
|
||||||
if (!hexColor || typeof hexColor !== 'string') {
|
if (!hexColor || typeof hexColor !== 'string') {
|
||||||
console.warn('⚠️ [getLuminance] Valeur hexColor invalide:', hexColor);
|
console.warn('⚠️ [getLuminance] Valeur hexColor invalide:', hexColor);
|
||||||
@ -28,7 +28,7 @@ function getLuminance(hexColor) {
|
|||||||
* @param {string} backgroundColor - Couleur de fond au format #RRGGBB
|
* @param {string} backgroundColor - Couleur de fond au format #RRGGBB
|
||||||
* @returns {string} - Couleur de texte (#000000 ou #ffffff)
|
* @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
|
// Vérifier que backgroundColor n'est pas null ou undefined
|
||||||
if (!backgroundColor || typeof backgroundColor !== 'string') {
|
if (!backgroundColor || typeof backgroundColor !== 'string') {
|
||||||
console.warn('⚠️ [getTextColor] Valeur backgroundColor invalide:', backgroundColor);
|
console.warn('⚠️ [getTextColor] Valeur backgroundColor invalide:', backgroundColor);
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { openModal } from './agenda-modal.js';
|
|||||||
import { getEvents, updateEvent, getEvent } from './agenda-api.js';
|
import { getEvents, updateEvent, getEvent } from './agenda-api.js';
|
||||||
import { notifyError } from './agenda-notifications.js';
|
import { notifyError } from './agenda-notifications.js';
|
||||||
import { initializeFilters } from './agenda-filters.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 toastr from 'toastr';
|
||||||
import { Calendar } from '@fullcalendar/core';
|
import { Calendar } from '@fullcalendar/core';
|
||||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user