@burdenoff/microfe-movethewheels 2026.1013.2 → 2026.1016.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/components/EntityCombobox.js +80 -74
- package/dist/components/pending-pick/PendingPickHistory.js +47 -38
- package/dist/components/pending-pick/PickReviewPanel.js +317 -0
- package/dist/generated/pending-pick-operations.d.ts +356 -0
- package/dist/movethewheels/components/pending-pick/PickReviewPanel.d.ts +5 -0
- package/dist/movethewheels/utils/pickReviewAcknowledgement.d.ts +4 -0
- package/dist/src/generated/pending-pick-operations.js +75 -6
- package/dist/stories/EntityCombobox.stories.d.ts +7 -0
- package/dist/utils/pickReviewAcknowledgement.js +10 -0
- package/package.json +5 -3
- package/src/generated/pending-pick-operations.ts +239 -1
- package/src/movethewheels/components/EntityCombobox.tsx +8 -2
- package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +6 -0
- package/src/movethewheels/components/pending-pick/PickReviewPanel.tsx +326 -0
- package/src/movethewheels/utils/pickReviewAcknowledgement.ts +51 -0
- package/src/operations/pending-pick/pick-review.graphql +14 -0
- package/src/stories/EntityCombobox.stories.tsx +58 -0
|
@@ -49,6 +49,21 @@ export type MtwCargoItem = {
|
|
|
49
49
|
updatedAt: Scalars['DateTime']['output'];
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
+
/** Bounded audit snapshot of at most 10 exact evidence versions. */
|
|
53
|
+
export type MtwContainerEvidence = {
|
|
54
|
+
__typename?: 'MtwContainerEvidence';
|
|
55
|
+
checkedAt: Scalars['DateTime']['output'];
|
|
56
|
+
fileId: Scalars['ID']['output'];
|
|
57
|
+
sha256Hash: Scalars['String']['output'];
|
|
58
|
+
versionId: Scalars['ID']['output'];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Exact shared Files version. The fingerprint establishes integrity, not issuer authenticity. */
|
|
62
|
+
export type MtwContainerEvidenceInput = {
|
|
63
|
+
fileId: Scalars['ID']['input'];
|
|
64
|
+
versionId: Scalars['ID']['input'];
|
|
65
|
+
};
|
|
66
|
+
|
|
52
67
|
export type MtwContainerPagination = {
|
|
53
68
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
54
69
|
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -72,6 +87,17 @@ export type MtwInventoryItem = {
|
|
|
72
87
|
warehouseId: Scalars['ID']['output'];
|
|
73
88
|
};
|
|
74
89
|
|
|
90
|
+
export type MtwMoveReviewSource = {
|
|
91
|
+
__typename?: 'MtwMoveReviewSource';
|
|
92
|
+
reference: Scalars['String']['output'];
|
|
93
|
+
revision: Scalars['String']['output'];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type MtwMoveReviewSourceInput = {
|
|
97
|
+
reference: Scalars['String']['input'];
|
|
98
|
+
revision: Scalars['String']['input'];
|
|
99
|
+
};
|
|
100
|
+
|
|
75
101
|
export type MtwPickIntentLine = {
|
|
76
102
|
__typename?: 'MtwPickIntentLine';
|
|
77
103
|
applicableProfile?: Maybe<MtwPickIntentProfile>;
|
|
@@ -136,6 +162,62 @@ export type MtwPickPreparation = {
|
|
|
136
162
|
source: MtwPickIntentLine;
|
|
137
163
|
};
|
|
138
164
|
|
|
165
|
+
/** Immutable human review only. It reserves no stock and confers no physical execution or qualification. */
|
|
166
|
+
export type MtwPickReview = {
|
|
167
|
+
__typename?: 'MtwPickReview';
|
|
168
|
+
actions: Array<MtwPickReviewAction>;
|
|
169
|
+
classification: Scalars['String']['output'];
|
|
170
|
+
evidence: Array<MtwContainerEvidence>;
|
|
171
|
+
handlingPolicy?: Maybe<MtwMoveReviewSource>;
|
|
172
|
+
id: Scalars['ID']['output'];
|
|
173
|
+
idempotencyKey: Scalars['String']['output'];
|
|
174
|
+
intentHash: Scalars['String']['output'];
|
|
175
|
+
kind: MtwPickReviewKind;
|
|
176
|
+
note: Scalars['String']['output'];
|
|
177
|
+
previousDecisionId?: Maybe<Scalars['ID']['output']>;
|
|
178
|
+
quantityCeiling?: Maybe<Scalars['Int']['output']>;
|
|
179
|
+
recordedAt: Scalars['DateTime']['output'];
|
|
180
|
+
reviewerActorId: Scalars['ID']['output'];
|
|
181
|
+
sop?: Maybe<MtwMoveReviewSource>;
|
|
182
|
+
subjectActorId: Scalars['ID']['output'];
|
|
183
|
+
taskId: Scalars['ID']['output'];
|
|
184
|
+
validFrom?: Maybe<Scalars['DateTime']['output']>;
|
|
185
|
+
validUntil?: Maybe<Scalars['DateTime']['output']>;
|
|
186
|
+
version: Scalars['Int']['output'];
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export type MtwPickReviewAction =
|
|
190
|
+
| 'RELEASE_STAGED_CUSTODY'
|
|
191
|
+
| 'RELEASE_UNPICKED'
|
|
192
|
+
| 'RESERVE'
|
|
193
|
+
| 'SHORT_PICK'
|
|
194
|
+
| 'STAGE';
|
|
195
|
+
|
|
196
|
+
export type MtwPickReviewKind =
|
|
197
|
+
| 'APPROVE'
|
|
198
|
+
| 'REJECT'
|
|
199
|
+
| 'REVOKE';
|
|
200
|
+
|
|
201
|
+
export type MtwPickReviewPage = {
|
|
202
|
+
__typename?: 'MtwPickReviewPage';
|
|
203
|
+
evaluatedAt: Scalars['DateTime']['output'];
|
|
204
|
+
hasMore: Scalars['Boolean']['output'];
|
|
205
|
+
items: Array<MtwPickReview>;
|
|
206
|
+
latestDecision?: Maybe<MtwPickReview>;
|
|
207
|
+
limit: Scalars['Int']['output'];
|
|
208
|
+
nextOffset?: Maybe<Scalars['Int']['output']>;
|
|
209
|
+
offset: Scalars['Int']['output'];
|
|
210
|
+
reviewState: MtwPickReviewState;
|
|
211
|
+
total: Scalars['Int']['output'];
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export type MtwPickReviewState =
|
|
215
|
+
| 'APPROVED_REVIEW_ONLY'
|
|
216
|
+
| 'NOT_CURRENT'
|
|
217
|
+
| 'REJECTED'
|
|
218
|
+
| 'REVOKED'
|
|
219
|
+
| 'UNREVIEWED';
|
|
220
|
+
|
|
139
221
|
/** Immutable reported planning intent. It reserves no stock and grants no execution authority. */
|
|
140
222
|
export type MtwPickTask = {
|
|
141
223
|
__typename?: 'MtwPickTask';
|
|
@@ -279,7 +361,15 @@ export type MtwWarehouseLocation = {
|
|
|
279
361
|
|
|
280
362
|
export type Mutation = {
|
|
281
363
|
__typename?: 'Mutation';
|
|
364
|
+
approveMtwPickTask: MtwPickReview;
|
|
282
365
|
createMtwPickTaskIntent: MtwPickTask;
|
|
366
|
+
rejectMtwPickTask: MtwPickReview;
|
|
367
|
+
revokeMtwPickTaskReview: MtwPickReview;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
export type MutationApproveMtwPickTaskArgs = {
|
|
372
|
+
input: RecordMtwPickReviewInput;
|
|
283
373
|
};
|
|
284
374
|
|
|
285
375
|
|
|
@@ -287,6 +377,16 @@ export type MutationCreateMtwPickTaskIntentArgs = {
|
|
|
287
377
|
input: CreateMtwPickTaskIntentInput;
|
|
288
378
|
};
|
|
289
379
|
|
|
380
|
+
|
|
381
|
+
export type MutationRejectMtwPickTaskArgs = {
|
|
382
|
+
input: RecordMtwPickReviewInput;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
export type MutationRevokeMtwPickTaskReviewArgs = {
|
|
387
|
+
input: RecordMtwPickReviewInput;
|
|
388
|
+
};
|
|
389
|
+
|
|
290
390
|
export type PaginationInput = {
|
|
291
391
|
cursor?: InputMaybe<Scalars['String']['input']>;
|
|
292
392
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -298,6 +398,8 @@ export type Query = {
|
|
|
298
398
|
inventoryItems: Array<MtwInventoryItem>;
|
|
299
399
|
inventoryItemsCount: Scalars['Int']['output'];
|
|
300
400
|
mtwPickPreparation: MtwPickPreparation;
|
|
401
|
+
mtwPickReview: MtwPickReview;
|
|
402
|
+
mtwPickReviewPage: MtwPickReviewPage;
|
|
301
403
|
mtwPickTask: MtwPickTask;
|
|
302
404
|
mtwPickTaskPage: MtwPickTaskPage;
|
|
303
405
|
};
|
|
@@ -320,6 +422,19 @@ export type QueryMtwPickPreparationArgs = {
|
|
|
320
422
|
};
|
|
321
423
|
|
|
322
424
|
|
|
425
|
+
export type QueryMtwPickReviewArgs = {
|
|
426
|
+
id: Scalars['ID']['input'];
|
|
427
|
+
taskId: Scalars['ID']['input'];
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
export type QueryMtwPickReviewPageArgs = {
|
|
432
|
+
limit?: Scalars['Int']['input'];
|
|
433
|
+
offset?: Scalars['Int']['input'];
|
|
434
|
+
taskId: Scalars['ID']['input'];
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
|
|
323
438
|
export type QueryMtwPickTaskArgs = {
|
|
324
439
|
id: Scalars['ID']['input'];
|
|
325
440
|
};
|
|
@@ -331,6 +446,23 @@ export type QueryMtwPickTaskPageArgs = {
|
|
|
331
446
|
sourceInventoryItemId?: InputMaybe<Scalars['ID']['input']>;
|
|
332
447
|
};
|
|
333
448
|
|
|
449
|
+
export type RecordMtwPickReviewInput = {
|
|
450
|
+
actions: Array<MtwPickReviewAction>;
|
|
451
|
+
evidence: Array<MtwContainerEvidenceInput>;
|
|
452
|
+
expectedPreviousDecisionId?: InputMaybe<Scalars['ID']['input']>;
|
|
453
|
+
expectedVersion: Scalars['Int']['input'];
|
|
454
|
+
handlingPolicy?: InputMaybe<MtwMoveReviewSourceInput>;
|
|
455
|
+
idempotencyKey: Scalars['String']['input'];
|
|
456
|
+
intentHash: Scalars['String']['input'];
|
|
457
|
+
note: Scalars['String']['input'];
|
|
458
|
+
quantityCeiling?: InputMaybe<Scalars['Int']['input']>;
|
|
459
|
+
sop?: InputMaybe<MtwMoveReviewSourceInput>;
|
|
460
|
+
subjectActorId: Scalars['ID']['input'];
|
|
461
|
+
taskId: Scalars['ID']['input'];
|
|
462
|
+
validFrom?: InputMaybe<Scalars['DateTime']['input']>;
|
|
463
|
+
validUntil?: InputMaybe<Scalars['DateTime']['input']>;
|
|
464
|
+
};
|
|
465
|
+
|
|
334
466
|
export type PickProfileFragment = { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } };
|
|
335
467
|
|
|
336
468
|
export type PickLineFragment = { __typename?: 'MtwPickIntentLine', inventoryItemId: string, cargoItemId: string, warehouseId: string, locationId: string, inventoryUpdatedAt: string, cargoUpdatedAt: string, warehouseUpdatedAt: string, locationUpdatedAt: string, compositionEpoch: number, criticalFingerprint: string, cargoLabel: string, warehouseLabel: string, binLabel: string, observationSequence: number, unresolvedObservationIds: Array<string>, reviewGaps: Array<string>, stock: { __typename?: 'MtwPickIntentStock', onHand: number, available: number, allocated: number, damaged: number }, recordedProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null, applicableProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null };
|
|
@@ -375,6 +507,38 @@ export type RecordPendingPickMutationVariables = Exact<{
|
|
|
375
507
|
|
|
376
508
|
export type RecordPendingPickMutation = { __typename?: 'Mutation', createMtwPickTaskIntent: { __typename?: 'MtwPickTask', id: string, requestedQuantity: number, note: string, workflow: MtwPickTaskWorkflow, status: MtwPickTaskStatus, reservedQuantity: number, stagedQuantity: number, executorActorId: string, createdBy: string, actorProvenance: string, onBehalfOf?: string | null, intentHash: string, recordedAt: string, source: { __typename?: 'MtwPickIntentLine', inventoryItemId: string, cargoItemId: string, warehouseId: string, locationId: string, inventoryUpdatedAt: string, cargoUpdatedAt: string, warehouseUpdatedAt: string, locationUpdatedAt: string, compositionEpoch: number, criticalFingerprint: string, cargoLabel: string, warehouseLabel: string, binLabel: string, observationSequence: number, unresolvedObservationIds: Array<string>, reviewGaps: Array<string>, stock: { __typename?: 'MtwPickIntentStock', onHand: number, available: number, allocated: number, damaged: number }, recordedProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null, applicableProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null }, destination: { __typename?: 'MtwPickIntentLine', inventoryItemId: string, cargoItemId: string, warehouseId: string, locationId: string, inventoryUpdatedAt: string, cargoUpdatedAt: string, warehouseUpdatedAt: string, locationUpdatedAt: string, compositionEpoch: number, criticalFingerprint: string, cargoLabel: string, warehouseLabel: string, binLabel: string, observationSequence: number, unresolvedObservationIds: Array<string>, reviewGaps: Array<string>, stock: { __typename?: 'MtwPickIntentStock', onHand: number, available: number, allocated: number, damaged: number }, recordedProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null, applicableProfile?: { __typename?: 'MtwPickIntentProfile', id: string, version: number, effectiveAt: string, capturedCompositionEpoch?: number | null, criticalFingerprint: string, facts: { __typename?: 'MtwStockBindingFacts', schemaVersion: number, provenance: MtwStockBindingProvenance, scope: MtwStockBindingScope, declaredLotPolicy: MtwStockBindingLotPolicy, source: { __typename?: 'MtwStockBindingSource', reference?: string | null, revision?: string | null }, countUnit?: { __typename?: 'MtwStockBindingCountUnit', kind: MtwStockBindingCountUnitKind, reference?: string | null, revision?: string | null } | null, scanMapping?: { __typename?: 'MtwStockBindingScanMapping', reportedItemLabel?: string | null, reportedBinLabel?: string | null, mappingReference?: string | null, mappingRevision?: string | null } | null, lot?: { __typename?: 'MtwStockBindingLot', reference?: string | null, revision?: string | null, declaredDisposition: MtwStockBindingLotDisposition, expiry: { __typename?: 'MtwStockBindingLotExpiry', policy: MtwStockBindingExpiryPolicy, expiresAt?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } | null, sourceValidity: { __typename?: 'MtwStockBindingSourceValidity', policy: MtwStockBindingExpiryPolicy, from?: string | null, until?: string | null, sourceReference?: string | null, sourceRevision?: string | null } } } | null } } };
|
|
377
509
|
|
|
510
|
+
export type PickReviewReceiptFragment = { __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> };
|
|
511
|
+
|
|
512
|
+
export type PickReviewHistoryQueryVariables = Exact<{
|
|
513
|
+
taskId: Scalars['ID']['input'];
|
|
514
|
+
limit: Scalars['Int']['input'];
|
|
515
|
+
offset: Scalars['Int']['input'];
|
|
516
|
+
}>;
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
export type PickReviewHistoryQuery = { __typename?: 'Query', mtwPickReviewPage: { __typename?: 'MtwPickReviewPage', total: number, limit: number, offset: number, hasMore: boolean, nextOffset?: number | null, reviewState: MtwPickReviewState, evaluatedAt: string, items: Array<{ __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> }>, latestDecision?: { __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> } | null } };
|
|
520
|
+
|
|
521
|
+
export type ApprovePickReviewMutationVariables = Exact<{
|
|
522
|
+
input: RecordMtwPickReviewInput;
|
|
523
|
+
}>;
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
export type ApprovePickReviewMutation = { __typename?: 'Mutation', approveMtwPickTask: { __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> } };
|
|
527
|
+
|
|
528
|
+
export type RejectPickReviewMutationVariables = Exact<{
|
|
529
|
+
input: RecordMtwPickReviewInput;
|
|
530
|
+
}>;
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
export type RejectPickReviewMutation = { __typename?: 'Mutation', rejectMtwPickTask: { __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> } };
|
|
534
|
+
|
|
535
|
+
export type RevokePickReviewMutationVariables = Exact<{
|
|
536
|
+
input: RecordMtwPickReviewInput;
|
|
537
|
+
}>;
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
export type RevokePickReviewMutation = { __typename?: 'Mutation', revokeMtwPickTaskReview: { __typename?: 'MtwPickReview', id: string, taskId: string, version: number, previousDecisionId?: string | null, intentHash: string, subjectActorId: string, kind: MtwPickReviewKind, actions: Array<MtwPickReviewAction>, quantityCeiling?: number | null, validFrom?: string | null, validUntil?: string | null, note: string, idempotencyKey: string, reviewerActorId: string, recordedAt: string, classification: string, handlingPolicy?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, sop?: { __typename?: 'MtwMoveReviewSource', reference: string, revision: string } | null, evidence: Array<{ __typename?: 'MtwContainerEvidence', fileId: string, versionId: string, sha256Hash: string, checkedAt: string }> } };
|
|
541
|
+
|
|
378
542
|
export const PickProfileFragmentDoc = gql`
|
|
379
543
|
fragment PickProfile on MtwPickIntentProfile {
|
|
380
544
|
id
|
|
@@ -478,6 +642,40 @@ export const PendingPickTaskFragmentDoc = gql`
|
|
|
478
642
|
recordedAt
|
|
479
643
|
}
|
|
480
644
|
${PickLineFragmentDoc}`;
|
|
645
|
+
export const PickReviewReceiptFragmentDoc = gql`
|
|
646
|
+
fragment PickReviewReceipt on MtwPickReview {
|
|
647
|
+
id
|
|
648
|
+
taskId
|
|
649
|
+
version
|
|
650
|
+
previousDecisionId
|
|
651
|
+
intentHash
|
|
652
|
+
subjectActorId
|
|
653
|
+
kind
|
|
654
|
+
actions
|
|
655
|
+
quantityCeiling
|
|
656
|
+
validFrom
|
|
657
|
+
validUntil
|
|
658
|
+
handlingPolicy {
|
|
659
|
+
reference
|
|
660
|
+
revision
|
|
661
|
+
}
|
|
662
|
+
sop {
|
|
663
|
+
reference
|
|
664
|
+
revision
|
|
665
|
+
}
|
|
666
|
+
evidence {
|
|
667
|
+
fileId
|
|
668
|
+
versionId
|
|
669
|
+
sha256Hash
|
|
670
|
+
checkedAt
|
|
671
|
+
}
|
|
672
|
+
note
|
|
673
|
+
idempotencyKey
|
|
674
|
+
reviewerActorId
|
|
675
|
+
recordedAt
|
|
676
|
+
classification
|
|
677
|
+
}
|
|
678
|
+
`;
|
|
481
679
|
export const PickInventoryDocument = gql`
|
|
482
680
|
query PickInventory($pagination: PaginationInput) {
|
|
483
681
|
inventoryItems(pagination: $pagination) {
|
|
@@ -1505,4 +1703,44 @@ export const RecordPendingPickDocument = gql`
|
|
|
1505
1703
|
recordedAt
|
|
1506
1704
|
}
|
|
1507
1705
|
}
|
|
1508
|
-
`;
|
|
1706
|
+
`;
|
|
1707
|
+
export const PickReviewHistoryDocument = gql`
|
|
1708
|
+
query PickReviewHistory($taskId: ID!, $limit: Int!, $offset: Int!) {
|
|
1709
|
+
mtwPickReviewPage(taskId: $taskId, limit: $limit, offset: $offset) {
|
|
1710
|
+
items {
|
|
1711
|
+
...PickReviewReceipt
|
|
1712
|
+
}
|
|
1713
|
+
total
|
|
1714
|
+
limit
|
|
1715
|
+
offset
|
|
1716
|
+
hasMore
|
|
1717
|
+
nextOffset
|
|
1718
|
+
latestDecision {
|
|
1719
|
+
...PickReviewReceipt
|
|
1720
|
+
}
|
|
1721
|
+
reviewState
|
|
1722
|
+
evaluatedAt
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
${PickReviewReceiptFragmentDoc}`;
|
|
1726
|
+
export const ApprovePickReviewDocument = gql`
|
|
1727
|
+
mutation ApprovePickReview($input: RecordMtwPickReviewInput!) {
|
|
1728
|
+
approveMtwPickTask(input: $input) {
|
|
1729
|
+
...PickReviewReceipt
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
${PickReviewReceiptFragmentDoc}`;
|
|
1733
|
+
export const RejectPickReviewDocument = gql`
|
|
1734
|
+
mutation RejectPickReview($input: RecordMtwPickReviewInput!) {
|
|
1735
|
+
rejectMtwPickTask(input: $input) {
|
|
1736
|
+
...PickReviewReceipt
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
${PickReviewReceiptFragmentDoc}`;
|
|
1740
|
+
export const RevokePickReviewDocument = gql`
|
|
1741
|
+
mutation RevokePickReview($input: RecordMtwPickReviewInput!) {
|
|
1742
|
+
revokeMtwPickTaskReview(input: $input) {
|
|
1743
|
+
...PickReviewReceipt
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
${PickReviewReceiptFragmentDoc}`;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* like `useRoute(value)`), so it keeps rendering correctly even once it falls
|
|
29
29
|
* outside the current search results or page.
|
|
30
30
|
*/
|
|
31
|
-
import { useEffect, useState } from 'react';
|
|
31
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
32
32
|
import { Check, ChevronsUpDown } from 'lucide-react';
|
|
33
33
|
import {
|
|
34
34
|
Command,
|
|
@@ -112,6 +112,11 @@ export function EntityCombobox<T>({
|
|
|
112
112
|
}: EntityComboboxProps<T>) {
|
|
113
113
|
const [open, setOpen] = useState(false);
|
|
114
114
|
const [search, setSearch] = useState('');
|
|
115
|
+
const [listId, setListId] = useState<string>();
|
|
116
|
+
// cmdk owns the rendered list ID; a caller-supplied id is overridden.
|
|
117
|
+
const listRef = useCallback((node: HTMLDivElement | null) => {
|
|
118
|
+
setListId(node?.id);
|
|
119
|
+
}, []);
|
|
115
120
|
const debouncedSearch = useDebouncedValue(search.trim(), 200);
|
|
116
121
|
|
|
117
122
|
useEffect(() => {
|
|
@@ -162,6 +167,7 @@ export function EntityCombobox<T>({
|
|
|
162
167
|
id={id}
|
|
163
168
|
role="combobox"
|
|
164
169
|
aria-expanded={open}
|
|
170
|
+
aria-controls={listId}
|
|
165
171
|
aria-required={required}
|
|
166
172
|
aria-invalid={error ? true : undefined}
|
|
167
173
|
disabled={disabled}
|
|
@@ -186,7 +192,7 @@ export function EntityCombobox<T>({
|
|
|
186
192
|
className="text-text-primary placeholder:text-text-tertiary"
|
|
187
193
|
/>
|
|
188
194
|
)}
|
|
189
|
-
<CommandList>
|
|
195
|
+
<CommandList ref={listRef}>
|
|
190
196
|
<CommandEmpty className="text-text-tertiary">
|
|
191
197
|
{loading ? 'Searching…' : emptyText}
|
|
192
198
|
</CommandEmpty>
|
|
@@ -9,8 +9,10 @@ import {
|
|
|
9
9
|
import { useConditionQuery } from '../../hooks/useContainerCondition';
|
|
10
10
|
import { Button, Input } from '../ui';
|
|
11
11
|
import { ReusePager, ReuseState, reuseCard } from '../ReuseControls';
|
|
12
|
+
import { PickReviewPanel } from './PickReviewPanel';
|
|
12
13
|
import { PickCapture } from './PickCapture';
|
|
13
14
|
function TaskReceipt({ task }: { task: PendingPickTaskFragment }) {
|
|
15
|
+
const [reviewOpen, setReviewOpen] = useState(false);
|
|
14
16
|
return (
|
|
15
17
|
<article className={`${reuseCard} min-w-0 break-words`}>
|
|
16
18
|
<h3 className="font-semibold">Pending plan · needs review</h3>
|
|
@@ -31,6 +33,10 @@ function TaskReceipt({ task }: { task: PendingPickTaskFragment }) {
|
|
|
31
33
|
<PickCapture title="Staging" line={task.destination} />
|
|
32
34
|
</div>
|
|
33
35
|
</details>
|
|
36
|
+
<Button type="button" variant="outline" onClick={() => setReviewOpen(!reviewOpen)}>
|
|
37
|
+
{reviewOpen ? 'Close move review' : 'Review this exact pending plan'}
|
|
38
|
+
</Button>
|
|
39
|
+
{reviewOpen && <PickReviewPanel task={task} />}
|
|
34
40
|
</article>
|
|
35
41
|
);
|
|
36
42
|
}
|