page property

This commit is contained in:
Philipinho
2026-04-20 21:27:29 +01:00
parent 30988c1959
commit 9ecf88511b
19 changed files with 627 additions and 26 deletions
@@ -159,6 +159,16 @@ async function buildCtx(
.execute();
ctx.attachmentNames = new Map(rows.map((a) => [a.id, a.fileName]));
}
} else if (fromType === BasePropertyType.PAGE) {
const ids = collectIds(chunk, propertyId);
if (ids.size > 0) {
const rows = await db
.selectFrom('pages')
.select(['id', 'title'])
.where('id', 'in', Array.from(ids))
.execute();
ctx.pageTitles = new Map(rows.map((p) => [p.id, p.title ?? '']));
}
}
return ctx;