nodebb-plugin-equipment-calendar 0.9.8 → 0.9.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/library.js CHANGED
@@ -700,6 +700,7 @@ async function renderAdminReservationsPage(req, res) {
700
700
  if (!(await ensureIsAdmin(req, res))) return;
701
701
 
702
702
  const settings = await getSettings();
703
+ const saved = false;
703
704
  const items = await getActiveItems(settings);
704
705
  const itemById = {};
705
706
  items.forEach(it => { itemById[it.id] = it; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-equipment-calendar",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
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": "0.5.7",
28
+ "version": "0.5.9",
29
29
  "minver": "4.7.1"
30
30
  }
@@ -1,29 +1,3 @@
1
-
2
- function updateTotalPrice() {
3
- try {
4
- const sel = document.getElementById('ec-item-ids');
5
- const out = document.getElementById('ec-total-price');
6
- const daysEl = document.getElementById('ec-total-days');
7
- if (!sel || !out) return;
8
- let total = 0;
9
- Array.from(sel.selectedOptions || []).forEach(opt => {
10
- const p = parseFloat(opt.getAttribute('data-price') || '0');
11
- if (!Number.isNaN(p)) total += p;
12
- });
13
- const days = getReservationDays();
14
- const finalTotal = total * days;
15
- if (daysEl) {
16
- daysEl.textContent = days + (days > 1 ? ' jours' : ' jour');
17
- }
18
- const txt = Number.isInteger(finalTotal) ? String(finalTotal) : finalTotal.toFixed(2);
19
- out.textContent = txt + ' €';
20
- } catch (e) {}
21
- });
22
- const txt = Number.isInteger(total) ? String(total) : total.toFixed(2);
23
- out.textContent = txt + ' €';
24
- } catch (e) {}
25
- }
26
-
27
1
  'use strict';
28
2
  /* global window, document, FullCalendar, bootbox */
29
3