nodebb-plugin-equipment-calendar 8.9.1 → 8.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-equipment-calendar",
3
- "version": "8.9.1",
3
+ "version": "8.9.2",
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-stable4k-fix-create-icons",
28
+ "version": "3.0.0-stable4l-dateslice-noemoji",
29
29
  "minver": "4.7.1"
30
30
  }
@@ -143,49 +143,36 @@ function updateTotalPrice() {
143
143
  eventContent: function(arg) {
144
144
  try {
145
145
  var status = (arg.event.extendedProps && arg.event.extendedProps.status) ? arg.event.extendedProps.status : '';
146
- var iconTxt = '';
147
146
  var iconClass = '';
148
- if (status === 'pending') { iconTxt = '⏳'; iconClass = 'fa fa-hourglass-half text-warning'; }
149
- else if (status === 'paid') { iconTxt = '✅'; iconClass = 'fa fa-check-circle text-success'; }
150
- else if (status === 'approved') { iconTxt = '✔️'; iconClass = 'fa fa-check text-success'; }
151
- else if (status === 'rejected' || status === 'cancelled') { iconTxt = '❌'; iconClass = 'fa fa-times text-danger'; }
147
+ if (status === 'pending') iconClass = 'fa fa-hourglass-half text-warning';
148
+ else if (status === 'paid') iconClass = 'fa fa-check-circle text-success';
149
+ else if (status === 'approved') iconClass = 'fa fa-check text-success';
150
+ else if (status === 'rejected' || status === 'cancelled') iconClass = 'fa fa-times text-danger';
152
151
 
153
152
  var wrap = document.createElement('div');
154
153
  wrap.className = 'ec-event';
155
- var icon = document.createElement('span');
156
- icon.className = 'ec-icon';
157
- // Prefer fontawesome if available, but keep emoji fallback
158
154
  if (iconClass) {
159
- icon.innerHTML = '<i class="' + iconClass + '"></i> <span class="visually-hidden">' + status + '</span>';
160
- } else {
161
- icon.textContent = '';
155
+ var icon = document.createElement('span');
156
+ icon.className = 'ec-icon';
157
+ icon.innerHTML = '<i class="' + iconClass + '"></i>';
158
+ wrap.appendChild(icon);
162
159
  }
163
160
  var t = document.createElement('span');
164
161
  t.className = 'ec-title';
165
162
  t.textContent = arg.event.title || '';
166
- if (iconTxt && (!iconClass || !document.querySelector('link[href*="fontawesome"], style, script'))) {
167
- // emoji fallback shown if needed
168
- var em = document.createElement('span');
169
- em.textContent = iconTxt + ' ';
170
- wrap.appendChild(em);
171
- } else if (iconClass) {
172
- wrap.appendChild(icon);
173
- }
174
163
  wrap.appendChild(t);
175
164
  return { domNodes: [wrap] };
176
165
  } catch (e) {
177
166
  return true;
178
167
  }
179
- } catch (e) {
180
- return true;
181
- }
182
168
  },
183
169
  timeZone: 'local',
184
170
  events: events,
185
171
  select: function (info) {
186
172
  if (!window.EC_CAN_CREATE) return;
187
- const startIso = info.startStr; // YYYY-MM-DD
188
- const endIsoInclusive = addDaysIsoLocal(info.endStr, -1); // endStr is exclusive
173
+ const startIso = String(info.startStr || '').slice(0,10); // YYYY-MM-DD
174
+ const endEnd = String(info.endStr || '').slice(0,10);
175
+ const endIsoInclusive = addDaysIsoLocal(endEnd, -1); // endStr is exclusive
189
176
  openCreateModal(startIso, endIsoInclusive);
190
177
  },
191
178
  dateClick: function (info) {