web-mojo 2.1.917 → 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 +154 -244
- 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-D9hJ2u6c.js → ChatView-Dcz7LkwL.js} +103 -576
- 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-CorHtzkO.js.map → DataView-CdDY9ijM.js.map} +1 -1
- package/dist/chunks/{DataView-BDUCD0q0.js → DataView-OUqaLmGB.js} +2 -2
- package/dist/chunks/{DataView-BDUCD0q0.js.map → DataView-OUqaLmGB.js.map} +1 -1
- package/dist/chunks/{Dialog-D9qIh5Jb.js → Dialog-C2mRUxga.js} +8 -6
- package/dist/chunks/{Dialog-D9qIh5Jb.js.map → Dialog-C2mRUxga.js.map} +1 -1
- package/dist/chunks/Dialog-Cl6MN8if.js +2 -0
- package/dist/chunks/{Dialog-ifYDY_7S.js.map → Dialog-Cl6MN8if.js.map} +1 -1
- package/dist/chunks/FormView-BSWaXDav.js +3 -0
- package/dist/chunks/{FormView-Dtzh5qLB.js.map → FormView-BSWaXDav.js.map} +1 -1
- package/dist/chunks/{FormView-Bq74K6dj.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-BHLlrFJf.js.map → MetricsMiniChartWidget-BkTEO87S.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-CoapKHw0.js → MetricsMiniChartWidget-Y70IHFIe.js} +3 -3
- package/dist/chunks/{MetricsMiniChartWidget-CoapKHw0.js.map → MetricsMiniChartWidget-Y70IHFIe.js.map} +1 -1
- package/dist/chunks/PDFViewer-C0aMqGJL.js +2 -0
- package/dist/chunks/{PDFViewer-DxoRBrX9.js.map → PDFViewer-C0aMqGJL.js.map} +1 -1
- package/dist/chunks/{PDFViewer-BXcYgXKx.js → PDFViewer-DkbYnnoV.js} +3 -3
- package/dist/chunks/{PDFViewer-BXcYgXKx.js.map → PDFViewer-DkbYnnoV.js.map} +1 -1
- package/dist/chunks/Page-CvbwEoLv.js +2 -0
- package/dist/chunks/{Page-Cw4qW3aV.js.map → Page-CvbwEoLv.js.map} +1 -1
- package/dist/chunks/{Page-CFzSUQLz.js → Page-Deq4y2Kq.js} +2 -2
- package/dist/chunks/{Page-CFzSUQLz.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-MzDCFzar.js → Rest-CS4jRCAs.js} +5 -1389
- package/dist/chunks/Rest-CS4jRCAs.js.map +1 -0
- package/dist/chunks/{TopNav-DaX7k8M8.js → TopNav-DXLRdU0o.js} +5 -5
- package/dist/chunks/{TopNav-DaX7k8M8.js.map → TopNav-DXLRdU0o.js.map} +1 -1
- package/dist/chunks/TopNav-GyvI31l2.js +2 -0
- package/dist/chunks/{TopNav-DgPBfS1e.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-D9hJ2u6c.js.map +0 -1
- package/dist/chunks/ChatView-u-UdWa-P.js +0 -2
- package/dist/chunks/ChatView-u-UdWa-P.js.map +0 -1
- package/dist/chunks/ContextMenu-BlmrYFlZ.js +0 -2155
- package/dist/chunks/ContextMenu-BlmrYFlZ.js.map +0 -1
- package/dist/chunks/ContextMenu-CfXiUGrB.js +0 -3
- package/dist/chunks/ContextMenu-CfXiUGrB.js.map +0 -1
- package/dist/chunks/DataView-CorHtzkO.js +0 -2
- package/dist/chunks/Dialog-ifYDY_7S.js +0 -2
- package/dist/chunks/FormView-Bq74K6dj.js.map +0 -1
- package/dist/chunks/FormView-Dtzh5qLB.js +0 -3
- package/dist/chunks/MetricsMiniChartWidget-BHLlrFJf.js +0 -2
- package/dist/chunks/PDFViewer-DxoRBrX9.js +0 -2
- package/dist/chunks/Page-Cw4qW3aV.js +0 -2
- package/dist/chunks/TopNav-DgPBfS1e.js +0 -2
- package/dist/chunks/WebApp-DHNZIzfN.js +0 -2
- package/dist/chunks/WebApp-DHNZIzfN.js.map +0 -1
- package/dist/chunks/WebApp-MzDCFzar.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 {
|
|
@@ -2329,23 +2188,15 @@ class GroupTablePage extends TablePage {
|
|
|
2329
2188
|
{
|
|
2330
2189
|
key: "id",
|
|
2331
2190
|
label: "ID",
|
|
2332
|
-
width: "60px",
|
|
2333
2191
|
sortable: true,
|
|
2334
2192
|
class: "text-muted"
|
|
2335
2193
|
},
|
|
2336
2194
|
{
|
|
2337
|
-
key: "
|
|
2338
|
-
label: "
|
|
2339
|
-
visibility: "lg"
|
|
2340
|
-
},
|
|
2341
|
-
{
|
|
2342
|
-
label: "Avatar",
|
|
2343
|
-
key: 'avatar|avatar("sm", "rounded")',
|
|
2344
|
-
sortable: false,
|
|
2345
|
-
visibility: "lg"
|
|
2195
|
+
key: "name",
|
|
2196
|
+
label: "Display Name"
|
|
2346
2197
|
},
|
|
2347
2198
|
{
|
|
2348
|
-
key: "kind",
|
|
2199
|
+
key: "kind|badge",
|
|
2349
2200
|
label: "Kind",
|
|
2350
2201
|
filter: {
|
|
2351
2202
|
type: "select",
|
|
@@ -2353,14 +2204,16 @@ class GroupTablePage extends TablePage {
|
|
|
2353
2204
|
}
|
|
2354
2205
|
},
|
|
2355
2206
|
{
|
|
2356
|
-
key: "
|
|
2357
|
-
label: "
|
|
2207
|
+
key: "is_active|yesnoicon",
|
|
2208
|
+
label: "Enabled",
|
|
2209
|
+
visibility: "lg"
|
|
2358
2210
|
},
|
|
2359
2211
|
{
|
|
2360
2212
|
key: "parent.name",
|
|
2361
2213
|
label: "Parent",
|
|
2362
|
-
formatter: "default('
|
|
2363
|
-
visibility: "md"
|
|
2214
|
+
formatter: "default('-')",
|
|
2215
|
+
visibility: "md",
|
|
2216
|
+
class: "text-muted fs-8"
|
|
2364
2217
|
},
|
|
2365
2218
|
{
|
|
2366
2219
|
key: "created",
|
|
@@ -2368,6 +2221,13 @@ class GroupTablePage extends TablePage {
|
|
|
2368
2221
|
className: "text-muted fs-8",
|
|
2369
2222
|
formatter: "epoch|datetime",
|
|
2370
2223
|
visibility: "lg"
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
key: "last_activity",
|
|
2227
|
+
label: "Activity",
|
|
2228
|
+
className: "text-muted fs-8",
|
|
2229
|
+
formatter: "relative",
|
|
2230
|
+
visibility: "lg"
|
|
2371
2231
|
}
|
|
2372
2232
|
],
|
|
2373
2233
|
filters: [
|
|
@@ -4682,7 +4542,7 @@ class LogView extends View {
|
|
|
4682
4542
|
try {
|
|
4683
4543
|
const parsed = JSON.parse(logContent);
|
|
4684
4544
|
formattedLog = JSON.stringify(parsed, null, 2);
|
|
4685
|
-
} catch (
|
|
4545
|
+
} catch (e) {
|
|
4686
4546
|
}
|
|
4687
4547
|
this.logContentView = new View({
|
|
4688
4548
|
template: `
|
|
@@ -8273,10 +8133,22 @@ class UserView extends View {
|
|
|
8273
8133
|
console.log("TODO: reset password");
|
|
8274
8134
|
}
|
|
8275
8135
|
async onActionDeactivateUser() {
|
|
8276
|
-
|
|
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
|
+
}
|
|
8277
8143
|
}
|
|
8278
8144
|
async onActionActivateUser() {
|
|
8279
|
-
|
|
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
|
+
}
|
|
8280
8152
|
}
|
|
8281
8153
|
// Action handlers for table interactions
|
|
8282
8154
|
async onActionViewGroup(action, event, element) {
|
|
@@ -8321,38 +8193,93 @@ class UserTablePage extends TablePage {
|
|
|
8321
8193
|
Collection: UserList,
|
|
8322
8194
|
viewDialogOptions: { header: false },
|
|
8323
8195
|
defaultQuery: {
|
|
8324
|
-
sort: "-last_activity"
|
|
8196
|
+
sort: "-last_activity",
|
|
8197
|
+
is_active: true
|
|
8325
8198
|
},
|
|
8326
8199
|
// Column definitions
|
|
8327
8200
|
columns: [
|
|
8328
8201
|
{
|
|
8329
8202
|
key: "id",
|
|
8330
8203
|
label: "ID",
|
|
8331
|
-
width: "60px",
|
|
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
|
-
label: "
|
|
8337
|
-
key:
|
|
8218
|
+
label: "Info",
|
|
8219
|
+
key: "permissions.manage_users",
|
|
8220
|
+
template: `
|
|
8221
|
+
{{^model.is_active}}<span class="text-danger">DISABLED</span> {{/model.is_active}}
|
|
8222
|
+
{{#model.permissions.manage_users}}{{{model.permissions.manage_users|yesnoicon('bi bi-person-gear text-danger')|tooltip('Manage Users')}}} {{/model.permissions.manage_users}}
|
|
8223
|
+
{{#model.permissions.manage_groups}}{{{model.permissions.manage_groups|yesnoicon('bi bi-building-gear text-primary')|tooltip('Manage Groups')}}} {{/model.permissions.manage_groups}}
|
|
8224
|
+
{{#model.permissions.view_global}}{{{model.permissions.view_global|yesnoicon('bi bi-globe text-secondary')|tooltip('View Global Menu')}}} {{/model.permissions.view_global}}
|
|
8225
|
+
{{#model.permissions.view_admin}}{{{model.permissions.view_admin|yesnoicon('bi bi-wrench text-secondary')|tooltip('View Admin Menu')}}} {{/model.permissions.view_admin}}
|
|
8226
|
+
`,
|
|
8338
8227
|
sortable: false
|
|
8339
8228
|
},
|
|
8340
8229
|
{
|
|
8341
|
-
key: "
|
|
8342
|
-
label: "
|
|
8230
|
+
key: "email",
|
|
8231
|
+
label: "Email",
|
|
8232
|
+
visibility: "xl",
|
|
8233
|
+
className: "text-muted fs-8"
|
|
8343
8234
|
},
|
|
8235
|
+
// {
|
|
8236
|
+
// key: 'username',
|
|
8237
|
+
// label: 'Username',
|
|
8238
|
+
// visibility: 'xl',
|
|
8239
|
+
// className: 'text-muted fs-8',
|
|
8240
|
+
// },
|
|
8344
8241
|
{
|
|
8345
|
-
key: "
|
|
8346
|
-
label: "
|
|
8242
|
+
key: "last_activity",
|
|
8243
|
+
label: "Last Activity",
|
|
8244
|
+
formatter: "relative",
|
|
8245
|
+
className: "text-muted fs-8"
|
|
8246
|
+
}
|
|
8247
|
+
],
|
|
8248
|
+
filters: [
|
|
8249
|
+
{
|
|
8250
|
+
key: "is_active",
|
|
8251
|
+
label: "Active",
|
|
8252
|
+
type: "boolean",
|
|
8253
|
+
defaultValue: true
|
|
8347
8254
|
},
|
|
8348
8255
|
{
|
|
8349
8256
|
key: "email",
|
|
8350
|
-
label: "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: ""
|
|
8351
8272
|
},
|
|
8352
8273
|
{
|
|
8353
8274
|
key: "last_activity",
|
|
8354
|
-
|
|
8355
|
-
|
|
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 "
|
|
8356
8283
|
}
|
|
8357
8284
|
],
|
|
8358
8285
|
// Table features
|
|
@@ -8391,17 +8318,6 @@ class UserTablePage extends TablePage {
|
|
|
8391
8318
|
label: "Send Invite"
|
|
8392
8319
|
}
|
|
8393
8320
|
],
|
|
8394
|
-
batchBarLocation: "top",
|
|
8395
|
-
batchActions: [
|
|
8396
|
-
{
|
|
8397
|
-
icon: "bi-x-circle",
|
|
8398
|
-
action: "disable-users",
|
|
8399
|
-
label: "Disable Users",
|
|
8400
|
-
handler: async (items, event, el) => {
|
|
8401
|
-
console.log("ADMIN CLICKED", items, this);
|
|
8402
|
-
}
|
|
8403
|
-
}
|
|
8404
|
-
],
|
|
8405
8321
|
// Table display options (for HTML table styling)
|
|
8406
8322
|
tableOptions: {
|
|
8407
8323
|
striped: true,
|
|
@@ -8412,14 +8328,14 @@ class UserTablePage extends TablePage {
|
|
|
8412
8328
|
});
|
|
8413
8329
|
}
|
|
8414
8330
|
async onActionEditPermissions(event, element) {
|
|
8331
|
+
event.preventDefault();
|
|
8415
8332
|
const item = this.collection.get(element.dataset.id);
|
|
8416
|
-
|
|
8333
|
+
await Dialog$1.showModelForm({
|
|
8417
8334
|
model: item,
|
|
8418
8335
|
size: "lg",
|
|
8419
8336
|
title: `Edit Permissions for "${item._.username}"`,
|
|
8420
8337
|
fields: UserForms.permissions.fields
|
|
8421
8338
|
});
|
|
8422
|
-
console.log(result);
|
|
8423
8339
|
}
|
|
8424
8340
|
async onActionChangePassword(event, element) {
|
|
8425
8341
|
const item = this.collection.get(element.dataset.id);
|
|
@@ -8550,12 +8466,6 @@ function registerAdminPages(app, addToMenu = true) {
|
|
|
8550
8466
|
icon: "bi-diagram-3",
|
|
8551
8467
|
permissions: ["manage_groups"]
|
|
8552
8468
|
},
|
|
8553
|
-
{
|
|
8554
|
-
text: "Members",
|
|
8555
|
-
route: "?page=admin/members",
|
|
8556
|
-
icon: "bi-person-badge",
|
|
8557
|
-
permissions: ["manage_groups"]
|
|
8558
|
-
},
|
|
8559
8469
|
{
|
|
8560
8470
|
text: "Incidents & Tickets",
|
|
8561
8471
|
route: null,
|
|
@@ -8761,11 +8671,11 @@ export {
|
|
|
8761
8671
|
UserDeviceTablePage,
|
|
8762
8672
|
UserTablePage,
|
|
8763
8673
|
UserView,
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8674
|
+
a as VERSION,
|
|
8675
|
+
V as VERSION_INFO,
|
|
8676
|
+
b as VERSION_MAJOR,
|
|
8677
|
+
c as VERSION_MINOR,
|
|
8678
|
+
d as VERSION_REVISION,
|
|
8769
8679
|
W as WebApp,
|
|
8770
8680
|
registerAdminPages
|
|
8771
8681
|
};
|