{selectedForm.description}
) : null} @@ -322,8 +369,8 @@ export function PortalTicketForm() { onCategoryChange={setCategoryId} onSubcategoryChange={setSubcategoryId} layout="stacked" - categoryLabel="Categoria *" - subcategoryLabel="Subcategoria *" + categoryRequired + subcategoryRequired secondaryEmptyLabel="Selecione uma categoria" /> {selectedForm.fields.length > 0 ? ( diff --git a/src/components/tickets/category-select.tsx b/src/components/tickets/category-select.tsx index 679e860..32bcd52 100644 --- a/src/components/tickets/category-select.tsx +++ b/src/components/tickets/category-select.tsx @@ -23,6 +23,8 @@ interface CategorySelectProps { disabled?: boolean categoryLabel?: string subcategoryLabel?: string + categoryRequired?: boolean + subcategoryRequired?: boolean className?: string secondaryEmptyLabel?: string layout?: "grid" | "stacked" @@ -41,9 +43,11 @@ export function CategorySelectFields({ onSubcategoryChange, autoSelectFirst = true, disabled = false, - categoryLabel = "Primária", - subcategoryLabel = "Secundária", - secondaryEmptyLabel = "Selecione uma categoria primária", + categoryLabel = "Categoria", + subcategoryLabel = "Subcategoria", + categoryRequired = false, + subcategoryRequired = false, + secondaryEmptyLabel = "Selecione uma categoria", className, layout = "grid", }: CategorySelectProps) { @@ -80,9 +84,11 @@ export function CategorySelectFields({ return (