This commit is contained in:
2026-08-15 10:35:54 +08:00
parent 555acca779
commit c4282020b5
11 changed files with 100 additions and 11 deletions
@@ -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