nodebb-plugin-equipment-calendar 8.1.2 → 8.1.6

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/library.js CHANGED
@@ -72,6 +72,28 @@ function parseDateInput(v) {
72
72
  }
73
73
 
74
74
 
75
+ function formatDateTimeFR(ms) {
76
+ const n = Number(ms || 0);
77
+ if (!n) return '';
78
+ try {
79
+ return new Date(n).toLocaleString('fr-FR', {
80
+ timeZone: 'Europe/Paris',
81
+ year: 'numeric',
82
+ month: '2-digit',
83
+ day: '2-digit',
84
+ hour: '2-digit',
85
+ minute: '2-digit',
86
+ hour12: false,
87
+ }).replace(',', ' :');
88
+ } catch (e) {
89
+ const d = new Date(n);
90
+ const pad = (x) => String(x).padStart(2,'0');
91
+ return `${pad(d.getDate())}/${pad(d.getMonth()+1)}/${d.getFullYear()} : ${pad(d.getHours())}:${pad(d.getMinutes())}`;
92
+ }
93
+ }
94
+
95
+
96
+
75
97
  const axios = require('axios');
76
98
  const { DateTime } = require('luxon');
77
99
  const { v4: uuidv4 } = require('uuid');
@@ -607,7 +629,7 @@ function toEvent(res, item, requesterName, canSeeRequester) {
607
629
  title: titleParts.join(' '),
608
630
  start,
609
631
  end,
610
- allDay: false,
632
+ allDay: true,
611
633
  className,
612
634
  extendedProps: {
613
635
  status: res.status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-equipment-calendar",
3
- "version": "8.1.2",
3
+ "version": "8.1.6",
4
4
  "description": "Equipment reservation calendar for NodeBB (FullCalendar, approvals, HelloAsso payments)",
5
5
  "main": "library.js",
6
6
  "scripts": {
package/plugin.json CHANGED
@@ -25,6 +25,6 @@
25
25
  "scripts": [
26
26
  "public/js/client.js"
27
27
  ],
28
- "version": "3.0.0-stable4c-datefix",
28
+ "version": "3.0.0-stable4d-ui",
29
29
  "minver": "4.7.1"
30
30
  }
@@ -42,19 +42,14 @@
42
42
  {{{ if hasRows }}}
43
43
  <div class="table-responsive">
44
44
  <table class="table table-striped align-middle">
45
- <thead>
46
- <tr>
47
- <th>RID</th>
48
- <th>Matériel</th>
49
- <th>UID</th>
50
- <th>Début</th>
51
- <th>Fin</th>
52
- <th>Statut</th>
53
- <th>Créé</th>
54
- <th>Note</th>
55
- <th>Actions</th>
56
- </tr>
57
- </thead>
45
+ <thead><tr>
46
+ <th>Matériel</th>
47
+ <th>Période</th>
48
+ <th>Créée le</th>
49
+ <th>Statut</th>
50
+ <th>Total</th>
51
+ <th class="text-end">Actions</th>
52
+ </tr></thead>
58
53
  <tbody>
59
54
  {{{ each rows }}}
60
55
  <tr>