@rh-support/cases 2.6.195 → 2.6.197

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.
@@ -4,7 +4,7 @@ import isEmpty from 'lodash/isEmpty';
4
4
  import React, { useContext, useEffect, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { SolrKeys } from '../../../enums/filters';
7
- import { filterNamesMap, PORTAL_DISPLAY_STATUSES } from '../../../utils/constants';
7
+ import { filterNamesMap, PORTAL_DISPLAY_STATUSES, PORTAL_OPEN_DISPLAY_STATUSES } from '../../../utils/constants';
8
8
  import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
9
9
  import { updateFilter } from '../CaseListFilterReducer';
10
10
  export function StatusFilter(props) {
@@ -59,9 +59,9 @@ export function StatusFilter(props) {
59
59
  return t('All cases');
60
60
  }
61
61
  else {
62
- const hasAllOpenSelected = selectedValues.includes('In Progress') &&
63
- selectedValues.includes('Waiting on Customer') &&
64
- !selectedValues.includes('Closed');
62
+ const hasAllOpenSelected = PORTAL_OPEN_DISPLAY_STATUSES.every((status) => selectedValues.includes(status)) &&
63
+ !selectedValues.includes('Closed') &&
64
+ !selectedValues.includes('Archived');
65
65
  if (hasAllOpenSelected) {
66
66
  return t('All open cases');
67
67
  }
@@ -1,5 +1,7 @@
1
1
  export declare const PORTAL_STATUS_GROUPS: Record<string, string[]>;
2
2
  export declare const PORTAL_DISPLAY_STATUSES: string[];
3
+ /** Statuses treated as open (excludes Closed and Archived). */
4
+ export declare const PORTAL_OPEN_DISPLAY_STATUSES: string[];
3
5
  export declare const filterNamesMap: {
4
6
  readonly case_status: any;
5
7
  readonly case_severity: any;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAazD,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AAIzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CA6D1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAoBzD,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAAoC,CAAC;AAEzE,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,UAExC,CAAC;AAIF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CA6D1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
@@ -2,19 +2,28 @@ import i18n from 'i18next';
2
2
  import { SolrKeys } from '../enums/filters';
3
3
  export const PORTAL_STATUS_GROUPS = {
4
4
  'In Progress': [
5
- 'New',
6
5
  'In Progress',
7
- 'Needs New Owner',
6
+ 'New',
8
7
  'Waiting on Collab',
9
8
  'Waiting on Engineering',
10
9
  'Waiting on Sales',
11
10
  'Waiting on 3rd Party Vendor',
11
+ 'Needs New Owner',
12
+ // Legacy Solr value retained for case-list filter expansion
12
13
  'Waiting on Red Hat',
13
14
  ],
14
- 'Waiting on Customer': ['Waiting on Customer Action Required', 'Waiting on Customer Solution Delivered'],
15
+ 'Waiting on Customer Action Required': [
16
+ 'Waiting on Customer Action Required',
17
+ // Legacy Solr value
18
+ 'Waiting on Customer',
19
+ ],
20
+ 'Waiting on Customer Solution Delivered': ['Waiting on Customer Solution Delivered'],
15
21
  Closed: ['Closed'],
22
+ Archived: ['Archived'],
16
23
  };
17
24
  export const PORTAL_DISPLAY_STATUSES = Object.keys(PORTAL_STATUS_GROUPS);
25
+ /** Statuses treated as open (excludes Closed and Archived). */
26
+ export const PORTAL_OPEN_DISPLAY_STATUSES = PORTAL_DISPLAY_STATUSES.filter((status) => status !== 'Closed' && status !== 'Archived');
18
27
  // used for adding title text for different solr fields
19
28
  // test
20
29
  export const filterNamesMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "2.6.195",
3
+ "version": "2.6.197",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -38,11 +38,11 @@
38
38
  "@patternfly/patternfly": "6.2.1",
39
39
  "@patternfly/react-core": "6.2.1",
40
40
  "@patternfly/react-table": "6.2.1",
41
- "@rh-support/components": "2.5.191",
42
- "@rh-support/react-context": "2.5.285",
41
+ "@rh-support/components": "2.5.193",
42
+ "@rh-support/react-context": "2.5.287",
43
43
  "@rh-support/types": "2.0.26",
44
- "@rh-support/user-permissions": "2.5.137",
45
- "@rh-support/utils": "2.5.119",
44
+ "@rh-support/user-permissions": "2.5.139",
45
+ "@rh-support/utils": "2.5.121",
46
46
  "localforage": "^1.10.0",
47
47
  "lodash": "^4.17.21",
48
48
  "pegjs": "^0.10.0",
@@ -92,5 +92,5 @@
92
92
  "defaults and supports es6-module",
93
93
  "maintained node versions"
94
94
  ],
95
- "gitHead": "e737fe04f1e771923e483cd65f7d6f6f87b53356"
95
+ "gitHead": "25e583b62d2c134f01811158805d24b70da32847"
96
96
  }