# View Category Detail

<!-- User story defining a specific requirement within a business flow.
The name of the story should start with the actor followed by `--` and the story name.
 -->

<!-- This section should contain the following subsections in order: -->
<!-- 1. ## User Story (required) -->
<!-- 2. ## Story Diagram (required) -->
<!-- 3. ## Scenario Patterns (required) -->
<!-- 4. ## Test Cases (required) -->
<!-- 5. ## Screens (required) -->
<!-- 6. ## Resolvers (required) -->

## User Story

As a viewer, I want to view the details of a category including its assigned products in read-only mode, so that I can understand which products belong to a given category.

## Story Diagram

<!-- Mermaid flowchart showing user interactions with screens.
Focus on actors, UI screens, and business outcomes.
Avoid technical details (APIs, databases, endpoints).
 -->

<!-- Code block requirements: -->
<!-- Minimum 1 mermaid code blocks required -->

```mermaid
flowchart TD
    A([Viewer]) --> B[Category List Screen]
    B --> C[Category Detail Screen]
    C --> D[Category attributes shown read-only]
    C --> E[Assigned products listed read-only]
```

## Scenario Patterns

- Detail view: the screen shows category code, name, parent category (if any), child categories, and the list of assigned products in read-only mode
- No mutation actions: edit, move, delete, assign product, and remove product actions are not available to the viewer

## Test Cases

- Given a valid category ID, the viewer sees the category code, name, parent, children, and assigned products
- Given a category with no assigned products, the products section shows an empty state
- Given a category with assigned products, all assigned products are listed without mutation controls

## Screens

- [category-detail](../../../screen/category-detail.md)

## Resolvers

<!-- Link to resolver docs that implement this story's backend operations.
Write "None" if this story does not require any resolvers.
 -->

- None
