forked from farhoodlabs/paperclip
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:
@@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export { companyService } from "./companies.js";
|
||||
export { agentService } from "./agents.js";
|
||||
export { assetService } from "./assets.js";
|
||||
export { projectService } from "./projects.js";
|
||||
export { issueService, type IssueFilters } from "./issues.js";
|
||||
export { issueApprovalService } from "./issue-approvals.js";
|
||||
|
||||
Reference in New Issue
Block a user