22 lines
465 B
TypeScript
22 lines
465 B
TypeScript
import type { InboundListQuery } from './core/types'
|
|||
|
|
|
||
|
|
export type InboundTaskMode = 'measurement' | 'review'
|
||
|
|
|
||
|
|
export function buildInboundTaskQuery(
|
||
|
|
mode: InboundTaskMode,
|
||
|
|
query: Omit<InboundListQuery, 'tab' | 'processStatus' | 'measureReviewStatus'>,
|
||
|
|
): InboundListQuery {
|
||
|
|
if (mode === 'review') {
|
||
|
|
return {
|
||
|
|
...query,
|
||
|
|
tab: 'WAIT_REVIEW',
|
||
|
|
measureReviewStatus: 'PENDING',
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return {
|
||
|
|
...query,
|
||
|
|
tab: 'WAIT_MEASURE',
|
||
|
|
}
|
||
|
|
}
|