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.
-
-
+
{
if (action) {
@@ -316,7 +324,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 +380,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/items-list/items-list.component.scss b/projects/admin/src/app/circulation/circulation-main.component.ts
similarity index 52%
rename from projects/admin/src/app/circulation/items-list/items-list.component.scss
rename to projects/admin/src/app/circulation/circulation-main.component.ts
index 8fc910644..b841f059f 100644
--- a/projects/admin/src/app/circulation/items-list/items-list.component.scss
+++ b/projects/admin/src/app/circulation/circulation-main.component.ts
@@ -1,7 +1,6 @@
/*
* RERO ILS UI
- * Copyright (C) 2022 RERO
- * Copyright (C) 2022 UCLouvain
+ * 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
@@ -15,11 +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';
-
-.btn-show-more {
- background-color: transparent !important;
- color: $white;
+@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..e7297304e 100644
--- a/projects/admin/src/app/circulation/circulation.module.ts
+++ b/projects/admin/src/app/circulation/circulation.module.ts
@@ -32,6 +32,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';
@@ -106,7 +107,8 @@ import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
IllRequestComponent,
IllRequestItemComponent,
JournalVolumePipe,
- CirculationSettingsComponent
+ CirculationSettingsComponent,
+ CirculationMainComponent
],
imports: [
CirculationRoutingModule,
@@ -125,7 +127,7 @@ import { GetLoanCipoPipe } from './pipe/get-loan-cipo.pipe';
MessagesModule,
InputSwitchModule,
SplitButtonModule
- ],
+ ],
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/item/item.component.html b/projects/admin/src/app/circulation/item/item.component.html
index 3f520a4a4..0a4002359 100644
--- a/projects/admin/src/app/circulation/item/item.component.html
+++ b/projects/admin/src/app/circulation/item/item.component.html
@@ -16,32 +16,17 @@
along with this program. If not, see .
-->
@if (item && !(item.loading || false)) {
-
}
diff --git a/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.ts b/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.ts
index 1cac3d87b..b7cc3e234 100644
--- a/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.ts
+++ b/projects/admin/src/app/circulation/main-request/requested-item/requested-item.component.ts
@@ -67,7 +67,6 @@ export class RequestedItemComponent implements OnInit {
getCallout() {
return (this.callout !== null)
? `callout ${this.callout}`
- : 'border rounded';
+ : null;
}
-
}
diff --git a/projects/admin/src/app/circulation/main-request/requested-items-list/requested-items-list.component.html b/projects/admin/src/app/circulation/main-request/requested-items-list/requested-items-list.component.html
index 5eaee360f..01d65f304 100644
--- a/projects/admin/src/app/circulation/main-request/requested-items-list/requested-items-list.component.html
+++ b/projects/admin/src/app/circulation/main-request/requested-items-list/requested-items-list.component.html
@@ -14,25 +14,42 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
+@defer (when items) {
+
+
+