Skip to content

Commit

Permalink
Merge pull request Aspen-Discovery#2105 from Abhyastamita/24.11.00
Browse files Browse the repository at this point in the history
LiDA: show linked account home library on Library Card page
  • Loading branch information
mdnoble73 authored Oct 18, 2024
2 parents 6c3b133 + 433960f commit 9441f9c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ const CreateLibraryCard = (data) => {
}

let icon = library.favicon;
if (library.logoApp) {
if (card.homeLocation === library.displayName && library.logoApp) {
icon = library.logoApp;
}

Expand All @@ -302,7 +302,7 @@ const CreateLibraryCard = (data) => {
<Flex direction="row">
{icon ? <Image source={{ uri: icon }} fallbackSource={require('../../../themes/default/aspenLogo.png')} w={42} h={42} alt={getTermFromDictionary(language, 'library_card')} /> : null}
<Text bold ml={3} mt={2} fontSize="lg" color="darkText">
{library.displayName}
{card.homeLocation}
</Text>
</Flex>
</Center>
Expand Down Expand Up @@ -339,7 +339,7 @@ const CreateLibraryCard = (data) => {
<Flex direction="row">
{icon ? <Image source={{ uri: icon }} fallbackSource={require('../../../themes/default/aspenLogo.png')} w={42} h={42} alt={getTermFromDictionary(language, 'library_card')} /> : null}
<Text bold ml={3} mt={2} fontSize="lg" color={cardText}>
{library.displayName}
{card.homeLocation}
</Text>
</Flex>
</Center>
Expand Down Expand Up @@ -492,4 +492,4 @@ const OpenBarcode = (data) => {
</Modal>
</Center>
);
};
};
5 changes: 4 additions & 1 deletion code/aspen_app/src/util/api/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ export async function getLinkedAccounts(primaryUser, cards, barcodeStyle, url, l
expired: primaryUser.expired,
expires: primaryUser.expires,
barcodeStyle: barcodeStyle,
homeLocation: primaryUser.homeLocation,
};
cardStack.push(primaryCard);
if (!_.isUndefined(response.data.result.linkedAccounts)) {
Expand All @@ -456,6 +457,7 @@ export async function getLinkedAccounts(primaryUser, cards, barcodeStyle, url, l
expired: account.expired,
expires: account.expires,
barcodeStyle: account.barcodeStyle ?? barcodeStyle,
homeLocation: account.homeLocation,
};
cardStack.push(card);
} else if (_.includes(cards, account.cat_username) === false) {
Expand All @@ -468,6 +470,7 @@ export async function getLinkedAccounts(primaryUser, cards, barcodeStyle, url, l
expired: account.expired,
expires: account.expires,
barcodeStyle: account.barcodeStyle ?? barcodeStyle,
homeLocation: account.homeLocation,
};
cardStack.push(card);
}
Expand Down Expand Up @@ -1151,4 +1154,4 @@ export async function updateScreenBrightnessStatus(status, url, language = 'en')
console.log(response);
return false;
}
}
}
1 change: 1 addition & 0 deletions code/web/release_notes/24.11.00.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Aspen LiDA Updates
- Show home library name of linked accounts on Library Card page. Only show the library logo if it's correct for the home library. (Ticket 128681) (*KP*)

## Aspen Discovery Updates
//mark - grove
Expand Down

0 comments on commit 9441f9c

Please sign in to comment.