Skip to content

Commit

Permalink
deploy 10 april (#1441)
Browse files Browse the repository at this point in the history
* in progress - first shot

* in progress - deleted som files

* setFacets

* in progress

* in progress .. write a test

* usefacet hook

* added a test

* in progress - small steps

* in progress - bugfix + component to style

* in progress - facets from enum

* in progress - remove consoles - find the query

* in progress - working copy

* more facets

* some styling + changes from review

* remove some unused vars

* fixed a test + a real error

* set facetlimit 50 + slice facetlist

* bugfixed + ALL facets

* debugging

* fixed a bug

* added facet tags

* formatting

* remove unused var

* ... (#1397)

* Bibdk2021 2032 mobile facets (#1398)

* fix it (#1394)

* fix it (#1396)

* in progress - added modal

* in progress - skeleton on facets + useGlobal hook

* ... (#1397)

* in progress - back to working copy

* in progress - added replace for modal

* update modal facets + correct modal

* in progress - some mobile styling + facettags on mobile

* in progress - remove usestate

* working facet browser !

* in progress .. small steps :)

* facetbutton in own component

* some mobile styling

* formatting :)

* modal page for mobile facets

* removed some unused vars

* datacheck

* cleanup a little

* fix a test - we dont need facets as dependency here

* skeleton when loading

---------

Co-authored-by: kfudbc <kfudbc@users.noreply.github.com>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>

* Bibdk2021 2464 nextjs 14 (#1389)

* const + link fix

* works with nextjs

* nextjs

* fixed stuff

* legacyBehavior

* remove comment

* audit

* fixed imports

* fixed lint error

* comment

* Bibdk2021 2530 searchhistory (#1399)

* filters in search history

* remove unused

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* Bibdk2021 2530 searchhistory2 (#1404)

* in progress - split historyobject

* today, yesterday and older in searchhistory

* props in lower case

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* fixed router issue with next14

* ... (#1401)

* handle developer fuckups when ordering

* Reuse filter page (#1406)

* disable orderconfirmation for periodica (#1402)

* disable orderconfirmation for periodica

* change from review - false is the way

* dbc-node:latest (#1403)

* ... (#1401)

* in progress - bugfixing

* handle developer fuckups when ordering

* in progress - modal mobil facetpage + various changes on filter.page

* and filter page also

* update usefacet + implement onselect event

---------

Co-authored-by: Yousef <yousefmohsen@outlook.dk>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>

* deleted old test

* skeletorn while loading

* fixes multi order status on bookmark page (#1407)

* fixes multi order status on bookmark page

* clean up

* console log

* clean clean

* bookmark key

* handleOrderFinished

* list of facets

* skeleton when loading

* added translations

* fixed a test

* refactor - only allow components in subtitle (#1409)

* fixed a test

* some styling for desktop

* remove unused var

* skeleton !

* advanced search tab (#1408)

* Bibdk2021 2494 fix alarms (#1410)

* fixed some bugs

* replaceAll -> replace

* replace replaceall with replace

* json parse fix

* replace replaceall

* added japanese and persian languages (#1411)

* fixed some bugs (#1413)

* fixed some bugs

* we still use it

* added contributors/creators FromDescription

* added contributors from description

* added contributors from description

* open popover (#1417)

* Bibdk2021 2549 (#1418)

* prefer resolver over field given by parent

* added 'not available for home loan' message for reservation button

* rm unused

* reset periodica form after ordering (#1421)

* reset periodica form after ordering

* a little test

* a little test

* refix RESOURCE bug (#1423)

* prioritize access (#1412)

* prioritize access

* sort access

* console log

* added if

* Bibdk2021 2554 lorem ipsum (#1424)

* in progress - no bibdkexclude

* excludebranches:false

* hide sort if hitcount > 0 (#1419)

* Bibdk2021 2364 new user link (#1420)

* open popover

* new user link

* prioritize cporation name (#1425)

* added new localization message, on shelf but not loanable (#1422)

* added new localization message, on shelf but not loanable

* fix test

* fix more localization status

* decode url before json.parse (#1415)

* styling + functional changes from review

* remove volume from title (#1427)

* filter result (#1426)

* Bibdk2021 2393 related worktypes only (#1429)

* handle selected worktypes only

* handle selected worktypes only

* handle selected worktypes only

* enable test + new story

* added id field for music (#1428)

* fixed mobile refresh

* some styling - yeah

* Feature dropdown down (#1430)

* dropdown always down

* dropdown direction

* comment

* test fix (#1433)

* test fix

* remove only

* cy version

* Bibdk2021 2270 no tags please (#1432)

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* do not show tags section if there are no tags

* mobile facets css + functional change from review (#1435)

* fixed a test - no hitcount for simple search filters

* added a little test

* no scroll for now

* reintroduce smooth scroll - yeah

* Bibdk2021 1609 participants (#1434)

* show participant in seperate field

* show participant in seperate field

* final (#1431)

* fixed search history

* sort refined

* lock tab (#1436)

* lock tab

* prettier

* shadow fix (#1437)

* shadow fix

* use var

* sort by score - ff bugfix

* one sort to rule

* Searchhistory checkbox fix (#1440)

* comment on sort func

* fixed checkboxes

* fixed a test

* minor css fix

* and fixed another merge conflict

---------

Co-authored-by: pjohans <pjohans@gmail.com>
Co-authored-by: mtni <36037828+mtni@users.noreply.github.com>
Co-authored-by: kfudbc <kfudbc@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 10, 2024
1 parent fcc89c8 commit 34fa3c9
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/components/base/translate/Translate.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,10 @@
}
},
"bibliographic-data": {
"contributorsFromDescription": {
"da": "Beskrivelse fra materialet",
"en": "Description from material"
},
"id": {
"da": "Id",
"en": "Id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ function HistoryHeaderActions({
function HistoryHeader() {
return (
<div className={cx(styles.header, styles.grid)}>
<div className={styles.checkbox}> </div>
<Text type="text4" className={styles.timestamp}>
<Text type="text4">
{Translate({ context: "search", label: "timeForSearch" })}
</Text>
<Text type="text4" className={styles.link}>
Expand Down Expand Up @@ -291,7 +290,7 @@ export function AdvancedSearchHistory() {
if (storedValue.length === checkboxList.length) {
setCheckboxList([]);
} else {
setCheckboxList(storedValue.map((stored) => stored.cql));
setCheckboxList(storedValue.map((stored) => stored.key));
}
};

Expand All @@ -300,7 +299,7 @@ export function AdvancedSearchHistory() {
*/
const onDeleteSelected = () => {
checkboxList.forEach((check) => {
const historyItem = storedValue.find((stored) => stored.cql === check);
const historyItem = storedValue.find((stored) => stored.key === check);
historyItem && deleteValue(historyItem);
//remove item from checklist too
onSelect(historyItem, false);
Expand All @@ -319,7 +318,7 @@ export function AdvancedSearchHistory() {
// if select is FALSE it has been deselected on gui
const newCheckList = [...checkboxList];
// if item is already in checkboxlist -> remove
const checkindex = checkboxList.findIndex((check) => check === item.cql);
const checkindex = checkboxList.findIndex((check) => check === item.key);
if (checkindex !== -1) {
// item found in list - if deselected remove it
if (!selected) {
Expand All @@ -328,7 +327,7 @@ export function AdvancedSearchHistory() {
}
// if not -> add it to list .. if selected
else if (selected) {
newCheckList.push(item.cql);
newCheckList.push(item.key);
}
setCheckboxList(newCheckList);
};
Expand All @@ -346,11 +345,11 @@ export function AdvancedSearchHistory() {
{items.length > 0 &&
items.map((item, index) => (
<HistoryItem
key={item.cql}
key={item.key}
item={item}
index={index}
checked={
checkboxList.findIndex((check) => check === item.cql) !== -1
checkboxList.findIndex((check) => check === item.key) !== -1
}
deleteSelected={onDeleteSelected}
onSelect={onSelect}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
.itemsheader {
border-bottom: 1px solid var(--iron);
margin-bottom: var(--pt2);
padding-left: var(--pt1);
}

@media (min-width: 576px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Default.loaders = [
],
},
cql: '(term.function="Sissel-Jo Gazan")',
key: '(term.function="Sissel-Jo Gazan")',
timestamp: "11:45",
},
{
Expand Down Expand Up @@ -74,6 +75,7 @@ Default.loaders = [
],
},
cql: '(term.function="Jesper Tolstrup" AND term.subject="heste")',
key: '(term.function="Jesper Tolstrup" AND term.subject="heste")',
timestamp: "10.36",
},
{
Expand All @@ -98,6 +100,7 @@ Default.loaders = [
],
},
cql: '(term.contributor="Tammi Øst")',
key: '(term.contributor="Tammi Øst")',
timestamp: "11:44",
},
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export default function Wrap({ onWorkClick, onPageChange }) {
// make an object for searchhistory
// the cql part .. we use the raw cql for now - facets are handled independently
const searchHistoryObj = {
key: cqlQuery,
hitcount: parsedResponse?.hitcount,
fieldSearch: fieldSearch || "",
cql: cqlAndFacetsQuery ? cql : fieldSearchQuery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ function ListItem({ facet, facetName, selectedFacets, onItemClick }) {
const current = selectedFacets?.find((sel) => {
return sel?.searchIndex === facetName;
});
// sort - we want selected items first

// sort - we want selected items first other items sorted by score
const sorter = (a, b) => {
const aselected = !!current?.values?.find((val) => {
return val.name === a.key;
Expand Down
3 changes: 2 additions & 1 deletion src/lib/api/manifestation.fragments.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ const manifestationFragment = `fragment manifestationFragment on Manifestation {
singular
}
}
}
}
contributorsFromDescription
publisher
edition {
publicationYear {
Expand Down
8 changes: 8 additions & 0 deletions src/lib/manifestationParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ const fields = () => [
<RenderContributors contributors={contributors} />
),
},
{
dataField: "contributorsFromDescription",
label: Translate({
context: "bibliographic-data",
label: "contributorsFromDescription",
}),
valueParser: (values) => values?.join(", ") || "",
},
{
dataField: "publisher",
label: Translate({
Expand Down

0 comments on commit 34fa3c9

Please sign in to comment.