Skip to content

Commit

Permalink
Merge branch 'master' into UICIRC-1009
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko committed Oct 31, 2023
2 parents b0a5341 + dea3cee commit 56277d4
Show file tree
Hide file tree
Showing 16 changed files with 564 additions and 62 deletions.
2 changes: 1 addition & 1 deletion src/settings/FinePolicy/FinePolicyDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class FinePolicyDetail extends React.Component {
</Accordion>
<FinesSection
policy={finePolicy}
getCheckboxValue={this.getCheckboxValue}m
getCheckboxValue={this.getCheckboxValue}
/>
<ReminderFeesSection
policy={finePolicy.reminderFeesPolicy}
Expand Down
1 change: 0 additions & 1 deletion src/settings/FinePolicy/FinePolicyDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import buildStripes from '../../../test/jest/__mock__/stripes.mock';
import {
FinesSection,
OverdueAboutSection,
ReminderFeesSection,
} from './components/ViewSections';
import { Metadata } from '../components';
import FinePolicyDetail from './FinePolicyDetail';
Expand Down
12 changes: 9 additions & 3 deletions src/settings/FixedDueDateSchedule/FixedDueDateScheduleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ class FixedDueDateScheduleDetail extends React.Component {
<ExpandAllButton data-testid="expandAllButton" />
</Col>
</Row>
<AccordionSet data-testid="accordionSet" >
<AccordionSet data-testid="accordionSet">
<Accordion
data-testid="generalFixedDueDateScheduleDetail"
id="generalFixedDueDateScheduleDetail"
label={<FormattedMessage id="ui-circulation.settings.fDDSform.about" />}
>
<section>
{(fixedDueDateSchedule.metadata && fixedDueDateSchedule.metadata.createdDate) &&
<this.cViewMetaData metadata={fixedDueDateSchedule.metadata} />}
{
(fixedDueDateSchedule.metadata && fixedDueDateSchedule.metadata.createdDate) &&
<AccordionSet>
<this.cViewMetaData metadata={fixedDueDateSchedule.metadata} />
</AccordionSet>
}
<Row>
<Col xs={12}>
<KeyValue
Expand All @@ -75,6 +80,7 @@ class FixedDueDateScheduleDetail extends React.Component {
</Accordion>
<Accordion
data-testid="fixedDueDateSchedule"
id="fixedDueDateSchedule"
label={<FormattedMessage id="ui-circulation.settings.fDDSform.schedule" />}
>
<section>
Expand Down
5 changes: 0 additions & 5 deletions src/settings/LoanPolicy/LoanPolicyDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ describe('LoanPolicyDetail', () => {
const testDefaultProps = {
stripes: testStripes,
};
const accordionDefaultStatus = {
generalLoanPolicyDetail: true,
recalls: true,
holds: true,
};

const getById = (id) => within(screen.getByTestId(id));

Expand Down
23 changes: 7 additions & 16 deletions src/settings/LostItemFeePolicy/LostItemFeePolicyDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ class LostItemFeePolicyDetail extends React.Component {
initialValues: {},
};

constructor(props) {
super(props);

this.state = {
sections: {
LostItemFeeGeneralInformation: true,
viewLostItemFeeSection: true,
},
};
}

getPathToValue = (pathToValue) => {
const { initialValues: policy } = this.props;
return get(policy, pathToValue);
Expand Down Expand Up @@ -98,15 +87,17 @@ class LostItemFeePolicyDetail extends React.Component {
<ExpandAllButton />
</Col>
</Row>
<AccordionSet data-testid="accordionSet" >
<AccordionSet data-testid="accordionSet">
<Accordion
id="LostItemFeeGeneralInformation"
label={formatMessage({ id: 'ui-circulation.settings.lostItemFee.generalInformation' })}
>
<Metadata
connect={connect}
metadata={policy.metadata}
/>
<AccordionSet>
<Metadata
connect={connect}
metadata={policy.metadata}
/>
</AccordionSet>
<LostItemFeeAboutSection getValue={this.getPathToValue} />
</Accordion>
<LostItemFeeSection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
render,
screen,
fireEvent,
within,
} from '@folio/jest-config-stripes/testing-library/react';

Expand Down
5 changes: 0 additions & 5 deletions src/settings/NoticePolicy/NoticePolicyDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import {
screen,
} from '@folio/jest-config-stripes/testing-library/react';

import {
ExpandAllButton,
AccordionSet,
} from '@folio/stripes/components';

import NoticePolicyDetail from './NoticePolicyDetail';
import {
GeneralSection,
Expand Down
3 changes: 1 addition & 2 deletions src/settings/RequestPolicy/RequestPolicyDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RequestPolicyDetail extends React.Component {
<ExpandAllButton data-testid="expandAllButton" />
</Col>
</Row>
<AccordionSet data-testid="accordionSet" >
<AccordionSet data-testid="accordionSet">
<Accordion
data-testid="generalInformation"
id="general"
Expand All @@ -54,7 +54,6 @@ class RequestPolicyDetail extends React.Component {
connect={stripes.connect}
metadata={policy.metadata}
/>

<Row>
<Col xs={12} data-request-policy-name>
<KeyValue
Expand Down
20 changes: 14 additions & 6 deletions src/settings/StaffSlips/StaffSlipDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@ class StaffSlipDetail extends React.Component {
</Col>
</Row>
<AccordionSet>
<Accordion label={<FormattedMessage id="ui-circulation.settings.staffSlips.generalInformation" />} >
<Metadata
connect={connect}
metadata={staffSlip.metadata}
/>
<Accordion
id="generalInformation"
label={<FormattedMessage id="ui-circulation.settings.staffSlips.generalInformation" />}
>
<AccordionSet>
<Metadata
connect={connect}
metadata={staffSlip.metadata}
/>
</AccordionSet>
<StaffSlipAboutSection staffSlip={staffSlip} />
</Accordion>
<Accordion label={<FormattedMessage id="ui-circulation.settings.staffSlips.templateContent" />} >
<Accordion
id="templateContent"
label={<FormattedMessage id="ui-circulation.settings.staffSlips.templateContent" />}
>
<StaffSlipTemplateContentSection staffSlip={staffSlip} />
</Accordion>
</AccordionSet>
Expand Down
4 changes: 0 additions & 4 deletions src/settings/StaffSlips/StaffSlipDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import buildStripes from '../../../test/jest/__mock__/stripes.mock';

import StaffSlipDetail from './StaffSlipDetail';
import { Metadata } from '../components';
import {
StaffSlipAboutSection,
StaffSlipTemplateContentSection,
} from './components/ViewSections';

jest.mock('../components', () => ({
Metadata: jest.fn(() => null),
Expand Down
22 changes: 11 additions & 11 deletions translations/ui-circulation/cs_CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"settings.loanHistory.paymentMethodLabel": "Nastavení pro platební metodu",
"settings.loanHistory.addExceptionButton": "Přidat výjimku",
"settings.loanHistory.paymentMethod.waive": "Odpustit",
"settings.loanHistory.paymentMethod.transfer": "Převést",
"settings.loanHistory.paymentMethod.transfer": "Převod",
"settings.loanHistory.paymentMethod.replace": "Nahradit",
"settings.loanHistory.paymentMethod.pay": "Zaplatit",
"settings.loanHistory.errors.paymentMethodSelected": "Tato platební metoda je již vybrána",
Expand Down Expand Up @@ -443,19 +443,19 @@
"settings.finePolicy.perPeriod": "{number} za {period}",
"permission.settings.view-overdue-fines-policies": "Nastavení (Cirkulace): Může zobrazit pravidla pokut za pozdní vrácení",
"permission.settings.view-lost-item-fees-policies": "Nastavení (Cirkulace): Může zobrazit pravidla poplatků za ztrátu",
"permission.settings.titleLevelRequests": "Nastavení (Cirkulace): Úprava požadavku na úrovni titulu",
"settings.index.titleLevelRequests": "Žádanky na úrovni titulu",
"settings.titleLevelRequests.paneTitle": "Žádanky na úrovni titulu",
"settings.titleLevelRequests.allow": "Povolit žádanky na úrovni titulu",
"settings.titleLevelRequests.createTLR": "Ve výchozím nastavení je vybrána možnost „Vytvořit žádanku na úrovni titulu“.",
"permission.settings.titleLevelRequests": "Nastavení (Cirkulace): Úprava požadavku na úrovni názvu",
"settings.index.titleLevelRequests": "Žádanky na úrovni názvu",
"settings.titleLevelRequests.paneTitle": "Žádanky na úrovni názvu",
"settings.titleLevelRequests.allow": "Povolit žádanky na úrovni názvu",
"settings.titleLevelRequests.createTLR": "Ve výchozím nastavení je vybrána možnost „Vytvořit žádanku na úrovni názvu“.",
"settings.titleLevelRequests.noticeTemplates": "Šablony notifikací",
"settings.titleLevelRequests.confirmationNotice": "Notifikace o potvrzení",
"settings.titleLevelRequests.cancellationNotice": "Notifikace o zrušení",
"settings.titleLevelRequests.expirationNotice": "Notifikace o vypršení platnosti",
"settings.titleLevelRequests.desription": "Vybrat šablony pro následující notifikace pro čtenáře. Pokud není vybrána žádná šablona, nebude odeslána žádná notifikace.",
"settings.titleLevelRequests.defaultTemplateValue": "Vybrat notifikaci",
"settings.titleLevelRequests.forbiddenDisableTlrModal.title": "Nelze změnit „Povolit žádanky na úrovni titulu",
"settings.titleLevelRequests.forbiddenDisableTlrModal.description": "\"Povolit žádanky na úrovni titulu\" nelze změnit, protože je používáno jedním nebo více žádankami",
"settings.titleLevelRequests.forbiddenDisableTlrModal.title": "Nelze změnit „Povolit žádanky na úrovni názvu",
"settings.titleLevelRequests.forbiddenDisableTlrModal.description": "\"Povolit žádanky na úrovni názvu\" nelze změnit, protože je používáno jedním nebo více žádankami",
"permission.settings.view-loan-policies": "Nastavení (Cirkulace): Může zobrazit pravidla pro výpůjčky",
"settings.loanPolicy.denyDelete.header": "Nelze smazat výpůjčkové pravidlo",
"settings.policy.denyDelete.body": "Toto pravidlo nelze smazat, protože ho používá jeden nebo více záznamů.",
Expand Down Expand Up @@ -508,7 +508,7 @@
"settings.requestPolicy.requestTypes.allowSome": "Povolte některý pult služeb vyzvednutí",
"settings.finePolicy.reminderFees.noticeMethods.print": "Tisk",
"settings.finePolicy.reminderFees.noticeMethods.none": "Žádný",
"settings.requestPolicy.policyTypes.hold.infoPopover.content": "If the \"Fail to create title level hold when request is blocked by circulation rule\" setting is <strong>unchecked</strong>, title level holds will always be allowed. (Settings > Circulation > Title level requests)",
"settings.finePolicy.reminderFees.timeUnit.hours": "Hour(s)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minute(s)"
"settings.requestPolicy.policyTypes.hold.infoPopover.content": "Pokud je nastavení \"Nepodařilo se vytvořit rezervaci na úrovni názvu, když je žádost blokována pravidlem cirkulace\" <strong>nezaškrtnuté</strong>, rezervace na úrovni názvu budou vždy povoleny. (Nastavení > Cirkulace > Žádosti na úrovni názvu)",
"settings.finePolicy.reminderFees.timeUnit.hours": "Hodina(y)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minuta(y)"
}
2 changes: 1 addition & 1 deletion translations/ui-circulation/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,5 @@
"settings.finePolicy.reminderFees.noticeMethods.none": "None",
"settings.requestPolicy.policyTypes.hold.infoPopover.content": "If the \"Fail to create title level hold when request is blocked by circulation rule\" setting is <strong>unchecked</strong>, title level holds will always be allowed. (Settings > Circulation > Title level requests)",
"settings.finePolicy.reminderFees.timeUnit.hours": "Hour(s)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minute(s)"
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minuto(s)"
}
2 changes: 1 addition & 1 deletion translations/ui-circulation/es_419.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,5 @@
"settings.finePolicy.reminderFees.noticeMethods.none": "Ninguno",
"settings.requestPolicy.policyTypes.hold.infoPopover.content": "If the \"Fail to create title level hold when request is blocked by circulation rule\" setting is <strong>unchecked</strong>, title level holds will always be allowed. (Settings > Circulation > Title level requests)",
"settings.finePolicy.reminderFees.timeUnit.hours": "Hour(s)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minute(s)"
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minuto(s)"
}
8 changes: 4 additions & 4 deletions translations/ui-circulation/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@
"settings.requestPolicy.errors.selectServicePoint": "Please select at least one service point",
"settings.requestPolicy.requestTypes.allowAll": "Allow all pickup service points",
"settings.requestPolicy.requestTypes.allowSome": "Allow some pickup service points",
"settings.finePolicy.reminderFees.noticeMethods.print": "Print",
"settings.finePolicy.reminderFees.noticeMethods.none": "None",
"settings.finePolicy.reminderFees.noticeMethods.print": "Imprimir",
"settings.finePolicy.reminderFees.noticeMethods.none": "Ninguno",
"settings.requestPolicy.policyTypes.hold.infoPopover.content": "If the \"Fail to create title level hold when request is blocked by circulation rule\" setting is <strong>unchecked</strong>, title level holds will always be allowed. (Settings > Circulation > Title level requests)",
"settings.finePolicy.reminderFees.timeUnit.hours": "Hour(s)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minute(s)"
"settings.finePolicy.reminderFees.timeUnit.hours": "Hora(s)",
"settings.finePolicy.reminderFees.timeUnit.minutes": "Minuto(s)"
}
Loading

0 comments on commit 56277d4

Please sign in to comment.