@rh-support/cases 2.1.34 → 2.1.36
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/lib/esm/components/case-list/CaseList.js +3 -3
- package/lib/esm/components/case-list/CaseListFilterReducer.d.ts +3 -0
- package/lib/esm/components/case-list/CaseListFilterReducer.d.ts.map +1 -1
- package/lib/esm/components/case-list/CaseListFilterReducer.js +3 -0
- package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.js +0 -3
- package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts +0 -1
- package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/CaseListTable.js +186 -93
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.d.ts +16 -0
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.d.ts.map +1 -0
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.js +273 -0
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.scss +27 -0
- package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.js +14 -91
- package/lib/esm/components/case-list/case-search/CaseSearch.js +1 -1
- package/lib/esm/components/case-list/case-search/SaveCaseSearchModal.js +1 -1
- package/lib/esm/components/case-list/case-search/useAdvanceSearchParser.d.ts +1 -0
- package/lib/esm/components/case-list/case-search/useAdvanceSearchParser.d.ts.map +1 -1
- package/lib/esm/components/index.d.ts +0 -7
- package/lib/esm/components/index.d.ts.map +1 -1
- package/lib/esm/components/index.js +0 -7
- package/lib/esm/css/caseList.css +33 -39
- package/lib/esm/models/caseList.d.ts +3 -0
- package/lib/esm/models/caseList.d.ts.map +1 -1
- package/lib/esm/utils/caseListUtils.js +2 -2
- package/package.json +6 -9
|
@@ -58,7 +58,6 @@ export function CaseList(props) {
|
|
|
58
58
|
const searchType = searchParams[FILTER_URL_QUERY_TYPE];
|
|
59
59
|
const abortControllerRef = useRef(undefined);
|
|
60
60
|
const isXLScreen = breakPoint.xl;
|
|
61
|
-
const isXXLScreen = breakPoint.xxl;
|
|
62
61
|
const isFirstMount = useRef(true);
|
|
63
62
|
const filterSectionRef = useRef(null);
|
|
64
63
|
const filterState = useContext(CaseListFilterStateContext);
|
|
@@ -66,7 +65,8 @@ export function CaseList(props) {
|
|
|
66
65
|
const forceUpdate = useForceUpdate();
|
|
67
66
|
const isCaseListFilterPanelExanded = userPreferences.data.isCaseListFilterPanelExanded;
|
|
68
67
|
const useFilterStateInit = useFilterStateOnLoad();
|
|
69
|
-
const isBasicSearchMode = filterState.filterQueryInfo.type === CaseSearchQueryType.BASIC
|
|
68
|
+
const isBasicSearchMode = filterState.filterQueryInfo.type === CaseSearchQueryType.BASIC ||
|
|
69
|
+
(filterState.filterQueryInfo.type === CaseSearchQueryType.ADVANCED && loggedInUserRights.data.isExternal());
|
|
70
70
|
const prevSearchType = usePrevious(filterState.filterQueryInfo.type);
|
|
71
71
|
let isSearchTypeChanged = filterState.filterQueryInfo.type !== prevSearchType;
|
|
72
72
|
const [hasError, setHasError] = useState(null);
|
|
@@ -356,5 +356,5 @@ export function CaseList(props) {
|
|
|
356
356
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filters') } },
|
|
357
357
|
React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse, allCaseTypes: allCaseTypes, allCaseStatuses: allCaseStatuses, allCaseSeverities: allCaseSeverities, allProducts: allProducts, isSolrSearchDown: isSolrSearchDown })))))),
|
|
358
358
|
React.createElement("section", { className: "case-search-table" },
|
|
359
|
-
React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError, isSolrDown: isSolrSearchDown
|
|
359
|
+
React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError, isSolrDown: isSolrSearchDown })))));
|
|
360
360
|
}
|
|
@@ -40,6 +40,9 @@ export interface IFilterInfo {
|
|
|
40
40
|
[SolrKeys.createdBySsoUsername]: Array<string>;
|
|
41
41
|
[SolrKeys.caseContactSSO]: Array<string>;
|
|
42
42
|
[SolrKeys.type]: Array<string>;
|
|
43
|
+
[SolrKeys.caseSummary]: Array<string>;
|
|
44
|
+
[SolrKeys.modifiedBy]: Array<string>;
|
|
45
|
+
[SolrKeys.alternateId]: Array<string>;
|
|
43
46
|
}
|
|
44
47
|
export declare const emptyFilters: IFilterInfo;
|
|
45
48
|
export interface ICaseListFilterState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListFilterReducer.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseListFilterReducer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9D,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAWlD,CAAC;AAEF,aAAK,mBAAmB;IACpB,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,UAAU,gBAAgB;IAC1B,gBAAgB,sBAAsB;IACtC,iBAAiB,wBAAwB;IACzC,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,qBAAqB,6BAA6B;IAClD,WAAW,iBAAiB;CAC/B;AAED,MAAM,WAAW,SAAS;IACtB,SAAS,EAAE,KAAK,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,oBAAoB,kBAAW,oBAyCrE,CAAC;AAEF,iBAAS,UAAU,CAAC,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,SAAS,QAK5E;AAED,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,cAAc,EAAE,eAAe,QAK9F;AAED,iBAAS,YAAY,CAAC,QAAQ,EAAE,0BAA0B,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;;;CAAA,QAKhF;AAED,iBAAS,aAAa,CAAC,QAAQ,EAAE,0BAA0B,EAAE,OAAO,KAAA,QAUnE;AAED,iBAAS,gBAAgB,CAAC,QAAQ,KAAA,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;;;CAAA,QAKvD;AAED,QAAA,MAAM,YAAY,qCAAgC,OAAO,SAOxD,CAAC;AAEF,iBAAS,yBAAyB,CAAC,QAAQ,KAAA,QAI1C;AAED,iBAAS,iBAAiB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,eAAe,EAAE,gBAAgB,QAKjG;AAED,iBAAS,iBAAiB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC,QAKvG;AAED,OAAO,EACH,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,GAC5B,CAAC"}
|
|
@@ -35,6 +35,9 @@ export const emptyFilters = {
|
|
|
35
35
|
[SolrKeys.createdBySsoUsername]: [],
|
|
36
36
|
[SolrKeys.caseContactSSO]: [],
|
|
37
37
|
[SolrKeys.type]: [],
|
|
38
|
+
[SolrKeys.caseSummary]: [],
|
|
39
|
+
[SolrKeys.modifiedBy]: [],
|
|
40
|
+
[SolrKeys.alternateId]: [],
|
|
38
41
|
};
|
|
39
42
|
const caseListFilterReducer = (pState, action) => {
|
|
40
43
|
switch (action.type) {
|
package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountsBookmarkedGroupFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,YAAY,eAAgB,MAAM,gBAS9C,CAAC;AAEF,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;IACjC,wBAAwB,EAAE,OAAO,CAAC;IAClC,yBAAyB,EAAE,OAAO,CAAC;CACtC;AAOD,eAAO,MAAM,QAAQ,cAAe,MAAM,eAAe,MAAM,WACiB,CAAC;AAEjF,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccountsBookmarkedGroupFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,YAAY,eAAgB,MAAM,gBAS9C,CAAC;AAEF,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;IACjC,wBAAwB,EAAE,OAAO,CAAC;IAClC,yBAAyB,EAAE,OAAO,CAAC;CACtC;AAOD,eAAO,MAAM,QAAQ,cAAe,MAAM,eAAe,MAAM,WACiB,CAAC;AAEjF,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,eAgJ1D"}
|
|
@@ -97,9 +97,6 @@ export function AccountsBookmarkedGroupFilter(props) {
|
|
|
97
97
|
if (!canReadBookmarkAccounts && !canAccessManagedAccounts) {
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
100
|
-
//no managed accounts --> user is a customer and should not be able to see account filter
|
|
101
|
-
if (isEmpty(managedAccountsList))
|
|
102
|
-
return null;
|
|
103
100
|
return (React.createElement("div", { className: "pf-v5-c-select" },
|
|
104
101
|
React.createElement("label", { htmlFor: "case-list-group-filter" }, canAccessManagedAccounts ? t('Accounts') : t(filterNamesMap[SolrKeys.accountNumber])),
|
|
105
102
|
React.createElement(Select, { variant: SelectVariant.typeaheadMulti, onToggle: (_event, open) => onBookmarksToggle(open), onSelect: onBookmarksSelect, onClear: onBookmarksClear, isOpen: isOpen, onFilter: onBookmarksFilter, placeholderText: getDropdownBtnPlaceholder(t(canAccessManagedAccounts ? 'Search for an account' : 'Search for a bookmark'), canAccessManagedAccounts ? selectedAccounts : selectedBookmarks, '', dropdownOptions.length, canAccessManagedAccounts ? t('All accounts') : t('All bookmarks')), "data-tracking-id": "accounts-filter", id: "case-list-group-filter" }, getBookmarksOptions(dropdownOptions))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAwB3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAEpF,OAAO,EAEH,eAAe,EACf,SAAS,EAIZ,MAAM,0BAA0B,CAAC;AA2BlC,UAAU,MAAM;IACZ,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAyjB1C"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Bullseye, Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
|
|
1
|
+
import { Bullseye, Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, PaginationVariant, Spinner, } from '@patternfly/react-core';
|
|
2
2
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
3
|
-
import {
|
|
3
|
+
import { Table, TableVariant, Tbody, Td, Th, Thead, Tr, Visibility } from '@patternfly/react-table';
|
|
4
|
+
import { TableColumnSelector, TableComponent, TablePagination } from '@rh-support/components';
|
|
4
5
|
import { GlobalMetadataDispatchContext, GlobalMetadataStateContext, updateUserPreferences, useGlobalStateContext, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
5
6
|
import { formatDate, scrollIntoView, toNewCaseTypeSwitcher } from '@rh-support/utils';
|
|
7
|
+
import { isEqual, isUndefined } from 'lodash';
|
|
6
8
|
import find from 'lodash/find';
|
|
7
9
|
import flatMap from 'lodash/flatMap';
|
|
8
|
-
import get from 'lodash/get';
|
|
9
10
|
import includes from 'lodash/includes';
|
|
10
11
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
11
12
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -29,7 +30,6 @@ const EMPTY_STATE_NO_FILTERS = 'The table will be populated after creating your
|
|
|
29
30
|
const EMPTY_STATE_NO_FILTERS_INTERNALUSER = 'Try expanding your search to filter on cases for all Red Hat accounts.';
|
|
30
31
|
const EMPTY_STATE_NO_FILTERS_ERROR = (React.createElement(React.Fragment, null,
|
|
31
32
|
"Try refreshing or check the",
|
|
32
|
-
' ',
|
|
33
33
|
React.createElement("a", { href: "https://status.redhat.com/", target: "_blank", rel: "noopener noreferrer" }, "status page"),
|
|
34
34
|
"to see if there are any known issues"));
|
|
35
35
|
export function CaseListTable(props) {
|
|
@@ -41,6 +41,11 @@ export function CaseListTable(props) {
|
|
|
41
41
|
const isColumnVisible = (columnId) => {
|
|
42
42
|
return includes(selectedColumns, columnId);
|
|
43
43
|
};
|
|
44
|
+
const mandatoryColumns = ['number', 'summary'];
|
|
45
|
+
const visibleColumns = mandatoryColumns.concat(selectedColumns);
|
|
46
|
+
const [activeSortIndex, setActiveSortIndex] = useState();
|
|
47
|
+
const [activeSortDirection, setActiveSortDirection] = useState();
|
|
48
|
+
const [sortedCaseListData, setSortedCaseListData] = useState(caseListData);
|
|
44
49
|
const { globalMetadataState: { navBarRef, hydraUserPreferences }, } = useGlobalStateContext();
|
|
45
50
|
const dispatch = useContext(CaseListFilterDispatchContext);
|
|
46
51
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
@@ -49,143 +54,98 @@ export function CaseListTable(props) {
|
|
|
49
54
|
const showingFilter = currentFilterLength > 0;
|
|
50
55
|
const filterState = useContext(CaseListFilterStateContext);
|
|
51
56
|
const { filterQueryInfo } = filterState;
|
|
52
|
-
const hasSearchQuery = !(filterQueryInfo.queryString === '');
|
|
57
|
+
const hasSearchQuery = !((filterQueryInfo === null || filterQueryInfo === void 0 ? void 0 : filterQueryInfo.queryString) === '');
|
|
53
58
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
54
59
|
const isInternal = loggedInUserRights.data.isInternal();
|
|
55
60
|
const tableToolbarRef = useRef(null);
|
|
56
|
-
const getCaseGroupName = (groupNum) => {
|
|
57
|
-
if (!groupNum || props.caseGroups.length < 1)
|
|
58
|
-
return '';
|
|
59
|
-
const group = props.caseGroups.find((group) => group.groupNum === groupNum);
|
|
60
|
-
return (group === null || group === void 0 ? void 0 : group.name) || '';
|
|
61
|
-
};
|
|
62
61
|
const columns = [
|
|
63
62
|
{
|
|
64
63
|
id: CaseListColumnIds.caseId,
|
|
65
|
-
cellWidth: 10,
|
|
66
64
|
title: t('Case ID'),
|
|
67
|
-
rowProps: (data) => ({ 'data-casenumber': data.case_number }),
|
|
68
65
|
sortable: true,
|
|
69
|
-
cell: (data) => (React.createElement(React.Fragment, null,
|
|
70
|
-
React.createElement(Link, { to: `/case/${data.case_number}` },
|
|
71
|
-
React.createElement("span", { className: "case-number" }, data.case_number)),
|
|
72
|
-
' ',
|
|
73
|
-
data.case_customer_escalation ? (React.createElement("div", { className: "escalation-label" },
|
|
74
|
-
React.createElement(Trans, null, "Escalated"))) : null)),
|
|
75
66
|
},
|
|
76
67
|
{
|
|
77
68
|
id: CaseListColumnIds.summary,
|
|
78
|
-
cellWidth: props.isXXLScreen ? 30 : 10,
|
|
79
69
|
title: t('Issue summary'),
|
|
80
70
|
sortable: true,
|
|
81
|
-
accessor: (data) => data.case_summary,
|
|
82
71
|
},
|
|
83
72
|
{
|
|
84
73
|
id: CaseListColumnIds.owner,
|
|
85
|
-
cellWidth: 10,
|
|
86
74
|
title: t('Owner'),
|
|
87
75
|
sortable: true,
|
|
88
|
-
accessor: (data) => data.case_contactName,
|
|
89
76
|
show: isColumnVisible(CaseListColumnIds.owner),
|
|
90
77
|
},
|
|
91
78
|
{
|
|
92
79
|
id: CaseListColumnIds.modified,
|
|
93
|
-
cellWidth: 10,
|
|
94
80
|
title: t('Modified by'),
|
|
95
81
|
sortable: true,
|
|
96
|
-
cell: (data) => (React.createElement(React.Fragment, null,
|
|
97
|
-
React.createElement("span", { className: "modified-name" }, data.case_lastModifiedByName),
|
|
98
|
-
' ',
|
|
99
|
-
data.case_lastModifiedDate ? formatDate(data.case_lastModifiedDate) : null)),
|
|
100
82
|
show: isColumnVisible(CaseListColumnIds.modified),
|
|
101
83
|
},
|
|
102
84
|
{
|
|
103
85
|
id: CaseListColumnIds.severity,
|
|
104
|
-
cellWidth: 10,
|
|
105
86
|
title: t('Severity'),
|
|
106
87
|
sortable: true,
|
|
107
|
-
cell: (data) => React.createElement(SeverityLabel, { sevValue: data.case_severity }),
|
|
108
88
|
show: isColumnVisible(CaseListColumnIds.severity),
|
|
109
89
|
},
|
|
110
90
|
{
|
|
111
91
|
id: CaseListColumnIds.status,
|
|
112
|
-
cellWidth: 10,
|
|
113
92
|
title: t('Status'),
|
|
114
93
|
sortable: true,
|
|
115
|
-
accessor: (data) => data.case_status,
|
|
116
94
|
show: isColumnVisible(CaseListColumnIds.status),
|
|
117
95
|
},
|
|
118
96
|
{
|
|
119
97
|
id: CaseListColumnIds.created,
|
|
120
|
-
cellWidth: 10,
|
|
121
98
|
title: t('Created by'),
|
|
122
99
|
sortable: true,
|
|
123
|
-
cell: (data) => (React.createElement(React.Fragment, null,
|
|
124
|
-
React.createElement("span", { className: "created-name" }, data.case_createdByName),
|
|
125
|
-
' ',
|
|
126
|
-
data.case_createdDate ? formatDate(data.case_createdDate) : null)),
|
|
127
100
|
show: isColumnVisible(CaseListColumnIds.created),
|
|
128
101
|
},
|
|
129
102
|
{
|
|
130
103
|
id: CaseListColumnIds.productAndVersion,
|
|
131
104
|
cellWidth: 15,
|
|
132
105
|
title: t('Product and version'),
|
|
133
|
-
cell: (data) => (React.createElement(React.Fragment, null,
|
|
134
|
-
data.case_product,
|
|
135
|
-
" ",
|
|
136
|
-
React.createElement("span", { style: { display: 'block' } }, data.case_version))),
|
|
137
106
|
show: isColumnVisible(CaseListColumnIds.productAndVersion),
|
|
138
107
|
},
|
|
139
108
|
{
|
|
140
109
|
id: CaseListColumnIds.accountNumber,
|
|
141
|
-
cellWidth: 10,
|
|
142
110
|
title: t('Account number'),
|
|
143
111
|
sortable: true,
|
|
144
|
-
accessor: (data) => data.case_accountNumber,
|
|
145
112
|
show: isColumnVisible(CaseListColumnIds.accountNumber),
|
|
146
113
|
},
|
|
147
114
|
{
|
|
148
115
|
id: CaseListColumnIds.alternateCaseId,
|
|
149
|
-
cellWidth: 10,
|
|
150
116
|
title: t('Personal reference number'),
|
|
151
117
|
sortable: true,
|
|
152
|
-
accessor: (data) => data.case_alternate_id,
|
|
153
118
|
show: isColumnVisible(CaseListColumnIds.alternateCaseId),
|
|
154
119
|
},
|
|
155
120
|
{
|
|
156
121
|
id: CaseListColumnIds.type,
|
|
157
|
-
cellWidth: 10,
|
|
158
122
|
title: t('Support type'),
|
|
159
123
|
sortable: true,
|
|
160
|
-
accessor: (data) => toNewCaseTypeSwitcher(data.case_type),
|
|
161
124
|
show: isColumnVisible(CaseListColumnIds.type),
|
|
162
125
|
},
|
|
163
126
|
{
|
|
164
127
|
id: CaseListColumnIds.caseClosedDate,
|
|
165
|
-
cellWidth: 10,
|
|
166
128
|
title: t('Closed date'),
|
|
167
129
|
sortable: true,
|
|
168
|
-
accessor: (data) => formatDate(data.case_closedDate),
|
|
169
130
|
show: isColumnVisible(CaseListColumnIds.caseClosedDate),
|
|
170
131
|
},
|
|
171
132
|
{
|
|
172
133
|
id: CaseListColumnIds.group,
|
|
173
|
-
cellWidth: 10,
|
|
174
134
|
title: t('Group'),
|
|
175
135
|
sortable: true,
|
|
176
|
-
accessor: (data) => data.case_folderName || getCaseGroupName(data.case_folderNumber),
|
|
177
136
|
show: isColumnVisible(CaseListColumnIds.group),
|
|
178
137
|
},
|
|
179
138
|
];
|
|
139
|
+
const visibleCaseListColumns = columns.filter((column) => { var _a; return (_a = visibleColumns.includes(column.id)) !== null && _a !== void 0 ? _a : column.id; });
|
|
140
|
+
const allRows = caseListData.map((row, index) => row.case_number);
|
|
141
|
+
const selectAllRows = () => {
|
|
142
|
+
!isEqual(selectedCases, allRows) ? setSelectedCases(allRows) : setSelectedCases([]);
|
|
143
|
+
};
|
|
180
144
|
const getSelectedColumnsListFromCache = () => {
|
|
181
145
|
const savedSelectedColumnsKey = UserPreferencesKeys.caseListSelectedColumns;
|
|
182
146
|
const savedSelectedColumns = find(hydraUserPreferences.data, (pref) => pref.key === savedSelectedColumnsKey);
|
|
183
147
|
(savedSelectedColumns === null || savedSelectedColumns === void 0 ? void 0 : savedSelectedColumns.value) && setSelectedColumns(JSON.parse(savedSelectedColumns.value));
|
|
184
148
|
};
|
|
185
|
-
useEffect(() => {
|
|
186
|
-
getSelectedColumnsListFromCache();
|
|
187
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
|
-
}, []);
|
|
189
149
|
const onColumnSelectorChange = (selectedColumnsList) => {
|
|
190
150
|
setSelectedColumns(selectedColumnsList);
|
|
191
151
|
try {
|
|
@@ -200,9 +160,6 @@ export function CaseListTable(props) {
|
|
|
200
160
|
console.error('Could not save selected columns in cache');
|
|
201
161
|
}
|
|
202
162
|
};
|
|
203
|
-
const onSortChange = (column, direction) => {
|
|
204
|
-
updateSort(dispatch, { direction, column: column.id });
|
|
205
|
-
};
|
|
206
163
|
const onPerPageSelect = (paginationInfo) => {
|
|
207
164
|
updatePagination(dispatch, paginationInfo);
|
|
208
165
|
};
|
|
@@ -214,20 +171,12 @@ export function CaseListTable(props) {
|
|
|
214
171
|
if (ev.target.tagName === 'INPUT') {
|
|
215
172
|
return;
|
|
216
173
|
}
|
|
217
|
-
// not used currently
|
|
218
|
-
// const caseId = get(row, 'case-id.props.data-casenumber');
|
|
219
|
-
// navigate to case details page here
|
|
220
174
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
isSelected ? setSelectedCases(caseListData.map((kase) => kase.case_number)) : setSelectedCases([]);
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
const caseNumber = get(rowdata, 'cells[0].props.data-casenumber');
|
|
230
|
-
setSelectedCases((oldCases) => isSelected ? [...oldCases, caseNumber] : oldCases.filter((caseId) => caseId !== caseNumber));
|
|
175
|
+
const onRowSelect = (ev, caseNumber) => {
|
|
176
|
+
if (!isUndefined(caseNumber)) {
|
|
177
|
+
setSelectedCases((oldCases) => !selectedCases.includes(caseNumber)
|
|
178
|
+
? [...oldCases, caseNumber]
|
|
179
|
+
: oldCases.filter((caseId) => caseId !== caseNumber));
|
|
231
180
|
}
|
|
232
181
|
};
|
|
233
182
|
// Clear Filters
|
|
@@ -251,26 +200,23 @@ export function CaseListTable(props) {
|
|
|
251
200
|
return EMPTY_STATE_FILTER_APPLIED;
|
|
252
201
|
}
|
|
253
202
|
};
|
|
254
|
-
const noResultFoundRow =
|
|
255
|
-
{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
],
|
|
272
|
-
},
|
|
273
|
-
];
|
|
203
|
+
const noResultFoundRow = (React.createElement(Tr, null,
|
|
204
|
+
React.createElement(Td, { colSpan: 8 },
|
|
205
|
+
React.createElement(Bullseye, { style: { minHeight: '350px' } },
|
|
206
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
207
|
+
React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null,
|
|
208
|
+
React.createElement(Trans, null, isInternal && (!showingFilter || !hasSearchQuery)
|
|
209
|
+
? 'No results found'
|
|
210
|
+
: 'No information to display')), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" }),
|
|
211
|
+
React.createElement(EmptyStateBody, null,
|
|
212
|
+
React.createElement(Trans, null, getEmptyStateErrMessage())),
|
|
213
|
+
React.createElement(EmptyStateFooter, null, (showingFilter || hasSearchQuery) && (React.createElement(Button, { variant: "link", onClick: clearAllFilters },
|
|
214
|
+
React.createElement(Trans, null, "Clear all")))))))));
|
|
215
|
+
const loadingRowDefault = (React.createElement(Tr, null,
|
|
216
|
+
React.createElement(Td, { colSpan: 8 },
|
|
217
|
+
React.createElement(Bullseye, { style: { minHeight: '350px' } },
|
|
218
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
|
|
219
|
+
React.createElement(Spinner, { size: "xl" }))))));
|
|
274
220
|
const onCasesCloseSuccess = () => {
|
|
275
221
|
resetFilterToDefaultState(dispatch);
|
|
276
222
|
};
|
|
@@ -288,8 +234,111 @@ export function CaseListTable(props) {
|
|
|
288
234
|
onSetPage(paginationInfo);
|
|
289
235
|
scrollIntoView(tableToolbarRef, { navBarRef, timeout: 0, onlyIfNotInViewport: true, offset: 30 });
|
|
290
236
|
};
|
|
237
|
+
const getSortableRowValues = (row) => {
|
|
238
|
+
const { case_number, case_summary, case_contactName, case_lastModifiedDate, case_severity, case_status, case_createdDate, case_accountNumber, case_alternate_id, case_type, case_closedDate, case_folderName, case_lastModifiedByName, case_createdByName, case_version, id, case_customer_escalation, case_product, } = row;
|
|
239
|
+
return [
|
|
240
|
+
case_number,
|
|
241
|
+
case_summary,
|
|
242
|
+
case_contactName,
|
|
243
|
+
case_lastModifiedDate,
|
|
244
|
+
case_severity,
|
|
245
|
+
case_status,
|
|
246
|
+
case_createdDate,
|
|
247
|
+
case_accountNumber,
|
|
248
|
+
case_alternate_id,
|
|
249
|
+
case_type,
|
|
250
|
+
case_closedDate,
|
|
251
|
+
case_folderName,
|
|
252
|
+
case_lastModifiedByName,
|
|
253
|
+
case_createdByName,
|
|
254
|
+
case_version,
|
|
255
|
+
id,
|
|
256
|
+
case_customer_escalation,
|
|
257
|
+
case_product,
|
|
258
|
+
];
|
|
259
|
+
};
|
|
260
|
+
const onSort = (columnIndex) => ({
|
|
261
|
+
sortBy: {
|
|
262
|
+
index: activeSortIndex,
|
|
263
|
+
direction: activeSortDirection,
|
|
264
|
+
},
|
|
265
|
+
onSort: (_event, index, direction) => {
|
|
266
|
+
setActiveSortIndex(index);
|
|
267
|
+
setActiveSortDirection(direction);
|
|
268
|
+
},
|
|
269
|
+
columnIndex,
|
|
270
|
+
});
|
|
271
|
+
const getCaseGroupName = (groupNum) => {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
if (!groupNum || ((_a = props.caseGroups) === null || _a === void 0 ? void 0 : _a.length) < 1)
|
|
274
|
+
return '';
|
|
275
|
+
const group = (_b = props.caseGroups) === null || _b === void 0 ? void 0 : _b.find((group) => group.groupNum === groupNum);
|
|
276
|
+
return (group === null || group === void 0 ? void 0 : group.name) || '';
|
|
277
|
+
};
|
|
278
|
+
const localRows = [
|
|
279
|
+
...caseListData.map((row, index) => ({
|
|
280
|
+
case_number: row.case_number,
|
|
281
|
+
case_summary: row.case_summary,
|
|
282
|
+
case_createdByName: row.case_createdByName,
|
|
283
|
+
case_lastModifiedDate: formatDate(row.case_lastModifiedDate) ? formatDate(row.case_lastModifiedDate) : '',
|
|
284
|
+
case_severity: row.case_severity ? row.case_severity : '',
|
|
285
|
+
case_status: row.case_status,
|
|
286
|
+
case_createdDate: formatDate(row.case_createdDate),
|
|
287
|
+
case_accountNumber: row.case_accountNumber,
|
|
288
|
+
case_alternate_id: row.case_alternate_id ? row.case_alternate_id : '',
|
|
289
|
+
case_type: toNewCaseTypeSwitcher(row.case_type),
|
|
290
|
+
case_closedDate: formatDate(row.case_closedDate) ? formatDate(row.case_closedDate) : '',
|
|
291
|
+
case_folderName: row.case_folderName || getCaseGroupName(row.case_folderNumber) || '',
|
|
292
|
+
case_contactName: row.case_contactName,
|
|
293
|
+
case_lastModifiedByName: row.case_lastModifiedByName ? row.case_lastModifiedByName : '',
|
|
294
|
+
case_version: row.case_version,
|
|
295
|
+
id: row.id,
|
|
296
|
+
case_product: row.case_product,
|
|
297
|
+
case_customer_escalation: row.case_customer_escalation,
|
|
298
|
+
})),
|
|
299
|
+
];
|
|
300
|
+
useEffect(() => {
|
|
301
|
+
var _a;
|
|
302
|
+
setSelectedCases([]);
|
|
303
|
+
setSortedCaseListData((_a = props.caseList) === null || _a === void 0 ? void 0 : _a.docs);
|
|
304
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
305
|
+
}, [props.caseList]);
|
|
306
|
+
useEffect(() => {
|
|
307
|
+
getSelectedColumnsListFromCache();
|
|
308
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
309
|
+
}, []);
|
|
310
|
+
useEffect(() => {
|
|
311
|
+
let sortedRows = localRows;
|
|
312
|
+
if (activeSortIndex !== undefined && activeSortDirection !== undefined) {
|
|
313
|
+
updateSort(dispatch, {
|
|
314
|
+
direction: activeSortDirection,
|
|
315
|
+
column: visibleCaseListColumns[activeSortIndex].id,
|
|
316
|
+
});
|
|
317
|
+
sortedRows = localRows.sort((a, b) => {
|
|
318
|
+
var _a, _b;
|
|
319
|
+
const aValue = getSortableRowValues(a)[activeSortIndex];
|
|
320
|
+
const bValue = getSortableRowValues(b)[activeSortIndex];
|
|
321
|
+
if (typeof aValue === 'number') {
|
|
322
|
+
// Numeric sort
|
|
323
|
+
if (activeSortDirection === 'asc') {
|
|
324
|
+
return aValue - bValue;
|
|
325
|
+
}
|
|
326
|
+
return bValue - aValue;
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
// String sort
|
|
330
|
+
if (activeSortDirection === 'asc') {
|
|
331
|
+
return (_a = aValue) === null || _a === void 0 ? void 0 : _a.localeCompare(bValue);
|
|
332
|
+
}
|
|
333
|
+
return (_b = bValue) === null || _b === void 0 ? void 0 : _b.localeCompare(aValue);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
setSortedCaseListData(sortedRows);
|
|
338
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
339
|
+
}, [activeSortDirection, activeSortIndex]);
|
|
291
340
|
return (React.createElement(React.Fragment, null,
|
|
292
|
-
React.createElement(
|
|
341
|
+
React.createElement(TableComponent, { columns: columns, data: caseListData, selectedColumns: selectedColumns },
|
|
293
342
|
React.createElement("div", { className: "case-list-table-toolbar pf-v5-l-flex", ref: tableToolbarRef },
|
|
294
343
|
React.createElement("div", { className: "toolbar-actions pf-v5-l-flex pf-m-space-items-sm" },
|
|
295
344
|
React.createElement(TableColumnSelector, { onColumnSelectorChange: onColumnSelectorChange }),
|
|
@@ -298,7 +347,51 @@ export function CaseListTable(props) {
|
|
|
298
347
|
React.createElement("span", { className: "toolbar-pagination" },
|
|
299
348
|
React.createElement(TablePagination, { perPage: (_c = props.paginationInfo) === null || _c === void 0 ? void 0 : _c.pageSize, currentPage: (_d = props.paginationInfo) === null || _d === void 0 ? void 0 : _d.currentPage, onPerPageSelect: onPerPageSelect, onSetPage: onSetPage, variant: PaginationVariant.top, itemCount: getItemCount() }))),
|
|
300
349
|
React.createElement("div", { className: "pf-v5-c-scroll-inner-wrapper" },
|
|
301
|
-
React.createElement(
|
|
350
|
+
React.createElement(Table, { variant: TableVariant.compact, "aria-label": "case-list", className: "case-list-table" },
|
|
351
|
+
React.createElement(Thead, null,
|
|
352
|
+
React.createElement(Tr, { key: "tableHeaderRow" },
|
|
353
|
+
React.createElement(Th, { select: {
|
|
354
|
+
onSelect: (_event, isSelecting) => selectAllRows(),
|
|
355
|
+
isSelected: isEqual(selectedCases, allRows),
|
|
356
|
+
}, className: props.isCaseListPageLoading || (caseListData || []).length < 1
|
|
357
|
+
? Visibility.hidden
|
|
358
|
+
: '', key: "selectAllRowsCheckBox" }),
|
|
359
|
+
visibleCaseListColumns.map((column, index) => (React.createElement(Th, { id: column.id, sort: column.sortable ? onSort(index) : undefined, key: column.id }, column.title))))),
|
|
360
|
+
React.createElement(Tbody, null, !props.isCaseListPageLoading && (caseListData || []).length < 1
|
|
361
|
+
? noResultFoundRow
|
|
362
|
+
: props.isCaseListPageLoading
|
|
363
|
+
? loadingRowDefault
|
|
364
|
+
: sortedCaseListData === null || sortedCaseListData === void 0 ? void 0 : sortedCaseListData.map((row, index) => (React.createElement(Tr, { onRowClick: (event) => (onRowClick ? onRowClick(event, row) : ''), key: row === null || row === void 0 ? void 0 : row.case_number },
|
|
365
|
+
React.createElement(Td, { select: {
|
|
366
|
+
rowIndex: index,
|
|
367
|
+
onSelect: (_event, index) => onRowSelect(_event, row === null || row === void 0 ? void 0 : row.case_number),
|
|
368
|
+
isSelected: selectedCases.includes(row === null || row === void 0 ? void 0 : row.case_number),
|
|
369
|
+
} }),
|
|
370
|
+
React.createElement(Th, { dataLabel: "Case ID", id: row.case_number },
|
|
371
|
+
React.createElement("div", { className: "case-number-section" },
|
|
372
|
+
React.createElement(Link, { to: `/case/${row.case_number}` },
|
|
373
|
+
React.createElement("span", { className: "case-number" }, row.case_number)),
|
|
374
|
+
row.case_customer_escalation ? (React.createElement("div", { className: "escalation-label" },
|
|
375
|
+
React.createElement(Trans, null, "Escalated"))) : (''))),
|
|
376
|
+
React.createElement(Td, { dataLabel: "Issue summary" }, row.case_summary),
|
|
377
|
+
React.createElement(Td, { className: !isColumnVisible('contactName') ? Visibility.hidden : '', dataLabel: "Owner" }, row.case_contactName),
|
|
378
|
+
React.createElement(Td, { className: !isColumnVisible('lastModifiedDate') ? Visibility.hidden : '', dataLabel: "Modified by" },
|
|
379
|
+
React.createElement("span", { className: "modified-name" }, row.case_lastModifiedByName),
|
|
380
|
+
row.case_lastModifiedDate ? formatDate(row.case_lastModifiedDate) : ''),
|
|
381
|
+
React.createElement(Td, { className: !isColumnVisible('severity') ? Visibility.hidden : '', dataLabel: "Severity" },
|
|
382
|
+
React.createElement(SeverityLabel, { sevValue: row.case_severity })),
|
|
383
|
+
React.createElement(Td, { className: !isColumnVisible('status') ? Visibility.hidden : '', dataLabel: "Status" }, row.case_status),
|
|
384
|
+
React.createElement(Td, { className: !isColumnVisible('createdDate') ? Visibility.hidden : '', dataLabel: "Created by" },
|
|
385
|
+
React.createElement("span", { className: "created-name" }, row.case_createdByName),
|
|
386
|
+
row.case_createdDate ? formatDate(row.case_createdDate) : ''),
|
|
387
|
+
React.createElement(Td, { className: !isColumnVisible('product') ? Visibility.hidden : '', dataLabel: "Product and Version" },
|
|
388
|
+
row.case_product,
|
|
389
|
+
React.createElement("span", { style: { display: 'block' } }, row.case_version)),
|
|
390
|
+
React.createElement(Td, { className: !isColumnVisible('accountNumber') ? Visibility.hidden : '', dataLabel: "Account number" }, row.case_accountNumber),
|
|
391
|
+
React.createElement(Td, { className: !isColumnVisible('alternateCaseId') ? Visibility.hidden : '', "data-label": "Personal reference number" }, row.case_alternate_id ? row.case_alternate_id : ''),
|
|
392
|
+
React.createElement(Td, { className: !isColumnVisible('type') ? Visibility.hidden : '', "data-label": "Support type" }, row.case_type),
|
|
393
|
+
React.createElement(Td, { className: !isColumnVisible('closedDate') ? Visibility.hidden : '', "data-label": "Closed date" }, row.case_closedDate ? formatDate(row.case_closedDate) : ''),
|
|
394
|
+
React.createElement(Td, { className: !isColumnVisible('folderName') ? Visibility.hidden : '', "data-label": "Group" }, row.case_folderName ? row.case_folderName : ''))))))),
|
|
302
395
|
caseListData.length > 9 && (React.createElement("footer", { className: "toolbar-pagination" },
|
|
303
396
|
React.createElement(TablePagination, { perPage: (_e = props === null || props === void 0 ? void 0 : props.paginationInfo) === null || _e === void 0 ? void 0 : _e.pageSize, currentPage: (_f = props === null || props === void 0 ? void 0 : props.paginationInfo) === null || _f === void 0 ? void 0 : _f.currentPage, onPerPageSelect: onPerPageSelect, onSetPage: onBottomPaginationSetPage, variant: PaginationVariant.bottom, itemCount: getItemCount() }))))));
|
|
304
397
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './DownloadCSVFileModal.scss';
|
|
2
|
+
import { IAccount } from '@cee-eng/hydrajs/@types/models/account';
|
|
3
|
+
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
4
|
+
import { UserAuth } from '@rh-support/user-permissions';
|
|
5
|
+
import { ICaseListFilterState } from '../CaseListFilterReducer';
|
|
6
|
+
interface IProps {
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
onModalshow: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
loggedInUserRights: IApiResponseDetails<UserAuth>;
|
|
11
|
+
loggedInUsersAccount: IApiResponseDetails<Partial<IAccount>>;
|
|
12
|
+
filterState: ICaseListFilterState;
|
|
13
|
+
}
|
|
14
|
+
export default function DownloadCSVFileModal(props: IProps): JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=DownloadCSVFileModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadCSVFileModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/DownloadCSVFileModal.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AAGrC,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAiBlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAQxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,oBAAoB,EAAE,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,WAAW,EAAE,oBAAoB,CAAC;CACrC;AAYD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAuXzD"}
|