feat(catalog): manage global categories from settings

Categories are the taxonomy both services and resources select from, but
until now they could only be reached through the service catalog, so every
environment ended up with its own spelling of "whole body".

- Settings > Categories page: global CRUD plus the "includes" edge
- POST/GET/DELETE /api/v1/service-category/{uuid}/includes — a DAG, kept
  separate from `parent` because "hand" sits under both "whole body" and
  "upper limb"; a cycle is refused with 422
- PUT /api/v1/resource/{uuid}/categories — full replacement, and a category
  from another environment is rejected explicitly since the uuid arrives in
  the request body where TenantFilter does not reach

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-08-02 12:58:26 +03:30
co-authored by Claude Opus 5
parent f8e8a63ae8
commit 03d8d7d68a
13 changed files with 865 additions and 0 deletions
+9
View File
@@ -1260,3 +1260,12 @@ export interface ServiceItemOption {
duration_minutes?: number | null;
price_rials?: number | null;
}
/** دستهٔ سراسری کاتالوگ — یک بار در تنظیمات تعریف می‌شود و همه‌جا انتخاب می‌شود. */
export interface CatalogCategory {
uuid: string;
name: string;
sort_order?: number;
active: boolean;
children?: CatalogCategory[];
}