Add AI auto sales replies for inbox
This commit is contained in:
@@ -3,6 +3,7 @@ import { roleAtLeast } from "@/lib/auth/roles";
|
||||
import { EmptyState, PageTitle } from "@/components/ui";
|
||||
import { InboxView } from "@/components/InboxView";
|
||||
import { PagePicker } from "@/components/PagePicker";
|
||||
import { InboxAiSettings } from "@/components/InboxAiSettings";
|
||||
|
||||
export default async function InboxPage() {
|
||||
const ctx = await getConsoleContext();
|
||||
@@ -12,7 +13,10 @@ export default async function InboxPage() {
|
||||
<>
|
||||
<PageTitle title="Inbox" subtitle={page ? `Messenger และ Instagram DM ของ ${page.name}` : "เลือกเพจที่จะดูข้อความ"} />
|
||||
{page ? (
|
||||
<InboxView key={page.id} pageId={page.id} pageName={page.name} hasInstagram={Boolean(page.igUsername)} canReply={roleAtLeast(page.role, "EDITOR")} />
|
||||
<>
|
||||
<InboxAiSettings pageId={page.id} canManage={roleAtLeast(page.role, "APPROVER")} />
|
||||
<InboxView key={page.id} pageId={page.id} pageName={page.name} hasInstagram={Boolean(page.igUsername)} canReply={roleAtLeast(page.role, "EDITOR")} />
|
||||
</>
|
||||
) : (
|
||||
<section className="card">
|
||||
<EmptyState icon="inbox" title="Inbox ดูทีละเพจ" hint="เลือกเพจด้านล่าง หรือจากตัวเลือกเพจที่เมนูซ้าย" />
|
||||
|
||||
Reference in New Issue
Block a user