@agenticmail/enterprise 0.5.306 → 0.5.308
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/dashboard/app.js +7 -5
- package/dist/dashboard/components/org-switcher.js +1 -6
- package/dist/dashboard/pages/approvals.js +1 -1
- package/dist/dashboard/pages/guardrails.js +1 -1
- package/dist/dashboard/pages/journal.js +1 -1
- package/dist/dashboard/pages/messages.js +1 -1
- package/dist/dashboard/pages/org-chart.js +1 -1
- package/dist/dashboard/pages/task-pipeline.js +1 -1
- package/dist/dashboard/pages/workforce.js +1 -1
- package/package.json +1 -1
- package/src/dashboard/app.js +7 -5
- package/src/dashboard/components/org-switcher.js +1 -6
- package/src/dashboard/pages/approvals.js +1 -1
- package/src/dashboard/pages/guardrails.js +1 -1
- package/src/dashboard/pages/journal.js +1 -1
- package/src/dashboard/pages/messages.js +1 -1
- package/src/dashboard/pages/org-chart.js +1 -1
- package/src/dashboard/pages/task-pipeline.js +1 -1
- package/src/dashboard/pages/workforce.js +1 -1
package/dist/dashboard/app.js
CHANGED
|
@@ -313,17 +313,19 @@ function App() {
|
|
|
313
313
|
}, []);
|
|
314
314
|
|
|
315
315
|
const stopImpersonation = useCallback(() => {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
setImpersonating(prev => {
|
|
317
|
+
if (prev && prev.originalToken) {
|
|
318
|
+
localStorage.setItem('em_token', prev.originalToken);
|
|
319
|
+
}
|
|
320
|
+
return null;
|
|
321
|
+
});
|
|
320
322
|
localStorage.removeItem('em_client_org_id');
|
|
321
323
|
// Reload real user
|
|
322
324
|
authCall('/me').then(d => { setUser(d.user || d); }).catch(() => {});
|
|
323
325
|
apiCall('/me/permissions').then(d => { if (d && d.permissions) setPermissions(d.permissions); }).catch(() => {});
|
|
324
326
|
toast('Stopped impersonation', 'success');
|
|
325
327
|
setPage('users');
|
|
326
|
-
}, [
|
|
328
|
+
}, []);
|
|
327
329
|
|
|
328
330
|
return h(AppContext.Provider, { value: { toast, toasts, user, theme, setPage, permissions, impersonating, startImpersonation, stopImpersonation } },
|
|
329
331
|
h('div', { className: 'app-layout' },
|
|
@@ -28,13 +28,8 @@ export function OrgContextSwitcher(props) {
|
|
|
28
28
|
var list = d.organizations || [];
|
|
29
29
|
setOrgs(list);
|
|
30
30
|
setLoaded(true);
|
|
31
|
-
// Auto-select user's org on first load if org-bound
|
|
32
|
-
if (userOrgId && !selectedOrgId) {
|
|
33
|
-
var org = list.find(function(o) { return o.id === userOrgId; });
|
|
34
|
-
if (org) onOrgChange(userOrgId, org);
|
|
35
|
-
}
|
|
36
31
|
}).catch(function() { setLoaded(true); });
|
|
37
|
-
}, [
|
|
32
|
+
}, []);
|
|
38
33
|
|
|
39
34
|
// Don't render if no client orgs and user isn't org-bound
|
|
40
35
|
if (loaded && orgs.length === 0 && !userOrgId) return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall, showConfirm, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall, showConfirm, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall,
|
|
1
|
+
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, apiCall, getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { TimezoneSelect } from '../components/timezones.js';
|
|
4
4
|
import { HelpButton } from '../components/help-button.js';
|
package/package.json
CHANGED
package/src/dashboard/app.js
CHANGED
|
@@ -313,17 +313,19 @@ function App() {
|
|
|
313
313
|
}, []);
|
|
314
314
|
|
|
315
315
|
const stopImpersonation = useCallback(() => {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
setImpersonating(prev => {
|
|
317
|
+
if (prev && prev.originalToken) {
|
|
318
|
+
localStorage.setItem('em_token', prev.originalToken);
|
|
319
|
+
}
|
|
320
|
+
return null;
|
|
321
|
+
});
|
|
320
322
|
localStorage.removeItem('em_client_org_id');
|
|
321
323
|
// Reload real user
|
|
322
324
|
authCall('/me').then(d => { setUser(d.user || d); }).catch(() => {});
|
|
323
325
|
apiCall('/me/permissions').then(d => { if (d && d.permissions) setPermissions(d.permissions); }).catch(() => {});
|
|
324
326
|
toast('Stopped impersonation', 'success');
|
|
325
327
|
setPage('users');
|
|
326
|
-
}, [
|
|
328
|
+
}, []);
|
|
327
329
|
|
|
328
330
|
return h(AppContext.Provider, { value: { toast, toasts, user, theme, setPage, permissions, impersonating, startImpersonation, stopImpersonation } },
|
|
329
331
|
h('div', { className: 'app-layout' },
|
|
@@ -28,13 +28,8 @@ export function OrgContextSwitcher(props) {
|
|
|
28
28
|
var list = d.organizations || [];
|
|
29
29
|
setOrgs(list);
|
|
30
30
|
setLoaded(true);
|
|
31
|
-
// Auto-select user's org on first load if org-bound
|
|
32
|
-
if (userOrgId && !selectedOrgId) {
|
|
33
|
-
var org = list.find(function(o) { return o.id === userOrgId; });
|
|
34
|
-
if (org) onOrgChange(userOrgId, org);
|
|
35
|
-
}
|
|
36
31
|
}).catch(function() { setLoaded(true); });
|
|
37
|
-
}, [
|
|
32
|
+
}, []);
|
|
38
33
|
|
|
39
34
|
// Don't render if no client orgs and user isn't org-bound
|
|
40
35
|
if (loaded && orgs.length === 0 && !userOrgId) return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall, showConfirm, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall, showConfirm, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall,
|
|
1
|
+
import { h, useState, useEffect, useCallback, useRef, Fragment, useApp, engineCall, apiCall, getOrgId } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { HelpButton } from '../components/help-button.js';
|
|
4
4
|
import { useOrgContext } from '../components/org-switcher.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId
|
|
1
|
+
import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId , apiCall } from '../components/utils.js';
|
|
2
2
|
import { I } from '../components/icons.js';
|
|
3
3
|
import { TimezoneSelect } from '../components/timezones.js';
|
|
4
4
|
import { HelpButton } from '../components/help-button.js';
|