See every seller supplying your factory, and act when something looks wrong — flag it, or block it so no new orders can be placed until you lift the block.
Live on toolsnaka.store 13/13 local + 13/13 live Server-side enforcement
In the Approver Dashboard (department head or plant head login) there is a new section, “Vendors you buy from”. It lists every seller that has supplied your factory, sorted by volume, with the money and order history behind each one — and it puts the control in your hands.
| Capability | Behaviour |
|---|---|
| See every seller | Name, city, order count, total value, last order (number + date), and the current state: normal, flagged or blocked — with the reason and when it was set. |
| Flag | Marks the seller as questionable. Requires a written reason. The seller is notified. |
| Block | Physically stops the factory from ordering from that seller. Checkout returns 403 “This seller is blocked by your department head (reason). New orders are paused until it is lifted.” Requires a written reason. The seller is notified. |
| Clear / Unblock | Lifts a flag or a block; ordering resumes immediately. |
| History | Every action is stored with who took it, when, why, and the seller's state at that moment — the last five are shown on the vendor. |
| Guard rails | Only department heads, plant heads and ToolNaka admins can act. A seller cannot read the oversight list (403). Flag/block without a reason is rejected (400). A seller with no orders to your factory cannot be acted on (404). |
Log in as a department head or plant head → Approval Desk → scroll to “Vendors you buy from”. The section sits between the approval queue and the status-flow reference, and shows counters for sellers / flagged / blocked.
API: GET /api/vendor-oversight (role-scoped list) · POST /api/vendor-oversight (record an action) · block enforcement in POST /api/orders. Data model: VendorAction.
Run 2 was executed against https://toolsnaka.store with the same database the real users hit. All test rows were deleted afterwards — vendorAction rows left: 0.
| To… | Do this |
|---|---|
| Review a seller | Approver Desk → “Vendors you buy from” → read the row: orders, value, last order, state. |
| Raise a concern | Press Flag, type the reason, press Flag again. The seller is notified; the state turns amber. |
| Stop a seller | Press Block, type the reason, confirm. New orders from your factory to that seller are refused immediately. |
| Restore a seller | Clear (lifts a flag) or Unblock (lifts a block). Ordering resumes at once. |