Skip to content

Commit

Permalink
Merge branch 'release/2024-1-0' into fix/fee-list
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Jan 4, 2024
2 parents 3febf25 + acc8e26 commit 195e900
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"prop-types": "Since we use former ddb-react components that depend on prop-types we keep this. Should be removed when usage of prop-types is deprecated."
},
"dependencies": {
"@danskernesdigitalebibliotek/dpl-design-system": "2023.51.0-cd7e0937a067366392e60d85a9831b7d1cdf363e",
"@danskernesdigitalebibliotek/dpl-design-system": "0.0.0-53111dc1d5d35ee254a8e231f1e3721088240a4a",
"@reach/alert": "^0.17.0",
"@reach/dialog": "^0.18.0",
"@reduxjs/toolkit": "^1.9.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const SelectableMaterial: FC<SelectableMaterialProps & MaterialProps> = ({
};

return (
<li className="arrow arrow__hover--right-small">
<li className="arrow__hover--right-small">
<div
className={clsx("list-materials", {
"list-materials--disabled": disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const StackableMaterial: FC<StackableMaterialProps & MaterialProps> = ({

return (
<div
className={clsx("list-reservation my-32 cursor-pointer", {
"list-reservation--stacked": additionalMaterials > 0
})}
className={clsx(
"list-reservation my-32 cursor-pointer arrow__hover--right-small",
{
"list-reservation--stacked": additionalMaterials > 0
}
)}
role="button"
onClick={handleOpenDueDateModal}
onKeyUp={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ReservationMaterial: FC<ReservationMaterialProps & MaterialProps> = ({
return (
<li>
<div
className="list-reservation my-32 cursor-pointer"
className="list-reservation my-32 cursor-pointer arrow__hover--right-small"
role="button"
onClick={() => openDetailsModal()}
onKeyUp={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/search-header/search-header.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Search header app", () => {
cy.getBySel("search-header-input").focus().type("ha");
cy.getBySel("autosuggest").should("not.be.visible");
cy.getBySel("search-header-input").focus().type("r");
cy.getBySel("autosuggest").should("be.visible");
cy.getBySel("autosuggest-text-item").should("be.visible");
});

it("Allows use of arrow keys to navigate autosuggest", () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/Buttons/ArrowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const ArrowButton: React.FC<ArrowButtonProps> = ({
return (
<button
aria-labelledby={arrowLabelledBy}
className="arrow-button"
style={pointer}
type="button"
onClick={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Dropdown: React.FunctionComponent<DropdownProps> = ({
value={value}
className={classes.option}
disabled={disabled}
selected={value === defaultValue}
selected={value.toString() === defaultValue?.toString()}
>
{optionsLabel}
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const CardListItem: React.FC<CardListItemProps> = ({
<article
ref={itemRef}
data-cy={dataCy}
className="card-list-item arrow arrow__hover--right-small"
className="card-list-item arrow__hover--right-small"
onClick={() => {
handleClick();
}}
Expand Down
13 changes: 5 additions & 8 deletions src/components/reservation/UserListItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ export interface UserListItemsProps {

const UserListItems: FC<UserListItemsProps> = ({
patron,
patron: {
defaultInterestPeriod,
preferredPickupBranch,
phoneNumber,
emailAddress
},
patron: { preferredPickupBranch, phoneNumber, emailAddress },
branches,
selectedBranch,
selectBranchHandler,
Expand Down Expand Up @@ -74,7 +69,7 @@ const UserListItems: FC<UserListItemsProps> = ({

return (
<>
{defaultInterestPeriod && (
{interestPeriods && (
<>
<ReservationFormListItem
icon={LoanHistoryIcon}
Expand All @@ -84,7 +79,9 @@ const UserListItems: FC<UserListItemsProps> = ({
buttonAriaLabel={t("changeInterestPeriodText")}
/>
<NoInterestAfterModal
selectedInterest={selectedInterest ?? defaultInterestPeriod}
selectedInterest={
selectedInterest ?? interestPeriods.defaultInterestPeriod.value
}
setSelectedInterest={setSelectedInterest}
/>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/reservation/forms/NoInterestAfterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RequestStatus } from "../../../core/utils/types/request";
import { Periods } from "../types";

export interface PickupModalProps {
selectedInterest: number;
selectedInterest: number | string;
setSelectedInterest: (value: number) => void;
saveCallback?: () => void;
reservationStatus?: RequestStatus;
Expand Down
6 changes: 3 additions & 3 deletions src/components/reservation/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const getNoInterestAfter = (
interestPeriod: Periods,
t: UseTextFunction
) => {
const interestPeriodFound = interestPeriod.interestPeriods.find(
({ value }) => value === String(days)
);
const interestPeriodFound = interestPeriod.interestPeriods.find((period) => {
return period.value.toString() === days.toString();
});

if (interestPeriodFound) {
return interestPeriodFound.label;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1477,10 +1477,10 @@
debug "^3.1.0"
lodash.once "^4.1.1"

"@danskernesdigitalebibliotek/dpl-design-system@2023.51.0-cd7e0937a067366392e60d85a9831b7d1cdf363e":
version "2023.51.0-cd7e0937a067366392e60d85a9831b7d1cdf363e"
resolved "https://npm.pkg.github.com/download/@danskernesdigitalebibliotek/dpl-design-system/2023.51.0-cd7e0937a067366392e60d85a9831b7d1cdf363e/eaa8bd13af004074cd2447655a4bb20fccd8dc2c#eaa8bd13af004074cd2447655a4bb20fccd8dc2c"
integrity sha512-Zimpf9G00kcS7QA27wuOtN4zmrRbs+4UAADXkAq0lFE+VhaQZ7EbcueVw2tZ47UXzQUgcPbF5a9X5P1Jk/kkZQ==
"@danskernesdigitalebibliotek/dpl-design-system@0.0.0-53111dc1d5d35ee254a8e231f1e3721088240a4a":
version "0.0.0-53111dc1d5d35ee254a8e231f1e3721088240a4a"
resolved "https://npm.pkg.github.com/download/@danskernesdigitalebibliotek/dpl-design-system/0.0.0-53111dc1d5d35ee254a8e231f1e3721088240a4a/b7efe97875a0bae09fc27425250b8de333dd0476#b7efe97875a0bae09fc27425250b8de333dd0476"
integrity sha512-U1orycYBJoaLt42wVXTc0+XNpuatby/JD2gV1YH8ewd0lOo6yNhik2U/iSbcKIsUpwrGx64itxEPt9e+dbRXNw==

"@discoveryjs/json-ext@^0.5.0", "@discoveryjs/json-ext@^0.5.3":
version "0.5.7"
Expand Down

0 comments on commit 195e900

Please sign in to comment.