From 8e9ea73c3537b722ded20448fb403d5760c5aa90 Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 11 Jan 2024 09:59:37 +0100 Subject: [PATCH 1/7] Use title for root PB and standard icon --- .../WfoSubscription/WfoSubscriptionDetailTree.tsx | 8 ++------ .../src/components/WfoTree/WfoTreeNode.tsx | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx index 9b3b617dd..9c9604700 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionDetailTree.tsx @@ -12,10 +12,7 @@ import { getTokenName } from '../../utils/getTokenName'; import { WfoTree } from '../WfoTree'; import { getWfoTreeNodeDepth } from '../WfoTree'; import { WfoSubscriptionProductBlock } from './WfoSubscriptionProductBlock'; -import { - getFieldFromProductBlockInstanceValues, - getProductBlockTitle, -} from './utils'; +import { getProductBlockTitle } from './utils'; interface WfoSubscriptionDetailTreeProps { productBlockInstances: ProductBlockInstance[]; @@ -47,9 +44,8 @@ export const WfoSubscriptionDetailTree = ({ // Does this node have a parent? if (shallowCopy.parent === null) { // Doesn't look like it, so this node is the root of the tree - shallowCopy.label = getFieldFromProductBlockInstanceValues( + shallowCopy.label = getProductBlockTitle( shallowCopy.productBlockInstanceValues, - 'name', ); shallowCopy.callback = () => setSelectedTreeNode(shallowCopy.id); depthList.push(0); // First id is on root diff --git a/packages/orchestrator-ui-components/src/components/WfoTree/WfoTreeNode.tsx b/packages/orchestrator-ui-components/src/components/WfoTree/WfoTreeNode.tsx index a40182f20..9faf6ad14 100644 --- a/packages/orchestrator-ui-components/src/components/WfoTree/WfoTreeNode.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoTree/WfoTreeNode.tsx @@ -44,10 +44,7 @@ export const WfoTreeNode: FC = ({ const expanded = expandedIds.includes(item.id); const selected = selectedIds.includes(item.id); - let expandIcon = expanded ? 'arrowDown' : 'arrowRight'; - if (item.id === 0) { - expandIcon = expanded ? 'folderOpen' : 'folderClosed'; - } + const expandIcon = expanded ? 'arrowDown' : 'arrowRight'; return (
From f038a89b2e1bc0d9f69ef73c7d8acadcfde02de2 Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 11 Jan 2024 10:09:15 +0100 Subject: [PATCH 2/7] by default open de root PB in a card --- .../orchestrator-ui-components/src/contexts/TreeContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orchestrator-ui-components/src/contexts/TreeContext.tsx b/packages/orchestrator-ui-components/src/contexts/TreeContext.tsx index 2fd83343c..4d44539ee 100644 --- a/packages/orchestrator-ui-components/src/contexts/TreeContext.tsx +++ b/packages/orchestrator-ui-components/src/contexts/TreeContext.tsx @@ -23,7 +23,7 @@ export type TreeProviderProps = { export const TreeProvider: React.FC = ({ children }) => { const [depths, setDepths] = React.useState([]); - const [selectedIds, setSelectedIds] = React.useState([]); + const [selectedIds, setSelectedIds] = React.useState([0]); const [expandedIds, setExpandedIds] = React.useState([0]); const toggleSelectedId = (id: number) => { From 79118640c98992894ba6d6d62e93f7a26f901851 Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 11 Jan 2024 10:46:52 +0100 Subject: [PATCH 3/7] make subscriptionInstanceId smaller font see #456 --- .../components/WfoSubscription/WfoSubscriptionProductBlock.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx index 7cc3436eb..de1df9dd3 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx @@ -84,7 +84,7 @@ export const WfoSubscriptionProductBlock = ({ )} - {`${t( + {`${t( 'subscriptionInstanceId', )}: ${subscriptionInstanceId}`} From a55cac1109b79b164a7d583e80a66b27767c2b4c Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 11 Jan 2024 11:25:45 +0100 Subject: [PATCH 4/7] Open subscriptions in new tab - see #456 --- .../components/WfoSubscription/WfoRelatedSubscriptions.tsx | 5 ++++- .../WfoSubscription/WfoSubscriptionProductBlock.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx index 88de0f41a..cbf98a0ce 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoRelatedSubscriptions.tsx @@ -86,7 +86,10 @@ export const WfoRelatedSubscriptions = ({ field: 'description', name: t('description'), render: (value, record) => ( - + {value} ), diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx index de1df9dd3..eb1802664 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx @@ -131,6 +131,7 @@ export const WfoSubscriptionProductBlock = ({ ) : ( {ownerSubscriptionId} From 680c02fea9761d2601dc8e54020c58a74f9575b7 Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 18 Jan 2024 13:42:04 +0100 Subject: [PATCH 5/7] replace the size s statement --- .../WfoServiceTicketDetailPage/WfoImpactedCustomersTable.tsx | 2 +- .../components/WfoServiceTicketsList/WfoServiceTicketsList.tsx | 2 +- .../src/components/WfoSettings/WfoModifySettings.tsx | 2 +- .../components/WfoSubscription/WfoSubscriptionProductBlock.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/wfo-ui-surf/components/WfoServiceTicketDetailPage/WfoImpactedCustomersTable.tsx b/apps/wfo-ui-surf/components/WfoServiceTicketDetailPage/WfoImpactedCustomersTable.tsx index 135d2784e..7572f9761 100644 --- a/apps/wfo-ui-surf/components/WfoServiceTicketDetailPage/WfoImpactedCustomersTable.tsx +++ b/apps/wfo-ui-surf/components/WfoServiceTicketDetailPage/WfoImpactedCustomersTable.tsx @@ -68,7 +68,7 @@ export const WfoImpactedCustomersTable = ({ name: t('customers'), field: 'customer', render: (customer) => ( - + {customer.customer_abbrev} ), diff --git a/apps/wfo-ui-surf/components/WfoServiceTicketsList/WfoServiceTicketsList.tsx b/apps/wfo-ui-surf/components/WfoServiceTicketsList/WfoServiceTicketsList.tsx index a65b4c173..9c047c22c 100644 --- a/apps/wfo-ui-surf/components/WfoServiceTicketsList/WfoServiceTicketsList.tsx +++ b/apps/wfo-ui-surf/components/WfoServiceTicketsList/WfoServiceTicketsList.tsx @@ -137,7 +137,7 @@ export const WfoServiceTicketsList = ({ {formatDate(date)} ) : ( - {formatDate(date)} + {formatDate(date)} ); }, }, diff --git a/packages/orchestrator-ui-components/src/components/WfoSettings/WfoModifySettings.tsx b/packages/orchestrator-ui-components/src/components/WfoSettings/WfoModifySettings.tsx index 357a53323..6d2253e8a 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSettings/WfoModifySettings.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSettings/WfoModifySettings.tsx @@ -25,7 +25,7 @@ export const WfoModifySettings: FC = ({ paddingSize="l" css={{ width: '50%' }} > - +

{t('modifyEngine')}

diff --git a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx index eb1802664..28f18e27d 100644 --- a/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx +++ b/packages/orchestrator-ui-components/src/components/WfoSubscription/WfoSubscriptionProductBlock.tsx @@ -84,7 +84,7 @@ export const WfoSubscriptionProductBlock = ({ )}
- {`${t( + {`${t( 'subscriptionInstanceId', )}: ${subscriptionInstanceId}`} From a1e5eaa542a6a2f30d39c3b67f221e6dcdc24781 Mon Sep 17 00:00:00 2001 From: Wouter Huisman <83226590+wouter1975@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:55:14 +0100 Subject: [PATCH 6/7] Create shaggy-squids-kick.md --- .changeset/shaggy-squids-kick.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/shaggy-squids-kick.md diff --git a/.changeset/shaggy-squids-kick.md b/.changeset/shaggy-squids-kick.md new file mode 100644 index 000000000..842fb25a7 --- /dev/null +++ b/.changeset/shaggy-squids-kick.md @@ -0,0 +1,10 @@ +--- +"wfo-ui-surf": patch +"wfo-ui": patch +"@orchestrator-ui/orchestrator-ui-components": patch +--- + +- expand the root product block card by default +- change tree icon of root product block +- open other subscription detail page opens in new tab +- use title of root product block in tree like the other product blocks From 83a03ed24f3cc70607d3b1617a7e58eae4e8117f Mon Sep 17 00:00:00 2001 From: Wouter Huisman Date: Thu, 18 Jan 2024 14:24:58 +0100 Subject: [PATCH 7/7] replace the size s statement --- .changeset/shaggy-squids-kick.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.changeset/shaggy-squids-kick.md b/.changeset/shaggy-squids-kick.md index 842fb25a7..ef6d9339a 100644 --- a/.changeset/shaggy-squids-kick.md +++ b/.changeset/shaggy-squids-kick.md @@ -1,10 +1,10 @@ --- -"wfo-ui-surf": patch -"wfo-ui": patch -"@orchestrator-ui/orchestrator-ui-components": patch +'wfo-ui-surf': patch +'wfo-ui': patch +'@orchestrator-ui/orchestrator-ui-components': patch --- -- expand the root product block card by default -- change tree icon of root product block -- open other subscription detail page opens in new tab -- use title of root product block in tree like the other product blocks +- expand the root product block card by default +- change tree icon of root product block +- open other subscription detail page opens in new tab +- use title of root product block in tree like the other product blocks