Lines 38-43
import {
Link Here
|
38 |
* @param {Function} resourceConfig.afterResourceFetch - A function to call after the resource is fetched. This can be used to edit resource data or fetch additional data |
38 |
* @param {Function} resourceConfig.afterResourceFetch - A function to call after the resource is fetched. This can be used to edit resource data or fetch additional data |
39 |
* @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreeements into EBSCO package agreements |
39 |
* @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreeements into EBSCO package agreements |
40 |
* @param {String} resourceConfig.extendedAttributesResourceType - The resource type for extended attributes, if applicable. |
40 |
* @param {String} resourceConfig.extendedAttributesResourceType - The resource type for extended attributes, if applicable. |
|
|
41 |
* @param {String} resourceConfig.extendedAttributesFieldGroup - The field group that you would like the additional fields to be displayed in. |
41 |
* @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar. |
42 |
* @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar. |
42 |
* @param {Function} resourceConfig.additionalToolbarButtons - A function to add additional buttons to the toolbar. |
43 |
* @param {Function} resourceConfig.additionalToolbarButtons - A function to add additional buttons to the toolbar. |
43 |
* @param {String} resourceConfig.formGroupsDisplayMode - The display mode for the form groups if not the default. Can be one of the following: "accordion", "tabs". |
44 |
* @param {String} resourceConfig.formGroupsDisplayMode - The display mode for the form groups if not the default. Can be one of the following: "accordion", "tabs". |
Lines 434-439
export function useBaseResource(resourceConfig) {
Link Here
|
434 |
type: "additional_fields", |
435 |
type: "additional_fields", |
435 |
extended_attributes_resource_type: |
436 |
extended_attributes_resource_type: |
436 |
resourceConfig.extendedAttributesResourceType, |
437 |
resourceConfig.extendedAttributesResourceType, |
|
|
438 |
...(resourceConfig.extendedAttributesFieldGroup && { |
439 |
group: resourceConfig.extendedAttributesFieldGroup, |
440 |
}), |
437 |
}); |
441 |
}); |
438 |
} |
442 |
} |
439 |
const groupings = attributesToConsider.reduce((acc, attr) => { |
443 |
const groupings = attributesToConsider.reduce((acc, attr) => { |
440 |
- |
|
|