Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ebsco and summon user list #117

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
6db2c11
BiblioCommons Import
K-Alette Aug 22, 2024
44b8ffc
Create admin form for controlling format sort order
mdnoble73 Aug 22, 2024
ac98fa4
Koha Volume Level Holds
K-Alette Aug 22, 2024
618db83
Merge pull request #2014 from K-Alette/24.08.01
mdnoble73 Aug 22, 2024
0f47f01
check deleteAlternateLibraryCard for false as a string
catsoup11789 Aug 22, 2024
7db1c58
add alternate library cards to LiDA
catsoup11789 Aug 22, 2024
e025ea7
Merge branch 'Aspen-Discovery:24.09.00' into 24.09.00
catsoup11789 Aug 22, 2024
8135b64
Move cron process to foreground
lucasmontoya13 Aug 22, 2024
1701d5d
Remove entrypoint in cron service
lucasmontoya13 Aug 22, 2024
24808b2
Merge pull request #2016 from catsoup11789/24.09.00
mdnoble73 Aug 23, 2024
ab4d637
Update version.json
catsoup11789 Aug 23, 2024
779608d
Fixes Nashville holds report
NashvillePublicLibrary Aug 23, 2024
6c2d328
Merge pull request #451 from Aspen-Discovery/24.09.00
K-Alette Aug 23, 2024
e71fb99
Merge pull request #2019 from K-Alette/24.09.00
K-Alette Aug 23, 2024
cf59b92
Fix for LiDA hold freeze translations
catsoup11789 Aug 23, 2024
3d06c0f
Update version.json
catsoup11789 Aug 23, 2024
98c61c3
Merge pull request #2010 from thekesolutions/cron_service_in_foreground
mdnoble73 Aug 23, 2024
82bfd41
LiDA Radio Facet Fix
catsoup11789 Aug 23, 2024
2a0f2a4
Creates barcode generator report
NashvillePublicLibrary Aug 24, 2024
ab7196e
Improves Barcode Generator
NashvillePublicLibrary Aug 24, 2024
f62c283
Fixes page breaks in avery 5160 barcode reports
NashvillePublicLibrary Aug 24, 2024
1f1ef79
Update 24.09.00.MD
NashvillePublicLibrary Aug 24, 2024
71c23a8
Improves Avery 5160 fit for circulation reports
NashvillePublicLibrary Aug 24, 2024
efc3c57
Adds EAN-8 disc hub barcode generator to Circulation Reports. (*JStaub*)
NashvillePublicLibrary Aug 25, 2024
35d8b8d
Creates Barcode Generator permissions
NashvillePublicLibrary Aug 25, 2024
d3b67a2
Makes translatable headings for barcode generators
NashvillePublicLibrary Aug 25, 2024
63a75e6
Update 24.09.00.MD
NashvillePublicLibrary Aug 25, 2024
ffb91ed
Adds validation to disc barcode generator
NashvillePublicLibrary Aug 25, 2024
9a6cb77
Fixes Disc Barcode Generator input truncation
NashvillePublicLibrary Aug 25, 2024
e6aa8c6
Corrects barcode generators permission...
NashvillePublicLibrary Aug 25, 2024
98cca72
Maybe fixes spaces-instead of tabs in User.php
NashvillePublicLibrary Aug 25, 2024
53a23f4
Improves QA check for spaces-instead-of-tabs
NashvillePublicLibrary Aug 25, 2024
404d06b
Update 24.09.00.MD
NashvillePublicLibrary Aug 25, 2024
1be0a8a
Admin Search: Small label for fix
NashvillePublicLibrary Aug 25, 2024
87f0d37
Update 24.09.00.MD
NashvillePublicLibrary Aug 25, 2024
a77145e
DIS-11 Customize the order that formats display within a grouped work
mdnoble73 Aug 26, 2024
f7418b0
Merge pull request #2021 from Nashville-Public-Library/24.09.00-QA
mdnoble73 Aug 26, 2024
f124c48
Bump micromatch from 4.0.5 to 4.0.8 in /code/aspen_app
dependabot[bot] Aug 26, 2024
70591f0
Merge pull request #2018 from Nashville-Public-Library/24.08.01-Nashv…
mdnoble73 Aug 26, 2024
1de0b42
Merge branch '24.08.01' into 24.08.10
mdnoble73 Aug 26, 2024
501c651
Merge branch '24.08.10' into 24.09.00
mdnoble73 Aug 26, 2024
7a496b2
Get volumes from MARC record when volumes.txt does not exist
Abhyastamita Aug 26, 2024
c95fb5f
Look up call number key for volume if VolumeId starts with LOOKUP
Abhyastamita Aug 26, 2024
5b182d6
Update release notes
Abhyastamita Aug 26, 2024
c1847a7
Merge branch 'volume_holds_symphony' into 24.09.00
Abhyastamita Aug 26, 2024
c0d9b07
Update 24.09.00.MD
NashvillePublicLibrary Aug 26, 2024
86880c8
Merge branch 'DIS-11-Allow-administrators-to-customize-the-order-that…
mdnoble73 Aug 26, 2024
75ef33c
Merge pull request #2023 from Aspen-Discovery/dependabot/npm_and_yarn…
mdnoble73 Aug 26, 2024
3054c80
Merge branch '24.09.00-smallFix' of https://github.com/Nashville-Publ…
mdnoble73 Aug 26, 2024
66794d1
Merge branch 'Nashville-Public-Library-24.09.00-smallFix' into 24.09.00
mdnoble73 Aug 26, 2024
b02d4c8
Merge branch '24.09.00' of https://github.com/Aspen-Discovery/aspen-d…
mdnoble73 Aug 26, 2024
751a875
Correct regexp for spaces-not-tabs detection
NashvillePublicLibrary Aug 26, 2024
f6102bf
Merge branch '24.09.00-PrintBarcodes' of https://github.com/Nashville…
mdnoble73 Aug 26, 2024
ba3d46b
Allow barcode reports to be used by libraries other than Nashville
mdnoble73 Aug 26, 2024
0529d80
Merge branch 'Nashville-Public-Library-24.09.00-PrintBarcodes' into 2…
mdnoble73 Aug 26, 2024
7ca8855
Merge pull request #2024 from Abhyastamita/24.09.00
mdnoble73 Aug 26, 2024
efe47a5
Rebuild jar
mdnoble73 Aug 26, 2024
818530a
QA: Corrects yet again the spaces-not-tabs regex
NashvillePublicLibrary Aug 26, 2024
0f97ce6
Merge pull request #2025 from Nashville-Public-Library/24.09.00-QA
mdnoble73 Aug 27, 2024
a7993d5
Get Patron Type Object Check
K-Alette Aug 27, 2024
0453dbd
Merge branch '24.09.00' into 24.09.00
K-Alette Aug 27, 2024
e1ac634
Small Changes
K-Alette Aug 27, 2024
10846ca
Update 24.09.00.MD
K-Alette Aug 27, 2024
2746d19
Fix checking cloudLibrary settings for alternate cards and linked acc…
Abhyastamita Aug 28, 2024
6d9be75
Merge pull request #2028 from K-Alette/24.09.00
mdnoble73 Aug 28, 2024
b28ca7c
More consistent alignment for form inputs and labels
Abhyastamita Aug 28, 2024
058fda9
Merge branch '24.09.00' of https://github.com/Abhyastamita/aspen-disc…
Abhyastamita Aug 28, 2024
4473a27
Update release notes
Abhyastamita Aug 28, 2024
eae0ac7
check createdEmailSent before trying to send new email
catsoup11789 Aug 28, 2024
4d89dbb
Merge pull request #950 from Aspen-Discovery/24.09.00
catsoup11789 Aug 28, 2024
0d323e6
Automatically block spammy user agents
Abhyastamita Aug 28, 2024
37c9668
Merge pull request #2030 from catsoup11789/24.09.00
mdnoble73 Aug 29, 2024
7555f3e
Merge pull request #2029 from Abhyastamita/24.09.00
mdnoble73 Aug 29, 2024
880ef5e
Do natural sorting of magazine holdings
mdnoble73 Sep 2, 2024
3d37c9f
DIS-6 Add circulation username to Location
mdnoble73 Sep 2, 2024
5658283
Merge branch '24.09.00' of https://github.com/Aspen-Discovery/aspen-d…
mdnoble73 Sep 2, 2024
bfe2421
fix: sourceId allow 255 char
Chloe070196 Aug 6, 2024
6800920
docs: update release notes
Chloe070196 Aug 6, 2024
2e5b1d8
fix: lists with summon records can be viewed
Chloe070196 Aug 7, 2024
6a37448
fix: each record's data is processed
Chloe070196 Aug 7, 2024
ae0ff69
fix: textQuery defaults to null in processData
Chloe070196 Aug 7, 2024
505f03d
style: swap spaces for tabs when indenting
Chloe070196 Aug 23, 2024
a1619a6
style: remove redundant spaces
Chloe070196 Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
echo "Found modified file: $file";
if [[ $file == *.php || $file == *.js || $file == *.java ]]; then
#echo "Checking $file for whitespace issues"
DIFF=$(git diff official/$DEFAULT_BRANCH HEAD -- $file)
DIFF=$(git diff official/$DEFAULT_BRANCH HEAD -- $file | grep "^\+\s* {2,}")
#echo "DIFF: $DIFF"
if [[ $DIFF =~ " " ]]; then
echo "Detected spaces instead of tabs in $file"
Expand Down
6 changes: 3 additions & 3 deletions code/aspen_app/app-configs/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "24.08.00",
"build": "270",
"patch": "0"
"version": "24.09.00",
"build": "275",
"patch": "2"
}
8 changes: 8 additions & 0 deletions code/aspen_app/src/components/Action/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const ActionButton = (data) => {
setHoldItemSelectIsOpen,
onHoldItemSelectClose,
cancelHoldItemSelectRef,
userHasAlternateLibraryCard,
shouldPromptAlternateLibraryCard,
} = data;
if (_.isObject(action)) {
if (action.type === 'overdrive_sample') {
Expand Down Expand Up @@ -81,6 +83,9 @@ export const ActionButton = (data) => {
cancelHoldItemSelectRef={cancelHoldItemSelectRef}
holdSelectItemResponse={holdSelectItemResponse}
setHoldSelectItemResponse={setHoldSelectItemResponse}
userHasAlternateLibraryCard={userHasAlternateLibraryCard}
shouldPromptAlternateLibraryCard={shouldPromptAlternateLibraryCard}
recordSource={recordSource}
/>
);
} else if (action.type === 'vdx_request') {
Expand Down Expand Up @@ -136,6 +141,9 @@ export const ActionButton = (data) => {
cancelHoldConfirmationRef={cancelHoldConfirmationRef}
holdConfirmationResponse={holdConfirmationResponse}
setHoldConfirmationResponse={setHoldConfirmationResponse}
userHasAlternateLibraryCard={userHasAlternateLibraryCard}
shouldPromptAlternateLibraryCard={shouldPromptAlternateLibraryCard}
recordSource={recordSource}
/>
);
}
Expand Down
223 changes: 223 additions & 0 deletions code/aspen_app/src/components/Action/AddAlternateLibraryCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
import React from 'react';
import _ from 'lodash';
import { CloseIcon, Modal, ModalBackdrop, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, FormControl, FormControlLabel, FormControlLabelText, Heading, Button, ButtonGroup, ButtonText, SelectTrigger, SelectInput, SelectIcon, SelectPortal, SelectBackdrop, SelectContent, SelectDragIndicatorWrapper, SelectDragIndicator, SelectItem, Icon, ChevronDownIcon, ButtonSpinner, Input, InputField, InputSlot, InputIcon } from '@gluestack-ui/themed';
import { LanguageContext, LibrarySystemContext, ThemeContext, UserContext } from '../../context/initialContext';
import { getTermFromDictionary } from '../../translations/TranslationService';
import { refreshProfile, updateAlternateLibraryCard } from '../../util/api/user';
import { decodeHTML } from '../../util/apiAuth';
import { completeAction } from '../../util/recordActions';
import { useWindowDimensions } from 'react-native';
import RenderHtml from 'react-native-render-html';
import { EyeOff, Eye } from 'lucide-react-native';

export const AddAlternateLibraryCard = (props) => {
const {
id,
title,
action,
volumeInfo,
holdTypeForFormat,
variationId,
prevRoute,
isEContent,
response,
setResponse,
responseIsOpen,
setResponseIsOpen,
onResponseClose,
cancelResponseRef,
holdConfirmationResponse,
setHoldConfirmationResponse,
holdConfirmationIsOpen,
setHoldConfirmationIsOpen,
onHoldConfirmationClose,
cancelHoldConfirmationRef,
holdSelectItemResponse,
setHoldSelectItemResponse,
holdItemSelectIsOpen,
setHoldItemSelectIsOpen,
onHoldItemSelectClose,
cancelHoldItemSelectRef,
recordSource,
activeAccount,
} = props;

let isPlacingHold = false;
if (_.isObject(action)) {
isPlacingHold = action.includes('hold');
}

const { library } = React.useContext(LibrarySystemContext);
const { user, updateUser } = React.useContext(UserContext);
const { language } = React.useContext(LanguageContext);
const { theme, textColor, colorMode } = React.useContext(ThemeContext);
const queryClient = useQueryClient();
const { width } = useWindowDimensions();
const [card, setCard] = React.useState(user?.alternateLibraryCard ?? '');
const [password, setPassword] = React.useState(user?.alternateLibraryCardPassword ?? '');
const [showModal, setShowModal] = React.useState(true);
const [loading, setLoading] = React.useState(false);

const [showPassword, setShowPassword] = React.useState(false);
const toggleShowPassword = () => setShowPassword(!showPassword);

let cardLabel = getTermFromDictionary(language, 'alternate_library_card');
let passwordLabel = getTermFromDictionary(language, 'password');
let formMessage = '';
let showAlternateLibraryCardPassword = false;

if (library?.alternateLibraryCardConfig?.alternateLibraryCardLabel) {
cardLabel = library.alternateLibraryCardConfig.alternateLibraryCardLabel;
}

if (library?.alternateLibraryCardConfig?.alternateLibraryCardPasswordLabel) {
passwordLabel = library.alternateLibraryCardConfig.alternateLibraryCardPasswordLabel;
}

if (library?.alternateLibraryCardConfig?.alternateLibraryCardFormMessage) {
formMessage = decodeHTML(library.alternateLibraryCardConfig.alternateLibraryCardFormMessage);
}

if (library?.alternateLibraryCardConfig?.showAlternateLibraryCardPassword) {
if (library.alternateLibraryCardConfig.showAlternateLibraryCardPassword === '1' || library.alternateLibraryCardConfig.showAlternateLibraryCardPassword === 1) {
showAlternateLibraryCardPassword = true;
}
}

const source = {
baseUrl: library.baseUrl,
html: formMessage,
};

const tagsStyles = {
body: {
color: textColor,
},
a: {
color: textColor,
textDecorationColor: textColor,
},
};

const updateCard = async () => {
await updateAlternateLibraryCard(card, password, false, library.baseUrl, language);
await refreshProfile(library.baseUrl).then(async (result) => {
updateUser(result);
});
};

return (
<Modal isOpen={showModal} onClose={() => setShowModal(false)} closeOnOverlayClick={false} size="lg">
<ModalBackdrop />
<ModalContent maxWidth="90%" bgColor={colorMode === 'light' ? theme['colors']['warmGray']['50'] : theme['colors']['coolGray']['700']}>
<ModalHeader borderBottomWidth="$1" borderBottomColor={colorMode === 'light' ? theme['colors']['warmGray']['300'] : theme['colors']['coolGray']['500']}>
<Heading size="md" color={textColor}>
{isPlacingHold ? getTermFromDictionary(language, 'hold_options') : getTermFromDictionary(language, 'checkout_options')}
</Heading>
<ModalCloseButton hitSlop={{ top: 30, bottom: 30, left: 30, right: 30 }}>
<Icon as={CloseIcon} color={textColor} />
</ModalCloseButton>
</ModalHeader>
<ModalBody mt="$3">
{formMessage ? <RenderHtml contentWidth={width} source={source} tagsStyles={tagsStyles} /> : null}
<FormControl mb="$2">
<FormControlLabel>
<FormControlLabelText color={textColor} size="sm">
{cardLabel}
</FormControlLabelText>
</FormControlLabel>
<Input>
<InputField textContentType="none" color={textColor} name="card" defaultValue={card} accessibilityLabel={cardLabel} onChangeText={(value) => setCard(value)} />
</Input>
</FormControl>
{showAlternateLibraryCardPassword ? (
<FormControl mb="$2">
<FormControlLabel>
<FormControlLabelText color={textColor} size="sm">
{passwordLabel}
</FormControlLabelText>
</FormControlLabel>
<Input>
<InputField textContentType="none" type={showPassword ? 'text' : 'password'} color={textColor} name="password" defaultValue={password} accessibilityLabel={passwordLabel} onChangeText={(value) => setPassword(value)} />
<InputSlot onPress={toggleShowPassword}>
<InputIcon as={showPassword ? Eye : EyeOff} mr="$2" color={textColor} />
</InputSlot>
</Input>
</FormControl>
) : null}
</ModalBody>
<ModalFooter borderTopWidth="$1" borderTopColor={colorMode === 'light' ? theme['colors']['warmGray']['300'] : theme['colors']['coolGray']['500']}>
<ButtonGroup space="sm">
<Button
variant="outline"
borderColor={colorMode === 'light' ? theme['colors']['warmGray']['300'] : theme['colors']['coolGray']['500']}
onPress={() => {
setShowModal(false);
setLoading(false);
}}>
<ButtonText color={colorMode === 'light' ? theme['colors']['warmGray']['500'] : theme['colors']['coolGray']['300']}>{getTermFromDictionary(language, 'close_window')}</ButtonText>
</Button>
<Button
bgColor={theme['colors']['primary']['500']}
isDisabled={loading}
onPress={async () => {
setLoading(true);
await completeAction(id, action, activeAccount, '', '', location, library.baseUrl, volume, holdType, holdNotificationPreferences, item).then(async (result) => {
setResponse(result);
if (result) {
if (result.success === true || result.success === 'true') {
queryClient.invalidateQueries({ queryKey: ['holds', activeAccount, library.baseUrl, language] });
queryClient.invalidateQueries({ queryKey: ['user', library.baseUrl, language] });
/*await refreshProfile(library.baseUrl).then((profile) => {
updateUser(profile);
});*/
}

if (result?.confirmationNeeded && result.confirmationNeeded === true) {
let tmp = holdConfirmationResponse;
const obj = {
message: result.message,
title: result.title,
confirmationNeeded: result.confirmationNeeded ?? false,
confirmationId: result.confirmationId ?? null,
recordId: id ?? null,
};
tmp = _.merge(obj, tmp);
setHoldConfirmationResponse(tmp);
}

if (result?.shouldBeItemHold && result.shouldBeItemHold === true) {
let tmp = holdSelectItemResponse;
const obj = {
message: result.message,
title: 'Select an Item',
patronId: activeAccount,
pickupLocation: location,
bibId: id ?? null,
items: result.items ?? [],
};

tmp = _.merge(obj, tmp);
setHoldSelectItemResponse(tmp);
}

setLoading(false);
setShowModal(false);
if (result?.confirmationNeeded && result.confirmationNeeded) {
setHoldConfirmationIsOpen(true);
} else if (result?.shouldBeItemHold && result.shouldBeItemHold) {
setHoldItemSelectIsOpen(true);
} else {
setResponseIsOpen(true);
}
}
});
}}>
{loading ? <ButtonSpinner color={theme['colors']['primary']['500-text']} /> : <ButtonText color={theme['colors']['primary']['500-text']}>{title}</ButtonText>}
</Button>
</ButtonGroup>
</ModalFooter>
</ModalContent>
</Modal>
);
};
Loading
Loading