diff --git a/src/modules/action/components/action.component.tsx b/src/modules/action/components/action.component.tsx
index 786f906..7b80751 100644
--- a/src/modules/action/components/action.component.tsx
+++ b/src/modules/action/components/action.component.tsx
@@ -90,15 +90,19 @@ export default class Action extends React.Component<
performAction = (action:string)=>{
this.setState({processing: true});
performAction(action, this.state.workflow.id, this.state.period.id, this.state.mechanisms.map(m=>m.meta)).then((response)=>{
- this.setState({processing: false});
- if (!response.ok || response.redirected) return this.errorMessage(action);
+ if (!response.ok || response.redirected) {
+ this.setState({processing: false});
+ return this.errorMessage(action);
+ }
this.getMechanismStatuses(this.state.workflow.id, this.state.period.id, this.state.mechanisms).then(()=>{
this.successMessage(action);
+ this.setState({processing: false});
});
});
};
+
renderAction(){
if (this.state.processing) return ;
return ;
diff --git a/src/modules/list/components/results/resultsTabs.component.tsx b/src/modules/list/components/results/resultsTabs.component.tsx
index ed4eb65..2823210 100644
--- a/src/modules/list/components/results/resultsTabs.component.tsx
+++ b/src/modules/list/components/results/resultsTabs.component.tsx
@@ -17,6 +17,7 @@ export default class ResultsTabs extends React.Component<
switchTab = (ev, tabNr) => {
const action = mechanismActions[tabNr];
+ if (this.state.action===action) return;
let filteredMechanisms = this.filterMechanisms(this.props.mechanisms, action);
this.setState({action: action, filteredMechanisms: filteredMechanisms});
this.props.onSwitchTab(action)