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]
### Fixed
- Fix cannot create vendor when the name is too similar to suggested one
## [0.5.0] - 2025-04-10
### Added

View File

@@ -272,8 +272,6 @@ function VendorListContent({
/>
{searchTerm.trim() !== "" && (
<>
{filteredVendors.length > 0 ? (
<div
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"
@@ -310,14 +308,8 @@ function VendorListContent({
{vendor.name}
</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
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={() => {
createVendor({
variables: {
@@ -348,8 +340,6 @@ function VendorListContent({
</button>
</div>
)}
</>
)}
</div>
</div>