mirror of
https://github.com/vitalityAI/office.git
synced 2025-04-20 11:00:16 -04:00
fix
This commit is contained in:
parent
9e792ebd9d
commit
660e1925eb
|
@ -47,6 +47,8 @@ const Demo: NextPage<any> = ({ officers }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const popOut = async (session) => {
|
const popOut = async (session) => {
|
||||||
|
notify(toastDispatch, "", "Loading call log...", ToastType.DEFAULT)
|
||||||
|
|
||||||
const messages = await (await fetch(process.env.NEXT_PUBLIC_API_URL + '/session/message/?sessionId=' + session.id, {
|
const messages = await (await fetch(process.env.NEXT_PUBLIC_API_URL + '/session/message/?sessionId=' + session.id, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -66,6 +68,7 @@ const Demo: NextPage<any> = ({ officers }) => {
|
||||||
console.log(session)
|
console.log(session)
|
||||||
|
|
||||||
setFocusSession(session)
|
setFocusSession(session)
|
||||||
|
notify(toastDispatch, "", "Loaded call log!", ToastType.SUCCESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
const transfer = async () => {
|
const transfer = async () => {
|
||||||
|
@ -112,14 +115,15 @@ const Demo: NextPage<any> = ({ officers }) => {
|
||||||
{
|
{
|
||||||
session ?
|
session ?
|
||||||
<>
|
<>
|
||||||
{focusSession ?
|
<div className={`absolute ${focusSession ? "backdrop-blur-sm translate-y-0 opacity-100" : " backdrop-blur-0 translate-y-20 opacity-0"} transition-all w-fit max-w-5xl z-50 text-white bg-black bg-opacity-80 p-8 rounded-sm left-0 right-0 mx-auto`}>
|
||||||
<div className="absolute w-fit z-10 text-white bg-black bg-opacity-80 p-8 rounded-sm left-0 right-0 mx-auto">
|
|
||||||
<button className={`absolute right-2 top-1 w-fit text-blue transition-all ease-in-out font-bold`} onClick={closePop}>{"X"}</button>
|
<button className={`absolute right-2 top-1 w-fit text-blue transition-all ease-in-out font-bold`} onClick={closePop}>{"X"}</button>
|
||||||
<div className="flex items-center ">
|
{focusSession ?
|
||||||
|
<><div className="flex items-center ">
|
||||||
<h2 className="w-fit text-3xl font-extrabold">Caller: {focusSession.callerPhone} | {focusSession.startedAt}</h2>
|
<h2 className="w-fit text-3xl font-extrabold">Caller: {focusSession.callerPhone} | {focusSession.startedAt}</h2>
|
||||||
<OutlineButton name="Transfer" onClick={transfer} className="ml-8" />
|
<OutlineButton name="Transfer" onClick={transfer} className="ml-8" />
|
||||||
</div>
|
</div>
|
||||||
<p className="my-4 text-white"><span className="text-blue font-bold">Summary: </span>{focusSession.summary}</p>
|
<p className="my-4 text-white"><span className="text-blue font-bold">Summary: </span>{focusSession.summary}</p>
|
||||||
|
<div className="">
|
||||||
{focusSession.messages.map(msg => {
|
{focusSession.messages.map(msg => {
|
||||||
return (
|
return (
|
||||||
<div key={msg.id}>
|
<div key={msg.id}>
|
||||||
|
@ -129,9 +133,12 @@ const Demo: NextPage<any> = ({ officers }) => {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
<div className={`${focusSession ? 'blur-sm' : 'blur-0'} transition-all`}>
|
</div>
|
||||||
|
|
||||||
|
<div className={`transition-all`}>
|
||||||
<div className='w-fit bg-white bg-opacity-5 rounded-md p-4 text-center mx-auto'>
|
<div className='w-fit bg-white bg-opacity-5 rounded-md p-4 text-center mx-auto'>
|
||||||
<h2 className="text-white text-2xl font-extrabold">Hey {session.user.name.split(' ')[0]}!</h2>
|
<h2 className="text-white text-2xl font-extrabold">Hey {session.user.name.split(' ')[0]}!</h2>
|
||||||
<p className="text-white text-xl font-light mt-2"> Can you give us your number real quick?</p>
|
<p className="text-white text-xl font-light mt-2"> Can you give us your number real quick?</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user