How to use the choerodon-ui.message.success function in choerodon-ui

To help you get started, we’ve selected a few choerodon-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github choerodon / choerodon-front-agile / agile / src / app / agile / containers / project / userMap / home / Home4.js View on Github external
.then((pcanvas) => {
        pcanvas.toBlob((blob) => {
          FileSaver.saveAs(blob, '用户故事地图.png');
        });
        shareContent.style.width = shareContentWidth;
        shareContent.style.height = shareContentHeight;

        message.success('导出图片成功', undefined, undefined, 'top');
      })
      .catch((error) => {
github choerodon / issue-service / react / src / app / issue / containers / organization / priority / priorityEdit / PriorityEdit.js View on Github external
const { name, des, default: isDefault } = data;
        const { editingPriority: { id, objectVersionNumber } } = PriorityStore;
        const { priorityColor } = this.state;
        const orgId = AppState.currentMenuType.organizationId;

        try {
          await PriorityStore.editPriorityById(orgId, {
            id,
            name,
            description: des,
            default: !!isDefault,
            objectVersionNumber,
            colour: priorityColor,
            organizationId: orgId,
          });
          message.success('修改成功');
          PriorityStore.loadPriorityList(orgId);
          this.hideSidebar();
        } catch (e) {
          message.error('修改失败');
          this.setState({
            loading: false,
          });
        }
      } else {
        this.setState({
          loading: false,
        });
      }
    });
  };
github choerodon / issue-service / react / src / app / issue / containers / organization / issueType / issueTypeList / IssueTypeList.js View on Github external
.then((data) => {
        if (data) {
          message.success(intl.formatMessage({ id: 'deleteSuccess' }));
        } else {
          message.error(intl.formatMessage({ id: 'deleteFailed' }));
        }
        this.closeRemove();
        this.loadIssueType();
      }).catch((error) => {
        message.error(intl.formatMessage({ id: 'deleteFailed' }));
github choerodon / agile-service-old / react / routes / issueTypeScheme / issueTypeSchemeCreate / IssueTypeSchemeCreate.js View on Github external
.then((res) => {
              if (res) {
                message.success(intl.formatMessage({ id: 'editSuccess' }));
              } else {
                message.error(intl.formatMessage({ id: 'editFailed' }));
              }
              this.setState({
                submitting: false,
              });
              this.handleClose();
            }).catch(() => {
              message.error(intl.formatMessage({ id: 'editFailed' }));
github choerodon / agile-service-old / react / routes / issueTypeScheme / issueTypeSchemeList / IssueTypeSchemeList.js View on Github external
.then((data) => {
        if (data) {
          message.success(intl.formatMessage({ id: 'deleteSuccess' }));
        } else {
          message.error(intl.formatMessage({ id: 'deleteFailed' }));
        }
        this.closeRemove();
        this.loadSchemeList();
      }).catch((error) => {
        message.error(intl.formatMessage({ id: 'deleteFailed' }));
github choerodon / issue-service / react / src / app / issue / containers / organization / stateMachine / stateMachineList / StateMachineList.js View on Github external
.then((data) => {
        if (data) {
          message.success(intl.formatMessage({ id: 'deleteSuccess' }));
        } else {
          message.error(intl.formatMessage({ id: 'deleteFailed' }));
        }
        this.closeRemove();
        this.loadStateMachine(page, pageSize, sorter, tableParam);
      }).catch((error) => {
        message.error(intl.formatMessage({ id: 'deleteFailed' }));
github choerodon / issue-service / react / src / app / issue / containers / organization / issueTypeScreenSchemes / issueTypeScreenSchemesEditTemplate / IssueTypeScreenSchemesEditTemplate.js View on Github external
try {
            await IssueTypeScreenSchemesStore.createScheme(orgId, data);
            message.success(intl.formatMessage({ id: 'createSuccess' }));
            this.handleCreateCancel();
          } catch (error) {
            message.error(intl.formatMessage({ id: 'createFailed' }));
          }
        } else if (type === 'edit') {
          data.objectVersionNumber = scheme.objectVersionNumber;
          data.id = scheme.id;
          try {
            await IssueTypeScreenSchemesStore.updateScheme(orgId, scheme.id, data);
            message.success(intl.formatMessage({ id: 'editSuccess' }));
            this.handleCreateCancel();
          } catch (error) {
            message.success(intl.formatMessage({ id: 'editFailed' }));
          }
        }

        this.setState({
          spinning: false,
        });
      }
    });
  };
github choerodon / agile-service-old / react / routes / stateMachineScheme / stateMachineSchemeList / StateMachineSchemeList.js View on Github external
StateMachineSchemeStore.deleteStateMachineScheme(organizationId, schemeId).then((data) => {
      if (data) {
        message.success(intl.formatMessage({ id: 'deleteSuccess' }));
      } else {
        message.error(intl.formatMessage({ id: 'deleteFailed' }));
      }
      StateMachineSchemeStore.setIsSchemeDeleteVisible(false);
      this.refresh();
    }).catch((error) => {
      message.error(intl.formatMessage({ id: 'deleteFailed' }));
github choerodon / agile-service-old / react / routes / issueType / issueTypeList / IssueTypeList.js View on Github external
.then((data) => {
        if (data) {
          message.success(intl.formatMessage({ id: 'deleteSuccess' }));
        } else {
          message.error(intl.formatMessage({ id: 'deleteFailed' }));
        }
        this.closeRemove();
        this.loadIssueType();
      }).catch((error) => {
        message.error(intl.formatMessage({ id: 'deleteFailed' }));
github choerodon / agile-service-old / react / routes / issueTypeScreenSchemes / issueTypeScreenSchemesEditTemplate / IssueTypeScreenSchemesEditTemplate.js View on Github external
data.organizationId = orgId;
        data.lineVOS = associations;
        if (type === 'create') {
          try {
            await IssueTypeScreenSchemesStore.createScheme(orgId, data);
            message.success(intl.formatMessage({ id: 'createSuccess' }));
            this.handleCreateCancel();
          } catch (error) {
            message.error(intl.formatMessage({ id: 'createFailed' }));
          }
        } else if (type === 'edit') {
          data.objectVersionNumber = scheme.objectVersionNumber;
          data.id = scheme.id;
          try {
            await IssueTypeScreenSchemesStore.updateScheme(orgId, scheme.id, data);
            message.success(intl.formatMessage({ id: 'editSuccess' }));
            this.handleCreateCancel();
          } catch (error) {
            message.success(intl.formatMessage({ id: 'editFailed' }));
          }
        }

        this.setState({
          spinning: false,
        });
      }
    });
  };