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 +1 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/public/js/client.js +0 -26
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
package/plugin.json
CHANGED
package/public/js/client.js
CHANGED
|
@@ -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
|
|