web-mojo 2.1.936 → 2.1.954
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/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +122 -229
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.cjs.js.map +1 -1
- package/dist/auth.es.js +7 -7
- package/dist/auth.es.js.map +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +7 -7
- package/dist/chunks/ChatView-BKa78eKF.js +2 -0
- package/dist/chunks/ChatView-BKa78eKF.js.map +1 -0
- package/dist/chunks/{ChatView-DlSxjxah.js → ChatView-Dcz7LkwL.js} +89 -574
- package/dist/chunks/ChatView-Dcz7LkwL.js.map +1 -0
- package/dist/chunks/Collection-OP7c9Zyu.js +989 -0
- package/dist/chunks/Collection-OP7c9Zyu.js.map +1 -0
- package/dist/chunks/Collection-aQF5eOUH.js +2 -0
- package/dist/chunks/Collection-aQF5eOUH.js.map +1 -0
- package/dist/chunks/ContextMenu-DV_wsr9B.js +3 -0
- package/dist/chunks/ContextMenu-DV_wsr9B.js.map +1 -0
- package/dist/chunks/ContextMenu-ixMyAUGS.js +1171 -0
- package/dist/chunks/ContextMenu-ixMyAUGS.js.map +1 -0
- package/dist/chunks/DataView-CdDY9ijM.js +2 -0
- package/dist/chunks/{DataView-XJbTQ5q0.js.map → DataView-CdDY9ijM.js.map} +1 -1
- package/dist/chunks/{DataView-Vmjx4eCr.js → DataView-OUqaLmGB.js} +2 -2
- package/dist/chunks/{DataView-Vmjx4eCr.js.map → DataView-OUqaLmGB.js.map} +1 -1
- package/dist/chunks/{Dialog-D_rAf4gQ.js → Dialog-C2mRUxga.js} +8 -6
- package/dist/chunks/{Dialog-D_rAf4gQ.js.map → Dialog-C2mRUxga.js.map} +1 -1
- package/dist/chunks/Dialog-Cl6MN8if.js +2 -0
- package/dist/chunks/{Dialog-BinTQTfO.js.map → Dialog-Cl6MN8if.js.map} +1 -1
- package/dist/chunks/FormView-BSWaXDav.js +3 -0
- package/dist/chunks/{FormView-TPFsq8ZX.js.map → FormView-BSWaXDav.js.map} +1 -1
- package/dist/chunks/{FormView-CIriLDZY.js → FormView-HWvIdFkB.js} +10 -6
- package/dist/chunks/FormView-HWvIdFkB.js.map +1 -0
- package/dist/chunks/ListView-Dcz0Gs6D.js +492 -0
- package/dist/chunks/ListView-Dcz0Gs6D.js.map +1 -0
- package/dist/chunks/ListView-eXgn0F0-.js +2 -0
- package/dist/chunks/ListView-eXgn0F0-.js.map +1 -0
- package/dist/chunks/MetricsMiniChartWidget-BkTEO87S.js +2 -0
- package/dist/chunks/{MetricsMiniChartWidget-sONcM0pG.js.map → MetricsMiniChartWidget-BkTEO87S.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-BolRZ-Ja.js → MetricsMiniChartWidget-Y70IHFIe.js} +3 -3
- package/dist/chunks/{MetricsMiniChartWidget-BolRZ-Ja.js.map → MetricsMiniChartWidget-Y70IHFIe.js.map} +1 -1
- package/dist/chunks/PDFViewer-C0aMqGJL.js +2 -0
- package/dist/chunks/{PDFViewer-UBhinN8A.js.map → PDFViewer-C0aMqGJL.js.map} +1 -1
- package/dist/chunks/{PDFViewer-D6SKOl85.js → PDFViewer-DkbYnnoV.js} +3 -3
- package/dist/chunks/{PDFViewer-D6SKOl85.js.map → PDFViewer-DkbYnnoV.js.map} +1 -1
- package/dist/chunks/Page-CvbwEoLv.js +2 -0
- package/dist/chunks/{Page-CnvHhwLZ.js.map → Page-CvbwEoLv.js.map} +1 -1
- package/dist/chunks/{Page-B7L25Omb.js → Page-Deq4y2Kq.js} +2 -2
- package/dist/chunks/{Page-B7L25Omb.js.map → Page-Deq4y2Kq.js.map} +1 -1
- package/dist/chunks/Rest-BNYqGlnP.js +2 -0
- package/dist/chunks/Rest-BNYqGlnP.js.map +1 -0
- package/dist/chunks/{WebApp-El07OMHH.js → Rest-CS4jRCAs.js} +5 -1389
- package/dist/chunks/Rest-CS4jRCAs.js.map +1 -0
- package/dist/chunks/{TopNav-CPA884W7.js → TopNav-DXLRdU0o.js} +5 -5
- package/dist/chunks/{TopNav-CPA884W7.js.map → TopNav-DXLRdU0o.js.map} +1 -1
- package/dist/chunks/TopNav-GyvI31l2.js +2 -0
- package/dist/chunks/{TopNav-Dcmcic-i.js.map → TopNav-GyvI31l2.js.map} +1 -1
- package/dist/chunks/WebApp-BAadsDpO.js +2 -0
- package/dist/chunks/WebApp-BAadsDpO.js.map +1 -0
- package/dist/chunks/WebApp-BVGZC2rj.js +1388 -0
- package/dist/chunks/WebApp-BVGZC2rj.js.map +1 -0
- package/dist/css/web-mojo.css +2 -2
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.cjs.js.map +1 -1
- package/dist/docit.es.js +12 -10
- package/dist/docit.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +120 -116
- package/dist/index.es.js.map +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.cjs.js.map +1 -1
- package/dist/lightbox.es.js +121 -121
- package/dist/lightbox.es.js.map +1 -1
- package/dist/map.cjs.js +2 -0
- package/dist/map.cjs.js.map +1 -0
- package/dist/map.es.js +188 -0
- package/dist/map.es.js.map +1 -0
- package/dist/timeline.cjs.js +2 -0
- package/dist/timeline.cjs.js.map +1 -0
- package/dist/timeline.es.js +225 -0
- package/dist/timeline.es.js.map +1 -0
- package/package.json +9 -1
- package/dist/chunks/ChatView-DlSxjxah.js.map +0 -1
- package/dist/chunks/ChatView-DnqrGXMC.js +0 -2
- package/dist/chunks/ChatView-DnqrGXMC.js.map +0 -1
- package/dist/chunks/ContextMenu-CE77rUmn.js +0 -2155
- package/dist/chunks/ContextMenu-CE77rUmn.js.map +0 -1
- package/dist/chunks/ContextMenu-KVxd0Kgd.js +0 -3
- package/dist/chunks/ContextMenu-KVxd0Kgd.js.map +0 -1
- package/dist/chunks/DataView-XJbTQ5q0.js +0 -2
- package/dist/chunks/Dialog-BinTQTfO.js +0 -2
- package/dist/chunks/FormView-CIriLDZY.js.map +0 -1
- package/dist/chunks/FormView-TPFsq8ZX.js +0 -3
- package/dist/chunks/MetricsMiniChartWidget-sONcM0pG.js +0 -2
- package/dist/chunks/PDFViewer-UBhinN8A.js +0 -2
- package/dist/chunks/Page-CnvHhwLZ.js +0 -2
- package/dist/chunks/TopNav-Dcmcic-i.js +0 -2
- package/dist/chunks/WebApp-El07OMHH.js.map +0 -1
- package/dist/chunks/WebApp-b9DQWz1d.js +0 -2
- package/dist/chunks/WebApp-b9DQWz1d.js.map +0 -1
package/dist/admin.es.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { P as Page } from "./chunks/Page-
|
|
2
|
-
import { V as View,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-
|
|
10
|
-
import { a as applyFileDropMixin, F as FormView } from "./chunks/FormView-
|
|
1
|
+
import { P as Page } from "./chunks/Page-Deq4y2Kq.js";
|
|
2
|
+
import { V as View, M as MOJOUtils } from "./chunks/Rest-CS4jRCAs.js";
|
|
3
|
+
import Dialog$1 from "./chunks/Dialog-C2mRUxga.js";
|
|
4
|
+
import { M as MetricsChart, c as MetricsMiniChartWidget, P as PieChart } from "./chunks/MetricsMiniChartWidget-Y70IHFIe.js";
|
|
5
|
+
import { b as TablePage, j as EmailDomainForms, i as EmailDomainList, E as EmailDomain, m as MailboxForms, l as MailboxList, k as Mailbox, q as EmailTemplate, c as TabView, s as EmailTemplateForms, r as EmailTemplateList, I as IncidentEvent, A as IncidentEventForms, z as IncidentEventList, v as FileManagerForms, u as FileManagerList, w as File, T as TableView, y as FileForms, x as FileList, at as GeoLocatedIP, au as GeoLocatedIPList, ae as MemberList, ad as LogList, aw as TicketList, D as IncidentList, Y as IncidentStats, O as IncidentHistoryList, N as IncidentHistory, B as Incident, C as ChatView, G as IncidentForms, a1 as Job, a7 as JobEventList, a5 as JobLogList, a3 as JobForms, a2 as JobList, aa as JobRunnerList, a8 as JobsEngineStats, ab as JobRunnerForms, a9 as JobRunner, ac as Log, M as Member, af as MemberForms, ag as MetricsPermission, ai as MetricsForms, ah as MetricsPermissionList, ar as PushConfigForms, ao as PushConfigList, aq as PushDeliveryList, ak as PushDeviceList, as as PushTemplateForms, am as PushTemplateList, R as RuleSet, _ as MatchByOptions, Z as BundleByOptions, W as RuleList, Q as RuleSetList, h as S3BucketForms, g as S3BucketList, n as SentMessage, o as SentMessageList, ay as TicketNoteList, ax as TicketNote, av as Ticket, az as TicketForms, aA as TicketCategories } from "./chunks/ChatView-Dcz7LkwL.js";
|
|
6
|
+
import DataView from "./chunks/DataView-OUqaLmGB.js";
|
|
7
|
+
import { C as ContextMenu, a as Group, G as GroupList, b as GroupForms, f as UserDevice, i as UserDeviceLocationList, g as UserDeviceList, U as User, e as UserDataView, d as UserForms, c as UserList } from "./chunks/ContextMenu-ixMyAUGS.js";
|
|
8
|
+
import { C as Collection } from "./chunks/Collection-OP7c9Zyu.js";
|
|
9
|
+
import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-DkbYnnoV.js";
|
|
10
|
+
import { a as applyFileDropMixin, F as FormView } from "./chunks/FormView-HWvIdFkB.js";
|
|
11
|
+
import { MapView } from "./map.es.js";
|
|
12
|
+
import { B, a, V, b, c, d, W } from "./chunks/WebApp-BVGZC2rj.js";
|
|
11
13
|
class AdminHeaderView extends View {
|
|
12
14
|
constructor(options = {}) {
|
|
13
15
|
super({
|
|
@@ -1590,7 +1592,7 @@ class FileTablePage extends TablePage {
|
|
|
1590
1592
|
*/
|
|
1591
1593
|
async onActionAdd(event, element) {
|
|
1592
1594
|
event.preventDefault();
|
|
1593
|
-
const Dialog2 = (await import("./chunks/Dialog-
|
|
1595
|
+
const Dialog2 = (await import("./chunks/Dialog-C2mRUxga.js")).default;
|
|
1594
1596
|
const formData = await Dialog2.showForm({
|
|
1595
1597
|
title: "Upload File",
|
|
1596
1598
|
size: "md",
|
|
@@ -1686,185 +1688,6 @@ class FileTablePage extends TablePage {
|
|
|
1686
1688
|
}
|
|
1687
1689
|
}
|
|
1688
1690
|
applyFileDropMixin(FileTablePage);
|
|
1689
|
-
class MapView extends View {
|
|
1690
|
-
constructor(options = {}) {
|
|
1691
|
-
super({
|
|
1692
|
-
className: "map-view",
|
|
1693
|
-
...options
|
|
1694
|
-
});
|
|
1695
|
-
this.markers = options.markers || [];
|
|
1696
|
-
this.center = options.center || null;
|
|
1697
|
-
this.zoom = options.zoom || 13;
|
|
1698
|
-
this.height = options.height || 400;
|
|
1699
|
-
this.showZoomControl = options.showZoomControl !== false;
|
|
1700
|
-
this.tileLayer = options.tileLayer || "osm";
|
|
1701
|
-
this.map = null;
|
|
1702
|
-
this.leafletMarkers = [];
|
|
1703
|
-
this.template = `
|
|
1704
|
-
<div class="map-container">
|
|
1705
|
-
<div id="map-{{id}}" style="height: {{height}}px; width: 100%; border-radius: 0.375rem; border: 1px solid #dee2e6;"></div>
|
|
1706
|
-
</div>
|
|
1707
|
-
`;
|
|
1708
|
-
}
|
|
1709
|
-
async onAfterRender() {
|
|
1710
|
-
await this.loadLeaflet();
|
|
1711
|
-
await this.initializeMap();
|
|
1712
|
-
}
|
|
1713
|
-
async loadLeaflet() {
|
|
1714
|
-
if (window.L) return;
|
|
1715
|
-
const cssLoaded = new Promise((resolve) => {
|
|
1716
|
-
const link = document.createElement("link");
|
|
1717
|
-
link.rel = "stylesheet";
|
|
1718
|
-
link.href = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css";
|
|
1719
|
-
link.onload = resolve;
|
|
1720
|
-
link.onerror = resolve;
|
|
1721
|
-
document.head.appendChild(link);
|
|
1722
|
-
});
|
|
1723
|
-
const jsLoaded = new Promise((resolve, reject) => {
|
|
1724
|
-
const script = document.createElement("script");
|
|
1725
|
-
script.src = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js";
|
|
1726
|
-
script.onload = resolve;
|
|
1727
|
-
script.onerror = reject;
|
|
1728
|
-
document.head.appendChild(script);
|
|
1729
|
-
});
|
|
1730
|
-
await Promise.all([cssLoaded, jsLoaded]);
|
|
1731
|
-
}
|
|
1732
|
-
getTileLayerUrl() {
|
|
1733
|
-
const tileLayers = {
|
|
1734
|
-
// Standard street maps
|
|
1735
|
-
osm: {
|
|
1736
|
-
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
1737
|
-
attribution: "© OpenStreetMap contributors",
|
|
1738
|
-
maxZoom: 19
|
|
1739
|
-
},
|
|
1740
|
-
// Satellite imagery
|
|
1741
|
-
satellite: {
|
|
1742
|
-
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
1743
|
-
attribution: "© Esri",
|
|
1744
|
-
maxZoom: 19
|
|
1745
|
-
},
|
|
1746
|
-
// Terrain and topographic
|
|
1747
|
-
terrain: {
|
|
1748
|
-
url: "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
|
|
1749
|
-
attribution: "© OpenTopoMap contributors",
|
|
1750
|
-
maxZoom: 17
|
|
1751
|
-
},
|
|
1752
|
-
// Dark mode styles
|
|
1753
|
-
dark: {
|
|
1754
|
-
url: "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",
|
|
1755
|
-
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1756
|
-
maxZoom: 20
|
|
1757
|
-
},
|
|
1758
|
-
// Light/minimal styles
|
|
1759
|
-
light: {
|
|
1760
|
-
url: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
|
|
1761
|
-
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1762
|
-
maxZoom: 20
|
|
1763
|
-
},
|
|
1764
|
-
// Watercolor artistic style
|
|
1765
|
-
watercolor: {
|
|
1766
|
-
url: "https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",
|
|
1767
|
-
attribution: "© Stadia Maps © Stamen Design © OpenStreetMap contributors",
|
|
1768
|
-
maxZoom: 16
|
|
1769
|
-
},
|
|
1770
|
-
// Black and white
|
|
1771
|
-
bw: {
|
|
1772
|
-
url: "https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",
|
|
1773
|
-
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1774
|
-
maxZoom: 20
|
|
1775
|
-
},
|
|
1776
|
-
// Streets with labels
|
|
1777
|
-
streets: {
|
|
1778
|
-
url: "https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",
|
|
1779
|
-
attribution: "© OpenStreetMap contributors © CARTO",
|
|
1780
|
-
maxZoom: 20
|
|
1781
|
-
}
|
|
1782
|
-
};
|
|
1783
|
-
return tileLayers[this.tileLayer] || tileLayers.osm;
|
|
1784
|
-
}
|
|
1785
|
-
async initializeMap() {
|
|
1786
|
-
const mapElement = this.element.querySelector(`#map-${this.id}`);
|
|
1787
|
-
if (!mapElement || !window.L) return;
|
|
1788
|
-
let mapCenter = this.center;
|
|
1789
|
-
if (!mapCenter && this.markers.length > 0) {
|
|
1790
|
-
mapCenter = [this.markers[0].lat, this.markers[0].lng];
|
|
1791
|
-
}
|
|
1792
|
-
if (!mapCenter) {
|
|
1793
|
-
mapCenter = [0, 0];
|
|
1794
|
-
}
|
|
1795
|
-
this.map = window.L.map(mapElement, {
|
|
1796
|
-
center: mapCenter,
|
|
1797
|
-
zoom: this.zoom,
|
|
1798
|
-
zoomControl: this.showZoomControl
|
|
1799
|
-
});
|
|
1800
|
-
const tileConfig = this.getTileLayerUrl();
|
|
1801
|
-
window.L.tileLayer(tileConfig.url, {
|
|
1802
|
-
attribution: tileConfig.attribution,
|
|
1803
|
-
maxZoom: tileConfig.maxZoom
|
|
1804
|
-
}).addTo(this.map);
|
|
1805
|
-
this.addMarkers(this.markers);
|
|
1806
|
-
if (this.markers.length > 1) {
|
|
1807
|
-
this.fitBounds();
|
|
1808
|
-
}
|
|
1809
|
-
setTimeout(() => {
|
|
1810
|
-
if (this.map) {
|
|
1811
|
-
this.map.invalidateSize();
|
|
1812
|
-
}
|
|
1813
|
-
}, 300);
|
|
1814
|
-
}
|
|
1815
|
-
addMarkers(markers) {
|
|
1816
|
-
if (!this.map || !Array.isArray(markers)) return;
|
|
1817
|
-
markers.forEach((markerData) => {
|
|
1818
|
-
const { lat, lng, popup, icon } = markerData;
|
|
1819
|
-
if (!lat || !lng) return;
|
|
1820
|
-
const markerOptions = {};
|
|
1821
|
-
if (icon) {
|
|
1822
|
-
markerOptions.icon = window.L.icon(icon);
|
|
1823
|
-
}
|
|
1824
|
-
const marker = window.L.marker([lat, lng], markerOptions).addTo(this.map);
|
|
1825
|
-
if (popup) {
|
|
1826
|
-
marker.bindPopup(popup);
|
|
1827
|
-
}
|
|
1828
|
-
this.leafletMarkers.push(marker);
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
fitBounds() {
|
|
1832
|
-
if (!this.map || this.leafletMarkers.length === 0) return;
|
|
1833
|
-
const group = new window.L.featureGroup(this.leafletMarkers);
|
|
1834
|
-
this.map.fitBounds(group.getBounds().pad(0.1));
|
|
1835
|
-
}
|
|
1836
|
-
updateMarkers(newMarkers) {
|
|
1837
|
-
this.clearMarkers();
|
|
1838
|
-
this.markers = newMarkers;
|
|
1839
|
-
this.addMarkers(newMarkers);
|
|
1840
|
-
if (newMarkers.length > 1) {
|
|
1841
|
-
this.fitBounds();
|
|
1842
|
-
} else if (newMarkers.length === 1) {
|
|
1843
|
-
this.map.setView([newMarkers[0].lat, newMarkers[0].lng], this.zoom);
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
clearMarkers() {
|
|
1847
|
-
this.leafletMarkers.forEach((marker) => {
|
|
1848
|
-
this.map.removeLayer(marker);
|
|
1849
|
-
});
|
|
1850
|
-
this.leafletMarkers = [];
|
|
1851
|
-
}
|
|
1852
|
-
setView(lat, lng, zoom = null) {
|
|
1853
|
-
if (!this.map) return;
|
|
1854
|
-
this.map.setView([lat, lng], zoom || this.zoom);
|
|
1855
|
-
}
|
|
1856
|
-
setZoom(zoom) {
|
|
1857
|
-
if (!this.map) return;
|
|
1858
|
-
this.map.setZoom(zoom);
|
|
1859
|
-
}
|
|
1860
|
-
async onBeforeDestroy() {
|
|
1861
|
-
if (this.map) {
|
|
1862
|
-
this.map.remove();
|
|
1863
|
-
this.map = null;
|
|
1864
|
-
}
|
|
1865
|
-
await super.onBeforeDestroy();
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
1691
|
class GeoIPView extends View {
|
|
1869
1692
|
constructor(options = {}) {
|
|
1870
1693
|
super({
|
|
@@ -2216,7 +2039,12 @@ class GroupView extends View {
|
|
|
2216
2039
|
{ key: "user.display_name", label: "User", sortable: true },
|
|
2217
2040
|
{ key: "user.email", label: "Email", sortable: true },
|
|
2218
2041
|
{ key: "created", label: "Date Joined", formatter: "date", sortable: true }
|
|
2219
|
-
]
|
|
2042
|
+
],
|
|
2043
|
+
showAdd: true,
|
|
2044
|
+
addButtonLabel: "Invite",
|
|
2045
|
+
onAdd: async (event) => {
|
|
2046
|
+
this.onInviteClick(event);
|
|
2047
|
+
}
|
|
2220
2048
|
});
|
|
2221
2049
|
const childrenCollection = new GroupList({
|
|
2222
2050
|
params: { parent: this.model.get("id"), size: 5 }
|
|
@@ -2304,6 +2132,37 @@ class GroupView extends View {
|
|
|
2304
2132
|
console.log("TODO: View parent group", parentId);
|
|
2305
2133
|
this.emit("view-parent-group", { groupId: parentId });
|
|
2306
2134
|
}
|
|
2135
|
+
async onInviteClick(event) {
|
|
2136
|
+
event.preventDefault();
|
|
2137
|
+
event.stopPropagation();
|
|
2138
|
+
const app = this.getApp();
|
|
2139
|
+
const data = await app.showForm({
|
|
2140
|
+
title: "Invite User To " + this.model.get("name"),
|
|
2141
|
+
fields: [
|
|
2142
|
+
{
|
|
2143
|
+
type: "email",
|
|
2144
|
+
name: "email",
|
|
2145
|
+
label: "Email",
|
|
2146
|
+
required: true,
|
|
2147
|
+
columns: 12
|
|
2148
|
+
}
|
|
2149
|
+
]
|
|
2150
|
+
});
|
|
2151
|
+
if (data && data.email) {
|
|
2152
|
+
app.showLoading();
|
|
2153
|
+
const resp = await app.rest.POST("/api/group/member/invite", {
|
|
2154
|
+
group: this.model.id,
|
|
2155
|
+
email: data.email
|
|
2156
|
+
});
|
|
2157
|
+
app.hideLoading();
|
|
2158
|
+
if (resp.success) {
|
|
2159
|
+
app.toast.success("User invited successfully");
|
|
2160
|
+
this.membersView.collection.fetch();
|
|
2161
|
+
} else {
|
|
2162
|
+
app.toast.error("Failed to invite user");
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2307
2166
|
}
|
|
2308
2167
|
Group.VIEW_CLASS = GroupView;
|
|
2309
2168
|
class GroupTablePage extends TablePage {
|
|
@@ -4683,7 +4542,7 @@ class LogView extends View {
|
|
|
4683
4542
|
try {
|
|
4684
4543
|
const parsed = JSON.parse(logContent);
|
|
4685
4544
|
formattedLog = JSON.stringify(parsed, null, 2);
|
|
4686
|
-
} catch (
|
|
4545
|
+
} catch (e) {
|
|
4687
4546
|
}
|
|
4688
4547
|
this.logContentView = new View({
|
|
4689
4548
|
template: `
|
|
@@ -8274,10 +8133,22 @@ class UserView extends View {
|
|
|
8274
8133
|
console.log("TODO: reset password");
|
|
8275
8134
|
}
|
|
8276
8135
|
async onActionDeactivateUser() {
|
|
8277
|
-
|
|
8136
|
+
const res = await Dialog$1.confirm("Are you sure you want to disable this user?");
|
|
8137
|
+
if (res) {
|
|
8138
|
+
await this.model.save({ is_active: false });
|
|
8139
|
+
this.getApp().toast.success("Member disable");
|
|
8140
|
+
} else {
|
|
8141
|
+
this.getApp().toast.error("Member disable failed");
|
|
8142
|
+
}
|
|
8278
8143
|
}
|
|
8279
8144
|
async onActionActivateUser() {
|
|
8280
|
-
|
|
8145
|
+
const res = await Dialog$1.confirm("Are you sure you want to enable this user?");
|
|
8146
|
+
if (res) {
|
|
8147
|
+
await this.model.save({ is_active: true });
|
|
8148
|
+
this.getApp().toast.success("Member enabled");
|
|
8149
|
+
} else {
|
|
8150
|
+
this.getApp().toast.error("Member enable failed");
|
|
8151
|
+
}
|
|
8281
8152
|
}
|
|
8282
8153
|
// Action handlers for table interactions
|
|
8283
8154
|
async onActionViewGroup(action, event, element) {
|
|
@@ -8322,7 +8193,8 @@ class UserTablePage extends TablePage {
|
|
|
8322
8193
|
Collection: UserList,
|
|
8323
8194
|
viewDialogOptions: { header: false },
|
|
8324
8195
|
defaultQuery: {
|
|
8325
|
-
sort: "-last_activity"
|
|
8196
|
+
sort: "-last_activity",
|
|
8197
|
+
is_active: true
|
|
8326
8198
|
},
|
|
8327
8199
|
// Column definitions
|
|
8328
8200
|
columns: [
|
|
@@ -8332,10 +8204,21 @@ class UserTablePage extends TablePage {
|
|
|
8332
8204
|
sortable: true,
|
|
8333
8205
|
class: "text-muted"
|
|
8334
8206
|
},
|
|
8207
|
+
// {
|
|
8208
|
+
// label: 'Avatar',
|
|
8209
|
+
// key: 'avatar|avatar("sm")',
|
|
8210
|
+
// sortable: false,
|
|
8211
|
+
// visibility: 'md'
|
|
8212
|
+
// },
|
|
8213
|
+
{
|
|
8214
|
+
key: "display_name|tooltip:model.username",
|
|
8215
|
+
label: "Display Name"
|
|
8216
|
+
},
|
|
8335
8217
|
{
|
|
8336
8218
|
label: "Info",
|
|
8337
8219
|
key: "permissions.manage_users",
|
|
8338
8220
|
template: `
|
|
8221
|
+
{{^model.is_active}}<span class="text-danger">DISABLED</span> {{/model.is_active}}
|
|
8339
8222
|
{{#model.permissions.manage_users}}{{{model.permissions.manage_users|yesnoicon('bi bi-person-gear text-danger')|tooltip('Manage Users')}}} {{/model.permissions.manage_users}}
|
|
8340
8223
|
{{#model.permissions.manage_groups}}{{{model.permissions.manage_groups|yesnoicon('bi bi-building-gear text-primary')|tooltip('Manage Groups')}}} {{/model.permissions.manage_groups}}
|
|
8341
8224
|
{{#model.permissions.view_global}}{{{model.permissions.view_global|yesnoicon('bi bi-globe text-secondary')|tooltip('View Global Menu')}}} {{/model.permissions.view_global}}
|
|
@@ -8343,16 +8226,6 @@ class UserTablePage extends TablePage {
|
|
|
8343
8226
|
`,
|
|
8344
8227
|
sortable: false
|
|
8345
8228
|
},
|
|
8346
|
-
// {
|
|
8347
|
-
// label: 'Avatar',
|
|
8348
|
-
// key: 'avatar|avatar("sm")',
|
|
8349
|
-
// sortable: false,
|
|
8350
|
-
// visibility: 'md'
|
|
8351
|
-
// },
|
|
8352
|
-
{
|
|
8353
|
-
key: "display_name|tooltip:model.username",
|
|
8354
|
-
label: "Display Name"
|
|
8355
|
-
},
|
|
8356
8229
|
{
|
|
8357
8230
|
key: "email",
|
|
8358
8231
|
label: "Email",
|
|
@@ -8372,6 +8245,43 @@ class UserTablePage extends TablePage {
|
|
|
8372
8245
|
className: "text-muted fs-8"
|
|
8373
8246
|
}
|
|
8374
8247
|
],
|
|
8248
|
+
filters: [
|
|
8249
|
+
{
|
|
8250
|
+
key: "is_active",
|
|
8251
|
+
label: "Active",
|
|
8252
|
+
type: "boolean",
|
|
8253
|
+
defaultValue: true
|
|
8254
|
+
},
|
|
8255
|
+
{
|
|
8256
|
+
key: "email",
|
|
8257
|
+
label: "Email",
|
|
8258
|
+
type: "text",
|
|
8259
|
+
defaultValue: ""
|
|
8260
|
+
},
|
|
8261
|
+
{
|
|
8262
|
+
key: "username",
|
|
8263
|
+
label: "Username",
|
|
8264
|
+
type: "text",
|
|
8265
|
+
defaultValue: ""
|
|
8266
|
+
},
|
|
8267
|
+
{
|
|
8268
|
+
key: "locations__ip_address",
|
|
8269
|
+
label: "IP Address",
|
|
8270
|
+
type: "text",
|
|
8271
|
+
defaultValue: ""
|
|
8272
|
+
},
|
|
8273
|
+
{
|
|
8274
|
+
key: "last_activity",
|
|
8275
|
+
type: "daterange",
|
|
8276
|
+
startName: "dr_start",
|
|
8277
|
+
endName: "dr_end",
|
|
8278
|
+
fieldName: "dr_field",
|
|
8279
|
+
label: "Date Range",
|
|
8280
|
+
format: "YYYY-MM-DD",
|
|
8281
|
+
displayFormat: "MMM DD, YYYY",
|
|
8282
|
+
separator: " to "
|
|
8283
|
+
}
|
|
8284
|
+
],
|
|
8375
8285
|
// Table features
|
|
8376
8286
|
selectable: true,
|
|
8377
8287
|
searchable: true,
|
|
@@ -8408,17 +8318,6 @@ class UserTablePage extends TablePage {
|
|
|
8408
8318
|
label: "Send Invite"
|
|
8409
8319
|
}
|
|
8410
8320
|
],
|
|
8411
|
-
batchBarLocation: "top",
|
|
8412
|
-
batchActions: [
|
|
8413
|
-
{
|
|
8414
|
-
icon: "bi-x-circle",
|
|
8415
|
-
action: "disable-users",
|
|
8416
|
-
label: "Disable Users",
|
|
8417
|
-
handler: async (items, event, el) => {
|
|
8418
|
-
console.log("ADMIN CLICKED", items, this);
|
|
8419
|
-
}
|
|
8420
|
-
}
|
|
8421
|
-
],
|
|
8422
8321
|
// Table display options (for HTML table styling)
|
|
8423
8322
|
tableOptions: {
|
|
8424
8323
|
striped: true,
|
|
@@ -8429,14 +8328,14 @@ class UserTablePage extends TablePage {
|
|
|
8429
8328
|
});
|
|
8430
8329
|
}
|
|
8431
8330
|
async onActionEditPermissions(event, element) {
|
|
8331
|
+
event.preventDefault();
|
|
8432
8332
|
const item = this.collection.get(element.dataset.id);
|
|
8433
|
-
|
|
8333
|
+
await Dialog$1.showModelForm({
|
|
8434
8334
|
model: item,
|
|
8435
8335
|
size: "lg",
|
|
8436
8336
|
title: `Edit Permissions for "${item._.username}"`,
|
|
8437
8337
|
fields: UserForms.permissions.fields
|
|
8438
8338
|
});
|
|
8439
|
-
console.log(result);
|
|
8440
8339
|
}
|
|
8441
8340
|
async onActionChangePassword(event, element) {
|
|
8442
8341
|
const item = this.collection.get(element.dataset.id);
|
|
@@ -8567,12 +8466,6 @@ function registerAdminPages(app, addToMenu = true) {
|
|
|
8567
8466
|
icon: "bi-diagram-3",
|
|
8568
8467
|
permissions: ["manage_groups"]
|
|
8569
8468
|
},
|
|
8570
|
-
{
|
|
8571
|
-
text: "Members",
|
|
8572
|
-
route: "?page=admin/members",
|
|
8573
|
-
icon: "bi-person-badge",
|
|
8574
|
-
permissions: ["manage_groups"]
|
|
8575
|
-
},
|
|
8576
8469
|
{
|
|
8577
8470
|
text: "Incidents & Tickets",
|
|
8578
8471
|
route: null,
|
|
@@ -8778,11 +8671,11 @@ export {
|
|
|
8778
8671
|
UserDeviceTablePage,
|
|
8779
8672
|
UserTablePage,
|
|
8780
8673
|
UserView,
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8674
|
+
a as VERSION,
|
|
8675
|
+
V as VERSION_INFO,
|
|
8676
|
+
b as VERSION_MAJOR,
|
|
8677
|
+
c as VERSION_MINOR,
|
|
8678
|
+
d as VERSION_REVISION,
|
|
8786
8679
|
W as WebApp,
|
|
8787
8680
|
registerAdminPages
|
|
8788
8681
|
};
|