use PDA identity for loading evidence acceptance
This commit is contained in:
@@ -85,7 +85,7 @@ async function uploadLoadingEvidence(context, taskId, warehouseId, evidenceType,
|
||||
try {
|
||||
const response = await fetch(`${context.options.gateway}${path}`, {
|
||||
method: 'POST',
|
||||
headers: { Accept: 'application/json', Authorization: `Bearer ${context.token}`,
|
||||
headers: { Accept: 'application/json', Authorization: `Bearer ${context.pdaToken || context.token}`,
|
||||
'Idempotency-Key': `${context.marker}-cab-evidence-${evidenceType}`.slice(0, 128) },
|
||||
body: form,
|
||||
signal: AbortSignal.timeout(60_000),
|
||||
@@ -620,7 +620,7 @@ export async function run(context) {
|
||||
Boolean(taskId) && taskId === confirmedTaskId && id(task?.loadingPlanId) === planId
|
||||
&& id(task?.containerBookingId) === containerId && Boolean(task?.cabinetNo)
|
||||
&& task?.currentContainerNo === realContainerNo && task?.taskStatus === 'LOADING'
|
||||
&& task?.workflowStatus === 'ASSIGNED'
|
||||
&& task?.workflowStatus === 'IN_PROGRESS'
|
||||
&& Boolean(pickItem?.id) && Number(pickItem?.plannedPackageCount) === 1,
|
||||
`taskId=${taskId || 'missing'}, itemId=${id(pickItem?.id) || 'missing'}`, OPTIONS)
|
||||
if (!taskId || !pickItem?.id) return
|
||||
|
||||
Reference in New Issue
Block a user