|
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 433-438
export function useBaseResource(resourceConfig) {
Link Here
|
| 433 |
type: "additional_fields", |
434 |
type: "additional_fields", |
| 434 |
extended_attributes_resource_type: |
435 |
extended_attributes_resource_type: |
| 435 |
resourceConfig.extendedAttributesResourceType, |
436 |
resourceConfig.extendedAttributesResourceType, |
|
|
437 |
...(resourceConfig.extendedAttributesFieldGroup && { |
| 438 |
group: resourceConfig.extendedAttributesFieldGroup, |
| 439 |
}), |
| 436 |
}); |
440 |
}); |
| 437 |
} |
441 |
} |
| 438 |
const groupings = attributesToConsider.reduce((acc, attr) => { |
442 |
const groupings = attributesToConsider.reduce((acc, attr) => { |
| 439 |
- |
|
|