优化
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { verifyWarehouseTransferReview } from './warehouse-transfer-review.mjs'
|
||||
|
||||
const MODULE = 'phase4-overseas-client-services'
|
||||
const SCENARIO = 'phase4-overseas-client-services-lifecycle'
|
||||
const OPTIONS = { scenario: SCENARIO, deploymentBlocker: true }
|
||||
@@ -196,7 +198,7 @@ async function verifyTransfer(context, token, orders) {
|
||||
&& detail.data?.outboundAt == null && Array.isArray(detail.data?.allocations) && detail.data.allocations.length === 0,
|
||||
`status=${detail.data?.status || 'missing'}, allocations=${detail.data?.allocations?.length ?? 'missing'}; ${trace(detail.response)}`, OPTIONS)
|
||||
context.createdResources.phase4OverseasClientServices.transferNo = transferNo
|
||||
return true
|
||||
return verifyWarehouseTransferReview(context, token, order.row.customerId, body, transferNo)
|
||||
}
|
||||
|
||||
async function verifyDiscard(context, token, markerOrders) {
|
||||
@@ -244,7 +246,7 @@ export async function run(context) {
|
||||
context.createdResources.phase4OverseasClientServices = {
|
||||
marker: context.marker, relabelNo: null, transferNo: null, discardNo: null,
|
||||
finalStatuses: { relabel: null, transfer: null, discard: null },
|
||||
cleanup: 'Merchant applications remain in their legal initial review/processing states; no outbound, dispatch, PDA or delivery action is invoked',
|
||||
cleanup: 'Relabel/discard remain pending; transfers are reviewed with separate incoming approval/rejection fixtures; no outbound, dispatch, PDA or delivery action is invoked',
|
||||
}
|
||||
const token = await loginMerchant(context)
|
||||
if (!token) return
|
||||
@@ -269,7 +271,7 @@ export async function run(context) {
|
||||
const discardDone = await verifyDiscard(context, token, orders)
|
||||
context.createdResources.phase4OverseasClientServices.finalStatuses = {
|
||||
relabel: relabelDone ? 'PENDING_PROCESSING' : null,
|
||||
transfer: transferDone ? 'PENDING_REVIEW' : null,
|
||||
transfer: transferDone ? 'APPROVED' : null,
|
||||
discard: discardDone ? 'PENDING_REVIEW' : null,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user