Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
deichman
Commits
8c3255c6
Commit
8c3255c6
authored
Jun 09, 2021
by
Øyvind Julsrud
Browse files
DEICH-5943
: deichman.no: revert back to original commit
parent
4797b3ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
deichman.no/components/ReservePublicationWidget/ReservePublicationWidget.js
View file @
8c3255c6
...
...
@@ -44,11 +44,6 @@ const availableFields = {
[
LANGUAGE_COURSE
]:
[
"
format
"
]
};
function
getNumHolds
(
copies
,
recordId
)
{
return
copies
[
recordId
]?.
numHolds
||
0
;
}
export
default
function
ReservePublicationWidget
({
publications
,
currentPublication
,
...
...
@@ -205,21 +200,22 @@ export default function ReservePublicationWidget({
return
(
<
div
data
-
animate
-
in
=
"
top
"
data
-
animation
-
order
=
"
4
"
>
<
div
className
=
"
reserve-work-widget
"
>
{
reasons
.
length
>
1
||
(
reasons
.
length
===
1
&&
reasons
[
0
]
!==
"
Til bruk i biblioteket
"
)
&&
<
h3
>
Denne
er
ikke
tilgjengelig
<
/h3
>
}
{
reasons
.
length
>
1
||
(
reasons
.
length
===
1
&&
reasons
[
0
]
!==
"
Til bruk i biblioteket
"
&&
(
<
h3
>
Denne
er
ikke
tilgjengelig
<
/h3
>
))}
<
Block
>
<
p
>
{
reasons
.
length
===
1
&&
<>
{
reasons
[
0
]}
<
/>
}
{
reasons
.
length
>
1
&&
"
Kan ikke bestilles
"
}
<
/p
>
<
p
>
{
reasons
.
length
===
1
&&
<>
{
reasons
[
0
]}
<
/>
}
{
reasons
.
length
>
1
&&
"
Kan ikke bestilles
"
}
<
/p
>
<
/Block
>
{
reasons
.
length
===
1
&&
reasons
[
0
]
===
"
Til bruk i biblioteket
"
&&
{
reasons
.
length
===
1
&&
reasons
[
0
]
===
"
Til bruk i biblioteket
"
&&
(
<
Block
top
=
{
4
}
>
<
Availability
items
=
{
copies
[
currentPublication
.
recordId
].
items
}
/
>
<
div
className
=
"
numHolds
"
>
,
{
getNumHolds
(
copies
,
currentPublication
.
recordId
)}
på
venteliste
<
/div
>
<
Availability
publications
=
{
copies
[
currentPublication
.
recordId
]}
/
>
<
PublicationDetailsButton
className
=
"
link
"
publication
=
{
currentPublication
}
...
...
@@ -228,7 +224,7 @@ export default function ReservePublicationWidget({
Finn
i
biblioteket
<
/PublicationDetailsButton
>
<
/Block
>
}
)
}
<
/div
>
<
/div
>
);
...
...
@@ -346,7 +342,8 @@ export function notReservableReason(publication, copies) {
const
items
=
copies
[
publication
.
recordId
]?.
items
||
[];
const
isReservable
=
items
.
filter
(
item
=>
item
.
reservable
).
length
>
0
;
const
isOnlyForBranchUse
=
items
.
length
>
0
&&
items
.
every
(
item
=>
item
.
notforloan
);
const
isOnlyForBranchUse
=
items
.
length
>
0
&&
items
.
every
(
item
=>
item
.
notforloan
);
if
(
publication
.
formats
?.
includes
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment