fix(23): resolve UAT issues — duplicate header, image position, catalog submit style
- Remove duplicate back arrow/header from ManualEntryForm (overlay already shows it) - Move ImageUpload to top of ManualEntryForm for visual cohesion - Change "Submit to Catalog?" from text link to checkbox-style toggle Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ export function CatalogSearchOverlay() {
|
||||
const [viewMode, setViewMode] = useState<ViewMode>("grid");
|
||||
const [manualEntryMode, setManualEntryMode] = useState(false);
|
||||
const [savedItemName, setSavedItemName] = useState<string | null>(null);
|
||||
const [catalogSubmitted, setCatalogSubmitted] = useState(false);
|
||||
|
||||
// Range filters (client-side)
|
||||
const [weightMin, setWeightMin] = useState(0);
|
||||
@@ -89,6 +90,7 @@ export function CatalogSearchOverlay() {
|
||||
setPriceMax(100000);
|
||||
setManualEntryMode(false);
|
||||
setSavedItemName(null);
|
||||
setCatalogSubmitted(false);
|
||||
}
|
||||
}, [catalogSearchOpen]);
|
||||
|
||||
@@ -115,6 +117,7 @@ export function CatalogSearchOverlay() {
|
||||
function handleAddAnother() {
|
||||
setManualEntryMode(false);
|
||||
setSavedItemName(null);
|
||||
setCatalogSubmitted(false);
|
||||
}
|
||||
|
||||
const navigate = useNavigate();
|
||||
@@ -162,6 +165,7 @@ export function CatalogSearchOverlay() {
|
||||
? () => {
|
||||
setManualEntryMode(false);
|
||||
setSavedItemName(null);
|
||||
setCatalogSubmitted(false);
|
||||
}
|
||||
: closeCatalogSearch
|
||||
}
|
||||
@@ -472,14 +476,43 @@ export function CatalogSearchOverlay() {
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
onClick={() => {
|
||||
setCatalogSubmitted(true);
|
||||
toast(
|
||||
"Coming soon — catalog submissions are on the roadmap!",
|
||||
)
|
||||
}
|
||||
className="mt-3 text-sm text-blue-600 hover:text-blue-800 underline underline-offset-2"
|
||||
);
|
||||
}}
|
||||
disabled={catalogSubmitted}
|
||||
className={`mt-3 inline-flex items-center gap-2 text-sm px-3 py-1.5 rounded-full border transition-colors ${
|
||||
catalogSubmitted
|
||||
? "border-green-300 bg-green-50 text-green-700 cursor-default"
|
||||
: "border-gray-300 text-gray-600 hover:border-blue-300 hover:text-blue-600 hover:bg-blue-50"
|
||||
}`}
|
||||
>
|
||||
Submit to Catalog?
|
||||
<span
|
||||
className={`inline-flex items-center justify-center w-4 h-4 rounded border transition-colors ${
|
||||
catalogSubmitted
|
||||
? "border-green-500 bg-green-500"
|
||||
: "border-gray-300"
|
||||
}`}
|
||||
>
|
||||
{catalogSubmitted && (
|
||||
<svg
|
||||
className="w-3 h-3 text-white"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={3}
|
||||
d="M5 13l4 4L19 7"
|
||||
/>
|
||||
</svg>
|
||||
)}
|
||||
</span>
|
||||
Submit to Catalog
|
||||
</button>
|
||||
<div className="flex gap-4 mt-6">
|
||||
<button
|
||||
@@ -503,10 +536,6 @@ export function CatalogSearchOverlay() {
|
||||
<ManualEntryForm
|
||||
initialName={searchInput}
|
||||
onSuccess={handleManualSuccess}
|
||||
onBack={() => {
|
||||
setManualEntryMode(false);
|
||||
setSavedItemName(null);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
/* Normal catalog results */
|
||||
|
||||
Reference in New Issue
Block a user