/** 撤办按钮 */


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

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

/**
  <sino-flow-cancel-do-button
    flow-type=""
    record-id=""
    show="" 显示权限 默认false
  ></sino-flow-cancel-do-button>
 */
module.directive('sinoFlowCancelDoButton', function(WorkflowTransfer) {
  
  return {
    restrict: 'E',
    require: '^sinoFlowButtonBar',
    template: '<sino-flow-base-flow-button tag="撤办" button-id="cancelDo" on-click="cancelDo(flowType, recordId)" subflag-value="5"></sino-flow-base-flow-button>',
    replace: true,
    link: function(scope) {
      scope.cancelDo = WorkflowTransfer.cancelDo;
    }
  };
});
