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