nodebb-plugin-equipment-calendar 9.0.7 → 9.0.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
|
@@ -187,12 +187,8 @@ async function setSettings(payload) {
|
|
|
187
187
|
Object.keys(payload || {}).forEach((k) => {
|
|
188
188
|
sets[k] = JSON.stringify(payload[k]);
|
|
189
189
|
});
|
|
190
|
-
await
|
|
190
|
+
await meta.settings.set('equipmentCalendar', sets);
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
192
|
function parseLocationMap(locationMapJson) {
|
|
197
193
|
try {
|
|
198
194
|
const obj = JSON.parse(locationMapJson || '{}');
|
|
@@ -1606,6 +1602,7 @@ async function handleAdminSave(req, res) {
|
|
|
1606
1602
|
ha_clientSecret: String(req.body.ha_clientSecret || ''),
|
|
1607
1603
|
ha_organizationSlug: String(req.body.ha_organizationSlug || ''),
|
|
1608
1604
|
ha_returnUrl: String(req.body.ha_returnUrl || ''),
|
|
1605
|
+
ha_apiBaseUrl: String(req.body.ha_apiBaseUrl || DEFAULT_SETTINGS.ha_apiBaseUrl),
|
|
1609
1606
|
ha_webhookSecret: String(req.body.ha_webhookSecret || ''),
|
|
1610
1607
|
defaultView: String(req.body.defaultView || DEFAULT_SETTINGS.defaultView),
|
|
1611
1608
|
timezone: String(req.body.timezone || DEFAULT_SETTINGS.timezone),
|
|
@@ -1613,8 +1610,8 @@ async function handleAdminSave(req, res) {
|
|
|
1613
1610
|
showRequesterToAll: (req.body.showRequesterToAll === '1' || req.body.showRequesterToAll === 'on') ? '1' : '0',
|
|
1614
1611
|
};
|
|
1615
1612
|
|
|
1616
|
-
await setSettings(
|
|
1617
|
-
return res.redirect('/admin/plugins/equipment-calendar?saved=1');
|
|
1613
|
+
await setSettings(values);
|
|
1614
|
+
return res.redirect(nconf.get('relative_path') + '/admin/plugins/equipment-calendar?saved=1');
|
|
1618
1615
|
} catch (e) {
|
|
1619
1616
|
return res.status(500).send(e.message || 'error');
|
|
1620
1617
|
}
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="acp-page-container">
|
|
3
3
|
<h1 class="mb-3">Equipment Calendar</h1>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<div class="equipment-calendar-settings">
|
|
6
6
|
<div class="card card-body mb-3">
|
|
7
7
|
<h5 class="mb-3">Permissions</h5>
|
|
8
8
|
<div class="mb-3">
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
66
|
<button id="save" type="button" class="btn btn-primary">Enregistrer</button>
|
|
67
|
-
</
|
|
67
|
+
</div>
|
|
68
68
|
</div>
|
|
69
69
|
|
|
70
70
|
<script>
|