nodebb-plugin-equipment-calendar 0.9.1 → 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; });
@@ -839,7 +840,7 @@ async function handleHelloAssoTest(req, res) {
839
840
  // force=1 skips in-memory cache and refresh_token; clear=1 wipes stored refresh token
840
841
  haTokenCache = null;
841
842
  await getHelloAssoAccessToken(settings,
842
- saved, { force, clearStored: clear });
843
+ { force, clearStored: clear });
843
844
  const items = await fetchHelloAssoItems(settings);
844
845
  const list = Array.isArray(items) ? items : (Array.isArray(items.data) ? items.data : []);
845
846
  count = list.length;
@@ -862,8 +863,7 @@ async function handleHelloAssoTest(req, res) {
862
863
  message,
863
864
  count,
864
865
  settings,
865
- saved,
866
- sampleItems,
866
+ sampleItems,
867
867
  hasSampleItems,
868
868
  hasSampleItems: sampleItems && sampleItems.length > 0,
869
869
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-equipment-calendar",
3
- "version": "0.9.1",
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.6",
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