Commit 7b7e85f0 authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

added "Permissions" button to KPI Execution display page

parent 3a239c02
......@@ -7,13 +7,15 @@ import { deleteExecution, executeExecution, getExecution, listDimensions, listPa
// Models
import ExecutionDetails from 'model/kpi/ExecutionDetails';
import ExecutionRun from 'model/kpi/ExecutionRun';
import Execution from 'model/kpi/Execution';
// Service
import KpiService from 'service/genesys/KpiService';
// UI
import { PageContents, PageSection } from 'ui/layout/PageLayout';
import Loading from 'ui/common/Loading';
import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton';
import Permissions from 'ui/common/permission/Permissions';
import PrettyDate from 'ui/common/time/PrettyDate';
import Loading from 'ui/common/Loading';
import { Properties, PropertiesItem } from 'ui/common/Properties';
import Grid from '@material-ui/core/Grid/Grid';
import Button from '@material-ui/core/Button';
......@@ -104,6 +106,7 @@ class ExecutionDisplay extends React.Component<IExecutionProps, any> {
<ExecutionDialog execution={ executionDetails && executionDetails.execution } buttonLabel={ t('common:action.edit') }/>
<Button variant="contained" onClick={ this.delete }>{ t('common:action.delete') }</Button>
<Button variant="contained" onClick={ this.execute }>{ t('kpi.admin.p.executionDisplay.execute') }</Button>
{ executionDetails.execution._permissions.manage && <Permissions clazz={ Execution.clazz } id={ executionDetails.execution.id } variant="contained" /> }
</div>
}/>
<PageContents className="pt-1rem">
......
import ExecutionDimension from 'model/kpi/ExecutionDimension';
import KPIParameter from 'model/kpi/KPIParameter';
import {Permissions} from 'model/acl/ACL';
import ExecutionGroup from './ExecutionGroup';
/*
* Defined in Swagger as '#/definitions/Execution'
*/
class Execution {
public _permissions: Permissions;
public _class: string;
public static clazz: string = 'org.genesys2.server.model.kpi.Execution';
public active: boolean;
public createdBy: number;
public createdDate: Date;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment