Commit 3e2668b8 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

ts-lint update fixed (stable)

fixed await problem
parent de17ab23
......@@ -52,13 +52,13 @@ if (__PRELOADED_STATE__ === undefined) {
document.getElementsByTagName('html')[0].setAttribute('dir', direction);
checkAccessTokens(store.dispatch, store.getState)
.then(async () => store.dispatch(receiveLang(detectedLang)))
.then(() => store.dispatch(receiveLang(detectedLang)))
.then(() => {
// no SSR
ReactDOM.render(
<Provider store={ store }>
<ConnectedRouter history={ history }>
<I18nextProvider i18n={ await i18nClient }>
<I18nextProvider i18n={ i18nClient }>
<MuiThemeProvider theme={ theme(direction) }>
{ renderRoutes(routes) }
</MuiThemeProvider>
......
......@@ -184,7 +184,7 @@ class PreviewPage extends React.Component<IPreviewPageProps, any> {
<PageTitle title={ t('amphibian.public.p.display.title') } />
{ error && <ErrorMessage error={ error }/> }
<Tabs tab={ `${currentSheet}` } tabs={ preview && preview.sheets.map((sheet) => (
<Tab name={ `${sheet.index}` } to={ `/amphibian/${uuid}/${sheet.index}` }>{ sheet.name }</Tab>
<Tab name={ `${sheet.index}` } key={ `${sheet.name}_${sheet.index}` } to={ `/amphibian/${uuid}/${sheet.index}` }>{ sheet.name }</Tab>
)) } />
<Grid container spacing={ 0 }>
{ sheetRows && (
......
......@@ -97,7 +97,7 @@ function datasetsDashboard(state = INITIAL_STATE, action: { type?: string, paylo
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -50,8 +50,10 @@ function datasetsPublic(state = INITIAL_STATE, action: { type?: string, payload?
dataset: { $set: apiCall },
accessionRefs: { $set: mustRemoveAccessions ? null : state.accessionRefs },
paged: {
content: {
[receivedIndex]: { $set: apiCall.data },
data: {
content: {
[receivedIndex]: {$set: apiCall.data},
},
},
loading: {$set: false},
},
......
......@@ -74,7 +74,7 @@ function descriptorListsDashboard(state = INITIAL_STATE, action: { type: string,
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -80,7 +80,7 @@ function descriptorListsPublic(state = INITIAL_STATE, action: { type: string, pa
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -9,7 +9,7 @@ import DescriptorList from 'model/catalog/DescriptorList';
import { loadMyPartners } from 'partners/actions/dashboard';
import Partner from 'model/genesys/Partner';
import steps from './steps';
import StepperPageTemplate from 'ui/pages/_base/StepperPage';
import StepperPageTemplate, { parentActionCreators, parentMapStateToProps } from 'ui/pages/_base/StepperPage';
// utilities
import { withPermissionCheck } from 'utilities';
......@@ -47,6 +47,7 @@ const mapStateToProps = (state, ownProps) => ({
loading: state.descriptorList.dashboard.descriptorList ? state.descriptorList.dashboard.descriptorList.loading : false,
uuid: ownProps.match.params.uuid,
pageTitle: ownProps.route.extraProps.title, // route-configured
...parentMapStateToProps(state, ownProps),
});
const mapDispatchToProps = (dispatch) => bindActionCreators({
......@@ -57,6 +58,7 @@ const mapDispatchToProps = (dispatch) => bindActionCreators({
unpublishItem: rejectDescriptorList,
approveItem: approveDescriptorList,
createItem: createDescriptorList,
...parentActionCreators,
}, dispatch);
export default withTranslation()(connect(mapStateToProps, mapDispatchToProps)(DescriptorListStepper));
export default connect(mapStateToProps, mapDispatchToProps)(withTranslation()(DescriptorListStepper));
......@@ -84,7 +84,7 @@ function descriptorsDashboard(state = INITIAL_STATE, action: IReducerAction) {
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -31,8 +31,10 @@ function dashboardInstitutes(state = INITIAL_STATE, action: IReducerAction) {
return update(state, {
institute: {$set: apiCall},
paged: {
content: {
[receivedIndex]: {$set: apiCall.data},
data: {
content: {
[receivedIndex]: {$set: apiCall.data},
},
},
loading: {$set: false},
},
......
......@@ -28,8 +28,10 @@ function publicInstitutes(state = INITIAL_STATE, action: IReducerAction) {
return update(state, {
institute: {$set: apiCall},
paged: {
content: {
[receivedIndex]: {$set: apiCall.data},
data: {
content: {
[receivedIndex]: {$set: apiCall.data},
},
},
loading: {$set: false},
},
......
......@@ -98,7 +98,7 @@ function dashboardSubsets(state = INITIAL_STATE, action: IReducerAction) {
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -41,8 +41,10 @@ function publicSubsets(state = INITIAL_STATE, action: IReducerAction) {
subset: { $set: apiCall },
accessionRefs: { $set: mustRemoveAccessions ? null : state.accessionRefs },
paged: {
content: {
[receivedIndex]: { $set: apiCall },
data: {
content: {
[receivedIndex]: {$set: apiCall.data as Subset},
},
},
loading: {$set: false},
},
......@@ -112,7 +114,7 @@ function publicSubsets(state = INITIAL_STATE, action: IReducerAction) {
paged: {
data: {
content: {$splice: [[removeIndex, 1]]},
numberOfElements: {$set: state.paged.data.number - 1},
number: {$set: state.paged.data.number - 1},
totalElements: {$set: state.paged.data.totalElements - 1},
},
},
......
......@@ -35,7 +35,7 @@ const styles = (theme) => ({
top: 'auto' as 'auto',
position: 'initial' as 'initial',
height: '100%' as '100%',
overflow: 'visible',
overflow: 'visible' as 'visible',
},
[theme.breakpoints.down('md')]: {
height: 'calc(100vh - 3.5rem)',
......@@ -293,4 +293,4 @@ const mapDispatchToProps = (dispatch) => bindActionCreators({
collapseSidebar,
}, dispatch);
export default connect(mapStateToProps, mapDispatchToProps)(compose(withWidth(), withStyles(styles), withTranslation())(SidebarWrapper));
export default connect(mapStateToProps, mapDispatchToProps)(compose(withWidth(), withStyles(styles as any), withTranslation())(SidebarWrapper));
......@@ -38,7 +38,7 @@
],
"max-classes-per-file": [true, 10],
"jsx-no-lambda": false,
"jsx-wrap-multiline": true,
"jsx-wrap-multiline": false,
"jsx-no-multiline-js": false,
"no-submodule-imports": false,
"no-implicit-dependencies": false,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment