Skip to content

Commit

Permalink
Merge branch 'master' into UICIRC-1125
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko authored Dec 16, 2024
2 parents 3dd2e04 + 6d5c6ff commit 624e4e6
Show file tree
Hide file tree
Showing 39 changed files with 177 additions and 108 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 10.1.0 IN PROGRESS

* React v19: refactor away from default props for functional components. Refs UICIRC-1080.
* Remove feature toggle. Refs UICIRC-1125.

## [10.0.1](https://github.com/folio-org/ui-circulation/tree/v10.0.1) (2024-12-04)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import { timeUnits, noticeMethods } from '../../../../../constants';
const ReminderFeesFields = props => {
const { formatMessage } = useIntl();
const {
canAdd,
canEdit,
canDelete,
noticeTemplates,
blockTemplates,
canAdd = true,
canEdit = true,
canDelete = true,
noticeTemplates = [],
blockTemplates = [],
} = props;
const sequenceLabel = formatMessage({ id: 'ui-circulation.settings.finePolicy.reminderFees.sequence' });
const intervalLabel = formatMessage({ id: 'ui-circulation.settings.finePolicy.reminderFees.interval' });
Expand Down Expand Up @@ -194,12 +194,4 @@ ReminderFeesFields.propTypes = {
blockTemplates: PropTypes.arrayOf(PropTypes.object),
};

ReminderFeesFields.defaultProps = {
canAdd: true,
canEdit: true,
canDelete: true,
noticeTemplates: [],
blockTemplates: [],
};

export default ReminderFeesFields;
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const GeneralSection = (props) => {
connect,
metadata,
policyName,
isPolicyActive,
policyDescription,
isPolicyActive = false,
policyDescription = '',
} = props;

const active = isPolicyActive
Expand Down Expand Up @@ -81,9 +81,4 @@ GeneralSection.propTypes = {
connect: PropTypes.func.isRequired,
};

GeneralSection.defaultProps = {
policyDescription: '',
isPolicyActive: false,
};

export default GeneralSection;
11 changes: 4 additions & 7 deletions src/settings/PatronNotices/PatronNoticeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ import css from './PatronNoticeForm.css';
const PatronNoticeForm = (props) => {
const {
handleSubmit,
initialValues,
initialValues = {},
initialValues: {
id: initialId,
},
} = {},
location: {
search,
},
Expand Down Expand Up @@ -88,8 +88,8 @@ const PatronNoticeForm = (props) => {
initialValues: notice,
} = props;

return notice.id
? notice.name
return notice?.id
? notice?.name
: formatMessage({ id: 'ui-circulation.settings.patronNotices.newLabel' });
};

Expand Down Expand Up @@ -190,9 +190,6 @@ PatronNoticeForm.propTypes = {
stripes: stripesShape.isRequired,
};

PatronNoticeForm.defaultProps = {
initialValues: {},
};
export default stripesFinalForm({
navigationCheck: true,
validate: validatePatronNoticeTemplate,
Expand Down
6 changes: 1 addition & 5 deletions src/settings/StaffSlips/StaffSlipForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const StaffSlipForm = (props) => {
const {
stripes,
handleSubmit,
initialValues,
initialValues = {},
pristine,
submitting,
onCancel,
Expand Down Expand Up @@ -118,10 +118,6 @@ StaffSlipForm.propTypes = {
intl: PropTypes.object.isRequired,
};

StaffSlipForm.defaultProps = {
initialValues: {},
};

export default stripesFinalForm({
navigationCheck: true,
})(injectIntl(StaffSlipForm));
6 changes: 1 addition & 5 deletions src/settings/components/CancelButton/CancelButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

const CancelButton = ({
onCancel,
labelKey,
labelKey = 'ui-circulation.settings.common.closeEntryDialog',
}) => (
<PaneMenu data-test-cancel-pane-menu>
<FormattedMessage id={labelKey}>
Expand All @@ -32,8 +32,4 @@ CancelButton.propTypes = {
labelKey: PropTypes.string,
};

CancelButton.defaultProps = {
labelKey: 'ui-circulation.settings.common.closeEntryDialog',
};

export default CancelButton;
6 changes: 1 addition & 5 deletions src/settings/components/FooterPane/FooterPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import css from './FooterPane.css';
const FooterPane = (props) => {
const {
isSaveButtonDisabled,
isSaveButtonAvailable,
isSaveButtonAvailable = true,
onCancel,
} = props;

Expand Down Expand Up @@ -49,8 +49,4 @@ FooterPane.propTypes = {
onCancel: PropTypes.func.isRequired,
};

FooterPane.defaultProps = {
isSaveButtonAvailable: true,
};

export default FooterPane;
5 changes: 4 additions & 1 deletion translations/ui-circulation/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/ber.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/cs_CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Nastavení (Cirkulace): Může zobrazit pravidla oznámení",
"permission.settings.view-notice-templates": "Nastavení (Cirkulace): Může zobrazit šablony oznámení pro čtenáře",
"permission.settings.view-request-policies": "Nastavení (Cirkulace): Může zobrazit pravidla žádanek",
"permission.settings.view-cancellation-reasons": "Nastavení (Cirkulace): Může zobrazit důvody zrušení"
"permission.settings.view-cancellation-reasons": "Nastavení (Cirkulace): Může zobrazit důvody zrušení",
"settings.index.titleLevelRequests": "Žádanky na úrovni názvu",
"settings.title.titleLevelRequests": "Žádanky na úrovni názvu",
"settings.titleLevelRequests.paneTitle": "Žádanky na úrovni názvu"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
13 changes: 8 additions & 5 deletions translations/ui-circulation/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,22 +543,25 @@
"settings.ViewPrintDetails.warningPopup.message.cancel": "Abbrechen",
"settings.staffSlips.borrowerTokenHeader": "Entleiher/-in",
"settings.staffSlips.loanTokenHeader": "Ausleihe",
"settings.index.titleLevelRequestsTlr": "Title level requests (TLR)",
"settings.index.titleLevelRequestsTlr": "Bestandsanfragen auf Titelebene",
"settings.index.tlrPatronNotices": "TLR patron notice templates",
"settings.index.consortiumTLR": "Consortium title level requests (TLR)",
"settings.title.titleLevelRequestsTlr": "Title level requests (TLR)",
"settings.title.titleLevelRequestsTlr": "Bestandsanfragen auf Titelebene",
"settings.title.tlrPatronNotices": "TLR Patron notice templates",
"settings.title.consortiumTLR": "Consortium title level requests (TLR)",
"settings.titleLevelRequestsTlr.paneTitle": "Title level requests (TLR)",
"settings.titleLevelRequestsTlr.paneTitle": "Bestandsanfragen auf Titelebene",
"settings.tlrPatronNotices.paneTitle": "TLR Patron notice templates",
"settings.consortiumTlr.allow": "Enable consortium title level requests (TLR)",
"settings.consortiumTlr.notification": "Consortium title level requests (TLR) is disabled. The setting will become active after the \"Allow title level requests\" checkbox is <strong>checked and saved</strong> in the title level requests (TLR) setting \"(Settings > Circulation > General > Title level requests (TLR))\".",
"permission.settings.view-titleLevelRequests": "Settings (Circulation): Title level request view",
"permission.settings.view-circulation-settings": "Settings (Circulation): Can view all circulation settings",
"permission.settings.view-circulation-settings": "Einstellungen (Ausleihe): Kann alle Ausleih-Einstellungen anzeigen",
"permission.settings.view-other-settings": "Settings (Circulation): Can view other settings",
"permission.settings.view-fixed-due-date-schedules": "Settings (Circulation): Can view fixed due date schedules",
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Einstellungen (Ausleihe): Kann Stornierungsgründe anzeigen",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/en_SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/es_419.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Réservations au niveau du titre",
"settings.title.titleLevelRequests": "Réservations au niveau du titre",
"settings.titleLevelRequests.paneTitle": "Réservations au niveau du titre"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/hi_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
5 changes: 4 additions & 1 deletion translations/ui-circulation/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,8 @@
"permission.settings.view-notice-policies": "Settings (Circulation): Can view notice policies",
"permission.settings.view-notice-templates": "Settings (Circulation): Can view patron notice templates",
"permission.settings.view-request-policies": "Settings (Circulation): Can view request policies",
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons"
"permission.settings.view-cancellation-reasons": "Settings (Circulation): Can view cancellation reasons",
"settings.index.titleLevelRequests": "Title level requests",
"settings.title.titleLevelRequests": "Title level requests",
"settings.titleLevelRequests.paneTitle": "Title level requests"
}
Loading

0 comments on commit 624e4e6

Please sign in to comment.