Skip to content

Commit

Permalink
backoffice: add PROCESSING to the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Nov 26, 2024
1 parent b9969d9 commit 15ac6e1
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 1,845 deletions.
12 changes: 0 additions & 12 deletions ui/src/backoffice/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { getStore, getStoreWithState } from '../../fixtures/store';
import Backoffice from '..';
import DashboardPageContainer from '../containers/DashboardPageContainer/DashboardPageContainer';
import SearchPageContainer from '../containers/SearchPageContainer/SearchPageContainer';
import DetailPageContainer from '../containers/DetailPageContainer/DetailPageContainer';
import { BACKOFFICE_SEARCH, BACKOFFICE } from '../../common/routes';

describe('Backoffice', () => {
Expand Down Expand Up @@ -68,17 +67,6 @@ describe('Backoffice', () => {
expect(getByTestId('backoffice-dashboard-page')).toBeInTheDocument();
});

it('navigates to DetailPageContainer when /backoffice/:id', () => {
const { getByTestId } = render(
<Provider store={getStore()}>
<MemoryRouter initialEntries={[`${BACKOFFICE}/:id`]}>
<Route path={`${BACKOFFICE}/:id`} component={DetailPageContainer} />
</MemoryRouter>
</Provider>
);

expect(getByTestId('backoffice-detail-page')).toBeInTheDocument();
});

it('navigates to SearchPageContainer when /backoffice/search', () => {
const { getByTestId } = render(
Expand Down
11 changes: 8 additions & 3 deletions ui/src/backoffice/components/ResultItem/ResultItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
LoadingOutlined,
StopOutlined,
WarningOutlined,
FieldTimeOutlined,
} from '@ant-design/icons';
import { Row, Col, Card } from 'antd';
import { Link } from 'react-router-dom';

import './ResultItem.less';
import PublicationSelectContainer from '../../../authors/containers/PublicationSelectContainer';
import ResultItem from '../../../common/components/ResultItem';
import UnclickableTag from '../../../common/components/UnclickableTag';
import { BACKOFFICE } from '../../../common/routes';
Expand Down Expand Up @@ -41,6 +41,11 @@ const renderWorkflowStatus = (status: string) => {
description:
'This workflow is currently running. Please wait for it to complete.',
},
processing: {
icon: <FieldTimeOutlined className="mr2" />,
text: 'Processing',
description: 'This workflow is currently processing.',
},
};

const statusInfo = statuses[status];
Expand All @@ -55,7 +60,7 @@ const renderWorkflowStatus = (status: string) => {
) : null;
};

const AuthorResultItem = ({ item }: { item: any }) => {
const WorkflowResultItem = ({ item }: { item: any }) => {
const data = item?.get('data');
const decision = item?.get('decisions')?.first();

Expand Down Expand Up @@ -128,4 +133,4 @@ const AuthorResultItem = ({ item }: { item: any }) => {
);
};

export default AuthorResultItem;
export default WorkflowResultItem;
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
.blue {
color: #2980b9;
}
.processing {
color: #0050b3;
}

.bg-error {
background-color: #e74c3c;
Expand All @@ -102,6 +105,9 @@
.bg-running {
background-color: #c2c5c7;
}
.bg-processing {
background-color: #b8b8b8;
}

.font-white {
color: white !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
background-color: #f7b852;
border: 1px solid #f7b852;
}
&.bg-processing {
background-color: #0050b3;
border: 1px solid #0050b3;
}
}


.ant-collapse-content-box {
padding-bottom: 1rem;
.error-code {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Map } from 'immutable';
import { push } from 'connected-react-router';
import classNames from 'classnames';

import './DetailPageContainer.less';
import './AuthorDetailPageContainer.less';
import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs';
import ContentBox from '../../../common/components/ContentBox';
import CollapsableForm from '../../../submissions/common/components/CollapsableForm';
Expand Down

This file was deleted.

Loading

0 comments on commit 15ac6e1

Please sign in to comment.