diff --git a/projects/admin/src/app/circulation/checkout/checkout.component.ts b/projects/admin/src/app/circulation/checkout/checkout.component.ts index bd6c889f1..9d45d5883 100644 --- a/projects/admin/src/app/circulation/checkout/checkout.component.ts +++ b/projects/admin/src/app/circulation/checkout/checkout.component.ts @@ -86,7 +86,7 @@ export class CheckoutComponent implements OnInit { if (!searchText) { return null; } - this.searchText = searchText; + this.searchText = searchText.trim(); this.getPatronOrItem(searchText); } @@ -102,7 +102,7 @@ export class CheckoutComponent implements OnInit { item.location.organisation.pid !== this.loggedUser.library.organisation.pid ) { - this.toastService.warning( + this.toastService.error( this.translate.instant('Item or patron not found!'), this.translate.instant('Checkin') ); diff --git a/projects/admin/src/app/circulation/item/item.component.html b/projects/admin/src/app/circulation/item/item.component.html index fd6b1adee..b10fc5908 100644 --- a/projects/admin/src/app/circulation/item/item.component.html +++ b/projects/admin/src/app/circulation/item/item.component.html @@ -20,19 +20,20 @@ class="row p-2 mb-1 border rounded align-middle" *ngIf="item"> -
- {{ item.barcode }}
-
{{ item.document.title | truncateText: 12 }}
-
+
+ +
+ + + + {{ item.actionDone | translate }} + + + + {{ item.actionDone | translate }} + + + + renew + + + {{ item.actionDone | translate }} + + +
diff --git a/projects/admin/src/app/circulation/items-list/items-list.component.ts b/projects/admin/src/app/circulation/items-list/items-list.component.ts index 857040a50..82a3ece8f 100644 --- a/projects/admin/src/app/circulation/items-list/items-list.component.ts +++ b/projects/admin/src/app/circulation/items-list/items-list.component.ts @@ -19,7 +19,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { User } from '../../class/user'; import { ItemAction } from '../items'; - @Component({ selector: 'admin-circulation-items-list', templateUrl: './items-list.component.html' @@ -47,12 +46,6 @@ export class ItemsListComponent { /** Extend loan item action */ extendLoan = ItemAction.extend_loan; - /** Checkin item action */ - checkin = ItemAction.checkin; - - /** Checkout item action */ - checkout = ItemAction.checkout; - /** Constructor */ constructor( ) { diff --git a/projects/admin/src/app/circulation/patron/card/card.component.html b/projects/admin/src/app/circulation/patron/card/card.component.html index 1d1b16257..25a441773 100644 --- a/projects/admin/src/app/circulation/patron/card/card.component.html +++ b/projects/admin/src/app/circulation/patron/card/card.component.html @@ -25,8 +25,8 @@

- {{ patron.last_name }}, - {{ patron.first_name }} + {{ patron.last_name }} + , {{ patron.first_name }}

diff --git a/projects/admin/src/app/circulation/patron/loan/loan.component.ts b/projects/admin/src/app/circulation/patron/loan/loan.component.ts index 490236c23..44aba871d 100644 --- a/projects/admin/src/app/circulation/patron/loan/loan.component.ts +++ b/projects/admin/src/app/circulation/patron/loan/loan.component.ts @@ -89,7 +89,7 @@ export class LoanComponent implements OnInit { if (!searchText) { return null; } - this.searchText = searchText; + this.searchText = searchText.trim(); this.getItem(searchText); } @@ -106,7 +106,7 @@ export class LoanComponent implements OnInit { this.itemsService.getItem(barcode, this.patron.pid).subscribe( newItem => { if (newItem === null) { - this.toastService.warning( + this.toastService.error( this.translate.instant('Item not found'), this.translate.instant('Checkout') ); @@ -122,8 +122,8 @@ export class LoanComponent implements OnInit { this.searchInputFocus = true; } else { if (newItem.pending_loans && newItem.pending_loans[0].patron_pid !== this.patron.pid) { - this.toastService.warning( - this.translate.instant('The item has a request'), + this.toastService.error( + this.translate.instant('Checkout impossible: the item is requested by another patron'), this.translate.instant('Checkout') ); this.searchText = ''; diff --git a/projects/admin/src/app/translate/i18n/de.json b/projects/admin/src/app/translate/i18n/de.json index 33b530f40..70b9c0dbe 100644 --- a/projects/admin/src/app/translate/i18n/de.json +++ b/projects/admin/src/app/translate/i18n/de.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "Ausleihdauer muss grösser als 1 sein.", "Checkout duration must be greater than 0.": "Ausleihdauer muss grösser als 0 sein.", "Checkout duration must be greater than 1.": "Ausleihdauer muss grösser als 1 sein.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "Ausleihe ist von der Ausleihpolitik nicht erlaubt", "Circulation": "Ausleihe", "Circulation Policy": "Ausleihpolitik", @@ -178,6 +179,7 @@ "Record Updated!": "Datensatz aktualisiert!", "Record created!": "Datensatz erstellt!", "Reminder fee amount": "Betrag der Erinnerungsgebühren", + "Renew": "Verlängern", "Renew all": "Alle verlängern", "Renewal": "Verlängerung", "Renewal duration": "Verlängerungsdauer", @@ -208,7 +210,6 @@ "TVA rate": "MwSt.", "The default record cannot be deleted": "Der Standarddatensatz kann nicht gelöscht werden", "The item contains requests": "Das Exemplar hat Bestellungen", - "The item has a request": "Das Exemplar hat eine Bestellung", "The item has been returned from missing": "Das fehlende Exemplar ist jetzt wieder verfügbar", "The item has fees": "The item has fees", "The item is ": "Das Exemplar ist ", @@ -265,7 +266,6 @@ "due_soon": "Ablauf der Ausleihfrist", "ebook": "E-Book", "excluded": "ausgeschlossen", - "extend_loan": "verlängern", "friday": "Freitag", "has # acquisition accounts attached": "hat # Konten angehängt", "has # acquisition order lines attached": "hat # Bestellzeilen angehängt", @@ -355,4 +355,4 @@ "wednesday": "Mittwoch", "week": "Woche", "year": "Jahr" -} \ No newline at end of file +} diff --git a/projects/admin/src/app/translate/i18n/en.json b/projects/admin/src/app/translate/i18n/en.json index 9c62627de..008d822e6 100644 --- a/projects/admin/src/app/translate/i18n/en.json +++ b/projects/admin/src/app/translate/i18n/en.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "Checkout duration must be greater than 1.", "Checkout duration must be greater than 0.": "Checkout duration must be greater than 0.", "Checkout duration must be greater than 1.": "Checkout duration must be greater than 1.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "Checkout is not allowed by circulation policy", "Circulation": "Circulation", "Circulation Policy": "Circulation Policy", @@ -178,6 +179,7 @@ "Record Updated!": "Record Updated!", "Record created!": "Record created!", "Reminder fee amount": "Reminder fee amount", + "Renew": "Renew", "Renew all": "Renew all", "Renewal": "Renewal", "Renewal duration": "Renewal duration", @@ -208,7 +210,6 @@ "TVA rate": "VAT rate", "The default record cannot be deleted": "The default record cannot be deleted", "The item contains requests": "The item contains requests", - "The item has a request": "The item has a request", "The item has been returned from missing": "The item has been returned from missing", "The item has fees": "The item has fees", "The item is ": "The item is ", @@ -265,7 +266,6 @@ "due_soon": "loan expiry notice", "ebook": "ebook", "excluded": "excluded", - "extend_loan": "renew", "friday": "Friday", "has # acquisition accounts attached": "has # accounts attached", "has # acquisition order lines attached": "has # acquisition order lines attached", diff --git a/projects/admin/src/app/translate/i18n/en_US.json b/projects/admin/src/app/translate/i18n/en_US.json index 9327e8e86..c7ea3f6ec 100644 --- a/projects/admin/src/app/translate/i18n/en_US.json +++ b/projects/admin/src/app/translate/i18n/en_US.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "Checkout duration must be great than 1.", "Checkout duration must be greater than 0.": "Checkout duration must be greater than 0.", "Checkout duration must be greater than 1.": "Checkout duration must be greater than 1.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "Checkout is not allowed by circulation policy", "Circulation": "Circulation", "Circulation Policy": "Circulation Policy", @@ -178,6 +179,7 @@ "Record Updated!": "Record Updated!", "Record created!": "Record created!", "Reminder fee amount": "Reminder fee amount", + "Renew": "Renew", "Renew all": "Renew all", "Renewal": "Renewal", "Renewal duration": "Renewal duration", @@ -208,7 +210,6 @@ "TVA rate": "TVA rate", "The default record cannot be deleted": "The default record cannot be deleted", "The item contains requests": "The item contains requests", - "The item has a request": "The item has a request", "The item has been returned from missing": "The item has been returned from missing", "The item has fees": "The item has fees", "The item is ": "The item is ", @@ -265,7 +266,6 @@ "due_soon": "due_soon", "ebook": "ebook", "excluded": "excluded", - "extend_loan": "extend_loan", "friday": "friday", "has # acquisition accounts attached": "has # acquisition accounts attached", "has # acquisition order lines attached": "has # acquisition order lines attached", diff --git a/projects/admin/src/app/translate/i18n/es.json b/projects/admin/src/app/translate/i18n/es.json index 3c730fb3c..b0754de78 100644 --- a/projects/admin/src/app/translate/i18n/es.json +++ b/projects/admin/src/app/translate/i18n/es.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "La duración de préstamo tiene que ser más de 1.", "Checkout duration must be greater than 0.": "La duración de préstamo tiene que ser más de 0.", "Checkout duration must be greater than 1.": "La duración de préstamo tiene que ser más de 1.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "El préstamo no está permitido por la política de circulación", "Circulation": "Circulación", "Circulation Policy": "Política de circulación", @@ -178,6 +179,7 @@ "Record Updated!": "¡El recurso ha sido actualizado!", "Record created!": "¡El recurso ha sido creado!", "Reminder fee amount": "El monto de la tasa del recordatorio", + "Renew": "Renovar préstamo", "Renew all": "Renovar todo", "Renewal": "Renovación", "Renewal duration": "Duración de la renovación", @@ -208,7 +210,6 @@ "TVA rate": "IVA", "The default record cannot be deleted": "El registro predeterminado no se puede suprimir", "The item contains requests": "El ejemplar tiene reservaciones", - "The item has a request": "El ejemplar tiene una reservación", "The item has been returned from missing": "El ejemplar faltante está de nuevo disponible", "The item has fees": "The item has fees", "The item is ": "El ejemplar es", @@ -265,7 +266,6 @@ "due_soon": "aviso de vencimiento", "ebook": "libro electrónico", "excluded": "excluido", - "extend_loan": "renovar préstamo", "friday": "Viernes", "has # acquisition accounts attached": "tiene # cuentas adjuntas", "has # acquisition order lines attached": "tiene # líneas de pedido adjuntas", @@ -355,4 +355,4 @@ "wednesday": "Miercóles", "week": "semana", "year": "año" -} \ No newline at end of file +} diff --git a/projects/admin/src/app/translate/i18n/fr.json b/projects/admin/src/app/translate/i18n/fr.json index 585639298..de1b64f50 100644 --- a/projects/admin/src/app/translate/i18n/fr.json +++ b/projects/admin/src/app/translate/i18n/fr.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "La durée du prêt doit être supérieure à 1.", "Checkout duration must be greater than 0.": "La durée du prêt doit être supérieure à 0.", "Checkout duration must be greater than 1.": "La durée du prêt doit être supérieure à 1.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "Prêt non autorisé par la politique de prêt", "Circulation": "Prêt", "Circulation Policy": "Politique de prêt", @@ -178,6 +179,7 @@ "Record Updated!": "La ressource a été mise à jour!", "Record created!": "La ressource a été créée!", "Reminder fee amount": "Montant des frais de rappel", + "Renew": "Renouveler", "Renew all": "Tout renouveler", "Renewal": "Prolongation", "Renewal duration": "Durée du renouvellement", @@ -208,7 +210,6 @@ "TVA rate": "Taux de TVA", "The default record cannot be deleted": "L'enregistrement par défaut ne peut pas être supprimé", "The item contains requests": "L'exemplaire contient des demandes", - "The item has a request": "L'exemplaire a une demande", "The item has been returned from missing": "L'exemplaire manquant est à nouveau disponible", "The item has fees": "The item has fees", "The item is ": "L'exemplaire est ", @@ -265,7 +266,6 @@ "due_soon": "avis d'échéance", "ebook": "e-book", "excluded": "exclu", - "extend_loan": "prolonger", "friday": "vendredi", "has # acquisition accounts attached": "a # comptes attachés", "has # acquisition order lines attached": "a # lignes de commande attachées", @@ -355,4 +355,4 @@ "wednesday": "mercredi", "week": "semaine", "year": "année" -} \ No newline at end of file +} diff --git a/projects/admin/src/app/translate/i18n/it.json b/projects/admin/src/app/translate/i18n/it.json index 449cdc859..5f3ddd936 100644 --- a/projects/admin/src/app/translate/i18n/it.json +++ b/projects/admin/src/app/translate/i18n/it.json @@ -37,6 +37,7 @@ "Checkout duration must be great than 1.": "La durata del prestito deve essere maggiore di 1 giorno.", "Checkout duration must be greater than 0.": "La durata del prestito deve essere superiore a 0.", "Checkout duration must be greater than 1.": "La durata del prestito deve essere superiore a 1.", + "Checkout impossible: the item is requested by another patron": "Checkout impossible: the item is requested by another patron", "Checkout is not allowed by circulation policy": "Checkout is not allowed by circulation policy", "Circulation": "Prestito", "Circulation Policy": "Politica di prestito", @@ -178,6 +179,7 @@ "Record Updated!": "Il record è stato aggiornato!", "Record created!": "Record creato!", "Reminder fee amount": "Reminder fee amount", + "Renew": "Renew", "Renew all": "Renew all", "Renewal": "Proroga", "Renewal duration": "Durata di proroga", @@ -208,7 +210,6 @@ "TVA rate": "TVA rate", "The default record cannot be deleted": "Il record predefinito non può essere eliminato", "The item contains requests": "L'esemplare ha delle richieste", - "The item has a request": "The item has a request", "The item has been returned from missing": "L'esemplare mancante è di nuovo disponibile", "The item has fees": "The item has fees", "The item is ": "L'esemplare è ", @@ -265,7 +266,6 @@ "due_soon": "due_soon", "ebook": "e-book", "excluded": "excluded", - "extend_loan": "extend_loan", "friday": "venerdì", "has # acquisition accounts attached": "has # acquisition accounts attached", "has # acquisition order lines attached": "has # acquisition order lines attached", @@ -355,4 +355,4 @@ "wednesday": "mercoledì", "week": "settimana", "year": "anno" -} \ No newline at end of file +}