+
+
+ {(['five_why', 'fishbone', 'other'] as const).map(m => (
+
+ ))}
+
+
+
+ {method === 'five_why' && (
+
+
5-Why Analysis
+ {fiveWhy.map((step, i) => (
+
+
+ updateWhyStep(i, 'why', e.target.value)}
+ placeholder="Why did this happen?"
+ className="w-full rounded border border-gray-300 px-2 py-1.5 text-sm"
+ />
+
+ ))}
+ {fiveWhy.length < 5 && (
+
+ )}
+
+ )}
+
+ {method === 'fishbone' && (
+
+
Fishbone (Ishikawa) Analysis
+ {fishbone.map((cat, catIdx) => (
+
+
{CATEGORY_LABELS[cat.category]}
+ {cat.causes.map((cause, causeIdx) => (
+
updateFishboneCause(catIdx, causeIdx, e.target.value)}
+ placeholder="Contributing cause…"
+ className="w-full rounded border border-gray-300 px-2 py-1.5 text-sm mb-1.5"
+ />
+ ))}
+
+
+ ))}
+
+ )}
+
+