Fix cannot create vendor who is already suggested

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-04-10 10:24:09 -07:00
parent 490f229ae7
commit c652fc0e4d
2 changed files with 68 additions and 74 deletions

View File

@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
### Fixed
- Fix cannot create vendor when the name is too similar to suggested one
## [0.5.0] - 2025-04-10 ## [0.5.0] - 2025-04-10
### Added ### Added

View File

@@ -272,8 +272,6 @@ function VendorListContent({
/> />
{searchTerm.trim() !== "" && ( {searchTerm.trim() !== "" && (
<>
{filteredVendors.length > 0 ? (
<div <div
style={{ borderRadius: "0.3rem" }} style={{ borderRadius: "0.3rem" }}
className="absolute top-full left-0 mt-1 w-[calc(100%-100px)] max-h-48 overflow-y-auto border bg-invert-bg shadow-md z-10" className="absolute top-full left-0 mt-1 w-[calc(100%-100px)] max-h-48 overflow-y-auto border bg-invert-bg shadow-md z-10"
@@ -310,14 +308,8 @@ function VendorListContent({
{vendor.name} {vendor.name}
</button> </button>
))} ))}
</div>
) : (
<div
style={{ borderRadius: "0.3rem" }}
className="absolute top-full left-0 mt-1 w-[calc(100%-100px)] border bg-level-0 shadow-md z-10"
>
<button <button
className="w-full px-3 py-2 text-left hover:bg-accent-bg flex items-center gap-2" className="w-full px-3 py-2 text-left hover:bg-h-subtle-bg flex items-center gap-2 border-t"
onClick={() => { onClick={() => {
createVendor({ createVendor({
variables: { variables: {
@@ -348,8 +340,6 @@ function VendorListContent({
</button> </button>
</div> </div>
)} )}
</>
)}
</div> </div>
</div> </div>