Design system / Organisms
Organism / Management and configuration
EditionSettings
EditionSettings composes identity, banner, manager invitations and category editing for one authorized Edition.
Intent and composition
This route-owned organism binds existing feature controls without authorizing operations or embedding API transport. useEditionCategories owns optimistic category updates, pending feedback, failure rollback and stale-scope protection. editionCategoriesApi sends the existing scoped PATCH. Category key, identity and order stay unchanged. Category feedback appears in its own section, and editing is disabled while a save is pending. Banner and member operations retain their existing hooks and feedback channels.
Coordinated concerns: Readable edition details, deliberate identity/banner editors, secondary manager invitations and category configuration with operation-local feedback.
The server page supplies authorized data and capabilities. useEditionCategories owns category pending/success/error state and rollback; editionCategoriesApi owns transport. The composition binds their returned state and commands without inline requests.
Authorized-context integration
Requires the authorized Edition route and real operation contracts. The public reference does not mount this assembly or invent persistence. CategoryEditor and MemberManager have separate, real-component local specimens.
Supported inputs and ownership
| Input | Responsibility |
|---|---|
| tenantSlug / programCode / editionCode | Authorized scope from the server page; the category API is memoized by this scope. |
| title / description / scope / bannerAssetId / bannerImageUrl / editionLabel | Initial details and banner. Scope remains read-only. The description is displayed here with a link to its editor in the Submissions hero. Title/code retain separate editors. Banner Edit/Save/Cancel preserves the upload contract without adding inheritance. A successful association closes editing independently of preview delivery. A failed preview shows saved-state guidance and Retry banner preview; retry performs only a GET, not another save. |
| categories | Authorized initial category snapshot. A scope change replaces local state; stale results cannot update another Edition. |
| memberCapabilities | Server-resolved member presentation capabilities. Server services independently enforce authorization. |
This is an integration summary, not a replacement for the implementation's complete prop types. A disabled control or hidden destination does not enforce permission.
Using it in a page
Integrate the section through its supported props and context requirements. Routes supply permitted data; instances bind product copy and behavior; templates arrange slots. Keep feature hooks and operations with their feature owner. Generic layouts must not load business data or enforce product policy.
Implementation
Repository path: src/app/(tenants)/console/[tenantCode]/admin/programs/[programCode]/editions/[editionCode]/editionSettings.tsx