Skip to content

Commit b62efcf

Browse files
authored
chore: remove deprecated/removed object references (DHIS2-19062) (#3325)
Remove deprecated userCredentials, userAccesses, userGroupAccesses, publicAccess, externalAccess references.
1 parent b2a3b37 commit b62efcf

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

src/modules/fields/baseFields.js

-4
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export const fieldsByType = {
9393
getFieldObject('displayShortName'),
9494
getFieldObject('displaySubtitle'),
9595
getFieldObject('displayTitle'),
96-
getFieldObject('externalAccess', { excluded: true }),
9796
getFieldObject('favorite'),
9897
getFieldObject('favorites'),
9998
getFieldObject('filterDimensions', { excluded: true }),
@@ -115,7 +114,6 @@ export const fieldsByType = {
115114
getFieldObject('parentGraphMap'),
116115
getFieldObject('periods', { excluded: true }),
117116
getFieldObject('programIndicatorDimensions', { excluded: true }),
118-
getFieldObject('publicAccess'),
119117
getFieldObject('relativePeriods', { excluded: true }),
120118
getFieldObject('rows'),
121119
getFieldObject('shortName'),
@@ -129,8 +127,6 @@ export const fieldsByType = {
129127
getFieldObject('topLimit', { option: true }),
130128
getFieldObject('translations'),
131129
getFieldObject('user'),
132-
getFieldObject('userAccesses'),
133-
getFieldObject('userGroupAccesses'),
134130
getFieldObject('userOrganisationUnit', { excluded: true }),
135131
getFieldObject('userOrganisationUnitChildren', { excluded: true }),
136132
getFieldObject('userOrganisationUnitGrandChildren', { excluded: true }),

src/modules/fields/index.js

-15
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ import {
66
} from './baseFields.js'
77
import { extendFields } from './nestedFields.js'
88

9-
export { getAllFieldObjectsByType }
10-
11-
export const getOptionsByType = (type) =>
12-
getAllFieldObjectsByType(type).filter(
13-
(fieldObj) => fieldObj.option === true
14-
)
15-
16-
export const getIncludedByType = (type) =>
17-
getAllFieldObjectsByType(type).filter((fieldObj) => !fieldObj.excluded)
18-
19-
export const getExcludedByType = (type) =>
20-
getAllFieldObjectsByType(type).filter(
21-
(fieldObj) => fieldObj.excluded === true
22-
)
23-
249
export const getFieldsStringByType = (type) =>
2510
getAllFieldObjectsByType(type)
2611
.map(markExcluded)

src/modules/fields/nestedFields.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const NAME = 'name,displayName,displayShortName'
77

88
const DIMENSION_ITEM = `dimensionItem~rename(${ID})`
99
const LEGEND_SET = `${ID},${NAME}`
10-
const USER = `${NAME},userCredentials[username]`
1110

1211
const ITEMS = `${DIMENSION_ITEM},${NAME},dimensionItemType,expression,access`
1312

@@ -21,11 +20,10 @@ const DIMENSION_PROPS = dimensionMetadataProps
2120
const DIMENSION_ITEMS = `dataDimensionItemType,${DIMENSION_PROPS}`
2221

2322
// nested fields map
24-
export const nestedFields = {
23+
const nestedFields = {
2524
columns: AXIS,
2625
rows: AXIS,
2726
filters: AXIS,
28-
user: USER,
2927
interpretations: INTERPRETATIONS,
3028
legend: LEGEND,
3129
dataDimensionItems: DIMENSION_ITEMS,

0 commit comments

Comments
 (0)