@orchestrator-ui/orchestrator-ui-components 1.4.0 → 1.6.0

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.
Files changed (73) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-lint.log +7 -1
  3. package/.turbo/turbo-test.log +8 -8
  4. package/CHANGELOG.md +36 -11
  5. package/LICENSE.txt +202 -0
  6. package/README.md +22 -0
  7. package/dist/index.d.ts +148 -31
  8. package/dist/index.js +2125 -1989
  9. package/package.json +21 -2
  10. package/src/api/index.ts +4 -3
  11. package/src/api/types.ts +53 -0
  12. package/src/components/WfoBadges/WfoProductBlockBadge/WfoProductBlockBadge.tsx +1 -0
  13. package/src/components/WfoDropdownButton/WfoDropdownButton.tsx +2 -0
  14. package/src/components/WfoForms/AutoFieldLoader.tsx +6 -6
  15. package/src/components/WfoForms/formFields/AcceptField.tsx +2 -1
  16. package/src/components/WfoForms/formFields/BoolField.tsx +2 -1
  17. package/src/components/WfoForms/formFields/DividerField.tsx +1 -1
  18. package/src/components/WfoForms/formFields/ErrorField.tsx +1 -1
  19. package/src/components/WfoForms/formFields/LabelField.tsx +1 -1
  20. package/src/components/WfoForms/formFields/ListAddField.tsx +2 -1
  21. package/src/components/WfoForms/formFields/ListDelField.tsx +2 -1
  22. package/src/components/WfoForms/formFields/LongTextField.tsx +1 -1
  23. package/src/components/WfoForms/formFields/NumField.tsx +1 -1
  24. package/src/components/WfoForms/formFields/ProductField.tsx +8 -7
  25. package/src/components/WfoForms/formFields/RadioField.tsx +1 -1
  26. package/src/components/WfoForms/formFields/SelectField.tsx +4 -2
  27. package/src/components/WfoForms/formFields/SubmitField.tsx +1 -1
  28. package/src/components/WfoForms/formFields/SubscriptionField.tsx +5 -4
  29. package/src/components/WfoForms/formFields/TextField.tsx +1 -1
  30. package/src/components/WfoForms/formFields/{ContactPersonAutocomplete.tsx → deprecated/ContactPersonAutocomplete.tsx} +4 -3
  31. package/src/components/WfoForms/formFields/{ContactPersonNameField.tsx → deprecated/ContactPersonNameField.tsx} +3 -2
  32. package/src/components/WfoForms/formFields/{ImsNodeIdField.tsx → deprecated/ImsNodeIdField.tsx} +4 -3
  33. package/src/components/WfoForms/formFields/{ImsPortIdField.tsx → deprecated/ImsPortIdField.tsx} +7 -4
  34. package/src/components/WfoForms/formFields/{IpNetworkField.tsx → deprecated/IpNetworkField.tsx} +4 -3
  35. package/src/components/WfoForms/formFields/{IpPrefixTableField.tsx → deprecated/IpPrefixTableField.tsx} +5 -4
  36. package/src/components/WfoForms/formFields/{SplitPrefix.tsx → deprecated/SplitPrefix.tsx} +3 -2
  37. package/src/components/WfoForms/formFields/{TimestampField.tsx → deprecated/TimestampField.tsx} +1 -1
  38. package/src/components/WfoForms/formFields/{VlanField.tsx → deprecated/VlanField.tsx} +5 -4
  39. package/src/components/WfoForms/formFields/deprecated/index.ts +13 -0
  40. package/src/components/WfoForms/formFields/{surf → deprecated}/types.ts +1 -1
  41. package/src/components/WfoForms/formFields/index.ts +1 -6
  42. package/src/components/WfoForms/formFields/utils.spec.ts +2 -1
  43. package/src/components/WfoForms/formFields/utils.ts +3 -2
  44. package/src/components/WfoJsonCodeBlock/WfoJsonCodeBlock.tsx +11 -5
  45. package/src/components/WfoJsonCodeBlock/styles.ts +13 -0
  46. package/src/components/WfoKeyValueTable/WfoValueCell.tsx +8 -1
  47. package/src/components/WfoSubscription/WfoSubscription.tsx +5 -5
  48. package/src/components/WfoSubscription/WfoSubscriptionGeneral.tsx +70 -62
  49. package/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +24 -5
  50. package/src/components/WfoSubscriptionsList/WfoSubscriptionsList.tsx +11 -1
  51. package/src/components/WfoSubscriptionsList/subscriptionResultMappers.ts +3 -0
  52. package/src/components/WfoTable/WfoInlineJson/WfoInlineJson.tsx +14 -0
  53. package/src/components/WfoTable/WfoInlineJson/index.ts +1 -0
  54. package/src/components/WfoTable/index.ts +1 -0
  55. package/src/components/WfoTable/utils/constants.ts +2 -2
  56. package/src/components/WfoWorkflowSteps/WfoStepStatusIcon/WfoStepStatusIcon.tsx +7 -0
  57. package/src/icons/WfoExternalLink.tsx +30 -0
  58. package/src/icons/index.ts +1 -0
  59. package/src/messages/en-GB.json +2 -0
  60. package/src/messages/nl-NL.json +2 -0
  61. package/src/pages/metadata/WfoProductsPage.tsx +5 -0
  62. package/src/pages/processes/WfoStartProcessPage.tsx +0 -6
  63. package/src/rtk/endpoints/subscriptionDetail.ts +1 -0
  64. package/src/rtk/endpoints/subscriptionList.ts +1 -0
  65. package/src/types/types.ts +3 -0
  66. package/src/utils/getDefaultTableConfig.ts +1 -0
  67. /package/src/components/WfoForms/formFields/{ContactPersonAutocompleteStyles.ts → deprecated/ContactPersonAutocompleteStyles.ts} +0 -0
  68. /package/src/components/WfoForms/formFields/{ImsPortIdFieldStyling.ts → deprecated/ImsPortIdFieldStyling.ts} +0 -0
  69. /package/src/components/WfoForms/formFields/{IpPrefixTableFieldStyling.ts → deprecated/IpPrefixTableFieldStyling.ts} +0 -0
  70. /package/src/components/WfoForms/formFields/{SplitPrefixStyling.ts → deprecated/SplitPrefixStyling.ts} +0 -0
  71. /package/src/components/WfoForms/formFields/{surf → deprecated}/utils.ts +0 -0
  72. /package/src/hooks/{surf → deprecated}/useGetSubscriptionDropdownOptions.ts +0 -0
  73. /package/src/hooks/{surf → deprecated}/useIsTaggedPort.ts +0 -0
