Files
vmall/openspec/changes/add-aftersale-refunds/specs/frontend-shop-admin/spec.md
T

1.4 KiB

ADDED Requirements

Requirement: Shop-scoped aftersale workspace

Shop-admin SHALL provide an aftersale list and detail workspace filtered to the authenticated shop's own_shop resources. Authorized shop users SHALL inspect order-item evidence and messages, approve or reject pending applications, and confirm returned goods with the guarded refund action. The UI SHALL show status transitions, remaining amount, ledger-backed refund result, and stale-action errors through the shared API contract.

Scenario: merchant approves a request

  • WHEN a shop user opens a pending application for an item belonging to their shop and approves it
  • THEN the status advances according to the selected aftersale type and the customer can see the persisted result

Scenario: merchant confirms return and refunds

  • WHEN a shop user confirms receipt of a buyer-shipped return
  • THEN the service records merchant confirmation, credits the customer's account once, and displays the refunded status and order total

Scenario: shop scope is enforced

  • WHEN a shop user requests or mutates an aftersale for another shop
  • THEN the API denies the operation and the workspace exposes no cross-shop data

Scenario: merchant messages buyer

  • WHEN an authorized shop user appends a localized message
  • THEN the message appears in the same chronological aftersale thread visible to the buyer