diff --git a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
index 1c859856..49f5da05 100644
--- a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
+++ b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html
@@ -27,11 +27,10 @@
@if (record() && adminMode().can) {
- @if (useStatus && useStatus.can && useStatus.url) {
+ @if (useStatus() && useStatus().can && useStatus().url) {
@@ -40,20 +39,27 @@
}
@if (deleteStatus()) {
-
+
+
+
}
}
diff --git a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
index 5ca302c3..880fdff6 100644
--- a/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
+++ b/projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts
@@ -52,23 +52,6 @@ export class DetailButtonComponent {
/** Delete record message event */
deleteMessageEvent = output
();
- /**
- * define if an action is the primary action for the resource
- * @param actionName - string: the action name to check
- * @return boolean
- */
- isPrimaryAction(actionName: string): boolean {
- switch (actionName) {
- case 'edit':
- case 'update':
- return this.updateStatus() && this.updateStatus().can && (!this.useStatus() || !this.useStatus().can);
- case 'use':
- return this.useStatus() && this.useStatus().can;
- default:
- return false;
- }
- }
-
/** Use the record */
useRecord(): void {
this.recordEvent.emit({ action: 'use', url: this.updateStatus().url })
diff --git a/projects/rero/ng-core/src/lib/record/editor/formly/primeng/select/select.ts b/projects/rero/ng-core/src/lib/record/editor/formly/primeng/select/select.ts
index 4e61906d..b7a97c3d 100644
--- a/projects/rero/ng-core/src/lib/record/editor/formly/primeng/select/select.ts
+++ b/projects/rero/ng-core/src/lib/record/editor/formly/primeng/select/select.ts
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
import { CommonModule } from '@angular/common';
-import { Component, NgModule, OnInit, Type } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, NgModule, OnInit, Type } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { FieldType, FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';
import { FormlySelectModule as FormlyCoreSelectModule, FormlyFieldSelectProps } from '@ngx-formly/core/select';
@@ -53,9 +53,10 @@ export interface IFormlySelectFieldConfig extends FormlyFieldConfig
-
}
-
+
+ }
`,
styles: `
:host ::ng-deep .p-dropdown-panel .p-dropdown-items .p-dropdown-item-group {
@@ -111,6 +113,7 @@ export interface IFormlySelectFieldConfig extends FormlyFieldConfig