diff --git a/projects/admin/src/app/circulation/checkin/checkin-action/checkin-action.component.html b/projects/admin/src/app/circulation/checkin/checkin-action/checkin-action.component.html
index 447fb1c2d..55593f073 100644
--- a/projects/admin/src/app/circulation/checkin/checkin-action/checkin-action.component.html
+++ b/projects/admin/src/app/circulation/checkin/checkin-action/checkin-action.component.html
@@ -14,15 +14,14 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-
-
+
One item and one patron were found.
-
-
+
Checkout/checkin
-
-
-
-
-
-
-
+
+
-
-
-
+ />
-
-
-
-
+ (hasFeesEmitter)="hasFees($event)"
+ />
diff --git a/projects/admin/src/app/circulation/checkin/checkin.component.ts b/projects/admin/src/app/circulation/checkin/checkin.component.ts
index 90b497cbb..31cd06833 100644
--- a/projects/admin/src/app/circulation/checkin/checkin.component.ts
+++ b/projects/admin/src/app/circulation/checkin/checkin.component.ts
@@ -155,7 +155,7 @@ export class CheckinComponent implements OnInit {
item.notes = [];
}
item.notes.push({
- content: error.error.status.replace(/^error:/, '').trim(),
+ content: this.processErrorMessage(error.error.status),
type: ItemNoteType.API
});
this.items.unshift(item);
@@ -163,6 +163,14 @@ export class CheckinComponent implements OnInit {
// catch this error to display it as a Toast message.
this._checkinErrorManagement(error, item);
});
+ } else if (error.error) {
+ this.messageService.add({
+ severity: 'warn',
+ summary: this.translate.instant('Checkin'),
+ detail: this.processErrorMessage(error.error.status),
+ life: CONFIG.MESSAGE_LIFE
+ });
+ this._resetSearchInput();
}
}
});
@@ -227,7 +235,8 @@ export class CheckinComponent implements OnInit {
if (patron.total.value === 1 && item.total.value === 1) {
const ref: DynamicDialogRef = this.dialogService.open(CheckinActionComponent, {
header: this.translate.instant('Circulation action'),
- width: '50vw',
+ focusOnShow: false,
+ width: '25vw',
})
ref.onClose.subscribe((action: string) => {
if (action) {
@@ -316,7 +325,7 @@ export class CheckinComponent implements OnInit {
private _checkinErrorManagement(error: any, item: Item) {
// get the error message from the raised error. This will be the Toast message core.
let message = (error.hasOwnProperty('error') && error.error.hasOwnProperty('status'))
- ? error.error.status.replace(/^error:/, '').trim()
+ ? this.processErrorMessage(error.error.status)
: error.message;
message = this.translate.instant(message);
message += ` ${this.translate.instant('Status')}: ${this.translate.instant(item.status.toString())}`;
@@ -372,6 +381,10 @@ export class CheckinComponent implements OnInit {
}
}
+ private processErrorMessage(message: string): string {
+ return message.replace(/^error:/, '').trim();
+ }
+
/** Reset search input */
private _resetSearchInput(): void {
setTimeout(() => {
diff --git a/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.scss b/projects/admin/src/app/circulation/circulation-main.component.ts
similarity index 52%
rename from projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.scss
rename to projects/admin/src/app/circulation/circulation-main.component.ts
index ab7813f28..b841f059f 100644
--- a/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.scss
+++ b/projects/admin/src/app/circulation/circulation-main.component.ts
@@ -1,6 +1,6 @@
/*
* RERO ILS UI
- * Copyright (C) 2019 RERO
+ * Copyright (C) 2024 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
@@ -14,24 +14,24 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
+import { Component } from '@angular/core';
- @import 'bootstrap/scss/functions';
- @import 'bootstrap/scss/variables';
-
-.item {
- margin-bottom: $spacer * .25 !important;
- padding: $spacer * .25 !important;
- border: $border-width solid $border-color;
- border-radius: $border-radius;
- position: relative;
-
- &:hover{
- background-color: $light;
- }
-
- div.actions {
- position: absolute;
- top: $spacer * .25;
- right: 15px;
- }
+@Component({
+ selector: 'admin-circulation-main',
+ template: `
+
+
+
+
+
+ {{ message.summary }}
+
+
+
+
+
+
+ `
+})
+export class CirculationMainComponent {
}
diff --git a/projects/admin/src/app/circulation/circulation-routing.module.ts b/projects/admin/src/app/circulation/circulation-routing.module.ts
index c2de9654c..e0a76f98a 100644
--- a/projects/admin/src/app/circulation/circulation-routing.module.ts
+++ b/projects/admin/src/app/circulation/circulation-routing.module.ts
@@ -1,6 +1,6 @@
/*
* RERO ILS UI
- * Copyright (C) 2019-2023 RERO
+ * Copyright (C) 2019-2024 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
@@ -14,7 +14,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PERMISSIONS } from '@rero/shared';
@@ -30,67 +29,76 @@ import { PendingComponent } from './patron/pending/pending.component';
import { PickupComponent } from './patron/pickup/pickup.component';
import { ProfileComponent } from './patron/profile/profile.component';
import { keepHistoryGuard } from './guard/keep-history.guard';
+import { CirculationMainComponent } from './circulation-main.component';
const routes: Routes = [
{
path: '',
- redirectTo: 'checkout',
- pathMatch: 'full'
- },
- {
- path: 'patron/:barcode',
- component: MainComponent,
+ component: CirculationMainComponent,
children: [
{
path: '',
- redirectTo: 'loan',
- pathMatch: 'full'
- },
- {
- path: 'loan',
- component: LoanComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ redirectTo: 'checkout',
+ pathMatch: 'full',
},
{
- path: 'pickup',
- component: PickupComponent,
+ path: 'checkout',
+ component: CheckinComponent,
canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
},
{
- path: 'pending',
- component: PendingComponent,
+ path: 'requests',
+ component: MainRequestComponent,
canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
},
{
- path: 'ill',
- component: IllRequestComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ path: 'patron/:barcode',
+ component: MainComponent,
+ children: [
+ {
+ path: '',
+ redirectTo: 'loan',
+ pathMatch: 'full'
+ },
+ {
+ path: 'loan',
+ component: LoanComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'pickup',
+ component: PickupComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'pending',
+ component: PendingComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'ill',
+ component: IllRequestComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'profile',
+ component: ProfileComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'fees',
+ component: PatronTransactionsComponent,
+ canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ },
+ {
+ path: 'history',
+ component: HistoryComponent,
+ canActivate: [ keepHistoryGuard, PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
+ }
+ ]
},
- {
- path: 'profile',
- component: ProfileComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
- },
- {
- path: 'fees',
- component: PatronTransactionsComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
- },
- {
- path: 'history',
- component: HistoryComponent,
- canActivate: [ keepHistoryGuard, PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
- }
]
- }, {
- path: 'checkout',
- component: CheckinComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
- }, {
- path: 'requests',
- component: MainRequestComponent,
- canActivate: [ PermissionGuard ], data: { permissions: [ PERMISSIONS.CIRC_ADMIN ] }
- }
+ },
];
@NgModule({
diff --git a/projects/admin/src/app/circulation/circulation.module.ts b/projects/admin/src/app/circulation/circulation.module.ts
index 833bf3791..32ef718a9 100644
--- a/projects/admin/src/app/circulation/circulation.module.ts
+++ b/projects/admin/src/app/circulation/circulation.module.ts
@@ -20,6 +20,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FormlyModule } from '@ngx-formly/core';
import { RecordModule } from '@rero/ng-core';
import { SharedModule } from '@rero/shared';
+import { AccordionModule } from 'primeng/accordion';
import { ButtonModule } from 'primeng/button';
import { DynamicDialogModule } from 'primeng/dynamicdialog';
import { InputSwitchModule } from 'primeng/inputswitch';
@@ -32,6 +33,7 @@ import { TagModule } from 'primeng/tag';
import { JournalVolumePipe } from 'projects/public-search/src/app/pipe/journal-volume.pipe';
import { CheckinActionComponent } from './checkin/checkin-action/checkin-action.component';
import { CheckinComponent } from './checkin/checkin.component';
+import { CirculationMainComponent } from './circulation-main.component';
import { CirculationRoutingModule } from './circulation-routing.module';
import { ItemComponent } from './item/item.component';
import { ItemsListComponent } from './items-list/items-list.component';
@@ -54,7 +56,7 @@ import { PatronFeeComponent } from './patron/patron-transactions/patron-fee/patr
import {
PatronTransactionEventFormComponent
} from './patron/patron-transactions/patron-transaction-event-form/patron-transaction-event-form.component';
-import { PatronTransactionEventComponent } from './patron/patron-transactions/patron-transaction-event/patron-transaction-event.component';
+import { PatronTransactionHistoryComponent } from './patron/patron-transactions/patron-transaction/patron-transaction-history/patron-transaction-history.component';
import {
DefaultTransactionDetailComponent
} from './patron/patron-transactions/patron-transaction/default-transaction-detail/default-transaction-detail.component';
@@ -69,6 +71,7 @@ import { PickupItemComponent } from './patron/pickup/pickup-item/pickup-item.com
import { PickupComponent } from './patron/pickup/pickup.component';
import { ProfileComponent } from './patron/profile/profile.component';
import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
+import { ScrollPanelModule } from 'primeng/scrollpanel';
@NgModule({
declarations: [
@@ -87,7 +90,6 @@ import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
PickupItemComponent,
PatronTransactionsComponent,
PatronTransactionComponent,
- PatronTransactionEventComponent,
PatronTransactionEventFormComponent,
OverdueTransactionComponent,
DefaultTransactionDetailComponent,
@@ -106,7 +108,9 @@ import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
IllRequestComponent,
IllRequestItemComponent,
JournalVolumePipe,
- CirculationSettingsComponent
+ CirculationSettingsComponent,
+ CirculationMainComponent,
+ PatronTransactionHistoryComponent
],
imports: [
CirculationRoutingModule,
@@ -124,8 +128,10 @@ import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
RippleModule,
MessagesModule,
InputSwitchModule,
- SplitButtonModule
- ],
+ SplitButtonModule,
+ AccordionModule,
+ ScrollPanelModule
+ ],
providers: [
CurrencyPipe
]
diff --git a/projects/admin/src/app/circulation/circulation.scss b/projects/admin/src/app/circulation/circulation.scss
deleted file mode 100644
index 2e8057c8b..000000000
--- a/projects/admin/src/app/circulation/circulation.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * RERO ILS UI
- * Copyright (C) 2023-2024 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
- * 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 .
- */
-
- @import 'bootstrap/scss/functions';
- @import 'bootstrap/scss/variables';
-
- .item {
- margin-bottom: map-get($spacers, 1) !important;
- padding: map-get($spacers, 1) !important;
- border: $border-width solid $border-color;
- border-radius: $border-radius;
- position: relative;
-
- &:hover{
- background-color: $light;
- }
-
- div.actions {
- position: absolute;
- top: map-get($spacers, 1);
- right: 15px;
- }
- }
diff --git a/projects/admin/src/app/circulation/items-list/items-list.component.scss b/projects/admin/src/app/circulation/circulationStatistics.ts
similarity index 70%
rename from projects/admin/src/app/circulation/items-list/items-list.component.scss
rename to projects/admin/src/app/circulation/circulationStatistics.ts
index 8fc910644..c48a4c7e8 100644
--- a/projects/admin/src/app/circulation/items-list/items-list.component.scss
+++ b/projects/admin/src/app/circulation/circulationStatistics.ts
@@ -1,7 +1,6 @@
/*
* RERO ILS UI
- * Copyright (C) 2022 RERO
- * Copyright (C) 2022 UCLouvain
+ * Copyright (C) 2019-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
@@ -15,11 +14,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-
-@import 'bootstrap/scss/functions';
-@import 'bootstrap/scss/variables';
-
-.btn-show-more {
- background-color: transparent !important;
- color: $white;
+export class CirculationStatistics {
+ static FEES = 'fees';
+ static FEES_ENGAGED = 'fees_engaged';
+ static HISTORY = 'history';
+ static ILL = 'ill';
+ static LOAN = 'loan';
+ static PENDING = 'pending';
+ static PICKUP = 'pickup';
}
diff --git a/projects/admin/src/app/circulation/item/item.component.html b/projects/admin/src/app/circulation/item/item.component.html
index 3f520a4a4..ea51016c9 100644
--- a/projects/admin/src/app/circulation/item/item.component.html
+++ b/projects/admin/src/app/circulation/item/item.component.html
@@ -1,6 +1,6 @@
@if (item && !(item.loading || false)) {
-
}
}
diff --git a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html
index 128f8a1aa..a100d8cbf 100644
--- a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html
+++ b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html
@@ -15,9 +15,9 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-
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 effe50a4f..42d9d33a2 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
@@ -20,8 +20,7 @@ import { getTagSeverityFromStatus } from '@app/admin/utils/utils';
@Component({
selector: 'admin-ill-request-item',
- templateUrl: './ill-request-item.component.html',
- styleUrls: ['../../../circulation.scss']
+ templateUrl: './ill-request-item.component.html'
})
export class IllRequestItemComponent {
diff --git a/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html b/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html
index 1b0c09676..0d67ae468 100644
--- a/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html
+++ b/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html
@@ -14,22 +14,31 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-@if (illRequests$ | async; as illRequests) {
-
- @if (illRequests.length > 0) {
-
-
-
Document
+@if(illRequests$ | async; as illRequests) {
+
+
+