@orchestrator-ui/orchestrator-ui-components 6.7.0 → 6.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "6.7.0",
3
+ "version": "6.7.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -1,7 +1,6 @@
1
1
  import React, { FC, useState } from 'react';
2
2
 
3
3
  import { useTranslations } from 'next-intl';
4
- import Link from 'next/link';
5
4
  import { useRouter } from 'next/router';
6
5
 
7
6
  import {
@@ -17,20 +16,18 @@ import {
17
16
  import {
18
17
  PATH_START_NEW_TASK,
19
18
  PATH_START_NEW_WORKFLOW,
20
- PATH_TASKS,
21
- PATH_WORKFLOWS,
22
19
  WfoInSyncField,
23
20
  } from '@/components';
24
21
  import { WfoSubscriptionActionsMenuItem } from '@/components/WfoSubscription/WfoSubscriptionActions/WfoSubscriptionActionsMenuItem';
25
22
  import { PolicyResource } from '@/configuration/policy-resources';
26
- import { usePolicy, useShowToastMessage } from '@/hooks';
23
+ import { usePolicy } from '@/hooks';
27
24
  import { WfoDotsHorizontal } from '@/icons/WfoDotsHorizontal';
28
25
  import {
29
26
  useGetSubscriptionActionsQuery,
30
27
  useGetSubscriptionDetailQuery,
31
28
  useStartProcessMutation,
32
29
  } from '@/rtk';
33
- import { ToastTypes, WorkflowTarget } from '@/types';
30
+ import { WorkflowTarget } from '@/types';
34
31
 
35
32
  type MenuBlockProps = {
36
33
  title: string;
@@ -63,7 +60,6 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
63
60
  { subscriptionId },
64
61
  { skip: disableQuery },
65
62
  );
66
- const { showToastMessage } = useShowToastMessage();
67
63
  const [startProcess] = useStartProcessMutation();
68
64
 
69
65
  const { data: subscriptionDetail } = useGetSubscriptionDetailQuery(
@@ -116,10 +112,7 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
116
112
  router.push(url);
117
113
  };
118
114
 
119
- const silentlyStartAction = (
120
- actionName: string,
121
- isTask: boolean = false,
122
- ) => {
115
+ const silentlyStartAction = (actionName: string) => {
123
116
  startProcess({
124
117
  workflowName: actionName,
125
118
  userInputs: [
@@ -129,20 +122,7 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
129
122
  ],
130
123
  })
131
124
  .unwrap()
132
- .then((result) => {
133
- const processUrl = `${isTask ? PATH_TASKS : PATH_WORKFLOWS}/${result.id}`;
134
- showToastMessage(
135
- ToastTypes.SUCCESS,
136
- <Link href={processUrl}>{processUrl}</Link>,
137
- t('actionStarted'),
138
- );
139
- })
140
125
  .catch((error) => {
141
- showToastMessage(
142
- ToastTypes.ERROR,
143
- t('actionStartFailed'),
144
- t('actionStartFailed'),
145
- );
146
126
  console.error(`Failed to start action:`, error);
147
127
  })
148
128
  .finally(() => {
@@ -156,7 +136,7 @@ export const WfoSubscriptionActions: FC<WfoSubscriptionActionsProps> = ({
156
136
  isTask: boolean = false,
157
137
  ) => {
158
138
  if (compactMode) {
159
- silentlyStartAction(actionName, isTask);
139
+ silentlyStartAction(actionName);
160
140
  } else {
161
141
  redirectToUrl(actionName, isTask);
162
142
  }
@@ -1 +1 @@
1
- export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.7.0';
1
+ export const ORCHESTRATOR_UI_LIBRARY_VERSION = '6.7.1';