diff --git a/src/ims/element/admin/events/template.xhtml b/src/ims/element/admin/events/template.xhtml index 14399ad0b..1bdc46d30 100644 --- a/src/ims/element/admin/events/template.xhtml +++ b/src/ims/element/admin/events/template.xhtml @@ -5,9 +5,19 @@
- For each event, you can configure access for individuals and for positions. - You can also choose when each permission applies, whether it be only - when a Ranger is marked on-site in Clubhouse, or all year long (always). +

For each event, you can configure permissions for individuals, positions, or teams. For example:

+ +

You can also choose when each permission is valid:

+ +

The REQUIRE_ACTIVE flag is unused, replaced by "on-site" validity.

+
@@ -38,7 +48,7 @@
- + Select an event from the pop-up above.

+

+ See what's new in IMS for 2025. +

On a shared machine? Please log out when you're done.

diff --git a/src/ims/element/static/admin_events.js b/src/ims/element/static/admin_events.js index 362c3d5e6..e43a5d7eb 100644 --- a/src/ims/element/static/admin_events.js +++ b/src/ims/element/static/admin_events.js @@ -160,8 +160,9 @@ function addAccess(sender) { if (!validExpression) { const confirmed = confirm( "WARNING: '" + newExpression + "' does not look like a valid ACL " + - "expression. Example expressions include 'person:Hubcap' for an individual " + - "or 'position:007' for a role. Wildcards are valid too, e.g. '*'\n\n" + + "expression. Example expressions include 'person:Hubcap' for an individual, " + + "'position:007' for a role, and 'team:Council' for a team. Wildcards are " + + "supported as well, e.g. '*'\n\n" + "Proceed with firing footgun?" ); if (!confirmed) { diff --git a/src/ims/element/static/field_reports.js b/src/ims/element/static/field_reports.js index 200c8d9c2..40af8efa1 100644 --- a/src/ims/element/static/field_reports.js +++ b/src/ims/element/static/field_reports.js @@ -303,6 +303,7 @@ function initSearchField() { urlReplace(url_viewFieldReports) + val, "Field_Report:" + val, ); + searchInput.value = ""; } } } diff --git a/src/ims/element/static/ims.js b/src/ims/element/static/ims.js index a101e5809..2c3b7e66e 100644 --- a/src/ims/element/static/ims.js +++ b/src/ims/element/static/ims.js @@ -454,31 +454,25 @@ function stateForIncident(incident) { // Return a summary for a given incident. function summarizeIncident(incident) { - const summary = incident.summary; - const reportEntries = incident.report_entries; + if (incident.summary) { + return incident.summary; + } - if (!summary) { - if (!reportEntries) { - return ""; + // Get the first line of the first report entry. + for (const reportEntry of incident.report_entries??[]) { + if (reportEntry.system_entry) { + // Don't use a system-generated entry in the summary + continue; } - // Get the first line of the first report entry. - for (const reportEntry of reportEntries) { - if (reportEntry.system_entry) { - // Don't use a system-generated entry in the summary - continue; - } - const lines = reportEntry.text.split("\n"); - for (const line of lines) { - if (line) { - return line; - } + const lines = reportEntry.text.split("\n"); + for (const line of lines) { + if (line) { + return line; } } - return ""; } - - return summary; + return ""; } @@ -912,7 +906,8 @@ function submitReportEntry() { controlHasError($("#report_entry_add"), 1000); } - sendEdits({"report_entries": [{"text": text}]}, ok, fail); + // send a dummy ID to appease the JSON parser in the server + sendEdits({"report_entries": [{"text": text, "id": -1}]}, ok, fail); } // diff --git a/src/ims/element/static/incident.js b/src/ims/element/static/incident.js index f173c3415..81aaf1a70 100644 --- a/src/ims/element/static/incident.js +++ b/src/ims/element/static/incident.js @@ -249,15 +249,6 @@ function loadPersonnel(success) { } -function localCachePersonnel(personnel) { - if (personnel == null) { - alert("Attempt to cache undefined personnel") - return; - } - cacheSet("personnel", personnel, 20 /* minutes */); -} - - // // Load incident types // @@ -288,16 +279,6 @@ function loadIncidentTypes(success) { jsonRequest(url_incidentTypes, null, ok, fail); } - -function localCacheIncidentTypes(incidentTypes) { - if (incidentTypes == null) { - alert("Attempt to cache undefined incident types") - return; - } - cacheSet("incident_types", incidentTypes, 20 /* minutes */); -} - - // // Load all field reports // diff --git a/src/ims/element/static/incidents.js b/src/ims/element/static/incidents.js index 4d8cdd79c..3ffb657f1 100644 --- a/src/ims/element/static/incidents.js +++ b/src/ims/element/static/incidents.js @@ -422,6 +422,7 @@ function initSearchField() { viewIncidentsURL + val, "Incident:" + eventID + "#" + val, ); + searchInput.value = ""; } } }