Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Create getViewAttributesLayout() #1357
Browse files Browse the repository at this point in the history
- Fix deprecated api with new api - getViewAttributesLayout

(cherry picked from commit af25474)
  • Loading branch information
wiadev authored and metas-ts committed Dec 4, 2017
1 parent 24cf628 commit 71dfd16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 11 additions & 0 deletions src/actions/GenericActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ export function initLayout(
);
}

export function getViewAttributesLayout(windowId, viewId, rowId) {
return axios.get(
config.API_URL +
'/documentView'+
'/' + windowId +
'/' + viewId +
'/' + rowId +
'/attributes/layout'
);
}

export function getData(
entity, docType, docId, tabId, rowId, subentity, subentityId, isAdvanced,
orderBy, viewId
Expand Down
6 changes: 3 additions & 3 deletions src/components/app/SelectionAttributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {connect} from 'react-redux';
import counterpart from 'counterpart';

import {
initLayout,
getViewAttributesLayout,
getViewAttributes
} from '../../actions/GenericActions';

Expand Down Expand Up @@ -35,10 +35,10 @@ class SelectionAttributes extends Component {

fetchActions = () => {
const {
windowType, viewId, selected, entity, DLWrapperSetData,
windowType, viewId, selected, DLWrapperSetData,
DLWrapperSetLayout
} = this.props;
initLayout(entity, windowType, selected[0], null, viewId)
getViewAttributesLayout(windowType, viewId, selected[0])
.then(response => {
DLWrapperSetLayout(response.data.elements);
return getViewAttributes(windowType, viewId, selected[0]);
Expand Down

0 comments on commit 71dfd16

Please sign in to comment.