Skip to content

Commit

Permalink
api: Send workflow item currency with subproject details
Browse files Browse the repository at this point in the history
When the subproject details are fetched, the workflow item currency is
now returned as well.
Removed the action 'fetchWorkflowItems' as it is not used.

Closes #281
  • Loading branch information
mathiashoeld committed Jun 17, 2019
1 parent 3cc7077 commit 8446edd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<!-- ### Removed -->

<!-- ### Fixed-->
### Fixed

- Display correct currency when editing workflow items [#281](https://github.com/openkfw/TruBudget/issues/281)

<!-- ### Security -->

Expand Down
2 changes: 2 additions & 0 deletions api/src/subproject_view_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ interface ExposedWorkflowitem {
data: {
id: string;
creationUnixTs: string;
currency: string | null | undefined;
displayName: string | null;
exchangeRate: string | undefined | null;
billingDate: string | undefined | null;
Expand Down Expand Up @@ -267,6 +268,7 @@ export function addHttpHandler(server: FastifyInstance, urlPrefix: string, servi
creationUnixTs: toUnixTimestampStr(workflowitem.createdAt),
displayName: workflowitem.displayName,
exchangeRate: workflowitem.exchangeRate,
currency: workflowitem.currency,
billingDate: workflowitem.billingDate,
amountType: workflowitem.amountType,
description: workflowitem.description,
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/pages/Workflows/WorkflowContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
enableSubProjectBudgetEdit,
enableWorkflowEdit,
fetchAllSubprojectDetails,
fetchWorkflowItems,
hideWorkflowDetails,
hideWorkflowDialog,
hideWorkflowitemAdditionalData,
Expand Down Expand Up @@ -142,7 +141,6 @@ const mapDispatchToProps = (dispatch, ownProps) => {
closeSubproject: (pId, sId) => dispatch(closeSubproject(pId, sId, true)),
closeWorkflowItem: (pId, sId, wId) => dispatch(closeWorkflowItem(pId, sId, wId, true)),

fetchWorkflowItems: streamName => dispatch(fetchWorkflowItems(streamName)),
setSelectedView: (id, section) => dispatch(setSelectedView(id, section)),

showWorkflowItemPermissions: wId => dispatch(showWorkflowItemPermissions(wId)),
Expand Down
10 changes: 0 additions & 10 deletions frontend/src/pages/Workflows/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export const FETCH_WORKFLOW_ITEMS = "FETCH_WORKFLOW_ITEMS";
export const FETCH_WORKFLOW_ITEMS_SUCCESS = "FETCH_WORKFLOW_ITEMS_SUCCESS";

export const SHOW_WORKFLOW_CREATE = "SHOW_WORKFLOW_CREATE";
export const HIDE_WORKFLOW_DIALOG = "HIDE_WORKFLOW_DIALOG";

Expand Down Expand Up @@ -344,13 +341,6 @@ export function updateWorkflowOrderOnState(workflowItems) {
};
}

export function fetchWorkflowItems(streamName) {
return {
type: FETCH_WORKFLOW_ITEMS,
streamName: streamName
};
}

export function storeWorkflowActions(actions) {
return {
type: STORE_WORKFLOWACTIONS,
Expand Down

0 comments on commit 8446edd

Please sign in to comment.