diff --git a/frontend/src/app/admin/projetos/[id]/editar/page.tsx b/frontend/src/app/admin/projetos/[id]/editar/page.tsx index 6c2eee5..bf5f409 100644 --- a/frontend/src/app/admin/projetos/[id]/editar/page.tsx +++ b/frontend/src/app/admin/projetos/[id]/editar/page.tsx @@ -31,6 +31,8 @@ export default function EditProject({ params }: { params: { id: string } }) { const galleryInputRef = useRef(null); const [loadingData, setLoadingData] = useState(true); const [loading, setLoading] = useState(false); + const [categories, setCategories] = useState(CATEGORY_OPTIONS); + const [newCategory, setNewCategory] = useState(''); const [formData, setFormData] = useState({ title: '', category: '', @@ -276,10 +278,39 @@ export default function EditProject({ params }: { params: { id: string } }) { required > - {CATEGORY_OPTIONS.map((option) => ( + {categories.map((option) => ( ))} +

Não encontra a categoria? Adicione uma nova abaixo

+ + +
+ +
+ setNewCategory(e.target.value)} + className="flex-1 px-4 py-3 bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-xl text-gray-900 dark:text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all" + placeholder="Ex: Consultoria Ambiental" + /> + +
diff --git a/frontend/src/app/admin/projetos/novo/page.tsx b/frontend/src/app/admin/projetos/novo/page.tsx index 88819c8..6671b08 100644 --- a/frontend/src/app/admin/projetos/novo/page.tsx +++ b/frontend/src/app/admin/projetos/novo/page.tsx @@ -30,6 +30,8 @@ export default function NewProject() { const coverInputRef = useRef(null); const galleryInputRef = useRef(null); const [loading, setLoading] = useState(false); + const [categories, setCategories] = useState(CATEGORY_OPTIONS); + const [newCategory, setNewCategory] = useState(''); const [formData, setFormData] = useState({ title: '', category: '', @@ -217,10 +219,39 @@ export default function NewProject() { required > - {CATEGORY_OPTIONS.map((option) => ( + {categories.map((option) => ( ))} +

Não encontra a categoria? Adicione uma nova abaixo

+
+ +
+ +
+ setNewCategory(e.target.value)} + className="flex-1 px-4 py-3 bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-xl text-gray-900 dark:text-white focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary transition-all" + placeholder="Ex: Consultoria Ambiental" + /> + +