SuspendPane.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Manage
  5. * Copyright IBM Corp. 2022
  6. * US Government Users Restricted Rights
  7. * Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['bi/admin/common/slideout/BasePane', 'react', 'react-dom', 'ba-react-admin/ba-react-admin.min'], function (BasePane, React, ReactDOM, AdminReact) {
  10. //NOSONAR: needed for amd
  11. var SetPriorityPane = BasePane.extend({
  12. init: function init(options) {
  13. SetPriorityPane.inherited('init', this, arguments);
  14. $.extend(this, options);
  15. },
  16. renderBody: function renderBody($body) {
  17. var reactProps = {};
  18. for (var prop in this.props) {
  19. reactProps[prop] = this.props[prop];
  20. }
  21. reactProps.pane = this;
  22. reactProps.cancelCallback = function () {
  23. this.slideout.hide();
  24. }.bind(this);
  25. var setPriorityPanel = React.createElement(AdminReact.SuspendActivitiesPanel, reactProps);
  26. ReactDOM.render(setPriorityPanel, $body[0]);
  27. return Promise.resolve(true);
  28. }
  29. });
  30. return SetPriorityPane;
  31. });