diff --git a/src/app/core/store/user/user.state.ts b/src/app/core/store/user/user.state.ts
index 54d516b31..0c5e6a21e 100644
--- a/src/app/core/store/user/user.state.ts
+++ b/src/app/core/store/user/user.state.ts
@@ -259,7 +259,7 @@ export class UserState {
},
},
});
- localStorage.setItem('currentUser', JSON.stringify(response))
+ localStorage.setItem('currentUser', JSON.stringify(response));
}
})
);
diff --git a/src/app/features/admin-institutions/components/admin-table/admin-table.component.html b/src/app/features/admin-institutions/components/admin-table/admin-table.component.html
index 5aad43925..6e2ad3182 100644
--- a/src/app/features/admin-institutions/components/admin-table/admin-table.component.html
+++ b/src/app/features/admin-institutions/components/admin-table/admin-table.component.html
@@ -108,24 +108,20 @@
} @else {
@for (col of columns; track col.field) {
- |
- |
diff --git a/src/app/features/home/components/tos-consent-banner/tos-consent-banner.component.spec.ts b/src/app/features/home/components/tos-consent-banner/tos-consent-banner.component.spec.ts
index 91e6bd4fc..08274b257 100644
--- a/src/app/features/home/components/tos-consent-banner/tos-consent-banner.component.spec.ts
+++ b/src/app/features/home/components/tos-consent-banner/tos-consent-banner.component.spec.ts
@@ -46,7 +46,6 @@ describe('TosConsentBannerComponent', () => {
it('should have the "Continue" button disabled by default', () => {
const continueButton = fixture.debugElement.query(By.css('p-button button')).nativeElement;
- console.log('continueButton ' + continueButton )
expect(continueButton.disabled).toBe(true);
});
@@ -71,7 +70,7 @@ describe('TosConsentBannerComponent', () => {
expect(toastServiceMock.showError).not.toHaveBeenCalled();
});
- it('should show toast banner if acceptedTermsOfService is false and "Continue" is clicked', () => {
+ it('should show toast banner if acceptedTermsOfService is false and "Continue" is clicked', () => {
component.acceptedTermsOfService.set(false);
const continueButton = fixture.debugElement.query(By.css('p-button button')).nativeElement;
continueButton.disabled = false;
@@ -79,5 +78,4 @@ describe('TosConsentBannerComponent', () => {
fixture.detectChanges();
expect(component.errorMessage).toEqual('toast.tos-consent.error-message');
});
-
});
diff --git a/src/app/features/moderation/constants/registry-sort-options.const.ts b/src/app/features/moderation/constants/registry-sort-options.const.ts
index 7eccf69a8..0e75886a3 100644
--- a/src/app/features/moderation/constants/registry-sort-options.const.ts
+++ b/src/app/features/moderation/constants/registry-sort-options.const.ts
@@ -13,10 +13,10 @@ export const REGISTRY_SORT_OPTIONS: CustomOption[] = [
},
{
value: RegistrySort.RegisteredNewest,
- label: 'moderation.sortOption.oldest',
+ label: 'moderation.sortOption.newest',
},
{
value: RegistrySort.RegisteredOldest,
- label: 'moderation.sortOption.newest',
+ label: 'moderation.sortOption.oldest',
},
];
diff --git a/src/app/shared/services/global-search.service.ts b/src/app/shared/services/global-search.service.ts
index fcc88bce7..4fc1be0b6 100644
--- a/src/app/shared/services/global-search.service.ts
+++ b/src/app/shared/services/global-search.service.ts
@@ -55,10 +55,10 @@ export class GlobalSearchService {
} {
let nextUrl: string | undefined;
- const searchResultItems = response.included!.filter(
- (item): item is SearchResultJsonApi => item.type === 'search-result'
- );
- const filterOptionItems = response.included!.filter((item): item is FilterOptionItem => item.type === 'index-card');
+ const searchResultItems =
+ response.included?.filter((item): item is SearchResultJsonApi => item.type === 'search-result') ?? [];
+ const filterOptionItems =
+ response.included?.filter((item): item is FilterOptionItem => item.type === 'index-card') ?? [];
const options = mapFilterOptions(searchResultItems, filterOptionItems);
const searchResultPage = response?.data?.relationships?.['searchResultPage'] as {
diff --git a/src/app/shared/stores/global-search/global-search.state.ts b/src/app/shared/stores/global-search/global-search.state.ts
index 85f85b131..22da0a9a8 100644
--- a/src/app/shared/stores/global-search/global-search.state.ts
+++ b/src/app/shared/stores/global-search/global-search.state.ts
@@ -300,6 +300,9 @@ export class GlobalSearchState {
private buildParamsForIndexCardSearch(state: GlobalSearchStateModel): Record {
const filtersParams: Record = {};
+ Object.entries(state.defaultFilterValues).forEach(([key, value]) => {
+ filtersParams[`cardSearchFilter[${key}][]`] = value;
+ });
Object.entries(state.filterValues).forEach(([key, value]) => {
if (value) {
const filterDefinition = state.filters.find((f) => f.key === key);
@@ -322,10 +325,6 @@ export class GlobalSearchState {
const sortParam = sortBy.includes('count') && !sortBy.includes('relevance') ? 'sort[integer-value]' : 'sort';
filtersParams[sortParam] = sortBy;
- Object.entries(state.defaultFilterValues).forEach(([key, value]) => {
- filtersParams[`cardSearchFilter[${key}][]`] = value;
- });
-
return filtersParams;
}
}