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

Commit

Permalink
Change /rest/api/pattribute request message #667
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunkat committed Apr 21, 2017
1 parent b694818 commit b7fd94f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/actions/AppActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,14 @@ export function markAsRead(id) {
// Attribute widget backend

export function getAttributesInstance(
attrType, tmpId, docType, docId, tabId, rowId, fieldName
attrType, tmpId, docType, docId, tabId, rowId, fieldName, entity
) {
const type = entity === 'process' ? 'processId':'windowId';

return () => axios.post(config.API_URL + '/' + attrType, {
'templateId': tmpId,
'source': {
'documentType': docType,
[type] : docType,
'documentId': docId,
'tabid': tabId,
'rowId': rowId,
Expand Down
5 changes: 3 additions & 2 deletions src/components/widget/Attributes/Attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ class Attributes extends Component {
handleInit = () => {
const {
dispatch, docType, dataId, tabId, rowId, fieldName, attributeType,
widgetData
widgetData, entity
} = this.props;
const tmpId = Object.keys(widgetData.value)[0];

dispatch(
getAttributesInstance(
attributeType, tmpId, docType, dataId, tabId, rowId, fieldName
attributeType, tmpId, docType, dataId, tabId, rowId, fieldName,
entity
)
).then(response => {
const {id, fields} = response.data;
Expand Down
1 change: 1 addition & 0 deletions src/components/widget/RawWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ class RawWidget extends Component {
case 'ProductAttributes':
return (
<Attributes
entity={entity}
attributeType="pattribute"
fields={fields}
dataId={dataId}
Expand Down

0 comments on commit b7fd94f

Please sign in to comment.