fix(admin-ui): Show all locations in allocation creation modal (#3448)

* Remove SC constraint from allocation location options

* Create tricky-peas-clean.md

* Update company field placeholder in address form
This commit is contained in:
Rares Stefan
2023-03-10 15:43:18 +01:00
committed by GitHub
parent f97b3d7cce
commit d4af873113
5 changed files with 7 additions and 18 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/admin-ui": patch
---
fix(admin): Show all locations in allocation creation modal

View File

@@ -63,7 +63,7 @@ const AddressForm = ({
<div className="gap-x-large grid grid-cols-2">
<InputField
label="Company"
placeholder="Medusa"
placeholder="Company"
errors={errors}
{...register(path("company"), {
pattern: FormValidator.whiteSpaceRule("Company"),

View File

@@ -51,14 +51,7 @@ const AllocateItemsModal: React.FC<AllocateItemsModalProps> = ({
const selectedLocation = useWatch({ control, name: "location" })
// if not sales channel is present fetch all locations
const stockLocationsFilter: { sales_channel_id?: string } = {}
if (order.sales_channel_id) {
stockLocationsFilter.sales_channel_id = order.sales_channel_id
}
const { stock_locations, isLoading } =
useAdminStockLocations(stockLocationsFilter)
const { stock_locations, isLoading } = useAdminStockLocations()
const locationOptions = useMemo(() => {
if (!stock_locations) {

View File

@@ -57,7 +57,6 @@ const CreateFulfillmentModal: React.FC<CreateFulfillmentModalProps> = ({
}, {})
: {}
)
console.log({ orderToFulfill })
const [noNotis, setNoNotis] = useState(false)
const [errors, setErrors] = useState({})
const [locationSelectValue, setLocationSelectValue] = useState<{

View File

@@ -106,14 +106,6 @@ const FulfillmentLine = ({
(locationId &&
(!availableQuantity || quantities[item.id] < availableQuantity))
console.log({
validQuantity,
locationId,
availableQuantity,
quantities,
itemId: item.id,
})
React.useEffect(() => {
setErrors((errors) => {
if (validQuantity) {