diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 400c7d2..fcd5555 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -138,6 +138,16 @@ .rich-text code { @apply rounded bg-muted px-1 py-0.5 text-xs; } .rich-text pre { @apply my-3 overflow-x-auto rounded bg-muted p-3 text-xs; } + .rich-text .ProseMirror.is-editor-empty::before, + .rich-text .ProseMirror p.is-editor-empty:first-child::before { + color: #94a3b8; + content: attr(data-placeholder); + pointer-events: none; + height: 0; + float: left; + font-weight: 400; + } + @keyframes recent-ticket-enter { 0% { opacity: 0; diff --git a/web/src/components/tickets/category-select.tsx b/web/src/components/tickets/category-select.tsx index 522fdcf..679e860 100644 --- a/web/src/components/tickets/category-select.tsx +++ b/web/src/components/tickets/category-select.tsx @@ -25,6 +25,7 @@ interface CategorySelectProps { subcategoryLabel?: string className?: string secondaryEmptyLabel?: string + layout?: "grid" | "stacked" } function findCategory(categories: TicketCategory[], categoryId: string | null) { @@ -44,6 +45,7 @@ export function CategorySelectFields({ subcategoryLabel = "Secundária", secondaryEmptyLabel = "Selecione uma categoria primária", className, + layout = "grid", }: CategorySelectProps) { const { categories, isLoading } = useTicketCategories(tenantId) const activeCategory = useMemo(() => findCategory(categories, categoryId), [categories, categoryId]) @@ -74,8 +76,10 @@ export function CategorySelectFields({ } }, [categoryId, secondaryOptions, subcategoryId, onSubcategoryChange]) + const containerClass = layout === "stacked" ? "flex flex-col gap-3" : "grid gap-3 sm:grid-cols-2" + return ( -
+