CMS · Proposal list & publication workflow

Lists the centre’s content proposals (news, events, promotions) with type, category, segment, store, date range and status, and drives the full editorial workflow: request publication, publish, reject publication, unpublish, expire, duplicate, preview, delete and drag-to-reorder.

AreaCMS
Routescms.proposals · cms.proposals.index
Centre modulescms · proposal_inbox · proposal_ranking
Staff levelsroot · admin · manager · storeManager · commerce · crmmanager · weboperator · content_creator
Modelscoupon · language · proposal
UI labeltitle.header.proposals / menu.navbar.proposal.show
Coverage6 use cases · 3 happy · 7 failure

Known issues (1)

Missing translations

These keys are used on this screen but do not exist in translations.json, so users see the raw key:

  • want_reject_publish

How it works

The editorial state machine spans five statuses (draft, pending, scheduled, active, expired) and six transitions, each with its own ability (canPublish, canRequestPublish, canRejectPublication, canUnpublish, canExpire, canDuplicate) so a content creator can request publication while only a manager can approve it. All transitions funnel through one saveProposal(proposal, type) helper driven by a messageProposal map of success/error copy, with per-action in-flight flags (isPublishing, isRequesting, isRejecting, isExpiring, isUnpublishing) guarding double submission, and loadCollection() re-running afterwards. expire is implemented by setting endDate to today rather than by a status field. Note the finally block derives the flag name by running the action verb through the nlp library to build a gerund — a clever but fragile way to reset is<Verb>ing, which is why every flag is also reset explicitly. Drag-to-reorder (onDroppedRow) only accepts active and scheduled proposals.

Use cases

Why someone opens this (6)

  • A content creator drafting a promotion and requesting publication.
  • A manager reviewing the pending queue and approving or rejecting it.
  • Taking a live proposal down immediately (unpublish) or ending it today (expire).
  • Reordering the proposals shown on the app home screen.
  • Duplicating a recurring event rather than re-entering it.
  • Previewing exactly how a proposal will look in the app before publishing.

Path map

flowchart LR
    F(["Proposal list and publication workflow"]):::feat
    F --> H1["Request → approve → live"]:::ok
    F --> H2["Taken down"]:::ok
    F --> H3["Reordered on the home screen"]:::ok
    F -.-> X1["Publish fails"]:::bad
    F -.-> X2["Request / reject / unpublish / expire fails"]:::bad
    F -.-> X3["Duplication fails"]:::bad
    F -.-> X4["Dragging a non-movable proposal"]:::bad
    F -.-> X5["Transition not permitted"]:::bad
    F -.-> X6["Double submission"]:::bad
    F -.-> X7["Raw translation key on screen"]:::bad
    classDef feat fill:#6a4a8f,stroke:#6a4a8f,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Request → approve → live

  1. Content creator finishes a draft and clicks request; cms.proposals.request-success confirms and the status becomes pending.
  2. A manager opens the pending proposal, previews it and clicks publish.
  3. published is set true, saved, and cms.proposals.publish-success is shown.
  4. The proposal becomes scheduled or active depending on its start date and appears in the app.

Taken down

  1. Manager clicks unpublish on a live proposal and confirms.
  2. cms.proposals.unpublish-success is shown and the proposal leaves the app.

Reordered on the home screen

  1. User drags an active proposal to a new position.
  2. onDroppedRow persists the new order.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Request → approve → live
  • ✅ Taken down
  • ✅ Reordered on the home screen
  • ⛔ Publish fails
  • ⛔ Request / reject / unpublish / expire fails
  • ⛔ Duplication fails
  • ⛔ Dragging a non-movable proposal
  • ⛔ Transition not permitted
  • ⛔ Double submission
  • ⛔ Raw translation key on screen

Implementation


Generated from doc/feature-inventory.json · id cms-proposal-list · commit 276788ca6