diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.spec.ts b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.spec.ts
new file mode 100644
index 000000000..70ba8189f
--- /dev/null
+++ b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.spec.ts
@@ -0,0 +1,57 @@
+/*
+ * RERO ILS UI
+ * Copyright (C) 2020 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 { HttpClientModule } from '@angular/common/http';
+import { LOCALE_ID } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { FormlyModule } from '@ngx-formly/core';
+import { TranslateModule } from '@ngx-translate/core';
+import { RecordModule } from '@rero/ng-core';
+import { BsModalRef } from 'ngx-bootstrap';
+import { ItemRequestComponent } from './item-request.component';
+
+
+describe('ItemRequestComponent', () => {
+ let component: ItemRequestComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [
+ FormsModule,
+ ReactiveFormsModule,
+ FormlyModule,
+ HttpClientModule,
+ RecordModule,
+ TranslateModule.forRoot()
+ ],
+ declarations: [ ItemRequestComponent ],
+ providers: [BsModalRef, {provide: LOCALE_ID, useValue: 'en-US' }]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ItemRequestComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.ts b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.ts
new file mode 100644
index 000000000..08f20a450
--- /dev/null
+++ b/projects/admin/src/app/record/detail-view/document-detail-view/item-request/item-request.component.ts
@@ -0,0 +1,264 @@
+/*
+ * RERO ILS UI
+ * Copyright (C) 2020 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 { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { FormControl, FormGroup } from '@angular/forms';
+import { FormlyFieldConfig } from '@ngx-formly/core';
+import { TranslateService } from '@ngx-translate/core';
+import { RecordService } from '@rero/ng-core';
+import { BsModalRef, BsModalService } from 'ngx-bootstrap';
+import { ToastrService } from 'ngx-toastr';
+import { UserService } from '../../../../service/user.service';
+import { debounceTime, map, shareReplay } from 'rxjs/operators';
+
+@Component({
+ selector: 'admin-item-request',
+ templateUrl: './item-request.component.html'
+})
+export class ItemRequestComponent implements OnInit {
+
+ /** Item pid */
+ private itemPid: string;
+
+ /** Pickup default $ref */
+ private pickupDefaultValue: string;
+
+ /** Current user */
+ private currentUser: any;
+
+ /** form */
+ form: FormGroup = new FormGroup({});
+
+ /** form fields */
+ formFields: FormlyFieldConfig[];
+
+ /** model */
+ model: FormModel;
+
+ /** patron record */
+ patron: any;
+
+ /** Dynamic message for can_request validator */
+ canRequestMessage: string;
+
+ /**
+ * Constructor
+ * @param _modalService - BsModalService
+ * @param _bsModalRef - BsModalRef
+ * @param _userService - UserService
+ * @param _recordService - RecordService
+ * @param _http - HttpClient
+ * @param _toastr - ToastrService
+ * @param _translateService - TranslateService
+ */
+ constructor(
+ private _modalService: BsModalService,
+ private _bsModalRef: BsModalRef,
+ private _userService: UserService,
+ private _recordService: RecordService,
+ private _http: HttpClient,
+ private _toastr: ToastrService,
+ private _translateService: TranslateService
+ ) { }
+
+ /**
+ * Init
+ */
+ ngOnInit() {
+ this.currentUser = this._userService.getCurrentUser();
+ const initialState: any = this._modalService.config.initialState;
+ if (initialState.hasOwnProperty('itemPid')) {
+ this.closeModal();
+ }
+ this.itemPid = initialState.itemPid;
+ this.initForm();
+ }
+
+ /**
+ * Submit form
+ * @param model - Object
+ */
+ submit(model: FormModel) {
+ const body = {
+ item_pid: this.itemPid,
+ pickup_location_pid: model.pickupPid,
+ patron_pid: this.patron.pid,
+ };
+ this._http.post('/api/item/request', body).subscribe(
+ () => {
+ this.closeModal();
+ this._toastr.success(
+ this._translateService.instant('Your new request has been registered.'),
+ this._translateService.instant('Item Request')
+ );
+ },
+ () => {
+ this._toastr.error(
+ this._translateService.instant('An error has occurred. Please try again.'),
+ this._translateService.instant('Item Request'),
+ { disableTimeOut: true }
+ );
+ }
+ );
+ }
+
+ /**
+ * Close modal dialog
+ * @param event - Event
+ */
+ closeModal() {
+ this._bsModalRef.hide();
+ }
+
+ /**
+ * Init form
+ */
+ initForm() {
+ if (this.currentUser) {
+ const organisationPid = this.currentUser.library.organisation.pid;
+ this.getPickupsByOrganisation(organisationPid).subscribe(pickups => {
+ this.formFields = [
+ {
+ key: 'patronBarcode',
+ type: 'input',
+ focus: true,
+ templateOptions: {
+ label: this._translateService.instant('Patron Barcode'),
+ required: true,
+ keydown: (field, event) => {
+ if (event.key === 'Enter') {
+ event.preventDefault();
+ }
+ }
+ },
+ asyncValidators: {
+ userExist: {
+ expression: (fc: FormControl) => {
+ return new Promise((resolve) => {
+ const value = fc.value;
+ if (value.length > 2) {
+ this.getPatron(fc.value).subscribe((result: any) => {
+ if (result.length === 1) {
+ this.patron = result[0].metadata;
+ } else {
+ this.patron = undefined;
+ }
+ resolve((result.length === 1) ? true : false);
+ });
+ }
+ });
+ },
+ message: this._translateService.instant('Patron not found.')
+ },
+ can_request: {
+ expression: (fc: FormControl) => {
+ return new Promise((resolve) => {
+ const value = fc.value;
+ if (value.length > 2) {
+ const libraryPid = this.currentUser.library.pid;
+ const patronBarcode = fc.value;
+ const itemPid = this.itemPid;
+ this._http.get(`/api/item/${itemPid}/can_request/${libraryPid}/${patronBarcode}`)
+ .subscribe((result: any) => {
+ if (!result.can_request) {
+ this.canRequestMessage = result.reason;
+ resolve(false);
+ } else {
+ resolve(true);
+ }
+ });
+ }
+ });
+ },
+ message: () => {
+ return this._translateService.instant(
+ this.canRequestMessage
+ );
+ }
+ }
+ }
+ },
+ {
+ key: 'pickupPid',
+ type: 'select',
+ templateOptions: {
+ label: this._translateService.instant('Pickup location'),
+ required: true,
+ placeholder: this._translateService.instant('Select…'),
+ options: pickups
+ }
+ }
+ ];
+ this.model = {
+ patronBarcode: null,
+ pickupPid: this.pickupDefaultValue
+ };
+ });
+ }
+ }
+
+ /**
+ * Get pickups by organisation pid
+ * @param organisationPid - string
+ * @return observable
+ */
+ private getPickupsByOrganisation(organisationPid: string) {
+ const currentLibrary = this.currentUser.currentLibrary;
+ const query = `is_pickup:true AND organisation.pid:${organisationPid}`;
+ return this._recordService.getRecords(
+ 'locations', query, 1, RecordService.MAX_REST_RESULTS_SIZE,
+ undefined, undefined, undefined, 'pickup_name'
+ ).pipe(
+ map(result => result.hits.total === 0 ? [] : result.hits.hits),
+ map(results => results.map((result: any) => result.metadata)),
+ map(results => results.map((result: any) => {
+ if (
+ this.pickupDefaultValue === undefined
+ && result.library.pid === currentLibrary
+ ) {
+ this.pickupDefaultValue = result.pid;
+ }
+ return {
+ label: result.pickup_name,
+ value: result.pid
+ };
+ }))
+ );
+ }
+
+ /**
+ * Get patron record by barcode
+ * @param barcode - string
+ * @return observable
+ */
+ private getPatron(barcode: string) {
+ const query = `barcode:${barcode}`;
+ return this._recordService.getRecords('patrons', query, 1, 1).pipe(
+ debounceTime(500),
+ map(result => result.hits.total === 0 ? [] : result.hits.hits),
+ shareReplay(1)
+ );
+ }
+}
+
+/**
+ * Interface to define fields on form
+ */
+interface FormModel {
+ patronBarcode: string;
+ pickupPid: string;
+}
diff --git a/projects/admin/src/app/translate/i18n/de.json b/projects/admin/src/app/translate/i18n/de.json
index 85d8e0d14..eac29fffc 100644
--- a/projects/admin/src/app/translate/i18n/de.json
+++ b/projects/admin/src/app/translate/i18n/de.json
@@ -12,6 +12,7 @@
"Allow checkout": "Ausleihe erlauben",
"Allow requests": "Bestellungen erlauben",
"Amount": "Betrag",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "Ein Fehler ist beim Server aufgetreten: ",
"Application": "Anwendung",
"Applies to patron types": "Gilt für Lesertypen",
@@ -43,6 +44,7 @@
"Circulation categories": "Ausleihkategorien",
"Circulation info": "Ausleihinfos",
"Circulation policies": "Ausleihpolitiken",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Ausleiheinstellungen",
"City": "Stadt",
"Close": "Geschlossen",
@@ -104,16 +106,22 @@
"Is part of": "Ist Teil von",
"Is pickup": "Ist Abholort",
"Item": "Exemplar",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Exemplar nicht gefunden",
+ "Item not found!": "Item not found!",
"Item or patron not found!": "Exemplar oder Leser nicht gefunden!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Exemplartypen",
"Items": "Exemplare",
"Language": "Sprache",
"Language of person": "Sprache der Person",
"Level": "Ebene",
- "Libaries": "Bibliotheken",
"Libraries": "Bibliotheken",
"Library": "Bibliothek",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "Die Bibliothek wird in diesem Zeitraum geschlossen sein.",
"Loading…": "Wird geladen...",
"Location": "Standort",
@@ -128,6 +136,7 @@
"Name is required.": "Name ist erforderlich.",
"Name must be at least 2 characters long.": "Der Name muss mindestens 2 Zeichen lang sein.",
"Name must be at least 4 characters long.": "Der Name muss mindestens 4 Zeichen lang sein.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "Keine Aktion erlaubt: das Exemplar gehört zu einer anderen Organisation.",
"No action possible on this item!": "Keine mögliche Aktion auf diesem Exemplar!",
"No loan for the current patron.": "Keine Ausleihe bei diesem Leser.",
@@ -153,8 +162,10 @@
"Organisations": "Organisationen",
"Overdue amount is required.": "Betrag der Erinnerungsgebühr ist erforderlich.",
"Overdue amount must be great than 0.": "Betrag der Erinnerungsgebühr muss grösser als 0 sein.",
- "Patron": "Leser",
+ "Patron": "Benutzer",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "Leser nicht gefunden!",
+ "Patron not found.": "Patron not found.",
"Patron types": "Lesertypen",
"Patrons": "Leser",
"Period": "Zeitraum",
@@ -196,6 +207,7 @@
"Reservation date": "Bestellungsdatum",
"Role": "Rolle",
"Roles": "Rollen",
+ "Select…": "Select…",
"Series": "Reihe",
"Source": "Herkunft",
"Start time format is not correct.": "Das Startzeitformat ist nicht korrekt.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "Aus folgendem Grund können Sie den Datensatz nicht löschen:",
"You cannot delete the record for the following reasons:": "Aus folgenden Gründen können Sie den Datensatz nicht löschen:",
"You do not have sufficient permissions to view this page": "Sie haben keine ausreichenden Berechtigungen, um diese Seite anzuzeigen.",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "Konten",
"acq_order_lines": "Bestellzeilen",
"acq_orders": "Bestellungen",
diff --git a/projects/admin/src/app/translate/i18n/en.json b/projects/admin/src/app/translate/i18n/en.json
index 509bb50b4..f54701baf 100644
--- a/projects/admin/src/app/translate/i18n/en.json
+++ b/projects/admin/src/app/translate/i18n/en.json
@@ -12,6 +12,7 @@
"Allow checkout": "Allow checkout",
"Allow requests": "Allow requests",
"Amount": "Amount",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "An error occured on the server: ",
"Application": "Application",
"Applies to patron types": "Apply to patron types",
@@ -43,6 +44,7 @@
"Circulation categories": "Circulation categories",
"Circulation info": "Circulation info",
"Circulation policies": "Circulation policies",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Circulation settings",
"City": "City",
"Close": "Close",
@@ -104,16 +106,22 @@
"Is part of": "Is part of",
"Is pickup": "Is pickup",
"Item": "Item",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Item not found",
+ "Item not found!": "Item not found!",
"Item or patron not found!": "Item or patron not found!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Item types",
"Items": "Items",
"Language": "Language",
"Language of person": "Language of person",
"Level": "Level",
- "Libaries": "Libraries",
"Libraries": "Libraries",
"Library": "Library",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "Library will be closed during this period.",
"Loading…": "Loading…",
"Location": "Location",
@@ -128,6 +136,7 @@
"Name is required.": "Name is required.",
"Name must be at least 2 characters long.": "Name must be at least 2 characters long.",
"Name must be at least 4 characters long.": "Name must be at least 4 characters long.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "No action allowed: the item belongs to another organisation.",
"No action possible on this item!": "No action possible on this item!",
"No loan for the current patron.": "No loan for the current patron.",
@@ -154,7 +163,9 @@
"Overdue amount is required.": "Overdue amount is required.",
"Overdue amount must be great than 0.": "Overdue amount must be great than 0.",
"Patron": "Patron",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "Patron not found!",
+ "Patron not found.": "Patron not found.",
"Patron types": "Patron types",
"Patrons": "Patrons",
"Period": "Period",
@@ -196,6 +207,7 @@
"Reservation date": "Reservation date",
"Role": "Role",
"Roles": "Roles",
+ "Select…": "Select…",
"Series": "Series",
"Source": "Source",
"Start time format is not correct.": "Start date format is incorrect.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "You cannot delete the record for the following reason:",
"You cannot delete the record for the following reasons:": "You cannot delete the record for the following reasons:",
"You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "accounts",
"acq_order_lines": "order lines",
"acq_orders": "orders",
diff --git a/projects/admin/src/app/translate/i18n/en_US.json b/projects/admin/src/app/translate/i18n/en_US.json
index 3dd82d571..d59b47361 100644
--- a/projects/admin/src/app/translate/i18n/en_US.json
+++ b/projects/admin/src/app/translate/i18n/en_US.json
@@ -12,6 +12,7 @@
"Allow checkout": "Allow checkout",
"Allow requests": "Allow requests",
"Amount": "Amount",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "An error occured on the server: ",
"Application": "Application",
"Applies to patron types": "Applies to patron types",
@@ -43,6 +44,7 @@
"Circulation categories": "Circulation categories",
"Circulation info": "Circulation info",
"Circulation policies": "Circulation policies",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Circulation settings",
"City": "City",
"Close": "Close",
@@ -104,16 +106,22 @@
"Is part of": "Is part of",
"Is pickup": "Is pickup",
"Item": "Item",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Item not found",
+ "Item not found!": "Item not found!",
"Item or patron not found!": "Item or patron not found!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Item types",
"Items": "Items",
"Language": "Language",
"Language of person": "Language of person",
"Level": "Level",
- "Libaries": "Libaries",
"Libraries": "Libraries",
"Library": "Library",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "Library will be closed during this period.",
"Loading…": "Loading…",
"Location": "Location",
@@ -128,6 +136,7 @@
"Name is required.": "Name is required.",
"Name must be at least 2 characters long.": "Name must be at least 2 characters long.",
"Name must be at least 4 characters long.": "Name must be at least 4 characters long.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "No action allowed: the item belongs to another organisation.",
"No action possible on this item!": "No action possible on this item!",
"No loan for the current patron.": "No loan for the current patron.",
@@ -154,7 +163,9 @@
"Overdue amount is required.": "Overdue amount is required.",
"Overdue amount must be great than 0.": "Overdue amount must be great than 0.",
"Patron": "Patron",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "Patron not found!",
+ "Patron not found.": "Patron not found.",
"Patron types": "Patron types",
"Patrons": "Patrons",
"Period": "Period",
@@ -196,6 +207,7 @@
"Reservation date": "Reservation date",
"Role": "Role",
"Roles": "Roles",
+ "Select…": "Select…",
"Series": "Series",
"Source": "Source",
"Start time format is not correct.": "Start time format is not correct.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "You cannot delete the record for the following reason:",
"You cannot delete the record for the following reasons:": "You cannot delete the record for the following reasons:",
"You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "acq_accounts",
"acq_order_lines": "acq_order_lines",
"acq_orders": "acq_orders",
diff --git a/projects/admin/src/app/translate/i18n/es.json b/projects/admin/src/app/translate/i18n/es.json
index ebb0e9d09..005097500 100644
--- a/projects/admin/src/app/translate/i18n/es.json
+++ b/projects/admin/src/app/translate/i18n/es.json
@@ -12,6 +12,7 @@
"Allow checkout": "Permitir préstamo",
"Allow requests": "Permitir reservaciones",
"Amount": "Monto",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "Un error ha ocurido en el servidor",
"Application": "Aplicación",
"Applies to patron types": "Aplicar a los tipos de usuarios",
@@ -43,6 +44,7 @@
"Circulation categories": "Categoría de préstamo",
"Circulation info": "Información de préstamo",
"Circulation policies": "Políticas de circulación",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Parámetros de circulación",
"City": "Ciudad",
"Close": "Cerrar",
@@ -104,16 +106,22 @@
"Is part of": "Forma parte de",
"Is pickup": "Es un mostrador de préstamo",
"Item": "Ejemplar",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Ejemplar no encontrado",
+ "Item not found!": "¡ejemplar no encontrado!",
"Item or patron not found!": "¡ejemplar o usuario no encontrado!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Typo de ejemplar",
"Items": "Ejemplares",
"Language": "Idioma",
"Language of person": "Idioma de una persona",
"Level": "Nivel",
- "Libaries": "Bibliotecas",
"Libraries": "Bibliotecas",
"Library": "Biblioteca",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "La biblioteca estará cerrada durante este período.",
"Loading…": "Cargando...",
"Location": "Depósito",
@@ -128,6 +136,7 @@
"Name is required.": "El nombre es obligatorio.",
"Name must be at least 2 characters long.": "El nombre tiene que comportar al menos 2 caracteres.",
"Name must be at least 4 characters long.": "El nombre tiene que comportar más de 4 caracteres.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "No se permite ninguna acción: el ejemplar pertenece a otra organización.",
"No action possible on this item!": "¡Ninguna acción es posible sobre este ejemplar!",
"No loan for the current patron.": "No hay préstamo para el usuario actual.",
@@ -154,7 +163,9 @@
"Overdue amount is required.": "El monto de las tasas por atraso de libros.",
"Overdue amount must be great than 0.": "El monto de las tasas por atraso de libros tiene que ser más de 0.",
"Patron": "Usuario",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "¡Usuario no encontrado!",
+ "Patron not found.": "Patron not found.",
"Patron types": "Tipos de usuarios",
"Patrons": "Usuarios",
"Period": "Periodo",
@@ -196,6 +207,7 @@
"Reservation date": "Fecha de reservación",
"Role": "Función",
"Roles": "Funcciones",
+ "Select…": "Select…",
"Series": "Series",
"Source": "Fuente",
"Start time format is not correct.": "El formato de la hora de empiezo es incorecto.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "No puede suprimir el recurso para la razón siguiente:",
"You cannot delete the record for the following reasons:": "No puede suprimir el recurso para las razones siguientes:",
"You do not have sufficient permissions to view this page": "No tiene suficientes permisos para ver esta página",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "cuentas",
"acq_order_lines": "líneas de pedido",
"acq_orders": "pedidos",
diff --git a/projects/admin/src/app/translate/i18n/fr.json b/projects/admin/src/app/translate/i18n/fr.json
index 78a773895..9e00a9b7a 100644
--- a/projects/admin/src/app/translate/i18n/fr.json
+++ b/projects/admin/src/app/translate/i18n/fr.json
@@ -12,6 +12,7 @@
"Allow checkout": "Permettre le prêt",
"Allow requests": "Permettre les demandes",
"Amount": "Montant",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "Une erreur est survenue sur le serveur :",
"Application": "Application",
"Applies to patron types": "Appliquer aux types de lecteur",
@@ -43,6 +44,7 @@
"Circulation categories": "Catégories de circulation",
"Circulation info": "Infos de prêt",
"Circulation policies": "Politiques de prêt",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Circulation settings",
"City": "Ville",
"Close": "Fermé",
@@ -104,16 +106,22 @@
"Is part of": "Fait partie de",
"Is pickup": "Est un bureau de prêt",
"Item": "Exemplaire",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Exemplaire non trouvé",
+ "Item not found!": "Item not found!",
"Item or patron not found!": "Exemplaire ou lecteur non trouvé!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Types d'exemplaires",
"Items": "Exemplaires",
"Language": "Langue",
"Language of person": "Langue de la personne",
"Level": "Niveau",
- "Libaries": "Bibliothèques",
"Libraries": "Bibliothèques",
"Library": "Bibliothèque",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "La bibliothèque est fermée durant cette période.",
"Loading…": "Chargement en cours...",
"Location": "Localisation",
@@ -128,6 +136,7 @@
"Name is required.": "Le nom est obligatoire.",
"Name must be at least 2 characters long.": "Le nom doit comporter au moins 2 caractères.",
"Name must be at least 4 characters long.": "Le nom doit comporter au moins 4 caractères.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "Aucune action n'est possible : l'exemplaire appartient à une autre organisation.",
"No action possible on this item!": "Aucune action n'est possible sur cet exemplaire !",
"No loan for the current patron.": "Pas de prêt pour ce lecteur.",
@@ -154,7 +163,9 @@
"Overdue amount is required.": "Le montant des frais de rappel est obligatoire.",
"Overdue amount must be great than 0.": "Le montant des frais de rappel doit être supérieur à 0.",
"Patron": "Lecteur",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "Le lecteur n'a pas été trouvé !",
+ "Patron not found.": "Patron not found.",
"Patron types": "Types de lecteurs",
"Patrons": "Lecteurs",
"Period": "Période",
@@ -196,6 +207,7 @@
"Reservation date": "Date de la réservation",
"Role": "Rôle",
"Roles": "Rôles",
+ "Select…": "Select…",
"Series": "Collection",
"Source": "Source",
"Start time format is not correct.": "Le format de la date de début n'est pas correct.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "Vous ne pouvez pas supprimer l'enregistrement pour la raison suivante : ",
"You cannot delete the record for the following reasons:": "Vous ne pouvez pas supprimer l'enregistrement pour les raisons suivantes : ",
"You do not have sufficient permissions to view this page": "Vous n'avez pas suffisamment de permissions pour voir cette page",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "comptes",
"acq_order_lines": "lignes de commande",
"acq_orders": "commandes",
diff --git a/projects/admin/src/app/translate/i18n/it.json b/projects/admin/src/app/translate/i18n/it.json
index 7b9cb966a..d9ab5834d 100644
--- a/projects/admin/src/app/translate/i18n/it.json
+++ b/projects/admin/src/app/translate/i18n/it.json
@@ -12,6 +12,7 @@
"Allow checkout": "Allow checkout",
"Allow requests": "Allow requests",
"Amount": "Amount",
+ "An error has occurred. Please try again.": "An error has occurred. Please try again.",
"An error occured on the server: ": "Si è verificato un errore sul server: ",
"Application": "Application",
"Applies to patron types": "Si applica ai tipi di lettori",
@@ -43,6 +44,7 @@
"Circulation categories": "Categorie di prestito",
"Circulation info": "Circulation info",
"Circulation policies": "Politiche di prestito",
+ "Circulation policies do not allow request on this item.": "Circulation policies do not allow request on this item.",
"Circulation settings": "Impostazioni per il prestito",
"City": "Città",
"Close": "Chiuso",
@@ -104,16 +106,22 @@
"Is part of": "Fa parte di",
"Is pickup": "È punto di ritiro",
"Item": "Esemplare",
+ "Item Request": "Item Request",
+ "Item is already checkedout to patron.": "Item is already checkedout to patron.",
+ "Item is already requested by patron.": "Item is already requested by patron.",
"Item not found": "Item not found",
+ "Item not found!": "Item not found!",
"Item or patron not found!": "Item or patron not found!",
+ "Item request": "Item request",
+ "Item status does not allow requests": "Item status does not allow requests",
"Item types": "Item types",
"Items": "Esemplari",
"Language": "Lingua",
"Language of person": "Lingua della persona",
"Level": "Livello",
- "Libaries": "Libaries",
"Libraries": "Biblioteche",
"Library": "Biblioteca",
+ "Library not found.": "Library not found.",
"Library will be closed during this period.": "La biblioteca rimarrà chiusa durante questo periodo.",
"Loading…": "Caricamento...",
"Location": "Localizzazione",
@@ -128,6 +136,7 @@
"Name is required.": "Il nome è richiesto.",
"Name must be at least 2 characters long.": "Il nome deve essere lungo almeno 2 caratteri.",
"Name must be at least 4 characters long.": "Il nome deve essere lungo almeno 4 caratteri.",
+ "New Request": "New Request",
"No action allowed: the item belongs to another organisation.": "No action allowed: the item belongs to another organisation.",
"No action possible on this item!": "Nessun'azione possibile su quest'esemplare",
"No loan for the current patron.": "Nessuno prestito da questo lettore.",
@@ -154,7 +163,9 @@
"Overdue amount is required.": "Importo della tassa di richiamo è richiesto.",
"Overdue amount must be great than 0.": "Importo della tassa di richiamo deve essere superiore a 0.",
"Patron": "Lettore",
+ "Patron Barcode": "Patron Barcode",
"Patron not found!": "Lettore non trovato!",
+ "Patron not found.": "Patron not found.",
"Patron types": "Tipi di lettori",
"Patrons": "Lettori",
"Period": "Periodo",
@@ -196,6 +207,7 @@
"Reservation date": "Data di prenotazione",
"Role": "Role",
"Roles": "Ruoli",
+ "Select…": "Select…",
"Series": "Collezione",
"Source": "Fonte",
"Start time format is not correct.": "Il formato dell'ora di inizio non è corretto.",
@@ -236,6 +248,7 @@
"You cannot delete the record for the following reason:": "Non è possibile eliminare il record per il seguente motivo:",
"You cannot delete the record for the following reasons:": "Non è possibile eliminare il record per il seguente motivo:",
"You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page",
+ "Your new request has been registered.": "Your new request has been registered.",
"acq_accounts": "acq_accounts",
"acq_order_lines": "acq_order_lines",
"acq_orders": "acq_orders",
@@ -355,4 +368,4 @@
"wednesday": "mercoledì",
"week": "settimana",
"year": "anno"
-}
+}
\ No newline at end of file
diff --git a/projects/admin/src/manual_translations.ts b/projects/admin/src/manual_translations.ts
index c9f3a9a03..5677ae85a 100644
--- a/projects/admin/src/manual_translations.ts
+++ b/projects/admin/src/manual_translations.ts
@@ -123,3 +123,11 @@ _('due_soon');
_('overdue');
_('availability');
_('recall');
+
+// Item Request messages
+_('Patron not found.');
+_('Library not found.');
+_('Circulation policies do not allow request on this item.');
+_('Item is already checkedout to patron.');
+_('Item is already requested by patron.');
+_('Item status does not allow requests');