RED-9663: removed UNASSIGNED option from the status filter.
This commit is contained in:
parent
1da7b41692
commit
c977f95f1e
@ -4,7 +4,6 @@ import { ProcessingFileStatus, WorkflowFileStatus } from '@red/domain';
|
||||
export const workflowFileStatusTranslations: { [key in WorkflowFileStatus]: string } = {
|
||||
APPROVED: _('file-status.approved'),
|
||||
NEW: _('file-status.new'),
|
||||
UNASSIGNED: _('file-status.unassigned'),
|
||||
UNDER_APPROVAL: _('file-status.under-approval'),
|
||||
UNDER_REVIEW: _('file-status.under-review'),
|
||||
};
|
||||
|
||||
@ -5,7 +5,6 @@ export const FILE_ID = 'fileId';
|
||||
export const WorkflowFileStatuses = {
|
||||
APPROVED: 'APPROVED',
|
||||
NEW: 'NEW',
|
||||
UNASSIGNED: 'UNASSIGNED',
|
||||
UNDER_APPROVAL: 'UNDER_APPROVAL',
|
||||
UNDER_REVIEW: 'UNDER_REVIEW',
|
||||
} as const;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { WorkflowFileStatus } from '../../files/types';
|
||||
import { WorkflowFileStatus } from '../../files';
|
||||
|
||||
type StatusSorterItem = { key: WorkflowFileStatus } | WorkflowFileStatus | string;
|
||||
type Sorter = Record<WorkflowFileStatus, number> & {
|
||||
@ -7,10 +7,9 @@ type Sorter = Record<WorkflowFileStatus, number> & {
|
||||
|
||||
export const StatusSorter: Sorter = {
|
||||
NEW: 0,
|
||||
UNASSIGNED: 1,
|
||||
UNDER_REVIEW: 2,
|
||||
UNDER_APPROVAL: 3,
|
||||
APPROVED: 4,
|
||||
UNDER_REVIEW: 1,
|
||||
UNDER_APPROVAL: 2,
|
||||
APPROVED: 3,
|
||||
byStatus: (a: StatusSorterItem, b: StatusSorterItem): number => {
|
||||
if (typeof a !== typeof b) {
|
||||
throw TypeError('Used different types when calling StatusSorter.byStatus1');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user