优化
This commit is contained in:
@@ -21,8 +21,10 @@ export async function run(context) {
|
||||
|
||||
// AWAITING_REVIEW is a PDA workflow state, not evidence permission. Evidence is
|
||||
// opened only after the server-side inbound aggregate has entered LOADING.
|
||||
// The list endpoint only exposes tasks that are currently in the loading queue.
|
||||
// Once PDA completion advances the task, use its stable task identity instead.
|
||||
const taskResponse = await context.request('GET',
|
||||
`/api/platform/v1/first-leg/pda-loading/tasks?loadingPlanId=${encodeURIComponent(loadingPlanId)}&warehouseId=${encodeURIComponent(warehouseId)}`)
|
||||
`/api/platform/v1/first-leg/pda-loading/tasks/${encodeURIComponent(taskId)}?warehouseId=${encodeURIComponent(warehouseId)}`)
|
||||
const task = successful(taskResponse) ? taskResponse.body?.data : null
|
||||
const taskItem = task?.items?.find?.((item) => id(item?.inboundId) === inboundId)
|
||||
const taskIdentityValid = id(task?.id) === taskId
|
||||
|
||||
Reference in New Issue
Block a user