Add MarkdownEditor component, asset image upload, and rich description editing
Introduce MarkdownEditor built on @mdxeditor/editor with headings, lists, links, quotes, image upload with drag-and-drop, and themed CSS integration. Add asset image upload API (routes, service, storage) and wire image upload into InlineEditor multiline mode, NewIssueDialog, NewProjectDialog, GoalDetail, IssueDetail, and ProjectDetail description fields. Tighten prompt template editor styling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
22
server/src/services/assets.ts
Normal file
22
server/src/services/assets.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { eq } from "drizzle-orm";
|
||||
import type { Db } from "@paperclip/db";
|
||||
import { assets } from "@paperclip/db";
|
||||
|
||||
export function assetService(db: Db) {
|
||||
return {
|
||||
create: (companyId: string, data: Omit<typeof assets.$inferInsert, "companyId">) =>
|
||||
db
|
||||
.insert(assets)
|
||||
.values({ ...data, companyId })
|
||||
.returning()
|
||||
.then((rows) => rows[0]),
|
||||
|
||||
getById: (id: string) =>
|
||||
db
|
||||
.select()
|
||||
.from(assets)
|
||||
.where(eq(assets.id, id))
|
||||
.then((rows) => rows[0] ?? null),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user