@autobusal/admin-agents 1.3.1 → 1.4.0
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/Manage.tsx +10 -5
- package/package.json +1 -1
package/Manage.tsx
CHANGED
|
@@ -5,7 +5,8 @@ import { Meta, BackWithTitle, Viewer, Box, IpLogs, ApiDetails } from '@autobusal
|
|
|
5
5
|
import { usePage, useBreadcrumbs, useSubscriptions, useCountries, useOperators } from '@autobusal/hooks';
|
|
6
6
|
import { GetStatus, getAllowed, success } from '@autobusal/utilities';
|
|
7
7
|
import { AgentData } from '@autobusal/providers/types/agents';
|
|
8
|
-
import { PartnerApi, TokenRevealModal } from '@autobusal/admin-api-consumers';
|
|
8
|
+
import { PartnerApi, TokenRevealModal, WelcomeModal } from '@autobusal/admin-api-consumers';
|
|
9
|
+
import { KeyReveal } from '@autobusal/admin-api-consumers/types';
|
|
9
10
|
import { useGetAgent, usePostAgent, useDeleteAgent } from './services';
|
|
10
11
|
|
|
11
12
|
interface Props {
|
|
@@ -35,7 +36,7 @@ const Manage = ({ url, t }: Props): JSX.Element => {
|
|
|
35
36
|
// in the panel: the panel sits inside Viewer, which swaps its form for a
|
|
36
37
|
// loading box while the record refetches after the key is issued - taking
|
|
37
38
|
// the panel, and any modal it opened, with it.
|
|
38
|
-
const [ revealToken, setRevealToken ] = useState<
|
|
39
|
+
const [ revealToken, setRevealToken ] = useState<KeyReveal | null>(null);
|
|
39
40
|
|
|
40
41
|
/*
|
|
41
42
|
* Claude - 2026-08-29 (audit A4-09, low)
|
|
@@ -355,9 +356,13 @@ const Manage = ({ url, t }: Props): JSX.Element => {
|
|
|
355
356
|
onDelete={ onDelete }
|
|
356
357
|
/>
|
|
357
358
|
|
|
358
|
-
{
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
{ /* Claude - 2026-09-24: enabling drafts the welcome email too, for the
|
|
360
|
+
admin to read and send or drop; a regenerated key shows alone */ }
|
|
361
|
+
{ revealToken && (revealToken.welcome ? (
|
|
362
|
+
<WelcomeModal agentId={ id } token={ revealToken.token } draft={ revealToken.welcome } t={ t } onClose={ () => setRevealToken(null) } />
|
|
363
|
+
) : (
|
|
364
|
+
<TokenRevealModal token={ revealToken.token } t={ t } onClose={ () => setRevealToken(null) } />
|
|
365
|
+
)) }
|
|
361
366
|
</Meta>
|
|
362
367
|
);
|
|
363
368
|
};
|