diff --git a/projects/admin/src/app/acquisition/pipes/note-badge-color.pipe.ts b/projects/admin/src/app/acquisition/pipes/note-badge-color.pipe.ts index 6f60b1af7..d5a25a988 100644 --- a/projects/admin/src/app/acquisition/pipes/note-badge-color.pipe.ts +++ b/projects/admin/src/app/acquisition/pipes/note-badge-color.pipe.ts @@ -26,7 +26,7 @@ export class NoteBadgeColorPipe implements PipeTransform { /** * Get the color (class) to use to highlight a note. * @param note: the note to analyze - * @return: the color/class (bootstrap) to use for the note. + * @return: the color/class (primeng) to use for the note. */ transform(note: IAcqNote): string { switch (note.type) { diff --git a/projects/admin/src/app/app.module.ts b/projects/admin/src/app/app.module.ts index de47581c3..4ca940ccf 100644 --- a/projects/admin/src/app/app.module.ts +++ b/projects/admin/src/app/app.module.ts @@ -149,7 +149,6 @@ import { LibraryDetailViewComponent } from './record/detail-view/library-detail- import { LocationComponent } from './record/detail-view/library-detail-view/location/location.component'; import { LocalFieldComponent } from './record/detail-view/local-field/local-field.component'; import { LocationDetailViewComponent } from './record/detail-view/location-detail-view/location-detail-view.component'; -import { OrganisationDetailViewComponent } from './record/detail-view/organisation-detail-view/organisation-detail-view.component'; import { PatronDetailViewComponent } from './record/detail-view/patron-detail-view/patron-detail-view.component'; import { PatronPermissionComponent } from './record/detail-view/patron-detail-view/patron-permissions/patron-permission/patron-permission.component'; import { PatronPermissionsComponent } from './record/detail-view/patron-detail-view/patron-permissions/patron-permissions.component'; @@ -242,7 +241,6 @@ export function appInitFactory(appInitializerService: AppInitializerService): () VendorDetailViewComponent, VendorBriefViewComponent, AddressTypeComponent, - OrganisationDetailViewComponent, RelatedResourceComponent, ItemRequestComponent, ErrorPageComponent, diff --git a/projects/admin/src/app/circulation/item/item.component.html b/projects/admin/src/app/circulation/item/item.component.html index a676fd7a0..f2ee08011 100644 --- a/projects/admin/src/app/circulation/item/item.component.html +++ b/projects/admin/src/app/circulation/item/item.component.html @@ -29,7 +29,7 @@
{{ item.barcode }} @if (isCollapsed) { - + }
@if (item.actionDone) { diff --git a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.ts b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.ts index 42d9d33a2..7a54e38fb 100644 --- a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.ts +++ b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.ts @@ -31,7 +31,7 @@ export class IllRequestItemComponent { isCollapsed: boolean = true; // COMPONENT FUNCTIONS ====================================================== - /** get the bootstrap color to apply on the request status badge */ + /** get the primeng color to apply on the request status badge */ badgeColor(status: string): string { return getTagSeverityFromStatus(status) ; } diff --git a/projects/admin/src/app/components/items/switch-location/item-switch-location-standalone/item-switch-location-standalone.component.html b/projects/admin/src/app/components/items/switch-location/item-switch-location-standalone/item-switch-location-standalone.component.html index 36e9a9ba3..b6b4bacc4 100644 --- a/projects/admin/src/app/components/items/switch-location/item-switch-location-standalone/item-switch-location-standalone.component.html +++ b/projects/admin/src/app/components/items/switch-location/item-switch-location-standalone/item-switch-location-standalone.component.html @@ -1,6 +1,6 @@ @if (item) { -
-

{{ 'Barcode' | translate }} {{ item.barcode }}

- -
+ } diff --git a/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.html b/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.html index 20fa378b9..7fec99374 100644 --- a/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.html +++ b/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.html @@ -1,6 +1,6 @@ -@if (initialLocation.length > 0 && options.length > 0) { +

{{'Switch item location' | translate}}: {{ initialLocationName }} ({{ item.barcode }})

+ +@if (initialLocationName && options.length > 0) {
-
-
-
Source
-
- -
-
- -
-
Target
-
+ +
+ -
-
- -
+ +
+ Cancel + Save +
+
+
} diff --git a/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.ts b/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.ts index f8906753b..298d8b88b 100644 --- a/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.ts +++ b/projects/admin/src/app/components/items/switch-location/item-switch-location/item-switch-location.component.ts @@ -23,7 +23,7 @@ import { LocationService } from '@app/admin/service/location.service'; import { TranslateService } from '@ngx-translate/core'; import { Error, extractIdOnRef } from '@rero/ng-core'; import { UserService } from '@rero/shared'; -import { MessageService, SelectItem, SelectItemGroup } from 'primeng/api'; +import { MessageService, SelectItemGroup } from 'primeng/api'; import { finalize, map } from 'rxjs/operators'; @Component({ @@ -52,7 +52,7 @@ export class ItemSwitchLocationComponent implements OnInit { form: UntypedFormGroup; /** options of the dropdown menu */ options: SelectItemGroup[] = []; - initialLocation: SelectItem[] = []; + initialLocationName = ''; constructor() { this.form = this.formBuilder.group({ @@ -70,14 +70,9 @@ export class ItemSwitchLocationComponent implements OnInit { ) .subscribe(locations => { this._buildOptions(locations); - const filteredLocations = locations.filter(loc => loc.pid === extractIdOnRef(this.item.location.$ref)); - if (filteredLocations) { - const currentLocation = filteredLocations.pop(); - this.initialLocation = [{ - label: currentLocation.name, - value: currentLocation.pid - }]; - } + this.initialLocationName = locations + .filter(loc => loc.pid === extractIdOnRef(this.item.location.$ref)) + .pop().name; }); } diff --git a/projects/admin/src/app/directives/tab-order.directive.ts b/projects/admin/src/app/directives/tab-order.directive.ts deleted file mode 100644 index 312ef0033..000000000 --- a/projects/admin/src/app/directives/tab-order.directive.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2020-2024 RERO - * Copyright (C) 2020 UCLouvain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -// Credit :: https://github.com/valor-software/ngx-bootstrap/issues/823#issuecomment-514976712 - -import { Directive, inject, Input, OnChanges } from '@angular/core'; -import { TabDirective } from 'ngx-bootstrap/tabs'; - -@Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: '[tabOrder]' -}) -export class TabOrderDirective implements OnChanges { - - private tab: TabDirective = inject(TabDirective); - - @Input() tabOrder = 0; - - /** hook OnChanges */ - ngOnChanges() { - (this.tab as any).__tabOrder = +this.tabOrder; - this.tab.tabset.tabs.sort((a: any, b: any) => a.__tabOrder - b.__tabOrder); - } -} diff --git a/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.html b/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.html index a7e264846..2040b72b5 100644 --- a/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.html +++ b/projects/admin/src/app/record/brief-view/issues-brief-view/issues-brief-view.component.html @@ -26,7 +26,7 @@
@if ((callNumber.first | json) !== '{}' || (callNumber.second | json) !== '{}') {
Call number
- +
} } diff --git a/projects/admin/src/app/record/brief-view/loans-brief-view/loans-brief-view.component.html b/projects/admin/src/app/record/brief-view/loans-brief-view/loans-brief-view.component.html index 637fd891c..a170450b3 100644 --- a/projects/admin/src/app/record/brief-view/loans-brief-view/loans-brief-view.component.html +++ b/projects/admin/src/app/record/brief-view/loans-brief-view/loans-brief-view.component.html @@ -52,14 +52,14 @@
{{ record.metadata.document.title | mainTitle }}
@if (record.metadata?.is_late) { overdue ({{ 'due date' | translate }} - + {{record.metadata.end_date | date: 'shortDate' }}) } } @case (loanState.ITEM_AT_DESK) { ({{ 'request expire at' | translate }} - {{ record.metadata.request_expire_date | date: 'shortDate' }}) + {{ record.metadata.request_expire_date | date: 'shortDate' }}) } } diff --git a/projects/admin/src/app/record/brief-view/patrons-brief-view/patrons-brief-view.component.ts b/projects/admin/src/app/record/brief-view/patrons-brief-view/patrons-brief-view.component.ts index 6efd6dcbc..d409f100f 100644 --- a/projects/admin/src/app/record/brief-view/patrons-brief-view/patrons-brief-view.component.ts +++ b/projects/admin/src/app/record/brief-view/patrons-brief-view/patrons-brief-view.component.ts @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -import { Component, inject, Input, OnInit } from '@angular/core'; +import { Component, inject, Input } from '@angular/core'; import { ResultItem } from '@rero/ng-core'; import { PERMISSIONS, PermissionsService } from '@rero/shared'; import { roleTagSeverity } from '../../../utils/roles'; @@ -46,7 +46,7 @@ export class PatronsBriefViewComponent implements ResultItem { /** * Get the color badge to apply for a specific role * @param role: the role to check. - * @return the bootstrap badge class to use for this role. + * @return the primeng badge class to use for this role. */ getRoleTagSeverity(role: string): string { return roleTagSeverity(role); diff --git a/projects/admin/src/app/record/circulation-logs/circulation-log/circulation-log-notification/circulation-log-notification.component.html b/projects/admin/src/app/record/circulation-logs/circulation-log/circulation-log-notification/circulation-log-notification.component.html index 0a2e1543f..ae3303710 100644 --- a/projects/admin/src/app/record/circulation-logs/circulation-log/circulation-log-notification/circulation-log-notification.component.html +++ b/projects/admin/src/app/record/circulation-logs/circulation-log/circulation-log-notification/circulation-log-notification.component.html @@ -73,7 +73,7 @@ @if (notificationRecord.notification_sent) { {{ 'message sent' | translate }} } @else { - {{ 'message not sent' | translate }} + {{ 'message not sent' | translate }} } } diff --git a/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.html b/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.html index e083c84ef..94201b3ba 100644 --- a/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.html +++ b/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.html @@ -15,44 +15,42 @@ along with this program. If not, see . --> -
-
+
+
- @if (serialPatternsTemplate != null) { -
-
-
-
Examples (preview)
-
-
- @if (!serialPreviewError) { - @if (serialPreviewExamples && serialPreviewExamples.length > 0) { -
    - @for (issue of serialPreviewExamples | slice:0:10; track issue) { -
  • {{ issue.issue }}
  • - } -
- ... -
    - @for (issue of serialPreviewExamples | slice:97:100; track issue) { -
  • {{ issue.issue }}
  • - } - -
- } @else { - +
+ + @if (!serialPreviewError) { + @if (serialPreviewExamples && serialPreviewExamples.length > 0) { +
    + @for (issue of serialPreviewExamples | slice:0:10; track issue) { +
  • {{ issue.issue }}
  • + } +
+ … +
    + @for (issue of serialPreviewExamples | slice:97:100; track issue) { +
  • {{ issue.issue }}
  • } +
+ } @else { + + } - } @else { - - } -
-
-
- } + } @else { + + } + +
diff --git a/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.ts b/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.ts index 1a4caeccc..8d20f3176 100644 --- a/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.ts +++ b/projects/admin/src/app/record/custom-editor/holding-editor/holding-editor.component.ts @@ -1,6 +1,6 @@ /* * RERO ILS UI - * Copyright (C) 2020-2024 RERO + * Copyright (C) 2020-2025 RERO * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -17,7 +17,7 @@ import { Component, inject, OnDestroy, OnInit } from '@angular/core'; import { AbstractCanDeactivateComponent, removeEmptyValues } from '@rero/ng-core'; import { BehaviorSubject, of, Subscription } from 'rxjs'; -import { catchError, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators'; +import { catchError, debounceTime, distinctUntilChanged, switchMap, tap } from 'rxjs/operators'; import { EditorService } from '../../../service/editor.service'; import { PredictionIssue } from '../../../service/holdings.service'; @@ -98,14 +98,13 @@ export class HoldingEditorComponent extends AbstractCanDeactivateComponent imple */ modelChanged(modelValue) { modelValue = removeEmptyValues(modelValue); - if ( - modelValue.patterns - && modelValue.patterns.template - ) { + if (modelValue.patterns && modelValue.patterns.template) { this.serialPatternsTemplate = modelValue.patterns.template; this.serialPreviewError = null; + this.serialPreviewExamples = []; this.predictionModel$.next(modelValue); } else { + this.serialPreviewExamples = []; this.serialPatternsTemplate = null; } } diff --git a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html index 306d97734..940399cdb 100644 --- a/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component.html @@ -58,7 +58,7 @@

{{ record.metadata.name | translate }}

@if (record.metadata.is_default) { } @else { - + } @@ -86,14 +86,14 @@

{{ record.metadata.name | translate }}

@if (record.metadata.automatic_renewal) { } @else { - + } } @else {
- +
}
Allow requests
@@ -101,7 +101,7 @@

{{ record.metadata.name | translate }}

@if (record.metadata.allow_requests) { } @else { - + } diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html index 6e1dd9fe1..e82946916 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding-organisation/holding-organisation.component.html @@ -21,7 +21,7 @@ @if (otherOrganisationCount > 0) {
Other organisations
- + } } @loading { diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding-item-temporary-item-type/holding-item-temporary-item-type.component.ts b/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding-item-temporary-item-type/holding-item-temporary-item-type.component.ts index 08a312c01..3ee24efea 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding-item-temporary-item-type/holding-item-temporary-item-type.component.ts +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding-item-temporary-item-type/holding-item-temporary-item-type.component.ts @@ -30,7 +30,7 @@ import { DateTime } from 'luxon';
{{ record.metadata.temporary_item_type.pid | getRecord:'item_types': 'field':'name' | async }} @if (record.metadata.temporary_item_type.end_date; as endDate) { -   +   ( {{ endDate | dateTranslate :'shortDate' }}) } diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holdings/holdings.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holdings/holdings.component.html index ab1b2594d..d0998e287 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holdings/holdings.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holdings/holdings.component.html @@ -23,13 +23,13 @@ @if (holdings) { - + @for (holding of holdings; track holding; let i = $index) {
} diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/received-issue/received-issue.component.html b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/received-issue/received-issue.component.html index 3b3bc0b0c..d0b3fd301 100644 --- a/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/received-issue/received-issue.component.html +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/received-issue/received-issue.component.html @@ -37,7 +37,7 @@ @if (issue.metadata.notes) { } - + @if (issue.metadata?.issue?.claims?.counter > 0 && isCollapsed) { } @@ -51,7 +51,7 @@