Fix du calcul des données calendrier
- Utilisation de la méthode getDefSigne pour obtenir le détail du signe de l'heure / du mois - fix d'une initialisation du mois qui faussait le calendrier
This commit is contained in:
		| @@ -92,7 +92,7 @@ export class RdDCalendrier extends Application { | |||||||
|       minutesRelative: 0, |       minutesRelative: 0, | ||||||
|       indexJour: index, |       indexJour: index, | ||||||
|       annee: Math.floor(index / (RDD_JOUR_PAR_MOIS * RDD_MOIS_PAR_AN)), |       annee: Math.floor(index / (RDD_JOUR_PAR_MOIS * RDD_MOIS_PAR_AN)), | ||||||
|       moisRdD: RdDCalendrier.getDefSigne(mois), |       moisRdD: RdDCalendrier.getDefSigne(mois).heure, | ||||||
|       moisLabel: RdDCalendrier.getDefSigne(mois).label, |       moisLabel: RdDCalendrier.getDefSigne(mois).label, | ||||||
|       jour: (index % RDD_JOUR_PAR_MOIS) // Le calendrier stocke le jour en 0-27, mais en 1-28 à l'affichage |       jour: (index % RDD_JOUR_PAR_MOIS) // Le calendrier stocke le jour en 0-27, mais en 1-28 à l'affichage | ||||||
|     } |     } | ||||||
| @@ -316,16 +316,12 @@ export class RdDCalendrier extends Application { | |||||||
|  |  | ||||||
|   /* -------------------------------------------- */ |   /* -------------------------------------------- */ | ||||||
|   fillCalendrierData(formData = {}) { |   fillCalendrierData(formData = {}) { | ||||||
|     console.log(this.calendrier); |     const mois = RdDCalendrier.getDefSigne(this.calendrier.moisRdD); | ||||||
|     let moisKey = heuresList[this.calendrier.moisRdD]; |     const heure = RdDCalendrier.getDefSigne(this.calendrier.heureRdD); | ||||||
|     let heureKey = heuresList[this.calendrier.heureRdD]; |     console.log('fillCalendrierData', this.calendrier, mois, heure); | ||||||
|     console.log(moisKey, heureKey); |  | ||||||
|  |  | ||||||
|     const mois = heuresDef[moisKey]; |     formData.heureKey = heure.key; | ||||||
|     const heure = heuresDef[heureKey]; |     formData.moisKey = mois.key; | ||||||
|  |  | ||||||
|     formData.heureKey = heureKey; |  | ||||||
|     formData.moisKey = moisKey; |  | ||||||
|     formData.jourMois = this.calendrier.jour + 1; |     formData.jourMois = this.calendrier.jour + 1; | ||||||
|     formData.nomMois = mois.label; // heures et mois nommés identiques |     formData.nomMois = mois.label; // heures et mois nommés identiques | ||||||
|     formData.iconMois = dossierIconesHeures + mois.icon; |     formData.iconMois = dossierIconesHeures + mois.icon; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user