/** 重启流程按钮 */


var angular = require('angular');
require('../modules');
require('../../flow/services/WorkflowTransfer');

var module = angular.module('flowmodulebutton.directives');

/**
  <sino-flow-reuse-button
     flow-type=""
     record-id=""
     show="" 展示权限 默认false
     name="" 名称
   ></sino-flow-reuse-button>
 */
module.directive('sinoFlowReuseButton', function(WorkflowTransfer, $toast) {
  return {
    restrict: 'E',
    require: '^sinoFlowButtonBar',
    template: '<sino-flow-base-flow-button tag="重启流程" button-id="reuseProcess" on-click="reuseProcess(flowType, recordId)" subflag-value="1"></sino-flow-base-flow-button>',
    replace: true,
    link: function(scope) {
      scope.reuseProcess = WorkflowTransfer.reuseProcess;
    }
  }
});
