diff --git a/docs/superpowers/plans/2026-05-25-supplier-modal-wizard.md b/docs/superpowers/plans/2026-05-25-supplier-modal-wizard.md new file mode 100644 index 0000000..3c3d2bf --- /dev/null +++ b/docs/superpowers/plans/2026-05-25-supplier-modal-wizard.md @@ -0,0 +1,423 @@ +# Supplier Select Modal — Two-Step Wizard Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Replace the mutually-exclusive tab bar in the supplier select modal with a two-step wizard: Step 1 picks the supply method (Full Order / By Item), Step 2 shows the appropriate supplier selection UI with a "← Change method" back link that clears all selections. + +**Architecture:** Single Blade component file change only — no controller, route, or migration work. The HTML is restructured into `#sup-step1` (method cards) and `#sup-step2` (existing form), both children of the modal shell. Two new JS functions (`showStep` / `goBack`) drive transitions; the existing form, panes, and submission logic are untouched. + +**Tech Stack:** Laravel Blade, vanilla JS, inline CSS (Tailwind JIT not used — inline styles only per project convention) + +**Spec:** `docs/superpowers/specs/2026-05-25-supplier-modal-wizard-design.md` + +--- + +### Task 1: Replace the header tab bar with the mode badge row + +**Files:** +- Modify: `resources/views/components/purchase/supplier-select-modal.blade.php` + +The current header has a tab bar (`stab-global`, `stab-item`). Remove it. Replace with a hidden `#sup-mode-badge-row` div (shown only in Step 2). Also add `id="sup-modal-subtitle"` to the subtitle element so JS can update it dynamically. Change the initial title to "Request for Quotation" and subtitle to "How do you want to assign suppliers?". Change `padding:20px 24px 0` → `padding:20px 24px 16px` (the `0` bottom padding was a tab-flush hack no longer needed). + +- [ ] **Step 1: Replace the header block** + +In `resources/views/components/purchase/supplier-select-modal.blade.php`, find and replace this exact block: + +```blade + {{-- Header --}} +