Skip to content

Commit

Permalink
Update constants
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Nov 14, 2023
1 parent dd6b996 commit 70d13b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const getDefaultActions = (option, options, formatMessage) => {
],
};

case OPTIONS.URL_RELATIONSHIP:
case OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP:
return {
type: '',
actions: [
Expand All @@ -307,7 +307,7 @@ export const getDefaultActions = (option, options, formatMessage) => {
],
};

case OPTIONS.URI:
case OPTIONS.ELECTRONIC_ACCESS_URI:
return {
type: '',
actions: [
Expand Down Expand Up @@ -388,7 +388,7 @@ export const getExtraActions = (option, action, formattedMessage) => {
switch (`${option}-${action}`) {
case `${OPTIONS.ITEM_NOTE}-${ACTIONS.FIND}`:
case `${OPTIONS.ADMINISTRATIVE_NOTE}-${ACTIONS.FIND}`:
case `${OPTIONS.URI}-${ACTIONS.FIND}`:
case `${OPTIONS.ELECTRONIC_ACCESS_URI}-${ACTIONS.FIND}`:
case `${OPTIONS.CHECK_IN_NOTE}-${ACTIONS.FIND}`:
case `${OPTIONS.CHECK_OUT_NOTE}-${ACTIONS.FIND}`:
case `${OPTIONS.HOLDINGS_NOTE}-${ACTIONS.FIND}`:
Expand All @@ -399,7 +399,7 @@ export const getExtraActions = (option, action, formattedMessage) => {
[FIELD_VALUE_KEY]: '',
}];

case `${OPTIONS.URL_RELATIONSHIP}-${ACTIONS.FIND}`:
case `${OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP}-${ACTIONS.FIND}`:
return [{
actionsList: commonAdditionalActions(formattedMessage),
controlType: () => CONTROL_TYPES.ELECTRONIC_ACCESS_RELATIONSHIP_SELECT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,8 @@ describe('ContentUpdatesForm helpers', () => {
);
});

it('returns the correct object for the URL_RELATIONSHIP option', () => {
expect(JSON.stringify(getDefaultActions(OPTIONS.URL_RELATIONSHIP, [], formatMessage)))
it('returns the correct object for the ELECTRONIC_ACCESS_URL_RELATIONSHIP option', () => {
expect(JSON.stringify(getDefaultActions(OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP, [], formatMessage)))
.toEqual(
JSON.stringify({
type: '',
Expand Down Expand Up @@ -654,8 +654,8 @@ describe('ContentUpdatesForm helpers', () => {
);
});

it('returns the correct object for the URI option', () => {
expect(JSON.stringify(getDefaultActions(OPTIONS.URI, [], formatMessage)))
it('returns the correct object for the ELECTRONIC_ACCESS_URI option', () => {
expect(JSON.stringify(getDefaultActions(OPTIONS.ELECTRONIC_ACCESS_URI, [], formatMessage)))
.toEqual(
JSON.stringify({
type: '',
Expand Down Expand Up @@ -746,7 +746,7 @@ describe('ContentUpdatesForm helpers', () => {
it('should return a certain structure for specific OPTIONS and ACTIONS - URL Relationship', () => {
const optionActionCombinations = [
{
option: OPTIONS.URL_RELATIONSHIP,
option: OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP,
action: ACTIONS.FIND
},
];
Expand Down
8 changes: 4 additions & 4 deletions src/constants/selectOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const OPTIONS = {
ADMINISTRATIVE_NOTE: 'ADMINISTRATIVE_NOTE',
CHECK_IN_NOTE: 'CHECK_IN_NOTE',
CHECK_OUT_NOTE: 'CHECK_OUT_NOTE',
URI: 'URI',
URL_RELATIONSHIP: 'URL_RELATIONSHIP',
ELECTRONIC_ACCESS_URI: 'ELECTRONIC_ACCESS_URI',
ELECTRONIC_ACCESS_URL_RELATIONSHIP: 'ELECTRONIC_ACCESS_URL_RELATIONSHIP',
};

export const PARAMETERS_KEYS = {
Expand Down Expand Up @@ -206,13 +206,13 @@ export const getHoldingsOptions = (formatMessage, holdingsNotes = []) => [
},
...holdingsNotes,
{
value: OPTIONS.URI,
value: OPTIONS.ELECTRONIC_ACCESS_URI,
label: formatMessage({ id: 'ui-bulk-edit.layer.options.holdings.uri' }),
disabled: false,
categoryName: formatMessage({ id: 'ui-bulk-edit.category.electronicAccess' }),
},
{
value: OPTIONS.URL_RELATIONSHIP,
value: OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP,
label: formatMessage({ id: 'ui-bulk-edit.layer.options.holdings.urlRelationship' }),
disabled: false,
categoryName: formatMessage({ id: 'ui-bulk-edit.category.electronicAccess' }),
Expand Down

0 comments on commit 70d13b0

Please sign in to comment.