nodebb-plugin-onekite-calendar 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog – calendar-onekite
2
2
 
3
+ ## 1.2.16
4
+ - Modale réservation (Durée rapide) : correction du grisé erroné des matériels réservés la veille. Les requêtes de disponibilité utilisent désormais des dates calendaires (YYYY-MM-DD) au lieu de toISOString() (UTC), pour éviter tout faux chevauchement lié au fuseau/DST.
5
+
3
6
  ## 1.2.15
4
7
  - Réservations (Durée rapide) : génération des évènements all-day basée sur startDate/endDate (YYYY-MM-DD) quand disponibles, pour éviter tout décalage lié à toISOString() (UTC) et empêcher un grisé « non disponible » le jour suivant.
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-onekite-calendar",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "FullCalendar-based equipment reservation workflow with admin approval & HelloAsso payment for NodeBB",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "acpScripts": [
40
40
  "public/admin.js"
41
41
  ],
42
- "version": "2.0.8"
42
+ "version": "2.0.9"
43
43
  }
package/public/client.js CHANGED
@@ -960,9 +960,16 @@ function toDatetimeLocalValue(date) {
960
960
 
961
961
  function rangeQuery(s, e) {
962
962
  try {
963
- const sIso = (s instanceof Date) ? s.toISOString() : new Date(s).toISOString();
964
- const eIso = (e instanceof Date) ? e.toISOString() : new Date(e).toISOString();
965
- return new URLSearchParams({ start: sIso, end: eIso }).toString();
963
+ // IMPORTANT: For availability checks we must avoid ISO strings with timezone
964
+ // (e.g. toISOString()) because local midnight in Europe/Paris becomes
965
+ // 23:00Z or 22:00Z depending on DST, which makes consecutive all-day ranges
966
+ // appear to overlap and wrongly greys out items.
967
+ //
968
+ // We always query using *calendar dates* (YYYY-MM-DD) with end exclusive,
969
+ // matching FullCalendar's all-day rule.
970
+ const sYmd = toLocalYmd(s);
971
+ const eYmd = toLocalYmd(e);
972
+ return new URLSearchParams({ start: sYmd, end: eYmd }).toString();
966
973
  } catch (err) {
967
974
  return '';
968
975
  }