include standard FBA producers in overseas PDA

This commit is contained in:
2026-09-23 23:01:04 +08:00
parent e19a30cc16
commit 95537d2d8d
@@ -932,7 +932,8 @@ export async function run(context) {
} }
const matrix = context.createdResources?.phase4InboundProducerFixtures const matrix = context.createdResources?.phase4InboundProducerFixtures
const dropship = matrix?.containers?.find((item) => item?.fulfillmentType === 'ONE_CLICK_DROPSHIP') const dropship = matrix?.containers?.find((item) => item?.fulfillmentType === 'ONE_CLICK_DROPSHIP')
const standardFbaProducers = (matrix?.byDestinationType?.FBA || []) const standardFbaProducers = (Array.isArray(matrix?.containers) ? matrix.containers : [])
.filter((item) => item?.destinationType === 'FBA')
.filter((item) => item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP') .filter((item) => item?.fulfillmentType !== 'ONE_CLICK_DROPSHIP')
.filter((item) => /-P4-(?:FBA-STANDARD|FBA-SECOND)(?:-R\d+)?:/.test(String(item?.resourceKey || ''))) .filter((item) => /-P4-(?:FBA-STANDARD|FBA-SECOND)(?:-R\d+)?:/.test(String(item?.resourceKey || '')))
.sort((left, right) => String(left?.resourceKey).localeCompare(String(right?.resourceKey))) .sort((left, right) => String(left?.resourceKey).localeCompare(String(right?.resourceKey)))