diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0dbcd60fd..4ed73f411 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* Add missed permission to fetch org types in view only mode. Refs UIOR-1168.
* Preview contains blank page when trying to print an order. Refs UIOR-1173.
* Do not disable account numbers having only one account available. Refs UIOR-1174.
+* Add donor info to POL. Refs UIOR-1147.
## [5.0.0](https://github.com/folio-org/ui-orders/tree/v5.0.0) (2023-10-12)
[Full Changelog](https://github.com/folio-org/ui-orders/compare/v4.0.3...v5.0.0)
diff --git a/src/components/POLine/POLineForm.js b/src/components/POLine/POLineForm.js
index f52ed638c..82fca258c 100644
--- a/src/components/POLine/POLineForm.js
+++ b/src/components/POLine/POLineForm.js
@@ -30,6 +30,7 @@ import {
import { ViewMetaData } from '@folio/stripes/smart-components';
import stripesForm from '@folio/stripes/final-form';
import {
+ DonorsList,
FundDistributionFieldsFinal,
handleKeyCommand,
} from '@folio/stripes-acq-components';
@@ -128,6 +129,7 @@ function POLineForm({
const initialInventoryData = isCreateFromInstance
? createPOLDataFromInstance(instance, identifierTypes)
: initialTemplateInventoryData;
+ const donorOrganizationIds = get(initialValues, 'donorOrganizationIds', []);
useEffect(() => {
setTimeout(() => {
@@ -438,6 +440,15 @@ function POLineForm({
integrationConfigs={integrationConfigs}
/>
+ }
+ >
+
+
{isOngoing(order.orderType) && (
}
diff --git a/src/components/POLine/const.js b/src/components/POLine/const.js
index e62ab7d47..deb49fdf1 100644
--- a/src/components/POLine/const.js
+++ b/src/components/POLine/const.js
@@ -24,6 +24,7 @@ export const ACCORDION_ID = {
vendor: 'vendor',
linkedInstances: 'linkedInstances',
ongoingOrder: 'ongoingOrder',
+ donorsInformation: 'donorsInformation',
};
// Mapping between attribute (field) in form and id of accordion
@@ -59,8 +60,12 @@ export const POL_TEMPLATE_FIELDS_MAP = {
'tags.tagList': 'polTags.tagList',
};
+const INITIALLY_CLOSED_ACCORDION_IDS = {
+ [ACCORDION_ID.donorsInformation]: true,
+};
+
export const INITIAL_SECTIONS = Object.values(ACCORDION_ID).reduce(
- (accum, id) => ({ ...accum, [id]: true }), {},
+ (accum, id) => ({ ...accum, [id]: !INITIALLY_CLOSED_ACCORDION_IDS[id] }), {},
);
export const ACCOUNT_STATUS = {
diff --git a/translations/ui-orders/en.json b/translations/ui-orders/en.json
index d768b6ca8..a421535bd 100644
--- a/translations/ui-orders/en.json
+++ b/translations/ui-orders/en.json
@@ -470,6 +470,7 @@
"paneBlock.openBtn": "Open",
"paneBlock.unopenBtn": "Unopen",
"paneBlock.POLines": "PO lines",
+ "paneBlock.donorInformation": "Donor information",
"paneBlock.POSummary": "PO summary",
"paneBlock.purchaseOrder": "Purchase order",
"paneBlock.receiveBtn": "Receive",