feat: add category/tag management UI with ColoredItemCombobox

- ColoredItemCombobox component with search, color swatches, inline creation
- Replace text inputs with combobox dropdowns for category and tag selection
- API methods for categories/tags CRUD
- TypeScript types for NewsCategory, NewsTag
- i18n keys for combobox (ru, en)
This commit is contained in:
Fringg
2026-03-23 15:30:02 +03:00
parent 59d8b66884
commit 2ae01c95ae
7 changed files with 502 additions and 92 deletions

View File

@@ -1,3 +1,15 @@
export interface NewsCategory {
id: number;
name: string;
color: string;
}
export interface NewsTag {
id: number;
name: string;
color: string;
}
export interface NewsArticle {
id: number;
title: string;
@@ -6,7 +18,9 @@ export interface NewsArticle {
excerpt: string | null;
category: string;
category_color: string;
category_id: number | null;
tag: string | null;
tag_id: number | null;
featured_image_url: string | null;
is_published: boolean;
is_featured: boolean;
@@ -25,7 +39,9 @@ export interface NewsListItem {
excerpt: string | null;
category: string;
category_color: string;
category_id: number | null;
tag: string | null;
tag_id: number | null;
featured_image_url: string | null;
is_published: boolean;
is_featured: boolean;
@@ -47,7 +63,9 @@ export interface NewsCreateRequest {
excerpt: string | null;
category: string;
category_color: string;
category_id: number | null;
tag: string | null;
tag_id: number | null;
featured_image_url: string | null;
is_published: boolean;
is_featured: boolean;