Skip to content

Commit

Permalink
Merge branch 'master' into UIDATIMP-1666
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 authored Oct 10, 2024
2 parents a2a87f3 + fead5b5 commit 3eb0b9b
Show file tree
Hide file tree
Showing 32 changed files with 9 additions and 162 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Change endpoint to get actual SRS MARC data (UIDATIMP-1597)
* Implement new Donor information section for Order field mapping profiles (UIDATIMP-1656)
* Adjust value for invoice and invoice lines adjustments "Type" field mapping. (UIDATIMP-1662)
* Remove accepted values when Mapping profile is created/updated (Instance, Holding, Item and Order). (UIDATIMP-1663)

### Bugs fixed:
* Remove `selected` column from associated profiles list. (UIDATIMP-1607)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ describe('ExistingSectionFolio edit component', () => {
it('should render data options', () => {
const { getByText } = renderExistingSectionFolio(existingSectionFolioWithCorrectData);

fireEvent.click(getByText('Select control'));

expect(getByText('test label1')).toBeDefined();
expect(getByText('test label2')).toBeDefined();
});
Expand All @@ -99,6 +101,7 @@ describe('ExistingSectionFolio edit component', () => {

const { getByText } = renderExistingSectionFolio(existingSectionFolioWithCorrectData);

fireEvent.click(getByText('Select control'));
const optionsElement = getByText('test label1');
fireEvent.click(optionsElement);

Expand All @@ -113,6 +116,7 @@ describe('ExistingSectionFolio edit component', () => {
}];
const { getByText } = renderExistingSectionFolio(existingSectionFolioWithWrongData);

fireEvent.click(getByText('Select control'));
const optionsElement = getByText('test label2');
fireEvent.click(optionsElement);

Expand All @@ -125,12 +129,14 @@ describe('ExistingSectionFolio edit component', () => {
const {
container,
getByPlaceholderText,
getByText,
} = renderExistingSectionFolio(existingSectionFolioWithCorrectData);
const filterElement = getByPlaceholderText('Filter options list');

expect(filterElement).toHaveValue('');

fireEvent.change(filterElement, { target: { value: 'test label1' } });
fireEvent.click(getByText('Select control'));

const dropdownOptionsAmount = container.querySelector('.selectionList').children.length;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import {
getSubfieldName,
getBoolFieldName,
getRepeatableFieldName,
getAcceptedValuesPath,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -135,8 +133,6 @@ export const AdministrativeData = ({
wrapperSourcePath: 'holdingsTypes',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(3)}
okapi={okapi}
/>
</Col>
Expand Down Expand Up @@ -184,8 +180,6 @@ export const AdministrativeData = ({
wrapperSourcePath: 'statisticalCodeTypes',
}]}
optionTemplate="**statisticalCodeTypeName**: **code** - **name**"
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(4, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
onRemove,
getSubfieldName,
getRepeatableFieldName,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -82,8 +81,6 @@ export const ElectronicAccess = ({
wrapperSourceLink: getWrapperSourceLink('ELECTRONIC_ACCESS', requestLimit),
wrapperSourcePath: 'electronicAccessRelationships',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(23, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
getFieldName,
getSubfieldName,
getRepeatableFieldName,
getAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -283,8 +282,6 @@ export const HoldingsDetails = ({
wrapperSourcePath: 'illPolicies',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(19)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
getSubfieldName,
getBoolSubfieldName,
getRepeatableFieldName,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -84,8 +83,6 @@ export const HoldingsNotes = ({
wrapperSourceLink: getWrapperSourceLink('HOLDINGS_NOTE_TYPES', requestLimit),
wrapperSourcePath: 'holdingsNoteTypes',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(22, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ import {
} from '../../../../../components';

import {
getAcceptedValuesPath,
getFieldName,
renderFieldLabelWithInfo,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';

export const Location = ({
setReferenceTables,
okapi,
requestLimit,
}) => {
Expand Down Expand Up @@ -57,8 +55,6 @@ export const Location = ({
wrapperSourceLink: getWrapperSourceLink('LOCATIONS', requestLimit),
wrapperSourcePath: 'locations',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(6)}
optionTemplate="**name** (**code**)"
okapi={okapi}
/>
Expand All @@ -79,8 +75,6 @@ export const Location = ({
wrapperSourcePath: 'locations',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(7)}
optionTemplate="**name** (**code**)"
okapi={okapi}
/>
Expand Down Expand Up @@ -148,8 +142,6 @@ export const Location = ({
wrapperSourcePath: 'callNumberTypes',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(11)}
okapi={okapi}
/>
</Col>
Expand Down Expand Up @@ -205,7 +197,6 @@ export const Location = ({
};

Location.propTypes = {
setReferenceTables: PropTypes.func.isRequired,
okapi: okapiShape.isRequired,
requestLimit: PropTypes.number,
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import {
getSubfieldName,
getBoolFieldName,
getRepeatableFieldName,
getAcceptedValuesPath,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';

Expand Down Expand Up @@ -144,8 +142,6 @@ export const AdministrativeData = ({
wrapperSourceLink: getWrapperSourceLink('INSTANCE_STATUSES', requestLimit),
wrapperSourcePath: 'instanceStatuses',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(6)}
okapi={okapi}
/>
</Col>
Expand Down Expand Up @@ -207,8 +203,6 @@ export const AdministrativeData = ({
wrapperSourcePath: 'statisticalCodeTypes',
}]}
optionTemplate="**statisticalCodeTypeName**: **code** - **name**"
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(8, 0, index)}
/>
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
getSubfieldName,
getFieldName,
getRepeatableFieldName,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -210,8 +209,6 @@ export const DescriptiveData = ({
wrapperSourceLink: getWrapperSourceLink('NATURE_OF_CONTENT_TERMS', requestLimit),
wrapperSourcePath: 'natureOfContentTerms',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(22, 0, index)}
/>
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
onRemove,
getSubfieldName,
getRepeatableFieldName,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -98,8 +97,6 @@ export const InstanceRelationship = ({
wrapperSourceLink: getWrapperSourceLink('INSTANCE_RELATIONSHIP_TYPES', requestLimit),
wrapperSourcePath: 'instanceRelationshipTypes',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(31, 1, index)}
/>
</Col>
</Row>
Expand Down Expand Up @@ -160,8 +157,6 @@ export const InstanceRelationship = ({
wrapperSourceLink: getWrapperSourceLink('INSTANCE_RELATIONSHIP_TYPES', requestLimit),
wrapperSourcePath: 'instanceRelationshipTypes',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(32, 1, index)}
/>
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
getSubfieldName,
getBoolFieldName,
getRepeatableFieldName,
getRepeatableAcceptedValuesPath,
} from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
Expand Down Expand Up @@ -206,8 +205,6 @@ export const AdministrativeData = ({
wrapperSourcePath: 'statisticalCodeTypes',
}]}
optionTemplate="**statisticalCodeTypeName**: **code** - **name**"
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(6, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ import {
WithValidation,
} from '../../../../../components';

import {
getAcceptedValuesPath,
getFieldName,
} from '../../utils';
import { getFieldName } from '../../utils';
import { TRANSLATION_ID_PREFIX } from '../../constants';
import {
getWrapperSourceLink,
Expand All @@ -28,7 +25,6 @@ import {
} from '../../../../../utils';

export const Condition = ({
setReferenceTables,
okapi,
requestLimit,
}) => {
Expand Down Expand Up @@ -99,8 +95,6 @@ export const Condition = ({
wrapperSourcePath: 'itemDamageStatuses',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(23)}
okapi={okapi}
/>
</Col>
Expand All @@ -123,7 +117,6 @@ export const Condition = ({
};

Condition.propTypes = {
setReferenceTables: PropTypes.func.isRequired,
okapi: okapiShape.isRequired,
requestLimit: PropTypes.number,
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
} from '../../../../../components';

import {
getRepeatableAcceptedValuesPath,
getRepeatableFieldName,
getSubfieldName,
onAdd,
Expand Down Expand Up @@ -82,8 +81,6 @@ export const ElectronicAccess = ({
wrapperSourceLink: getWrapperSourceLink('ELECTRONIC_ACCESS', requestLimit),
wrapperSourcePath: 'electronicAccessRelationships',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(32, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from '../../../../../components';

import {
getAcceptedValuesPath,
getFieldName,
renderFieldLabelWithInfo,
} from '../../utils';
Expand All @@ -27,7 +26,6 @@ import {
} from '../../../../../utils';

export const ItemData = ({
setReferenceTables,
okapi,
requestLimit,
}) => {
Expand Down Expand Up @@ -57,8 +55,6 @@ export const ItemData = ({
wrapperSourceLink: getWrapperSourceLink('MATERIAL_TYPES', requestLimit),
wrapperSourcePath: 'mtypes',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(8)}
okapi={okapi}
/>
</Col>
Expand Down Expand Up @@ -97,8 +93,6 @@ export const ItemData = ({
wrapperSourcePath: 'callNumberTypes',
}]}
isRemoveValueAllowed
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getAcceptedValuesPath(10)}
okapi={okapi}
/>
</Col>
Expand Down Expand Up @@ -185,7 +179,6 @@ export const ItemData = ({
};

ItemData.propTypes = {
setReferenceTables: PropTypes.func.isRequired,
okapi: okapiShape.isRequired,
requestLimit: PropTypes.number,
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {

import {
getBoolSubfieldName,
getRepeatableAcceptedValuesPath,
getRepeatableFieldName,
getSubfieldName,
onAdd,
Expand Down Expand Up @@ -84,8 +83,6 @@ export const ItemNotes = ({
wrapperSourceLink: getWrapperSourceLink('ITEM_NOTE_TYPES', requestLimit),
wrapperSourcePath: 'itemNoteTypes',
}]}
setAcceptedValues={setReferenceTables}
acceptedValuesPath={getRepeatableAcceptedValuesPath(25, 0, index)}
okapi={okapi}
/>
</Col>
Expand Down
Loading

0 comments on commit 3eb0b9b

Please sign in to comment.