@@ -7,7 +7,20 @@ export const getStyles = (theme: EuiThemeComputed) => {
7
7
  borderRadius: theme.border.radius.medium,
8
8
  });
9
9
 
10
+ const euiBasicCodeBlockStyle = css({
11
+ backgroundColor: 'inherit',
12
+ '.euiCodeBlock__pre': {
13
+ paddingTop: 0,
14
+ paddingBottom: 0,
15
+ paddingLeft: 0,
16
+ },
17
+ '.euiCodeBlock__controls': {
18
+ backgroundColor: 'inherit',
19
+ },
20
+ });
21
+
10
22
  return {
11
23
  euiCodeBlockStyle,
24
+ euiBasicCodeBlockStyle,
12
25
  };
13
26
  };
@@ -30,9 +30,16 @@ export const WfoValueCell: FC<WfoValueCellProps> = ({
30
30
 
31
31
  const shouldRenderCopyColumn = enableCopyIcon && textToCopy;
32
32
 
33
+ const valueToRender =
34
+ typeof value === 'string' ||
35
+ typeof value === 'number' ||
36
+ React.isValidElement(value)
37
+ ? value
38
+ : JSON.stringify(value);
39
+
33
40
  return (
34
41
  <div css={[getBackgroundColorStyleForRow(rowNumber), valueColumnStyle]}>
35
- <div css={valueCellStyle}>{value}</div>
42
+ <div css={valueCellStyle}>{valueToRender}</div>
36
43
  <div css={clipboardIconStyle}>
37
44
  {shouldRenderCopyColumn && (
38
45
  <EuiCopy textToCopy={textToCopy}>
@@ -103,11 +103,6 @@ export const WfoSubscription = ({ subscriptionId }: WfoSubscriptionProps) => {
103
103
  onChangeTab={onSelectedTabChanged}
104
104
  />
105
105
 
106
- {selectedTab === SubscriptionDetailTab.GENERAL_TAB && (
107
- <WfoSubscriptionGeneral
108
- subscriptionDetail={subscriptionDetail}
109
- />
110
- )}
111
106
  {selectedTab ===
112
107
  SubscriptionDetailTab.SERVICE_CONFIGURATION_TAB && (
113
108
  <WfoSubscriptionDetailTree
@@ -116,6 +111,11 @@ export const WfoSubscription = ({ subscriptionId }: WfoSubscriptionProps) => {
116
111
  }
117
112
  />
118
113
  )}
114
+ {selectedTab === SubscriptionDetailTab.GENERAL_TAB && (
115
+ <WfoSubscriptionGeneral
116
+ subscriptionDetail={subscriptionDetail}
117
+ />
118
+ )}
119
119
  {selectedTab === SubscriptionDetailTab.PROCESSES_TAB &&
120
120
  data && (
121
121
  <WfoProcessesTimeline
@@ -4,8 +4,9 @@ import { useTranslations } from 'next-intl';
4
4
 
5
5
  import { EuiFlexGrid, EuiFlexItem } from '@elastic/eui';
6
6
 
7
+ import { WfoJsonCodeBlock } from '@/components';
7
8
  import { SubscriptionDetail } from '@/types';
8
- import { formatDate } from '@/utils';
9
+ import { camelToHuman, formatDate } from '@/utils';
9
10
 
10
11
  import {
11
12
  WfoProductStatusBadge,
@@ -24,71 +25,72 @@ export const WfoSubscriptionGeneral = ({
24
25
  }: WfoSubscriptionGeneralProps) => {
25
26
  const t = useTranslations('subscriptions.detail');
26
27
 
27
- const getSubscriptionDetailBlockData = (): WfoKeyValueTableDataType[] => {
28
- return [
29
- {
30
- key: t('subscriptionId'),
31
- value: subscriptionDetail.subscriptionId,
32
- textToCopy: subscriptionDetail.subscriptionId,
33
- },
34
- {
35
- key: t('productName'),
36
- value: subscriptionDetail.product.name,
37
- },
38
- {
39
- key: t('description'),
40
- value: subscriptionDetail.description,
41
- },
42
- {
43
- key: t('startDate'),
44
- value: formatDate(subscriptionDetail.startDate),
45
- },
46
- {
47
- key: t('endDate'),
48
- value: formatDate(subscriptionDetail.endDate),
49
- },
50
- {
51
- key: t('status'),
52
- value: (
53
- <WfoSubscriptionStatusBadge
54
- status={subscriptionDetail.status}
55
- />
56
- ),
57
- },
58
- {
59
- key: t('insync'),
60
- value: (
61
- <WfoInSyncField subscriptionDetail={subscriptionDetail} />
62
- ),
63
- },
64
- {
65
- key: t('customer'),
66
- value:
67
- subscriptionDetail && subscriptionDetail.customer
68
- ? `${subscriptionDetail.customer?.fullname}`
69
- : '-',
70
- },
71
- {
72
- key: t('customerUuid'),
73
- value:
74
- subscriptionDetail && subscriptionDetail.customer
75
- ? `${subscriptionDetail.customer?.customerId}`
76
- : '-',
77
- textToCopy: subscriptionDetail.customer?.customerId,
78
- },
79
- {
80
- key: t('note'),
81
- value: (subscriptionDetail && subscriptionDetail.note) || '-',
82
- },
83
- ];
84
- };
28
+ const getSubscriptionDetailBlockData = (): WfoKeyValueTableDataType[] => [
29
+ {
30
+ key: t('subscriptionId'),
31
+ value: subscriptionDetail.subscriptionId,
32
+ textToCopy: subscriptionDetail.subscriptionId,
33
+ },
34
+ {
35
+ key: t('productName'),
36
+ value: subscriptionDetail.product.name,
37
+ },
38
+ {
39
+ key: t('description'),
40
+ value: subscriptionDetail.description,
41
+ },
42
+ {
43
+ key: t('startDate'),
44
+ value: formatDate(subscriptionDetail.startDate),
45
+ },
46
+ {
47
+ key: t('endDate'),
48
+ value: formatDate(subscriptionDetail.endDate),
49
+ },
50
+ {
51
+ key: t('status'),
52
+ value: (
53
+ <WfoSubscriptionStatusBadge
54
+ status={subscriptionDetail.status}
55
+ />
56
+ ),
57
+ },
58
+ {
59
+ key: t('insync'),
60
+ value: <WfoInSyncField subscriptionDetail={subscriptionDetail} />,
61
+ },
62
+ {
63
+ key: t('customer'),
64
+ value:
65
+ subscriptionDetail && subscriptionDetail.customer
66
+ ? `${subscriptionDetail.customer?.fullname}`
67
+ : '-',
68
+ },
69
+ {
70
+ key: t('customerUuid'),
71
+ value:
72
+ subscriptionDetail && subscriptionDetail.customer
73
+ ? `${subscriptionDetail.customer?.customerId}`
74
+ : '-',
75
+ textToCopy: subscriptionDetail.customer?.customerId,
76
+ },
77
+ {
78
+ key: t('note'),
79
+ value: (subscriptionDetail && subscriptionDetail.note) || '-',
80
+ },
81
+ ];
82
+
83
+ const getMetadataBlockData = (): WfoKeyValueTableDataType[] =>
84
+ Object.entries(subscriptionDetail.metadata).map(([key, value]) => ({
85
+ key: camelToHuman(key),
86
+ value: <WfoJsonCodeBlock data={value} isBasicStyle />,
87
+ }));
85
88
 
86
- const getFixedInputBlockData = (): WfoKeyValueTableDataType[] => {
87
- return subscriptionDetail.fixedInputs.map((fixedInput) => ({
89
+ const getFixedInputBlockData = (): WfoKeyValueTableDataType[] =>
90
+ subscriptionDetail.fixedInputs.map((fixedInput) => ({
88
91
  key: fixedInput.field,
89
92
  value: fixedInput.value,
90
93
  }));
91
- };
92
94
 
93
95
  const getProductInfoBlockData = (): WfoKeyValueTableDataType[] => {
94
96
  const product = subscriptionDetail.product;
@@ -133,6 +135,12 @@ export const WfoSubscriptionGeneral = ({
133
135
  keyValues={getSubscriptionDetailBlockData()}
134
136
  />
135
137
  </EuiFlexItem>
138
+ <EuiFlexItem>
139
+ <SubscriptionKeyValueBlock
140
+ title={t('metadata')}
141
+ keyValues={getMetadataBlockData()}
142
+ />
143
+ </EuiFlexItem>
136
144
  <EuiFlexItem>
137
145
  <SubscriptionKeyValueBlock
138
146
  title={t('blockTitleFixedInputs')}
@@ -20,7 +20,10 @@ import { FieldValue, InUseByRelation } from '../../types';
20
20
  import { camelToHuman } from '../../utils';
21
21
  import { PATH_SUBSCRIPTIONS } from '../WfoPageTemplate';
22
22
  import { getStyles } from './styles';
23
- import { getProductBlockTitle } from './utils';
23
+ import {
24
+ getFieldFromProductBlockInstanceValues,
25
+ getProductBlockTitle,
26
+ } from './utils';
24
27
 
25
28
  interface WfoSubscriptionProductBlockProps {
26
29
  ownerSubscriptionId: string;
@@ -84,9 +87,12 @@ export const WfoSubscriptionProductBlock = ({
84
87
  )}
85
88
  </h3>
86
89
  </EuiText>
87
- <EuiText size="s">{`${t(
88
- 'subscriptionInstanceId',
89
- )}: ${subscriptionInstanceId}`}</EuiText>
90
+ <EuiText size="s">
91
+ {getFieldFromProductBlockInstanceValues(
92
+ productBlockInstanceValues,
93
+ 'name',
94
+ )}
95
+ </EuiText>
90
96
  </EuiFlexItem>
91
97
  <EuiFlexItem grow={false}>
92
98
  <EuiButtonEmpty
@@ -109,6 +115,20 @@ export const WfoSubscriptionProductBlock = ({
109
115
  <tbody>
110
116
  {!hideDetails && (
111
117
  <>
118
+ <tr key={-3}>
119
+ <td
120
+ valign={'top'}
121
+ css={productBlockFirstLeftColStyle}
122
+ >
123
+ <b>{t('subscriptionInstanceId')}</b>
124
+ </td>
125
+ <td
126
+ valign={'top'}
127
+ css={productBlockFirstRightColStyle}
128
+ >
129
+ {subscriptionInstanceId}
130
+ </td>
131
+ </tr>
112
132
  <tr key={-2}>
113
133
  <td
114
134
  valign={'top'}
@@ -123,7 +143,6 @@ export const WfoSubscriptionProductBlock = ({
123
143
  {subscriptionId ===
124
144
  ownerSubscriptionId ? (
125
145
  <>
126
- {subscriptionId}
127
146
  <EuiBadge>
128
147
  {t('self')}
129
148
  </EuiBadge>
@@ -8,8 +8,11 @@ import { Pagination } from '@elastic/eui';
8
8
 
9
9
  import {
10
10
  FilterQuery,
11
+ PATH_SUBSCRIPTIONS,
11
12
  WfoDateTime,
13
+ WfoInlineJson,
12
14
  WfoInsyncIcon,
15
+ WfoJsonCodeBlock,
13
16
  WfoSubscriptionStatusBadge,
14
17
  } from '@/components';
15
18
  import { DataDisplayParams, useShowToastMessage } from '@/hooks';
@@ -142,6 +145,13 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
142
145
  field: 'note',
143
146
  name: t('note'),
144
147
  },
148
+ metadata: {
149
+ field: 'metadata',
150
+ name: t('metadata'),
151
+ render: (value) => <WfoInlineJson data={value} />,
152
+ renderDetails: (value) =>
153
+ value && <WfoJsonCodeBlock data={value} isBasicStyle />,
154
+ },
145
155
  };
146
156
 
147
157
  const { sortBy, queryString, pageIndex, pageSize } = dataDisplayParams;
@@ -166,7 +176,7 @@ export const WfoSubscriptionsList: FC<WfoSubscriptionsListProps> = ({
166
176
 
167
177
  const sortedColumnId = getTypedFieldFromObject(sortBy?.field, tableColumns);
168
178
  if (!sortedColumnId) {
169
- router.replace('/subscriptions');
179
+ router.replace(PATH_SUBSCRIPTIONS);
170
180
  return null;
171
181
  }
172
182
 
@@ -12,6 +12,7 @@ export type SubscriptionListItem = Pick<
12
12
  tag: string | null;
13
13
  customerFullname: string;
14
14
  customerShortcode: string;
15
+ metadata: object | null;
15
16
  };
16
17
 
17
18
  export const mapGraphQlSubscriptionsResultToPageInfo = (
@@ -32,6 +33,7 @@ export const mapGraphQlSubscriptionsResultToSubscriptionListItems = (
32
33
  subscriptionId,
33
34
  note,
34
35
  customer,
36
+ metadata,
35
37
  } = subscription;
36
38
 
37
39
  const { name: productName, tag } = product;
@@ -50,5 +52,6 @@ export const mapGraphQlSubscriptionsResultToSubscriptionListItems = (
50
52
  tag,
51
53
  customerFullname,
52
54
  customerShortcode,
55
+ metadata: Object.keys(metadata).length > 0 ? metadata : null,
53
56
  };
54
57
  });
@@ -0,0 +1,14 @@
1
+ import React, { FC } from 'react';
2
+
3
+ export type WfoInlineJsonProps = {
4
+ data: object | null;
5
+ };
6
+
7
+ export const WfoInlineJson: FC<WfoInlineJsonProps> = ({ data }) => {
8
+ if (!data) {
9
+ return null;
10
+ }
11
+
12
+ const valueAsString = JSON.stringify(data);
13
+ return <span title={valueAsString}>{valueAsString}</span>;
14
+ };
@@ -0,0 +1 @@
1
+ export * from './WfoInlineJson';
@@ -15,3 +15,4 @@ export * from './WfoTableWithFilter';
15
15
 
16
16
  export * from './WfoSortButtons';
17
17
  export * from './WfoFirstPartUUID';
18
+ export * from './WfoInlineJson';
@@ -1,5 +1,5 @@
1
- export const DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 100];
2
- export const DEFAULT_PAGE_SIZE = 10;
1
+ export const DEFAULT_PAGE_SIZES = [5, 10, 15, 20, 25, 50, 100];
2
+ export const DEFAULT_PAGE_SIZE = 15;
3
3
 
4
4
  export const ACTIVE_PROCESSES_LIST_TABLE_LOCAL_STORAGE_KEY =
5
5
  'activeProcessesListTable';
@@ -77,6 +77,13 @@ export const WfoStepStatusIcon = ({
77
77
  true,
78
78
  theme.colors.danger,
79
79
  ];
80
+ case StepStatus.SKIPPED:
81
+ return [
82
+ stepStateSuccessIconStyle,
83
+ theme.colors.primaryText,
84
+ true,
85
+ theme.colors.accent,
86
+ ];
80
87
  case StepStatus.FORM:
81
88
  return [stepStateSuccessIconStyle, theme.colors.link];
82
89
 
@@ -0,0 +1,30 @@
1
+ import React, { FC } from 'react';
2
+
3
+ import { WfoIconProps } from './WfoIconProps';
4
+
5
+ export const WfoExternalLink: FC<WfoIconProps> = ({
6
+ width = 24,
7
+ height = 24,
8
+ color = 'currentColor',
9
+ }) => (
10
+ <svg
11
+ width={width}
12
+ height={height}
13
+ viewBox="0 0 24 24"
14
+ version="1.1"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ >
17
+ <title>icon/external-link</title>
18
+ <g
19
+ id="Symbols"
20
+ stroke="none"
21
+ strokeWidth="1"
22
+ fill="none"
23
+ fillRule="evenodd"
24
+ >
25
+ <g id="icon/external-link" fill={color}>
26
+ <path d="M10,7 C10.55228,7 11,7.44772 11,8 C11,8.55228 10.55228,9 10,9 L7,9 L7,17 L15,17 L15,14 C15,13.4477 15.4477,13 16,13 C16.5523,13 17,13.4477 17,14 L17,17 C17,18.1046 16.1046,19 15,19 L7,19 C5.89543,19 5,18.1046 5,17 L5,9 C5,7.89543 5.89543,7 7,7 Z M18,5 C18.5523,5 19,5.44772 19,6 L19,11 C19,11.55228 18.5523,12 18,12 C17.4477,12 17,11.55228 17,11 L17,8.41421 L10.70711,14.7071 C10.31658,15.0976 9.68342,15.0976 9.29289,14.7071 C8.90237,14.3166 8.90237,13.6834 9.29289,13.2929 L15.5858,7 L13,7 C12.4477,7 12,6.55228 12,6 C12,5.44772 12.4477,5 13,5 Z" />
27
+ </g>
28
+ </g>
29
+ </svg>
30
+ );
@@ -30,3 +30,4 @@ export * from './WfoViewList';
30
30
  export * from './WfoContactEnvelopeFill';
31
31
  export * from './WfoBell';
32
32
  export * from './WfoWarningTriangle';
33
+ export * from './WfoExternalLink';
@@ -242,6 +242,7 @@
242
242
  "tag": "Product tag",
243
243
  "startDate": "Start date",
244
244
  "endDate": "End date",
245
+ "metadata": "Metadata",
245
246
  "note": "Note",
246
247
  "customerFullname": "Customer",
247
248
  "customerShortcode": "Customer abbr"
@@ -304,6 +305,7 @@
304
305
  "tag": "Tag",
305
306
  "created": "Created",
306
307
  "endDate": "End date",
308
+ "metadata": "Metadata",
307
309
  "note": "Note",
308
310
  "noRelatedSubscriptions": "No related subscriptions found",
309
311
  "hideTerminatedRelatedSubscriptions": "Hide terminated subscriptions",
@@ -242,6 +242,7 @@
242
242
  "startDate": "Startdatum",
243
243
  "endDate": "Einddatum",
244
244
  "note": "Notitie",
245
+ "metadata": "Metadata",
245
246
  "customerFullName": "Klant",
246
247
  "customerAbbreviation": "Klantafkorting"
247
248
  },
@@ -298,6 +299,7 @@
298
299
  "insync": "In sync",
299
300
  "customer": "Klant",
300
301
  "customerUuid": "Klant UUID",
302
+ "metadata": "Metadata",
301
303
  "name": "Naam",
302
304
  "productType": "Produkttype",
303
305
  "tag": "Tag",
@@ -94,6 +94,11 @@ export const WfoProductsPage = () => {
94
94
  field: PRODUCT_FIELD_NAME,
95
95
  name: t('name'),
96
96
  width: '200',
97
+ render: (name) => (
98
+ <WfoProductBlockBadge badgeType={BadgeType.PRODUCT}>
99
+ {name}
100
+ </WfoProductBlockBadge>
101
+ ),
97
102
  },
98
103
  tag: {
99
104
  field: PRODUCT_FIELD_TAG,
@@ -121,13 +121,7 @@ export const WfoStartProcessPage = ({
121
121
  // Resolve handler
122
122
  (result) => {
123
123
  const process = result as { id: string };
124
- // TODO: Use toast hook to display success message
125
124
  if (process.id) {
126
- // eslint-disable-next-line no-console
127
- console.log(
128
- 'resolver successfullly!: ',
129
- process.id,
130
- );
131
125
  const basePath = isTask
132
126
  ? PATH_TASKS
133
127
  : PATH_WORKFLOWS;
@@ -30,6 +30,7 @@ export const subscriptionDetailQuery = `
30
30
  startDate
31
31
  status
32
32
  customerId
33
+ metadata
33
34
  customer {
34
35
  fullname
35
36
  customerId
@@ -38,6 +38,7 @@ export const subscriptionListQuery = `query SubscriptionsList(
38
38
  fullname
39
39
  shortcode
40
40
  }
41
+ metadata
41
42
  }
42
43
  pageInfo {
43
44
  totalItems
@@ -76,6 +76,7 @@ export enum BadgeType {
76
76
  PRODUCT_BLOCK = 'product_block',
77
77
  PRODUCT_BLOCK_TAG = 'product_block_tag',
78
78
  PRODUCT_TAG = 'product_tag',
79
+ PRODUCT = 'product',
79
80
  }
80
81
 
81
82
  export interface FixedInputDefinition {
@@ -395,6 +396,7 @@ export type Subscription = {
395
396
  product: Pick<ProductDefinition, 'name' | 'tag' | 'productType'>;
396
397
  productBlockInstances: ProductBlockInstance[];
397
398
  customer: Pick<Customer, 'fullname' | 'shortcode'>;
399
+ metadata: object;
398
400
  };
399
401
 
400
402
  export type SubscriptionSummary = Pick<
@@ -434,6 +436,7 @@ export type SubscriptionDetail = {
434
436
  endDate: string;
435
437
  startDate: string;
436
438
  status: SubscriptionStatus;
439
+ metadata: object;
437
440
  productBlockInstances: ProductBlockInstance[];
438
441
 
439
442
  customerId?: string | null;
@@ -101,6 +101,7 @@ export const getDefaultTableConfig = <T>(storageKey: string) => {
101
101
  case SUBSCRIPTIONS_TABLE_LOCAL_STORAGE_KEY:
102
102
  const subscriptionColumns: (keyof SubscriptionListItem)[] = [
103
103
  'productName',
104
+ 'metadata',
104
105
  ];
105
106
  return getTableConfig<T>(subscriptionColumns as (keyof T)[]);
106
107
  default: