handoff fixes
This commit is contained in:
parent
83f0eba64d
commit
8653f319f7
9 changed files with 30 additions and 1309 deletions
|
|
@ -1,58 +1,18 @@
|
|||
import { useState } from "react";
|
||||
import HandoffConversation from "./HandoffConversation";
|
||||
import HandoffInbox from "./HandoffInbox";
|
||||
import HandoffSettings from "./HandoffSettings";
|
||||
|
||||
export default function HumanHandoff() {
|
||||
const [tab, setTab] = useState("handoffs");
|
||||
const [selectedHandoffId, setSelectedHandoffId] = useState(null);
|
||||
|
||||
function switchTab(nextTab) {
|
||||
setTab(nextTab);
|
||||
if (nextTab !== "handoffs") {
|
||||
setSelectedHandoffId(null);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="human-handoff-page">
|
||||
<header className="human-handoff-head">
|
||||
<div>
|
||||
<h1>Human Handoff</h1>
|
||||
<p>
|
||||
Private Agent ↔ Human Owner conversations, linked to external customer threads
|
||||
but kept on separate RFC threading planes.
|
||||
Configure when your Agent should involve a Human Owner. Settings are saved here;
|
||||
email routing is not affected until handoff is enabled in a future release.
|
||||
</p>
|
||||
<nav className="human-handoff-tabs" aria-label="Human Handoff sections">
|
||||
<button
|
||||
type="button"
|
||||
className={tab === "handoffs" ? "active" : ""}
|
||||
onClick={() => switchTab("handoffs")}
|
||||
>
|
||||
Handoffs
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={tab === "settings" ? "active" : ""}
|
||||
onClick={() => switchTab("settings")}
|
||||
>
|
||||
Settings
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{tab === "handoffs" && (
|
||||
selectedHandoffId ? (
|
||||
<HandoffConversation
|
||||
handoffId={selectedHandoffId}
|
||||
onBack={() => setSelectedHandoffId(null)}
|
||||
/>
|
||||
) : (
|
||||
<HandoffInbox onSelect={setSelectedHandoffId} />
|
||||
)
|
||||
)}
|
||||
{tab === "settings" && <HandoffSettings />}
|
||||
<HandoffSettings />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue