@rh-support/cases 0.2.25 → 0.2.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAyBlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAKH,0BAA0B,EAK7B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAK1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AA4B3F,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,YAAY,EAAE,cAAc,EAAE,CAAC;CAClC;AAED,oBAAY,YAAY,GAAG,0BAA0B,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;AAM5F,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eA0arC"}
1
+ {"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAyBlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAKH,0BAA0B,EAK7B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAK1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AA4B3F,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,YAAY,EAAE,cAAc,EAAE,CAAC;CAClC;AAED,oBAAY,YAAY,GAAG,0BAA0B,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;AAM5F,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eA6arC"}
@@ -304,7 +304,7 @@ export function CaseList(props) {
304
304
  React.createElement("div", { className: "filter-wrapper" },
305
305
  React.createElement("pfe-collapse-panel", { id: "case-filters-panel", "pfe-animation": "false", ref: filterSectionRef },
306
306
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filters') } },
307
- React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse })))))),
307
+ React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse, allCaseTypes: allCaseTypes })))))),
308
308
  React.createElement("section", { className: "case-search-table" },
309
309
  React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError })))));
310
310
  }
@@ -39,6 +39,7 @@ export interface IFilterInfo {
39
39
  [SolrKeys.escalation]: Array<IKeyValue<string>>;
40
40
  [SolrKeys.createdBySsoUsername]: Array<string>;
41
41
  [SolrKeys.caseContactSSO]: Array<string>;
42
+ [SolrKeys.type]: Array<string>;
42
43
  }
43
44
  export declare const emptyFilters: IFilterInfo;
44
45
  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,CAUlD,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,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,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AY,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"}
@@ -10,6 +10,7 @@ export const initialFilterInfo = {
10
10
  [SolrKeys.escalation]: [],
11
11
  [SolrKeys.createdBySsoUsername]: [],
12
12
  [SolrKeys.caseContactSSO]: [],
13
+ [SolrKeys.type]: [],
13
14
  };
14
15
  var CaseListReducerEnum;
15
16
  (function (CaseListReducerEnum) {
@@ -33,6 +34,7 @@ export const emptyFilters = {
33
34
  [SolrKeys.escalation]: [],
34
35
  [SolrKeys.createdBySsoUsername]: [],
35
36
  [SolrKeys.caseContactSSO]: [],
37
+ [SolrKeys.type]: [],
36
38
  };
37
39
  const caseListFilterReducer = (pState, action) => {
38
40
  switch (action.type) {
@@ -2,7 +2,8 @@ import { ISolrResponseToFacetFields } from '@rh-support/utils';
2
2
  import { IFacetFields } from '../../../models/caseList';
3
3
  interface IProps {
4
4
  filterValues: ISolrResponseToFacetFields<IFacetFields>;
5
+ allCaseTypes: any;
5
6
  }
6
- export declare const CaseListFilters: ({ filterValues }: IProps) => JSX.Element;
7
+ export declare const CaseListFilters: ({ filterValues, allCaseTypes }: IProps) => JSX.Element;
7
8
  export {};
8
9
  //# sourceMappingURL=CaseListFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAK/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAUxD,UAAU,MAAM;IACZ,YAAY,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;CAC1D;AAID,eAAO,MAAM,eAAe,qBAAsB,MAAM,gBAkEvD,CAAC"}
1
+ {"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAK/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWxD,UAAU,MAAM;IACZ,YAAY,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;IACvD,YAAY,EAAE,GAAG,CAAC;CACrB;AAID,eAAO,MAAM,eAAe,mCAAoC,MAAM,gBAoErE,CAAC"}
@@ -11,9 +11,10 @@ import { GroupsFilter } from './GroupsFilter';
11
11
  import { ProductsFilter } from './ProductsFilter';
12
12
  import { SeverityFilter } from './SeverityFilter';
13
13
  import { StatusFilter } from './StatusFilter';
14
+ import { TypeFilter } from './TypeFilter';
14
15
  // Adding a new filter here? Make sure you add in caseSearchUtils also so that
15
16
  // it get included in the solr search query fq parameter
16
- export const CaseListFilters = ({ filterValues }) => {
17
+ export const CaseListFilters = ({ filterValues, allCaseTypes }) => {
17
18
  const ability = useContext(AbilityContext);
18
19
  const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
19
20
  const canReadBookmarkAccounts = ability.can(resourceActions.READ, resources.BOOKMARK_ACCOUNTS);
@@ -26,6 +27,7 @@ export const CaseListFilters = ({ filterValues }) => {
26
27
  const canAccessGroupsFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.GROUPS_FILTER);
27
28
  const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
28
29
  const canAccessCreatorFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.CREATOR_FILTER);
30
+ const canAccessTypeFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.TYPE_FILTER);
29
31
  return (React.createElement(React.Fragment, null,
30
32
  React.createElement("div", { className: "filter-group" },
31
33
  canReadBookmarkAccounts && React.createElement(AccountsFilter, { canReadBookmarkAccounts: canReadBookmarkAccounts }),
@@ -35,5 +37,6 @@ export const CaseListFilters = ({ filterValues }) => {
35
37
  canAccessSeverityFilter && (React.createElement(SeverityFilter, { filterValues: get(filterValues, SolrKeys.severity, []), forceSingleSelect: isSecureSupportAccount })),
36
38
  canAccessStatusFilter && React.createElement(StatusFilter, { filterValues: get(filterValues, SolrKeys.status, []) }),
37
39
  canAccessCreatorFilter && React.createElement(CreatorSsoNameFilter, null),
40
+ canAccessTypeFilter && React.createElement(TypeFilter, { allCaseTypes: allCaseTypes.data }),
38
41
  canAccessAdditionalFilter && React.createElement(AdditionalFilters, null))));
39
42
  };
@@ -0,0 +1,6 @@
1
+ interface IProps {
2
+ allCaseTypes: string[];
3
+ }
4
+ export declare function TypeFilter(props: IProps): JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=TypeFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/TypeFilter.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACZ,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eA6BvC"}
@@ -0,0 +1,18 @@
1
+ import { MultiSelectDropDownList } from '@rh-support/components';
2
+ import { getDropdownBtnPlaceholder, toOptions } from '@rh-support/utils';
3
+ import React, { useContext } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { SolrKeys } from '../../../enums/filters';
6
+ import { filterNamesMap } from '../../../utils/constants';
7
+ import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
8
+ import { updateFilter } from '../CaseListFilterReducer';
9
+ export function TypeFilter(props) {
10
+ const { t } = useTranslation();
11
+ const dispatch = useContext(CaseListFilterDispatchContext);
12
+ const { filterInfo } = useContext(CaseListFilterStateContext);
13
+ const onFilterChangeMultipleSelect = (selectedTypes) => updateFilter(dispatch, {
14
+ filterKey: SolrKeys.type,
15
+ values: selectedTypes.map((selectedType) => selectedType.label),
16
+ });
17
+ return (React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a type'), filterInfo[SolrKeys.type], ' ', props.allCaseTypes.length, t('All selected')), "data-tracking-id": "type-filter", id: "case-list-type-filter", title: t(filterNamesMap[SolrKeys.type]), label: t(filterNamesMap[SolrKeys.type]), onChange: onFilterChangeMultipleSelect, selectedItems: toOptions(filterInfo[SolrKeys.type]), list: toOptions(props.allCaseTypes) }));
18
+ }
@@ -14,6 +14,7 @@ export declare const fieldNameToSolrFieldMapping: {
14
14
  case_version: string;
15
15
  case_contact_sso_username: string;
16
16
  case_createdby_sso_username: string;
17
+ case_type: string;
17
18
  };
18
19
  export declare const advanceSearchFieldNameToSolrFieldMapping: {
19
20
  case_24_7: string;
@@ -1 +1 @@
1
- {"version":3,"file":"caseSearch.d.ts","sourceRoot":"","sources":["../../../src/enums/caseSearch.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,oBAAY,mBAAmB;IAC3B,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;CAWvC,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;CAiBpD,CAAC"}
1
+ {"version":3,"file":"caseSearch.d.ts","sourceRoot":"","sources":["../../../src/enums/caseSearch.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,oBAAY,mBAAmB;IAC3B,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CAYvC,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;CAiBpD,CAAC"}
@@ -16,5 +16,6 @@ export const fieldNameToSolrFieldMapping = {
16
16
  [SolrKeys.version]: 'productVersion',
17
17
  [SolrKeys.caseContactSSO]: 'ownedByMe',
18
18
  [SolrKeys.createdBySsoUsername]: 'createdBySsoUsername',
19
+ [SolrKeys.type]: 'type',
19
20
  };
20
21
  export const advanceSearchFieldNameToSolrFieldMapping = Object.assign(Object.assign({}, fieldNameToSolrFieldMapping), { [SolrKeys.fts]: 'FTS', [SolrKeys.cep]: 'CEP', [SolrKeys.accountNumber]: 'accountNumber', [SolrKeys.type]: 'caseType', [SolrKeys.caseNumber]: 'caseNumber', [SolrKeys.caseOwner]: 'ownerSSO', [SolrKeys.modifiedBy]: 'lastModifiedByName', [SolrKeys.createdBySsoUsername]: 'createdBySSO', [SolrKeys.createdBy]: 'createdByName', [SolrKeys.contactName]: 'contactName', [SolrKeys.caseContactSSO]: 'contactSSO', [SolrKeys.modifiedDate]: 'lastModifiedDate', [SolrKeys.createdDate]: 'createdDate', [SolrKeys.description]: 'description', [SolrKeys.caseSummary]: 'summary' });
@@ -3,7 +3,8 @@ export declare enum SolrTags {
3
3
  c_status = "c_status",
4
4
  c_account = "c_account",
5
5
  c_group = "c_group",
6
- c_severity = "c_severity"
6
+ c_severity = "c_severity",
7
+ c_type = "c_type"
7
8
  }
8
9
  export declare enum SolrKeys {
9
10
  caseNumber = "case_number",
@@ -1 +1 @@
1
- {"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/enums/filters.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC5B;AAED,oBAAY,QAAQ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;IACpD,WAAW,gBAAgB;IAC3B,UAAU,qBAAqB;IAC/B,YAAY,qBAAqB;IACjC,oBAAoB,qBAAqB;IACzC,sBAAsB,qBAAqB;IAC3C,WAAW,gBAAgB;IAC3B,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;CAElC,CAAC"}
@@ -5,6 +5,7 @@ export var SolrTags;
5
5
  SolrTags["c_account"] = "c_account";
6
6
  SolrTags["c_group"] = "c_group";
7
7
  SolrTags["c_severity"] = "c_severity";
8
+ SolrTags["c_type"] = "c_type";
8
9
  })(SolrTags || (SolrTags = {}));
9
10
  export var SolrKeys;
10
11
  (function (SolrKeys) {
@@ -1 +1 @@
1
- {"version":3,"file":"caseSearchUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseSearchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EACH,oBAAoB,EACpB,WAAW,EAId,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAEH,mBAAmB,EAEtB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,6BAA6B,UAAU,CAAC;AACrD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,iBAAS,8BAA8B,CAAC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,eAAe,CAAC,CAgE1B;AAED,iBAAS,6BAA6B,CAAC,QAAQ,GAAE,qBAAqB,EAAO,GAAG,qBAAqB,EAAE,CAEtG;AAcD,iBAAS,6BAA6B,CAAC,WAAW,EAAE,oBAAoB,UAUvE;AAED,iBAAS,6BAA6B,CAClC,QAAQ,EAAE,MAAM,EAChB,mBAAmB,EAAE,oBAAoB,EACzC,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,GAAE,mBAA+C,wBA4C9D;AAED,iBAAS,kCAAkC,CACvC,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,oBAAoB,EACzC,kBAAkB,EAAE,oBAAoB,wBAmC3C;AAgGD,OAAO,EACH,8BAA8B,EAC9B,sCAAsC,EACtC,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,wCAAwC,EACxC,kCAAkC,GACrC,CAAC"}
@@ -66,6 +66,7 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
66
66
  .facetField(SolrKeys.product, [SolrTags.c_product])
67
67
  .facetField(SolrKeys.severity, [SolrTags.c_severity])
68
68
  .facetField(SolrKeys.status, [SolrTags.c_status])
69
+ .facetField(SolrKeys.type, [SolrTags.c_type])
69
70
  .pivotField(SolrPivotKeys.product_version, [SolrTags.c_product])
70
71
  .preBuiltfq(SolrKeys.product, productVersionQuery, [SolrTags.c_product])
71
72
  .fq(SolrKeys.status, filterInfo[SolrKeys.status], [SolrTags.c_status])
@@ -73,6 +74,7 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
73
74
  .fq(SolrKeys.group, filteredGroups)
74
75
  .fq(SolrKeys.accountNumber, filteredAccounts)
75
76
  .fq(SolrKeys.escalation, escalationValue)
77
+ .fq(SolrKeys.type, filterInfo[SolrKeys.type], [SolrTags.c_type])
76
78
  .beginOr()
77
79
  .fq(SolrKeys.createdBySsoUsername, filterInfo[SolrKeys.createdBySsoUsername])
78
80
  .fq(SolrKeys.caseContactSSO, filterInfo[SolrKeys.caseContactSSO])
@@ -15,6 +15,7 @@ export declare const filterNamesMap: {
15
15
  case_number: string;
16
16
  case_createdby_sso_username: string;
17
17
  case_contact_sso_username: string;
18
+ case_type: string;
18
19
  usernameFilterTitle: string;
19
20
  };
20
21
  export declare const UpdatedCaseDataEvent = "PCM-Next > case-list-data-background-refresh";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;CAkB1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CAmB1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
@@ -17,6 +17,7 @@ export const filterNamesMap = {
17
17
  [SolrKeys.caseNumber]: 'Case number',
18
18
  [SolrKeys.createdBySsoUsername]: 'Created by me',
19
19
  [SolrKeys.caseContactSSO]: 'Owned by me',
20
+ [SolrKeys.type]: 'Type',
20
21
  usernameFilterTitle: 'Username',
21
22
  };
22
23
  export const UpdatedCaseDataEvent = 'PCM-Next > case-list-data-background-refresh';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -53,10 +53,10 @@
53
53
  "@patternfly/react-core": "4.128.2",
54
54
  "@patternfly/react-table": "4.26.7",
55
55
  "@rh-support/api": "0.3.9",
56
- "@rh-support/components": "1.1.19",
57
- "@rh-support/react-context": "0.2.21",
56
+ "@rh-support/components": "1.1.20",
57
+ "@rh-support/react-context": "0.2.22",
58
58
  "@rh-support/types": "0.2.0",
59
- "@rh-support/user-permissions": "0.2.14",
59
+ "@rh-support/user-permissions": "0.2.15",
60
60
  "@rh-support/utils": "0.2.13",
61
61
  "i18next": "^19.0.1",
62
62
  "localforage": "^1.7.3",
@@ -101,5 +101,5 @@
101
101
  "not ie <= 11",
102
102
  "not op_mini all"
103
103
  ],
104
- "gitHead": "cc2251e88d4484f4eb68bcd095bf719d140f89e9"
104
+ "gitHead": "643158040e5b85d50275aa7f4318180c1defc696"
105
105
  }