Show content automation action for all page views
This commit is contained in:
@@ -40,7 +40,7 @@ export default async function OverviewPage(props: PageProps<"/">) {
|
||||
const openDays = Array.from({ length: 7 }, (_, i) => addDays(week, i)).filter(d => d >= today).length;
|
||||
const planFor = ctx.selected && editable.includes(ctx.selected.id) && openDays > 0 ? ctx.selected : null;
|
||||
return <>
|
||||
<PageTitle title="แผนคอนเทนต์" subtitle={ctx.selected ? `จัดคิวโพสต์ของ ${ctx.selected.name}` : "ทุกไอเดีย ทุกเพจ ในแผนเดียว · เวลาไทย"} actions={editable.length > 0 ? <>{planFor && <ContentAutoLauncher pageId={planFor.id} />}<Link href="/posts/new" className="btn btn-primary"><Icon name="plus" /> สร้างโพสต์</Link></> : undefined} />
|
||||
<PageTitle title="แผนคอนเทนต์" subtitle={ctx.selected ? `จัดคิวโพสต์ของ ${ctx.selected.name}` : "ทุกไอเดีย ทุกเพจ ในแผนเดียว · เวลาไทย"} actions={editable.length > 0 ? <><ContentAutoLauncher pages={ctx.pages.filter((page) => editable.includes(page.id)).map(({ id, name }) => ({ id, name }))} initialPageId={ctx.selected?.id} /><Link href="/posts/new" className="btn btn-primary"><Icon name="plus" /> สร้างโพสต์</Link></> : undefined} />
|
||||
<div className="flex flex-wrap items-center gap-3 text-[12px] text-ink-3">
|
||||
<span>{posts.length} โพสต์ในสัปดาห์นี้</span><span className="w-1 h-1 bg-line rounded-full" /><span>{tray.length}{tray.length === 50 ? "+" : ""} โพสต์ยังไม่วางวัน</span>
|
||||
{pending > 0 && <Link href="/posts?status=PENDING_APPROVAL" className="pill pill-amber">รออนุมัติ {pending}</Link>}
|
||||
|
||||
Reference in New Issue
Block a user