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

Change /rest/api/pattribute request message #667 #668

Merged
merged 1 commit into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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