nodebb-plugin-onekite-calendar 2.0.34 → 2.0.35

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.
@@ -313,6 +313,12 @@ async function handler(req, res, next) {
313
313
  const requesterUid = parseInt(r.uid, 10);
314
314
  const requester = await user.getUserFields(requesterUid, ['username']);
315
315
  if (requesterUid) {
316
+ const latNum = Number(r.pickupLat);
317
+ const lonNum = Number(r.pickupLon);
318
+ const mapUrl = (Number.isFinite(latNum) && Number.isFinite(lonNum))
319
+ ? `https://www.openstreetmap.org/?mlat=${encodeURIComponent(String(latNum))}&mlon=${encodeURIComponent(String(lonNum))}#map=18/${encodeURIComponent(String(latNum))}/${encodeURIComponent(String(lonNum))}`
320
+ : '';
321
+
316
322
  await sendEmail('calendar-onekite_paid', requesterUid, 'Location matériel - Paiement reçu', {
317
323
  uid: requesterUid,
318
324
  username: requester && requester.username ? requester.username : '',
@@ -320,6 +326,8 @@ async function handler(req, res, next) {
320
326
  itemNames: (Array.isArray(r.itemNames) ? r.itemNames : (r.itemName ? [r.itemName] : [])),
321
327
  dateRange: `Du ${formatFR(r.start)} au ${formatFR(r.end)}`,
322
328
  paymentReceiptUrl: r.paymentReceiptUrl || '',
329
+ pickupAddress: r.pickupAddress || '',
330
+ mapUrl,
323
331
  });
324
332
  }
325
333
 
@@ -346,4 +354,4 @@ async function handler(req, res, next) {
346
354
 
347
355
  module.exports = {
348
356
  handler,
349
- };
357
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-onekite-calendar",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
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.34"
42
+ "version": "2.0.35"
43
43
  }
@@ -1,5 +1,5 @@
1
1
  <p>Bonjour {username},</p>
2
- <p>Votre réservation a été validée.</p>
2
+ <p>Votre réservation est validée. Veuillez procéder à son règlement.</p>
3
3
 
4
4
  <!-- IF validatedBy -->
5
5
  <p><strong>Validée par :</strong> <a href="{validatedByUrl}">{validatedBy}</a></p>
@@ -16,6 +16,10 @@
16
16
 
17
17
  <!-- IF pickupTime -->
18
18
  <p><strong>Heure de récupération :</strong> {pickupTime}</p>
19
+
20
+ <!-- IF pickupAddress -->
21
+ <p><strong>Adresse :</strong> {pickupAddress}</p>
22
+ <!-- ENDIF pickupAddress -->
19
23
  <!-- ENDIF pickupTime -->
20
24
 
21
25
  <!-- IF pickupAddress -->
@@ -23,7 +27,7 @@
23
27
  <!-- ENDIF pickupAddress -->
24
28
 
25
29
  <!-- IF mapUrl -->
26
- <p style="font-size: 12px; color: #666;">Voir sur la carte : <a href="{mapUrl}">OpenStreetMap</a></p>
30
+ <p style="font-size: 12px; color: #666;"><strong>Voir sur la carte :</strong> <a href="{mapUrl}">OpenStreetMap</a</p>
27
31
  <!-- ENDIF mapUrl -->
28
32
 
29
33
  <!-- IF notes -->
@@ -10,6 +10,14 @@
10
10
 
11
11
  <p>{dateRange}</p>
12
12
 
13
+
14
+ <!-- IF pickupAddress -->
15
+ <p><strong>Adresse :</strong> {pickupAddress}</p>
16
+ <!-- ENDIF pickupAddress -->
17
+
18
+ <!-- IF mapUrl -->
19
+ <p style="font-size: 12px; color: #666;"><strong>Voir sur la carte :</strong> <a href="{mapUrl}">OpenStreetMap</a></p>
20
+ <!-- ENDIF mapUrl -->
13
21
  <!-- IF paymentReceiptUrl -->
14
22
  <p><strong>Reçu :</strong> <a href="{paymentReceiptUrl}">{paymentReceiptUrl}</a></p>
15
23
  <!-- ENDIF paymentReceiptUrl -->