Feat/fulfill swaps and claims with locations (#3518)
* re-add if statements * initial implementation * add changeset * address feedback * remove context param from create-fulfillment * fix tests
This commit is contained in:
@@ -172,10 +172,6 @@ const CreateFulfillmentModal: React.FC<CreateFulfillmentModalProps> = ({
|
||||
no_notification: noNotis,
|
||||
} as AdminPostOrdersOrderFulfillmentsReq
|
||||
|
||||
if (isLocationFulfillmentEnabled) {
|
||||
requestObj.location_id = locationSelectValue.value
|
||||
}
|
||||
|
||||
requestObj.items = Object.entries(quantities)
|
||||
.filter(([, value]) => !!value)
|
||||
.map(([key, value]) => ({
|
||||
@@ -185,6 +181,10 @@ const CreateFulfillmentModal: React.FC<CreateFulfillmentModalProps> = ({
|
||||
break
|
||||
}
|
||||
|
||||
if (isLocationFulfillmentEnabled) {
|
||||
requestObj.location_id = locationSelectValue.value
|
||||
}
|
||||
|
||||
action.mutate(requestObj, {
|
||||
onSuccess: () => {
|
||||
notification("Success", successText, "success")
|
||||
|
||||
Reference in New Issue
Block a user