diff --git a/projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.html b/projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.html
index a62bf7d9..2c2ffdee 100644
--- a/projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.html
+++ b/projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.html
@@ -14,10 +14,10 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see
.
-->
-@if (props.hideLabel !== true) {
-
-}
-
+
+ @if (props.hideLabel !== true) {
+
+ }
@if (showError && formControl.errors) {
@@ -25,7 +25,7 @@
}
@for (f of field.fieldGroup; track f) {
-
+
}
diff --git a/projects/rero/ng-core/src/lib/record/editor/type/switch/switch.component.ts b/projects/rero/ng-core/src/lib/record/editor/type/switch/switch.component.ts
index 94bfea32..1df7cdfd 100644
--- a/projects/rero/ng-core/src/lib/record/editor/type/switch/switch.component.ts
+++ b/projects/rero/ng-core/src/lib/record/editor/type/switch/switch.component.ts
@@ -19,7 +19,6 @@ import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
import { FormlyFieldProps } from '@ngx-formly/primeng/form-field';
interface SwitchProps extends FormlyFieldProps {
- indeterminate: boolean;
hideLabel: boolean;
}
@@ -29,13 +28,13 @@ interface SwitchProps extends FormlyFieldProps {
@Component({
selector: 'ng-core-editor-formly-field-switch',
template: `
-
`,
})
@@ -43,7 +42,6 @@ export class SwitchComponent extends FieldType
> {
/** Default properties */
defaultOptions: Partial> = {
props: {
- indeterminate: true,
hideLabel: true,
},
};
diff --git a/projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.ts b/projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.ts
index 945c4514..b5b9c077 100644
--- a/projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.ts
+++ b/projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.ts
@@ -89,7 +89,6 @@ export class AddFieldEditorComponent implements OnInit, OnDestroy {
onSelect(event: AutoCompleteSelectEvent): void {
this.editorComponentInstance.setHide(event.value, false);
- console.log('clear');
this.autocomplete.clear();
}
diff --git a/projects/rero/ng-core/src/lib/record/editor/wrappers/form-field-wrapper/form-field-wrapper.component.ts b/projects/rero/ng-core/src/lib/record/editor/wrappers/form-field-wrapper/form-field-wrapper.component.ts
index d1439677..74eaa120 100644
--- a/projects/rero/ng-core/src/lib/record/editor/wrappers/form-field-wrapper/form-field-wrapper.component.ts
+++ b/projects/rero/ng-core/src/lib/record/editor/wrappers/form-field-wrapper/form-field-wrapper.component.ts
@@ -20,7 +20,7 @@ import { FieldWrapper } from '@ngx-formly/core';
@Component({
selector: 'ng-core-form-field-wrapper',
template: `
-
+
@if (props.label && props.hideLabel !== true) {
diff --git a/projects/rero/ng-core/src/lib/record/record-ui.service.ts b/projects/rero/ng-core/src/lib/record/record-ui.service.ts
index 430c649c..b5d2fe89 100644
--- a/projects/rero/ng-core/src/lib/record/record-ui.service.ts
+++ b/projects/rero/ng-core/src/lib/record/record-ui.service.ts
@@ -90,7 +90,6 @@ export class RecordUiService {
* @param message Message to display
*/
showDeleteMessage(message: string): void {
- console.log('delete');
this.confirmationService.confirm({
acceptLabel: this.translateService.instant('OK'),
rejectVisible: false,
diff --git a/projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.ts b/projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.ts
index bbfd4528..74b2cb4c 100644
--- a/projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.ts
+++ b/projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.ts
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-import { Component, computed, inject, input, output } from '@angular/core';
+import { Component, computed, inject, input, OnChanges, output, SimpleChanges } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
export interface IFilter {
@@ -31,6 +31,11 @@ export class ListFiltersComponent {
protected translateService: TranslateService = inject(TranslateService);
+ /**
+ * All aggregations
+ */
+ aggregations = input();
+
// Selected aggregations filters
aggregationsFilters = input();
@@ -83,10 +88,39 @@ export class ListFiltersComponent {
});
}
});
+ this.aggregations().map((item: any) => {
+ this.getFilterNames(item.value.buckets, filters);
+ });
return filters;
}
+ /**
+ * Get displayed name of bucket
+ * and fill in filters list.
+ *
+ * @param buckets - Bucket to get the name from.
+ */
+ getFilterNames(buckets: any, filters) {
+ if (!buckets || buckets.length === 0) {
+ return;
+ }
+ buckets.map((bucket: any) => {
+ for (const k in bucket) {
+ if (bucket[k].buckets) {
+ this.getFilterNames(bucket[k].buckets, filters);
+ }
+ }
+ if (bucket.name) {
+ const index = filters.findIndex((filter: any) => filter.key === bucket.key && filter.aggregationKey === bucket.aggregationKey);
+ if (index > -1) {
+ filters[index].name = bucket.name;
+ filters[index] = {...filters[index]};
+ }
+ }
+ });
+ }
+
/**
* Remove filter.
* @param filter - the filter to remove
diff --git a/projects/rero/ng-core/src/lib/record/search/record-search.component.html b/projects/rero/ng-core/src/lib/record/search/record-search.component.html
index 556c6a05..371a8edf 100644
--- a/projects/rero/ng-core/src/lib/record/search/record-search.component.html
+++ b/projects/rero/ng-core/src/lib/record/search/record-search.component.html
@@ -25,34 +25,35 @@
{{ availableTypes[0].label | translate }}
}
-
+
@if (showSearchInput) {
+ />
}
- @if (loaded && total < 1) {
-
- @if (adminMode.can && addStatus.can) {
-
- } } @else {
+ @if (loaded && hasNoRecord) {
+
+ @if (adminMode.can && addStatus.can) {
+
+ }
+ } @else {
@if (resultsText$ | async; as resultsText) {
@@ -80,6 +81,7 @@
{{ availableTypes[0].label | translate }}