From 5e5a75a0c97dc67a71032f2d4adc61d92a6fda16 Mon Sep 17 00:00:00 2001 From: Renaud Michotte Date: Wed, 13 May 2020 15:14:03 +0200 Subject: [PATCH] serial: receive an issue Creates components and services allowing to receive an issue item. * Creates component for 'serial' type holding. * Adapts `ItemsRoute` to pre-populate the item editor with holding data in case where user add/update an issue item. * Adapts and corrects `HoldingRoute` allowing to display an holding detail view. * Moves `item.service` from CirculationModule to AppModule. * Adapts the document detail view to correctly display item from serial type holding. Co-authored-by : Renaud Michotte --- projects/admin/src/app/app.module.ts | 43 ++-- .../circulation/checkin/checkin.component.ts | 2 +- .../app/circulation/item/item.component.ts | 2 +- .../items-list/items-list.component.ts | 2 +- .../main-request.component.spec.ts | 2 + .../patron-transaction.service.spec.ts | 27 ++- .../circulation/patron/loan/loan.component.ts | 9 +- .../overdue-transaction.component.ts | 2 +- .../src/app/{circulation => class}/items.ts | 8 +- .../documents-brief-view.component.html | 9 +- .../holding-editor.component.html | 4 +- .../holding-editor.component.ts | 28 ++- .../default-holding-item.component.html} | 26 +-- .../default-holding-item.component.ts} | 44 ++-- .../holding/holding.component.html | 92 ++++++-- .../holding/holding.component.ts | 72 +++++-- .../serial-holding-item.component.html | 69 ++++++ .../serial-holding-item.component.ts | 30 +++ .../holding-detail-view.component.html | 23 ++ .../holding-detail-view.component.ts | 68 ++++++ .../serial-holding-detail-view.component.html | 162 ++++++++++++++ .../serial-holding-detail-view.component.ts | 202 ++++++++++++++++++ .../serial-holding-detail-view.style.scss | 13 ++ .../item-detail-view.component.html | 52 ++++- .../item-detail-view.component.ts | 5 + .../item-transaction.component.ts | 2 +- .../admin/src/app/routes/holdings-route.ts | 38 +--- projects/admin/src/app/routes/items-route.ts | 98 +++++++-- .../admin/src/app/routes/patrons-route.ts | 2 +- .../src/app/routes/route-tool.service.ts | 24 ++- projects/admin/src/app/scss/styles.scss | 6 + .../admin/src/app/service/editor.service.ts | 10 +- .../holdings.service.spec.ts} | 17 +- .../admin/src/app/service/holdings.service.ts | 81 +++++++ .../src/app/service/items.service.spec.ts | 17 +- .../admin/src/app/service/items.service.ts | 36 +++- .../admin/src/app/service/patron.service.ts | 2 +- .../app/service/record-permission.service.ts | 3 +- .../src/app/shared/shared-pipes.module.ts | 4 + .../src/assets/rero-ils-ui/admin/i18n/ar.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/de.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/en.json | 25 ++- .../assets/rero-ils-ui/admin/i18n/en_US.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/es.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/fr.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/it.json | 25 ++- .../src/assets/rero-ils-ui/admin/i18n/nl.json | 25 ++- .../person-brief.component.spec.ts | 12 +- 48 files changed, 1328 insertions(+), 220 deletions(-) rename projects/admin/src/app/{circulation => class}/items.ts (97%) rename projects/admin/src/app/record/detail-view/document-detail-view/{holding-item/holding-item.component.html => holding/default-holding-item/default-holding-item.component.html} (79%) rename projects/admin/src/app/record/detail-view/document-detail-view/{holding-item/holding-item.component.ts => holding/default-holding-item/default-holding-item.component.ts} (84%) create mode 100644 projects/admin/src/app/record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component.html create mode 100644 projects/admin/src/app/record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component.ts create mode 100644 projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.html create mode 100644 projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.ts create mode 100644 projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.html create mode 100644 projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.ts create mode 100644 projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.style.scss rename projects/admin/src/app/{circulation/items.spec.ts => service/holdings.service.spec.ts} (61%) create mode 100644 projects/admin/src/app/service/holdings.service.ts diff --git a/projects/admin/src/app/app.module.ts b/projects/admin/src/app/app.module.ts index 2f9ccf6c9..76b013ed5 100644 --- a/projects/admin/src/app/app.module.ts +++ b/projects/admin/src/app/app.module.ts @@ -15,14 +15,21 @@ * along with this program. If not, see . */ -import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; +import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; import { LOCALE_ID, NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FormlyModule } from '@ngx-formly/core'; import { TranslateLoader as BaseTranslateLoader, TranslateModule } from '@ngx-translate/core'; -import { CoreConfigService, RecordModule, TranslateService } from '@rero/ng-core'; +import { CoreConfigService, RecordModule, TranslateLoader, TranslateService } from '@rero/ng-core'; +import { CollapseModule } from 'ngx-bootstrap/collapse'; +import { BsDatepickerModule, BsLocaleService } from 'ngx-bootstrap/datepicker'; +import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; +import { PopoverModule } from 'ngx-bootstrap/popover'; +import { TabsModule } from 'ngx-bootstrap/tabs'; +import { TooltipModule } from 'ngx-bootstrap/tooltip'; +import { TypeaheadModule } from 'ngx-bootstrap/typeahead'; import { UiSwitchModule } from 'ngx-toggle-switch'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -57,6 +64,7 @@ import { import { AcquisitionOrderLinesComponent } from './record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component'; +import { OrderLineComponent } from './record/detail-view/acquisition-order-detail-view/order-lines/order-line/order-line.component'; import { AcquisitionOrderLineDetailViewComponent } from './record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component'; @@ -66,12 +74,21 @@ import { AcquisitionAccountsComponent } from './record/detail-view/budget-detail import { BudgetDetailViewComponent } from './record/detail-view/budget-detail-view/budget-detail-view.component'; import { CircPolicyDetailViewComponent } from './record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component'; import { DocumentDetailViewComponent } from './record/detail-view/document-detail-view/document-detail-view.component'; -import { HoldingItemComponent } from './record/detail-view/document-detail-view/holding-item/holding-item.component'; +import { + DefaultHoldingItemComponent +} from './record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component'; import { HoldingComponent } from './record/detail-view/document-detail-view/holding/holding.component'; +import { + SerialHoldingItemComponent +} from './record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component'; import { HoldingsComponent } from './record/detail-view/document-detail-view/holdings/holdings.component'; import { ItemRequestComponent } from './record/detail-view/document-detail-view/item-request/item-request.component'; import { RelatedResourceComponent } from './record/detail-view/document-detail-view/related-resource/related-resource.component'; import { ResourceComponent } from './record/detail-view/document-detail-view/resource/resource.component'; +import { HoldingDetailViewComponent } from './record/detail-view/holding-detail-view/holding-detail-view.component'; +import { + SerialHoldingDetailViewComponent +} from './record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component'; import { ItemDetailViewComponent } from './record/detail-view/item-detail-view/item-detail-view.component'; import { ItemTransactionComponent } from './record/detail-view/item-detail-view/item-transaction/item-transaction.component'; import { ItemTransactionsComponent } from './record/detail-view/item-detail-view/item-transactions/item-transactions.component'; @@ -93,16 +110,6 @@ import { RemoteAutocompleteInputTypeComponent } from './record/editor/remote-aut import { ItemAvailabilityComponent } from './record/item-availability/item-availability.component'; import { AppConfigService } from './service/app-config.service'; import { SharedPipesModule } from './shared/shared-pipes.module'; -import { TranslateLoader } from '@rero/ng-core'; -import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'; -import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { CollapseModule } from 'ngx-bootstrap/collapse'; -import { TypeaheadModule } from 'ngx-bootstrap/typeahead'; -import { TabsModule } from 'ngx-bootstrap/tabs'; -import { TooltipModule } from 'ngx-bootstrap/tooltip'; -import { PopoverModule } from 'ngx-bootstrap/popover'; -import { BsLocaleService } from 'ngx-bootstrap/datepicker'; -import { OrderLineComponent } from './record/detail-view/acquisition-order-detail-view/order-lines/order-line/order-line.component'; @NgModule({ declarations: [ @@ -133,7 +140,6 @@ import { OrderLineComponent } from './record/detail-view/acquisition-order-detai DocumentDetailViewComponent, HoldingEditorComponent, HoldingComponent, - HoldingItemComponent, HoldingsComponent, BioInformationsPipe, BirthDatePipe, @@ -174,7 +180,11 @@ import { OrderLineComponent } from './record/detail-view/acquisition-order-detai ResourceComponent, ItemRequestComponent, ErrorPageComponent, - OrderLineComponent + OrderLineComponent, + SerialHoldingItemComponent, + SerialHoldingDetailViewComponent, + HoldingDetailViewComponent, + DefaultHoldingItemComponent ], imports: [ AppRoutingModule, @@ -264,7 +274,8 @@ import { OrderLineComponent } from './record/detail-view/acquisition-order-detai BudgetDetailViewComponent, OrganisationDetailViewComponent, ItemRequestComponent, - ErrorPageComponent + ErrorPageComponent, + HoldingDetailViewComponent ], bootstrap: [AppComponent] }) diff --git a/projects/admin/src/app/circulation/checkin/checkin.component.ts b/projects/admin/src/app/circulation/checkin/checkin.component.ts index 6a231cc16..e0734f387 100644 --- a/projects/admin/src/app/circulation/checkin/checkin.component.ts +++ b/projects/admin/src/app/circulation/checkin/checkin.component.ts @@ -25,7 +25,7 @@ import { User } from '../../class/user'; import { ItemsService } from '../../service/items.service'; import { PatronService } from '../../service/patron.service'; import { UserService } from '../../service/user.service'; -import { Item, ItemAction, ItemNoteType, ItemStatus } from '../items'; +import { Item, ItemAction, ItemNoteType, ItemStatus } from '../../class/items'; @Component({ selector: 'admin-circulation-checkout', diff --git a/projects/admin/src/app/circulation/item/item.component.ts b/projects/admin/src/app/circulation/item/item.component.ts index d18b1542f..b43995780 100644 --- a/projects/admin/src/app/circulation/item/item.component.ts +++ b/projects/admin/src/app/circulation/item/item.component.ts @@ -21,7 +21,7 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { ItemsService } from '../../service/items.service'; import { OrganisationService } from '../../service/organisation.service'; -import { Item, ItemAction, Loan, LoanState } from '../items'; +import { Item, ItemAction, Loan, LoanState } from '../../class/items'; import { PatronTransactionService } from '../patron-transaction.service'; @Component({ 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 82a3ece8f..8fdddcb46 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 @@ -17,7 +17,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { User } from '../../class/user'; -import { ItemAction } from '../items'; +import { ItemAction } from '../../class/items'; @Component({ selector: 'admin-circulation-items-list', diff --git a/projects/admin/src/app/circulation/main-request/main-request.component.spec.ts b/projects/admin/src/app/circulation/main-request/main-request.component.spec.ts index 8341a430f..267574f15 100644 --- a/projects/admin/src/app/circulation/main-request/main-request.component.spec.ts +++ b/projects/admin/src/app/circulation/main-request/main-request.component.spec.ts @@ -17,6 +17,7 @@ import { HttpClientModule } from '@angular/common/http'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; import { CirculationModule } from '../circulation.module'; import { MainRequestComponent } from './main-request.component'; @@ -29,6 +30,7 @@ describe('MainRequestComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ + RouterTestingModule, HttpClientModule, TranslateModule.forRoot(), CirculationModule diff --git a/projects/admin/src/app/circulation/patron-transaction.service.spec.ts b/projects/admin/src/app/circulation/patron-transaction.service.spec.ts index 9f67fd686..c77f94c99 100644 --- a/projects/admin/src/app/circulation/patron-transaction.service.spec.ts +++ b/projects/admin/src/app/circulation/patron-transaction.service.spec.ts @@ -1,10 +1,25 @@ -import { TestBed } from '@angular/core/testing'; - -import { PatronTransactionService } from './patron-transaction.service'; +/* + * RERO ILS UI + * Copyright (C) 2019 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 { TranslateModule } from '@ngx-translate/core'; +import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { ToastrModule } from 'ngx-toastr'; +import { TranslateModule } from '@ngx-translate/core'; +import { CirculationModule } from './circulation.module'; +import { PatronTransactionService } from './patron-transaction.service'; describe('PatronTransactionService', () => { beforeEach(() => TestBed.configureTestingModule({ @@ -12,7 +27,7 @@ describe('PatronTransactionService', () => { TranslateModule.forRoot({}), HttpClientModule, RouterTestingModule, - ToastrModule.forRoot() + CirculationModule ] })); 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 c9d3d45f1..fe3985882 100644 --- a/projects/admin/src/app/circulation/patron/loan/loan.component.ts +++ b/projects/admin/src/app/circulation/patron/loan/loan.component.ts @@ -20,11 +20,11 @@ import { TranslateService } from '@ngx-translate/core'; import { ToastrService } from 'ngx-toastr'; import { forkJoin } from 'rxjs'; import { User } from '../../../class/user'; -import { PatronBlockedMessagePipe } from '../../../pipe/patron-blocked-message.pipe'; -import { ItemsService } from '../../../service/items.service'; import { PatronService } from '../../../service/patron.service'; import { UserService } from '../../../service/user.service'; -import { Item, ItemAction, ItemNoteType, ItemStatus } from '../../items'; +import { Item, ItemAction, ItemNoteType, ItemStatus } from '../../../class/items'; +import { ItemsService } from '../../../service/items.service'; +import { PatronBlockedMessagePipe } from '../../../pipe/patron-blocked-message.pipe'; @Component({ selector: 'admin-loan', @@ -265,7 +265,4 @@ export class LoanComponent implements OnInit { ); } } - - } - diff --git a/projects/admin/src/app/circulation/patron/patron-transactions/patron-transaction/overdue-transaction/overdue-transaction.component.ts b/projects/admin/src/app/circulation/patron/patron-transactions/patron-transaction/overdue-transaction/overdue-transaction.component.ts index cba713cd4..dbcdddc15 100644 --- a/projects/admin/src/app/circulation/patron/patron-transactions/patron-transaction/overdue-transaction/overdue-transaction.component.ts +++ b/projects/admin/src/app/circulation/patron/patron-transactions/patron-transaction/overdue-transaction/overdue-transaction.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { RecordService } from '@rero/ng-core'; import { map, mergeMap } from 'rxjs/operators'; -import { Item } from '../../../../items'; +import { Item } from '../../../../../class/items'; import { PatronTransaction } from '../../../../patron-transaction'; @Component({ diff --git a/projects/admin/src/app/circulation/items.ts b/projects/admin/src/app/class/items.ts similarity index 97% rename from projects/admin/src/app/circulation/items.ts rename to projects/admin/src/app/class/items.ts index cc7b8136b..9130617c8 100644 --- a/projects/admin/src/app/circulation/items.ts +++ b/projects/admin/src/app/class/items.ts @@ -21,7 +21,7 @@ import { marker } from '@biesbjerg/ngx-translate-extract-marker'; import * as moment from 'moment'; import { Moment } from 'moment'; -import { User } from '../class/user'; +import { User } from './user'; import { RecordPermission } from '../service/record-permission.service'; export function _(str) { @@ -44,6 +44,12 @@ export enum ItemNoteType { CHECKOUT = _('checkout_note') } +export enum IssueItemStatus { + RECEIVED = _('received'), + CLAIMED = _('claimed'), + DELETED = _('deleted') +} + export enum LoanState { CREATED = _('CREATED'), PENDING = _('PENDING'), diff --git a/projects/admin/src/app/record/brief-view/documents-brief-view/documents-brief-view.component.html b/projects/admin/src/app/record/brief-view/documents-brief-view/documents-brief-view.component.html index b16df7cbb..ca48c0614 100644 --- a/projects/admin/src/app/record/brief-view/documents-brief-view/documents-brief-view.component.html +++ b/projects/admin/src/app/record/brief-view/documents-brief-view/documents-brief-view.component.html @@ -16,7 +16,14 @@ -->
- {{ record.metadata.ui_title_text }} + + + {{ record.metadata.ui_title_text }} + + + {{ record.metadata.title | mainTitle }} + + – {{ record.metadata.type | 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 c0e06ebc6..3e2489682 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 @@ -11,11 +11,11 @@
Examples (preview)
    -
  • {{issue}}
  • +
  • {{issue.issue}}
...
    -
  • {{issue}}
  • +
  • {{issue.issue}}
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 f73d30a9c..5a82ab234 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,24 @@ +/* + * 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 { Component } from '@angular/core'; -import { EditorService } from '../../../service/editor.service'; import { removeEmptyValues } from '@rero/ng-core'; +import { EditorService } from '../../../service/editor.service'; +import { PredictionIssue } from '../../../service/holdings.service'; /** * Holding specific editor. @@ -17,7 +35,7 @@ export class HoldingEditorComponent { model = {}; /** Current list of the serial preview examples */ - serialPreviewExamples = []; + serialPreviewExamples: Array = []; /** Number of the serial preview examples */ numberOfSerialPreviewExamples = 100; @@ -42,9 +60,9 @@ export class HoldingEditorComponent { this.serialPreviewError = null; if (modelValue.patterns && modelValue.patterns.template) { this._editorService.getHoldingPatternPreview(modelValue, this.numberOfSerialPreviewExamples).subscribe( - response => { - if (response && response.issues && response.issues.length > 0) { - this.serialPreviewExamples = response.issues; + (predictions) => { + if (predictions && predictions.length > 0) { + this.serialPreviewExamples = predictions; } }, (error: any) => { diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.html similarity index 79% rename from projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.html rename to projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.html index 9db155324..7b5619fe3 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.html @@ -1,18 +1,18 @@
diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.ts b/projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.ts similarity index 84% rename from projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.ts rename to projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.ts index a5bde7027..687b94e3f 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-item/holding-item.component.ts +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding/default-holding-item/default-holding-item.component.ts @@ -15,21 +15,21 @@ * along with this program. If not, see . */ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { RecordUiService } from '@rero/ng-core'; import { BsModalService } from 'ngx-bootstrap/modal'; +import { RecordUiService } from '@rero/ng-core'; +import { forkJoin } from 'rxjs'; +import { first } from 'rxjs/operators'; import { ItemsService } from 'projects/admin/src/app/service/items.service'; import { RecordPermissionService } from 'projects/admin/src/app/service/record-permission.service'; import { UserService } from 'projects/admin/src/app/service/user.service'; -import { forkJoin } from 'rxjs'; -import { first } from 'rxjs/operators'; -import { ItemRequestComponent } from '../item-request/item-request.component'; +import { ItemRequestComponent } from '../../item-request/item-request.component'; @Component({ - selector: 'admin-holding-item', - templateUrl: './holding-item.component.html' + selector: 'admin-default-holding-item', + templateUrl: './default-holding-item.component.html' }) -export class HoldingItemComponent implements OnInit { +export class DefaultHoldingItemComponent implements OnInit { /** Holding record */ @Input() holding: any; @@ -44,17 +44,6 @@ export class HoldingItemComponent implements OnInit { permissions: any; - - /** Check if the holding owning library correspond to the current user library affilation. - * - * Used to display the request button. A more advanced test is performed when the patron barcode is known. - * @returns - true if match - */ - get isHoldingMatchUserLibraryPID(): boolean { - return this._userService.getCurrentUser().currentLibrary - === this.holding.metadata.library.pid; - } - /** * Constructor * @param _recordUiService - RecordUiService @@ -64,11 +53,11 @@ export class HoldingItemComponent implements OnInit { * @param _itemService - ItemService */ constructor( - private _recordUiService: RecordUiService, - private _recordPermissionService: RecordPermissionService, - private _userService: UserService, - private _modalService: BsModalService, - private _itemService: ItemsService + protected _recordUiService: RecordUiService, + protected _recordPermissionService: RecordPermissionService, + protected _userService: UserService, + protected _modalService: BsModalService, + protected _itemService: ItemsService ) { } /** Init */ @@ -87,6 +76,15 @@ export class HoldingItemComponent implements OnInit { }); } + /** Check if the holding owning library correspond to the current user library affiliation. + * + * Used to display the request button. A more advanced test is performed when the patron barcode is known. + * @returns - true if match + */ + get isHoldingMatchUserLibraryPID(): boolean { + return this._userService.getCurrentUser().currentLibrary === this.holding.metadata.library.pid; + } + /** * Add request on item and refresh permissions * @param itemPid - string diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding.component.html index 6189b913c..302e2e019 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding/holding.component.html @@ -18,25 +18,32 @@
-
+
+ + {{ location.metadata.library.pid | getRecord: 'libraries' : 'field' : 'name' | async }}: + {{ location.metadata.name }} +
-
- {{ location.metadata.library.pid | getRecord: 'libraries' : 'field' : 'name' | async }}: - {{ location.metadata.name }} -
-
+
{{ holding.metadata.circulation_category.pid | getRecord: 'item_types' : 'field' : 'name' | async }}
-
- +
+ + + + + + + +
+
+ + + + +
+
+
+
+ + diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component.ts b/projects/admin/src/app/record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component.ts new file mode 100644 index 000000000..cc0dd9eef --- /dev/null +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding/serial-holding-item/serial-holding-item.component.ts @@ -0,0 +1,30 @@ +/* + * 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 { Component } from '@angular/core'; +import { IssueItemStatus } from 'projects/admin/src/app/class/items'; +import { DefaultHoldingItemComponent } from '../default-holding-item/default-holding-item.component'; + +@Component({ + selector: 'admin-serial-holding-item', + templateUrl: './serial-holding-item.component.html' +}) +export class SerialHoldingItemComponent extends DefaultHoldingItemComponent { + + /** reference to ItemIssueStatus */ + itemIssueStatus = IssueItemStatus; + +} diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.html b/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.html new file mode 100644 index 000000000..5bece9ba1 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.html @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.ts b/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.ts new file mode 100644 index 000000000..ccfd7e9a8 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/holding-detail-view.component.ts @@ -0,0 +1,68 @@ +/* + * RERO ILS UI + * Copyright (C) 2019 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 { Component, OnDestroy, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; +import { Observable, Subscription } from 'rxjs'; + +@Component({ + selector: 'admin-holding-detail-view', + templateUrl: './holding-detail-view.component.html' +}) +export class HoldingDetailViewComponent implements OnInit , OnDestroy, DetailRecord { + + /** Observable resolving record data */ + record$: Observable; + + /** Resource type */ + type: string; + + /** Record */ + record: any; + + /** The observer to the record observable */ + private _recordObs: Subscription; + + /** + * Constructor + * @param _router: Router + */ + constructor( + private _router: Router + ) { } + + /** + * Init hook + */ + ngOnInit() { + this._recordObs = this.record$.subscribe(record => { + this.record = record; + // TODO : At this time, only 'serial' holding should be displayed. Then redirect user to the document detail view + if (this.record.metadata.holdings_type !== 'serial') { + this._router.navigate(['/errors/403'], { skipLocationChange: true }); + } + }); + } + + /** + * Destroy hook + */ + ngOnDestroy(): void { + this._recordObs.unsubscribe(); + } + +} diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.html b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.html new file mode 100644 index 000000000..f9f9c4e6a --- /dev/null +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.html @@ -0,0 +1,162 @@ + +

+ {{ 'Holdings' | translate }} : {{ 'Receive an issue' | translate }} +

+ +
+
+ + + + +
+
+ +

+ {{ 'Issues' | translate }} + +

+
+
+
+
Numbering
+
Status
+
Call number
+
Reception date
+
+
+
+ + + + +
+
{{ prediction.issue }}
+
+ {{'expected at' | translate }} + {{ prediction.expected_date | dateTranslate }} +
+
+ + + + +
+
+ +
+
+ New + {{ item.metadata.issue.display_text }} +
+
+ +
+
{{ item.metadata.call_number }}
+
{{ item.metadata.issue.received_date | dateTranslate }}
+
+ + + + + + + + +
+
+
+
+ +
+
+ + + {{ 'Show more' | translate }} ... + + ({{ showMoreIssuesCounter }}) +
+
+
+
+ + diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.ts b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.ts new file mode 100644 index 000000000..100ad2395 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.component.ts @@ -0,0 +1,202 @@ +/* + * RERO ILS UI + * Copyright (C) 2019 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 { Component, Input, OnInit } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { RecordService, RecordUiService } from '@rero/ng-core'; +import { ToastrService } from 'ngx-toastr'; +import { HoldingsService, PredictionIssue } from 'projects/admin/src/app/service/holdings.service'; +import { ItemsService } from 'projects/admin/src/app/service/items.service'; +import { RecordPermissionService } from 'projects/admin/src/app/service/record-permission.service'; +import { IssueItemStatus } from '../../../../class/items'; + + +@Component({ + selector: 'admin-serial-holding-detail-view', + templateUrl: './serial-holding-detail-view.component.html', + styleUrls: ['./serial-holding-detail-view.style.scss'] +}) +export class SerialHoldingDetailViewComponent implements OnInit { + + /** the holding record */ + @Input() holding: any; + + /** array of receive items for this holding */ + receivedItems = []; + + /** array of prediction for this holding */ + predictionsItems: Array = []; + + /** received issue counter : number of received issue to load/display */ + private _receivedIssueCounter = 5; + + /** total number of received item for this holding */ + totalReceivedItems = 0; + + /** prediction issue counter : number of prediction issue to load/display */ + private _predictionIssueCounter = 3; + + /** reference to IssueItemStatus */ + issueItemStatus = IssueItemStatus; + + + /** + * Constructor + * + * @param _holdingService: HoldingService + * @param _recordService: RecordService + * @param _recordUiService: RecordUiService + * @param _recordPermissionService: RecordPermissionService + * @param _itemService: ItemService + * @param _translateService: TranslateService, + * @param _toastrService: ToastrService + */ + constructor( + private _holdingService: HoldingsService, + private _recordService: RecordService, + private _recordUiService: RecordUiService, + private _recordPermissionService: RecordPermissionService, + private _itemService: ItemsService, + private _translateService: TranslateService, + private _toastrService: ToastrService + ) {} + + /** + * Init hook + */ + ngOnInit(): void { + this._loadPrediction(); + this._loadReceivedItems(); + } + + /** + * Load prediction issues corresponding to the holding. + */ + private _loadPrediction() { + this._holdingService.getHoldingPatternPreview(this.holding.id, this._predictionIssueCounter).subscribe( + (predictions) => { + this.predictionsItems = predictions; + } + ); + } + + /** + * Load received items corresponding to the holding. + */ + private _loadReceivedItems() { + this._recordService + .getRecords( + 'items', + `holding.pid:${this.holding.id}`, + 1, + this._receivedIssueCounter, + [], {}, null, + '-issue_expected_date' + ).subscribe(result => { + this.totalReceivedItems = result.hits.total; + this.receivedItems = []; + result.hits.hits.forEach(item => this.receivedItems.push(this._loadItem(item)), this); + }); + } + + /** + * Load a received item ; also load item permissions + * @param item: the item to load + * @return Return the item with linked permissions + */ + private _loadItem(item: any) { + this._recordPermissionService.getPermission('items', item.id).subscribe( + (permissions) => item.permissions = permissions + ); + return item; + } + + + /** + * Action to perform when user click on a showMore link + * @param type - string: the type of item to load more + * @param increment - number: the number to data to load + */ + showMore(type: string, increment= 10) { + if (type === 'received') { + this._receivedIssueCounter += increment; + this._loadReceivedItems(); + } + if (type === 'prediction') { + this._predictionIssueCounter += increment; + this._loadPrediction(); + } + } + + /** + * Get the counter string about not loaded items + * @return the string to display with the 'show more' link + */ + get showMoreIssuesCounter() { + const additionalIssueCounter = this.totalReceivedItems - this.receivedItems.length; + return (additionalIssueCounter === 1) + ? '1 ' + this._translateService.instant('hidden issue') + : additionalIssueCounter + ' ' + this._translateService.instant('hidden issues'); + } + + /** + * Display message if the record cannot be deleted + * @param item: The corresponding item (with permissions properties) + * @return the delete info message use hover the delete button + */ + deleteInfoMessage(item: any): string { + return (item && item.permissions && item.permissions.delete && item.permissions.delete.reasons) + ? this._recordPermissionService.generateDeleteMessage(item.permissions.delete.reasons) + : ''; + } + + /** + * Delete an holding issue. + * @param item: The issue item to delete + */ + deleteIssue(item) { + this._recordUiService.deleteRecord('items', item.metadata.pid).subscribe( + () => { + this.receivedItems = this.receivedItems.filter(el => el.metadata.pid !== item.metadata.pid); + } + ); + } + + /** + * Quick received issue + * This function allow to received the next predicted issue for a serial holding + */ + quickIssueReceive() { + this._holdingService.quickReceivedIssue(this.holding).subscribe( + (result) => { + this._toastrService.success(this._translateService.instant('New issue created.')); + // change item structure to have same structure as received items + const item = { + id: result.issue.pid, + metadata: result.issue, + permissions: {}, + new_issue: true // Used to flag this issue as new received issue ; allowing to display a visual badge for user + }; + this.receivedItems.unshift(this._loadItem(item)); + this._loadPrediction(); // as we received a predicted issue, we need to reload predictions + }, + (error) => { + const message = `[${error.status}-${error.statusText}] ${error.error.message}`; + this._toastrService.error(message, this._translateService.instant('Issue creation failed!')); + } + ); + } +} diff --git a/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.style.scss b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.style.scss new file mode 100644 index 000000000..b7a70adad --- /dev/null +++ b/projects/admin/src/app/record/detail-view/holding-detail-view/serial-holding-detail-view/serial-holding-detail-view.style.scss @@ -0,0 +1,13 @@ +@import 'node_modules/bootstrap/scss/bootstrap'; + +div.deleted-status { + div.text { + text-decoration:line-through; + color:$danger; + } +} +div.expected-issue { + div.text { + color:lightgray; + } +} diff --git a/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.html b/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.html index f43ef09ac..77a56f98d 100644 --- a/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.html @@ -16,17 +16,20 @@ --> -
+

{{ 'Barcode' | translate }} {{ record.metadata.barcode }}

-
- {{ 'Call number' | translate }}: -
+
Call number
- {{ record.metadata.call_number }} + + {{ record.metadata.call_number }} + + + ({{ 'no data' | translate }}) +
@@ -68,6 +71,45 @@

{{ 'Barcode' | translate }} {{ record.metadata.barcode }}

+ +
+
+

Issue data

+
+
+
+ +
Numbering
+
{{ record.metadata.issue.display_text }}
+ +
Received date
+
{{ record.metadata.issue.received_date | dateTranslate }}
+ +
Expected date
+
{{ record.metadata.issue.expected_date | dateTranslate }}
+ +
Regular issue
+
+ +
+ +
Status
+
+ + {{ record.metadata.issue.status | translate }} +
+
+
+
+
Notes
diff --git a/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.ts b/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.ts index 85c14dbb1..1a4cb33f1 100644 --- a/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.ts +++ b/projects/admin/src/app/record/detail-view/item-detail-view/item-detail-view.component.ts @@ -18,6 +18,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { extractIdOnRef, RecordService } from '@rero/ng-core'; import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; import { forkJoin, Observable, Subscription } from 'rxjs'; +import { IssueItemStatus } from '../../../class/items'; import { LoanService } from '../../../service/loan.service'; @Component({ @@ -26,6 +27,7 @@ import { LoanService } from '../../../service/loan.service'; styles: [] }) export class ItemDetailViewComponent implements DetailRecord, OnInit, OnDestroy { + /** Observable resolving record data */ record$: Observable; @@ -47,6 +49,9 @@ export class ItemDetailViewComponent implements DetailRecord, OnInit, OnDestroy /** Number of requested items */ numberOfRequests: number; + /** reference to IssueItemStatus */ + issueItemStatus = IssueItemStatus; + /** * Constructor * @param recordService - RecordService diff --git a/projects/admin/src/app/record/detail-view/item-detail-view/item-transaction/item-transaction.component.ts b/projects/admin/src/app/record/detail-view/item-detail-view/item-transaction/item-transaction.component.ts index de2b59aa0..4c5f40f5c 100644 --- a/projects/admin/src/app/record/detail-view/item-detail-view/item-transaction/item-transaction.component.ts +++ b/projects/admin/src/app/record/detail-view/item-detail-view/item-transaction/item-transaction.component.ts @@ -18,7 +18,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angu import { TranslateService } from '@ngx-translate/core'; import { DialogService, RecordService } from '@rero/ng-core'; import { ToastrService } from 'ngx-toastr'; -import { LoanState } from 'projects/admin/src/app/circulation/items'; +import { LoanState } from 'projects/admin/src/app/class/items'; import { LoanService } from 'projects/admin/src/app/service/loan.service'; import { UserService } from 'projects/admin/src/app/service/user.service'; import { Observable } from 'rxjs'; diff --git a/projects/admin/src/app/routes/holdings-route.ts b/projects/admin/src/app/routes/holdings-route.ts index 21d1ef416..0ef207a52 100644 --- a/projects/admin/src/app/routes/holdings-route.ts +++ b/projects/admin/src/app/routes/holdings-route.ts @@ -14,15 +14,14 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { BaseRoute } from './base-route'; -import { RouteInterface, RecordService } from '@rero/ng-core'; -import { ItemDetailViewComponent } from '../record/detail-view/item-detail-view/item-detail-view.component'; -import { of } from 'rxjs'; import { FormlyFieldConfig } from '@ngx-formly/core'; +import { DetailComponent, RecordService, RouteInterface } from '@rero/ng-core'; import { JSONSchema7 } from 'json-schema'; import { map } from 'rxjs/operators'; -import { HoldingEditorComponent } from '../record/custom-editor/holding-editor/holding-editor.component'; import { CanUpdateGuard } from '../guard/can-update.guard'; +import { HoldingEditorComponent } from '../record/custom-editor/holding-editor/holding-editor.component'; +import { HoldingDetailViewComponent } from '../record/detail-view/holding-detail-view/holding-detail-view.component'; +import { BaseRoute } from './base-route'; export class HoldingsRoute extends BaseRoute implements RouteInterface { @@ -40,6 +39,7 @@ export class HoldingsRoute extends BaseRoute implements RouteInterface { return { matcher: (url: any) => this.routeMatcher(url, this.name), children: [ + { path: 'detail/:pid', component: DetailComponent }, { path: 'edit/:pid', component: HoldingEditorComponent, canActivate: [ CanUpdateGuard ] }, { path: 'new', component: HoldingEditorComponent } ], @@ -49,10 +49,7 @@ export class HoldingsRoute extends BaseRoute implements RouteInterface { { key: this.name, label: 'Holdings', - // editorLongMode: true, - - detailComponent: ItemDetailViewComponent, - canRead: (record: any) => this.canReadHolding(record), + detailComponent: HoldingDetailViewComponent, canUpdate: (record: any) => this._routeToolService.canUpdate(record, this.recordType), canDelete: (record: any) => this._routeToolService.canDelete(record, this.recordType), preCreateRecord: (data: any) => { @@ -68,12 +65,6 @@ export class HoldingsRoute extends BaseRoute implements RouteInterface { return this.populateLocationsByCurrentUserLibrary( field, jsonSchema ); - }, - redirectUrl: (record: any) => { - return this.redirectUrl( - record.metadata.document, - '/records/documents/detail' - ); } } ] @@ -81,23 +72,6 @@ export class HoldingsRoute extends BaseRoute implements RouteInterface { }; } - /** - * Check if the item is in the same organisation of connected user. - * @param record - Object - * @return Observable - */ - private canReadHolding(record: any) { - const organisationPid = this._routeToolService.userService - .getCurrentUser().library.organisation.pid; - if ('organisation' in record.metadata) { - return of({ - can: organisationPid === record.metadata.organisation.pid, - message: '' - }); - } - return of({ can: false, message: '' }); - } - /** * Populate select menu with locations of current user library * @param field - FormlyFieldConfig diff --git a/projects/admin/src/app/routes/items-route.ts b/projects/admin/src/app/routes/items-route.ts index 5fe23fbef..145c25327 100644 --- a/projects/admin/src/app/routes/items-route.ts +++ b/projects/admin/src/app/routes/items-route.ts @@ -17,9 +17,9 @@ import { BaseRoute } from './base-route'; import { RouteInterface, DetailComponent, EditorComponent, RecordService } from '@rero/ng-core'; import { ItemDetailViewComponent } from '../record/detail-view/item-detail-view/item-detail-view.component'; -import { of } from 'rxjs'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { JSONSchema7 } from 'json-schema'; +import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { CanUpdateGuard } from '../guard/can-update.guard'; @@ -54,13 +54,25 @@ export class ItemsRoute extends BaseRoute implements RouteInterface { canRead: (record: any) => this.canReadItem(record), canUpdate: (record: any) => this._routeToolService.canUpdate(record, this.recordType), canDelete: (record: any) => this._routeToolService.canDelete(record, this.recordType), + preprocessRecordEditor: (record: any) => { + // If we found an `holding` parameter into the query string then we need to pre-populated + // the form with the corresponding holding metadata (see '_populateItemFieldFromHolding' function + // to know which fields will be filled. + const holdingPid = this._routeToolService.getRouteQueryParam('holding'); + if (holdingPid !== null) { + this._populateItemFieldFromHolding(record, holdingPid); + } + return record; + }, preCreateRecord: (data: any) => { - data.document = { - $ref: this._routeToolService.apiService.getRefEndpoint( - 'documents', - this._routeToolService.getRouteQueryParam('document') - ) - }; + if (data.document == null) { + data.document = { + $ref: this._routeToolService.apiService.getRefEndpoint( + 'documents', + this._routeToolService.getRouteQueryParam('document') + ) + }; + } return data; }, preUpdateRecord: (data: any) => { @@ -71,6 +83,11 @@ export class ItemsRoute extends BaseRoute implements RouteInterface { return data; }, postprocessRecordEditor: (record: any) => { + // As 'issue' is part of the JSON propertiesOrder. The record should always contain this property ; + // But this property is only necessary for 'issue' item type. + if (record.type !== 'issue' && record.hasOwnProperty('issue')) { + delete record.issue; + } // If we try to save an item with without any notes, then remove the empty array notes array from record if (record.notes && record.notes.length === 0) { delete record.notes; @@ -82,18 +99,31 @@ export class ItemsRoute extends BaseRoute implements RouteInterface { field, jsonSchema ); }, - redirectUrl: (record: any) => { - return this.redirectUrl( - record.metadata.document, - '/records/documents/detail' - ); - } + redirectUrl: (record: any) => this.getUrl(record) } ] } }; } + /** + * Get the url where redirect the user. + * After editing an item, user should always redirect to the linked document except if + * a `redirectTo` parameter is found in the query string + * @param record - object, record to be saved + * @return an observable on the url to redirect + */ + private getUrl(record: any) { + const redirectTo = this._routeToolService.getRouteQueryParam('redirectTo'); + return of((redirectTo) + ? redirectTo + : this.redirectUrl( + record.metadata.document, + '/records/documents/detail' + ) + ); + } + /** * Check if the item is in the same organisation of connected user. * @param record - Object @@ -153,4 +183,46 @@ export class ItemsRoute extends BaseRoute implements RouteInterface { } return field; } + + /** + * Populate item record from holding data + * + * For an issue item record, we need to set some default and/or static values for the record. + * Some of theses values (record.type, record.issue.regular) are required by the JSON schema but are hidden into the form. + * Some other fields will be pre-populated, based on corresponding url arguments + * + * @param record: the item record to populate + * @param holdingPid: the holding pid + */ + private _populateItemFieldFromHolding(record: any, holdingPid: string) { + record.type = 'issue'; + record.issue = record.issue || {}; + record.issue.regular = true; // default to true + + // setting irregular issue from url parameter + try { + // NOTE : Using `Boolean(JSON.parse(...`, values [1, '1', 'true', 'True'] from url will be considered as True. + const isIrregular = Boolean(JSON.parse(this._routeToolService.getRouteQueryParam('irregular', 'false'))); + if (isIrregular) { + record.issue.regular = false; + } + } catch (e) { } + // setting other issue attributes from url parameters + const today = this._routeToolService.datePipe.transform(Date.now(), 'yyyy-MM-dd'); + record.issue.display_text = this._routeToolService.getRouteQueryParam('display_text', ''); + record.issue.expected_date = this._routeToolService.getRouteQueryParam('expected_date', today); + record.issue.received_date = this._routeToolService.getRouteQueryParam('received_date', today); + + this._routeToolService.recordService.getRecord('holdings', holdingPid).subscribe( + (holdingData) => { + record.item_type = holdingData.metadata.circulation_category; + record.location = holdingData.metadata.location; + record.document = holdingData.metadata.document; + record.holding = { $ref: this._routeToolService.apiService.getRefEndpoint('holdings', holdingPid) }; + if (holdingData.metadata.patterns.frequency === 'rdafr:1016') { // 'rdafr:1016 --> 'irregular frequency' + record.issue.regular = false; + } + } + ); + } } diff --git a/projects/admin/src/app/routes/patrons-route.ts b/projects/admin/src/app/routes/patrons-route.ts index 0b2c58c1a..295838fc1 100644 --- a/projects/admin/src/app/routes/patrons-route.ts +++ b/projects/admin/src/app/routes/patrons-route.ts @@ -51,8 +51,8 @@ export class PatronsRoute extends BaseRoute implements RouteInterface { detailComponent: PatronDetailViewComponent, canUpdate: (record: any) => this._routeToolService.canUpdate(record, this.recordType), canDelete: (record: any) => this._routeToolService.canDelete(record, this.recordType), - // Clean-up 'blocked_note' field content if blocked is false. postprocessRecordEditor: (record: any) => { + // Clean-up 'blocked_note' field content if blocked is false. if (record.blocked === false) { delete record.blocked_note; } diff --git a/projects/admin/src/app/routes/route-tool.service.ts b/projects/admin/src/app/routes/route-tool.service.ts index 1f951fa9b..8f777794b 100644 --- a/projects/admin/src/app/routes/route-tool.service.ts +++ b/projects/admin/src/app/routes/route-tool.service.ts @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +import { DatePipe } from '@angular/common'; import { Injectable } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; @@ -62,6 +63,13 @@ export class RouteToolService { return this._recordService; } + /** + * @return datePipe + */ + get datePipe() { + return this._datePipe; + } + /** * Constructor * @@ -71,6 +79,7 @@ export class RouteToolService { * @param _activatedRoute - ActivatedRoute * @param _recordService - RecordService * @param _recordPermissionService - RecordPermissionService + * @param _datePipe - DatePipe */ constructor( private _translateService: TranslateService, @@ -78,7 +87,8 @@ export class RouteToolService { private _apiService: ApiService, private _activatedRoute: ActivatedRoute, private _recordService: RecordService, - private _recordPermissionService: RecordPermissionService + private _recordPermissionService: RecordPermissionService, + private _datePipe: DatePipe ) { } /** @@ -194,15 +204,17 @@ export class RouteToolService { /** * Get route param by name + * Check the query string to found a requested parameter. If the param is not + * part of the query string, return the default value specified as function parameter. * * @param name - string + * @param defaultValue: the default value to return if name is not found as query parameter * @return mixed - string | null */ - getRouteQueryParam(name: string) { + getRouteQueryParam(name: string, defaultValue = null) { const queryParams = this._activatedRoute.snapshot.queryParams; - if (name in queryParams) { - return queryParams[name]; - } - return null; + return ( name in queryParams && queryParams[name].length > 0 ) + ? queryParams[name] + : defaultValue; } } diff --git a/projects/admin/src/app/scss/styles.scss b/projects/admin/src/app/scss/styles.scss index 1cfb202f0..361161d08 100644 --- a/projects/admin/src/app/scss/styles.scss +++ b/projects/admin/src/app/scss/styles.scss @@ -78,6 +78,12 @@ header { width: 450px !important; // override width for all toastr message } +span.no-data { + font-style: italic; + color: lightgray; + cursor: not-allowed; +} + json-schema-form { input.ng-valid, textarea.ng-valid { diff --git a/projects/admin/src/app/service/editor.service.ts b/projects/admin/src/app/service/editor.service.ts index 040c3d26b..3c169d00a 100644 --- a/projects/admin/src/app/service/editor.service.ts +++ b/projects/admin/src/app/service/editor.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { RecordService } from '@rero/ng-core'; -import { catchError } from 'rxjs/operators'; +import { catchError, map } from 'rxjs/operators'; import { of, Observable } from 'rxjs'; +import { PredictionIssue } from './holdings.service'; @Injectable({ providedIn: 'root' @@ -42,10 +42,12 @@ export class EditorService { * @param size the number of preview samples * @returns an object with an issues property containing the list of samples */ - getHoldingPatternPreview(data: any, size = 10): Observable { + getHoldingPatternPreview(data: any, size = 10): Observable { return this.http.post(`/api/holding/pattern/preview`, { data: data.patterns, size - }); + }).pipe( + map(result => result.issues) + ); } } diff --git a/projects/admin/src/app/circulation/items.spec.ts b/projects/admin/src/app/service/holdings.service.spec.ts similarity index 61% rename from projects/admin/src/app/circulation/items.spec.ts rename to projects/admin/src/app/service/holdings.service.spec.ts index 170a78f95..63998d95a 100644 --- a/projects/admin/src/app/circulation/items.spec.ts +++ b/projects/admin/src/app/service/holdings.service.spec.ts @@ -14,11 +14,20 @@ * 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 { TestBed } from '@angular/core/testing'; -import { Loan } from './items'; +import { HoldingsService } from './holdings.service'; -describe('Loan', () => { - it('should create an instance', () => { - expect(new Loan()).toBeTruthy(); +describe('HoldingsService', () => { + beforeEach(() => TestBed.configureTestingModule({ + imports: [ + HttpClientModule + ] + })); + + it('should be created', () => { + const service: HoldingsService = TestBed.get(HoldingsService); + expect(service).toBeTruthy(); }); }); diff --git a/projects/admin/src/app/service/holdings.service.ts b/projects/admin/src/app/service/holdings.service.ts new file mode 100644 index 000000000..0d872b237 --- /dev/null +++ b/projects/admin/src/app/service/holdings.service.ts @@ -0,0 +1,81 @@ +/* + * 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, HttpParams } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +/** + * Prediction issue structure + */ +export interface PredictionIssue { + issue: string; + expected_date: string; +} + + +@Injectable({ + providedIn: 'root' +}) +export class HoldingsService { + + /** + * Constructor + * @param _http - HttpClient + */ + constructor(private _http: HttpClient) { } + + /** + * Get prediction preview for given serial patterns. + * @param holdingPid - string: the holding PID + * @param size - number: the number of preview + * @returns an object with an issues property containing the list of samples + */ + getHoldingPatternPreview(holdingPid: string, size = 10): Observable { + const url = `/api/holding/${holdingPid}/patterns/preview`; + let params = new HttpParams(); + params = params.set('size', size.toString()); + return this._http.get(url, { params }).pipe( + map(data => data.issues.reverse()) + ); + } + + /** + * Issue quick receive + * This function allow to create an "issue" item based on minimum information + * @param holding: the parent holding. + * @param displayText: (optional) the predicted numbering for the new issue + * @param receivedDate: (optional) the received date for the new issue + * @return an Observable on receive issue API + */ + quickReceivedIssue(holding: any, displayText?: string, receivedDate?: string) { + const url = `/api/holding/${holding.id}/issues`; + const data: any = {}; + if (displayText || receivedDate) { + data.issue = {}; + if (displayText) { + data.issue.display_text = displayText; + } + if (receivedDate) { + data.issue.received_date = receivedDate; + } + } + return this._http.post(url, data); + } + +} diff --git a/projects/admin/src/app/service/items.service.spec.ts b/projects/admin/src/app/service/items.service.spec.ts index 86c04dee6..9385f9d4f 100644 --- a/projects/admin/src/app/service/items.service.spec.ts +++ b/projects/admin/src/app/service/items.service.spec.ts @@ -15,15 +15,26 @@ * along with this program. If not, see . */ +import { HttpClientModule } from '@angular/common/http'; import { TestBed } from '@angular/core/testing'; - +import { RouterTestingModule } from '@angular/router/testing'; +import { TranslateModule } from '@ngx-translate/core'; +import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap/modal'; +import { ToastrModule } from 'ngx-toastr'; import { ItemsService } from './items.service'; -import { HttpClientModule } from '@angular/common/http'; describe('ItemsService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [ - HttpClientModule + HttpClientModule, + ModalModule.forRoot(), + ToastrModule.forRoot(), + TranslateModule.forRoot({}), + RouterTestingModule, + ], + providers: [ + BsModalRef, + BsModalService ] })); diff --git a/projects/admin/src/app/service/items.service.ts b/projects/admin/src/app/service/items.service.ts index 5b286b990..1a4e20283 100644 --- a/projects/admin/src/app/service/items.service.ts +++ b/projects/admin/src/app/service/items.service.ts @@ -17,20 +17,36 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { ApiService, RecordService, RecordUiService } from '@rero/ng-core'; import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { Item, ItemAction, ItemNoteType, ItemStatus } from '../circulation/items'; +import { Item, ItemAction, ItemNoteType, ItemStatus } from '../class/items'; @Injectable({ providedIn: 'root' }) export class ItemsService { - constructor(private http: HttpClient) { } + /** + * constructor + * @param _http - HttpClient + * @param _recordService - RecordService + * @param _recordUiService - RecordUiService + * @param _apiService - ApiService + * @param _translateService - TranslateService + */ + constructor( + private _http: HttpClient, + private _recordService: RecordService, + private _recordUiService: RecordUiService, + private _apiService: ApiService, + private _translateService: TranslateService + ) { } getRequestedLoans(libraryPid) { const url = `/api/item/requested_loans/${libraryPid}`; - return this.http.get(url).pipe( + return this._http.get(url).pipe( map(data => data.hits), map(hits => hits.total === 0 ? [] : hits.hits), map(hits => hits.map( @@ -47,7 +63,7 @@ export class ItemsService { doValidateRequest(item, transactionLibraryPid) { const url = '/api/item/validate'; - return this.http.post(url, { + return this._http.post(url, { item_pid: item.pid, pid: item.loan.pid, transaction_library_pid: transactionLibraryPid @@ -65,7 +81,7 @@ export class ItemsService { if (patronPid) { url = url + `?patron_pid=${patronPid}`; } - return this.http.get(url).pipe( + return this._http.get(url).pipe( map(data => { const item = new Item(data.metadata.item); if (data.metadata.loan) { @@ -90,7 +106,7 @@ export class ItemsService { */ automaticCheckin(itemBarcode, transactionLibraryPid) { const url = '/api/item/automatic_checkin'; - return this.http.post(url, {item_barcode: itemBarcode, transaction_library_pid: transactionLibraryPid}).pipe( + return this._http.post(url, {item_barcode: itemBarcode, transaction_library_pid: transactionLibraryPid}).pipe( map(data => { const item = new Item(data.metadata); const actions = Object.keys(data.action_applied); @@ -134,14 +150,14 @@ export class ItemsService { if (item.loan) { data.pid = item.loan.pid; } - return this.http.post(url, data).pipe( + return this._http.post(url, data).pipe( map(itemData => { const newItem = new Item(itemData.metadata); newItem.actionDone = action; newItem.setLoan(Object.values(itemData.action_applied).pop()); return newItem; }) - ); + ); } /** @@ -151,7 +167,7 @@ export class ItemsService { */ getPickupLocations(itemPid): Observable { const url = `/api/item/${itemPid}/pickup_locations`; - return this.http.get(url).pipe( + return this._http.get(url).pipe( map(data => data.locations), catchError(e => { if (e.status === 404) { @@ -176,7 +192,7 @@ export class ItemsService { if (patronBarcode != null) { params = params.set('patron_barcode', patronBarcode); } - return this.http.get(`/api/item/${itemPid}/can_request`, { params }); + return this._http.get(`/api/item/${itemPid}/can_request`, { params }); } /** Is a callout wrapper is required for this item. diff --git a/projects/admin/src/app/service/patron.service.ts b/projects/admin/src/app/service/patron.service.ts index da2c617d1..f9fcfc466 100644 --- a/projects/admin/src/app/service/patron.service.ts +++ b/projects/admin/src/app/service/patron.service.ts @@ -19,7 +19,7 @@ import { Injectable } from '@angular/core'; import { ApiService, RecordService } from '@rero/ng-core'; import { BehaviorSubject, Observable } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; -import { Item, LoanState } from '../circulation/items'; +import { Item, LoanState } from '../class/items'; import { User } from '../class/user'; @Injectable({ diff --git a/projects/admin/src/app/service/record-permission.service.ts b/projects/admin/src/app/service/record-permission.service.ts index 365864821..3aae5f204 100644 --- a/projects/admin/src/app/service/record-permission.service.ts +++ b/projects/admin/src/app/service/record-permission.service.ts @@ -196,7 +196,8 @@ export class RecordPermissionService { return { is_default: this._translateService.instant('The default record cannot be deleted'), has_settings: this._translateService.instant('The record contains settings'), - harvested: this._translateService.instant('The record has been harvested') + harvested: this._translateService.instant('The record has been harvested'), + regular_issue_cannot_be_deleted: this._translateService.instant('A regular issue cannot be deleted') }; } } diff --git a/projects/admin/src/app/shared/shared-pipes.module.ts b/projects/admin/src/app/shared/shared-pipes.module.ts index bf9a0991d..385145285 100644 --- a/projects/admin/src/app/shared/shared-pipes.module.ts +++ b/projects/admin/src/app/shared/shared-pipes.module.ts @@ -15,6 +15,7 @@ * along with this program. If not, see . */ +import { DatePipe } from '@angular/common'; import { NgModule } from '@angular/core'; import { AuthorNameTranslatePipe } from '../pipe/author-name-translate.pipe'; import { MainTitlePipe } from '../pipe/main-title.pipe'; @@ -33,6 +34,9 @@ import { PatronBlockedMessagePipe } from '../pipe/patron-blocked-message.pipe'; MainTitlePipe, ProvisionActivityPipe, PatronBlockedMessagePipe + ], + providers: [ + DatePipe ] }) export class SharedPipesModule {} diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/ar.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/ar.json index 04f3211ff..902600229 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/ar.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/ar.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "غير مسموح بالدخول", "Accompanying material": "Accompanying material", "Account": "الحساب", @@ -6,6 +7,7 @@ "Acquisitions": "التزويد", "Action": "إجراء", "Add": "إضافة", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "العنوان", "Address must be at least 4 characters long.": "يجب ألا يقل طول العنوان عن 4 أحرف.", @@ -78,6 +80,7 @@ "Debit card": "بطاقة بنكية", "Delete": "حذف", "Description": "التفاصيل", + "Detail": "Detail", "Details": "تفاصيل", "Developed by": "طورت بواسطة", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "استثناءات (اجازات، ..)", "Exchange rate": "سعر الصرف", "Expected availability": "التوافر المتوقع", + "Expected date": "Expected date", "Fees": "الرسوم", "First reminder days": "عدد ايام التذكير الاول", "First reminder days is required.": "عدد ايام التذكير الاول مطلوب", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "المساعدة", "History": "تاريخ", + "Holdings": "Holdings", "Id": "رقم", "Identifier": "رقم معرف", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "افتراضي", "Is online": "Is online", "Is pickup": " يكون استلام", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "النسخة", "Item not found": "النسخة غير موجودة", "Item not found.": "النسخة غير موجودة", "Item or patron not found!": "النسخة او المستخدم غير موجودين", "Item request": "طلب النسخة", "Item types": "تصنيفات النسخة", + "Label": "Label", "Language": "اللغة", "Language of person": "لغة إسناد المؤلف", "Level": "المستوى", @@ -153,6 +162,8 @@ "Name is required.": "الاسم مطلوب", "Name must be at least 2 characters long.": "يجب أن يتكون الاسم من حرفين على الأقل.", "Name must be at least 4 characters long.": "يجب أن يكون الاسم 4 أحرف على الأقل.", + "New": "New", + "New issue created.": "New issue created.", "New request": "طلب جديد", "No": "No", "No fee history for this patron.": "لا يوجد تاريخ لرسوم هذا المستخدم", @@ -170,6 +181,7 @@ "Number of days after due date": "عدد الايام بعد يوم الاستحقاق", "Number of days before due date": "عدد الايام قبل يوم الاستحقاق", "Number of renewals": "عدد التجديدات", + "Numbering": "Numbering", "OK": "موافق", "Online": "الاتصال المباشر", "Online access": "الاتصال المباشر", @@ -219,11 +231,17 @@ "Public interface": "المنصة العامة", "Publication": "المنشورات", "Quantity": "كمية", + "Quick receive": "Quick receive", "RERO ILS administration": "إدارة RERO ILS", "Reason": "Reason", "Reason of dispute": "سبب الخلاف", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "تم تحديث التسجيلة", "Record created!": "تم إنشاء التسجيلة", + "Regular issue": "Regular issue", "Related resource": "مصدر ذو صلة", "Reminder fee amount": "مبلغ رسوم التذكير", "Renew": "تجديد", @@ -311,7 +329,6 @@ "approved": "موافق عليه", "audio": "صوت", "author": "المؤلف", - "available": "متاح", "biographicalInformation": "معلومات ببليوجرافية", "bookplate": "لوحة كتب", "budgets": "الميزانيات", @@ -331,6 +348,7 @@ "educationalSheet": "ورقة تعليمية", "erratum": "خطأ", "exhibitionDocumentation": "وثائق العروض", + "expected at": "expected at", "extract": "استخلاص", "friday": "الجمعة", "fullText": "النص الكامل", @@ -362,6 +380,9 @@ "has 1 organisation attached": "يوجد 1 شبكة مرفقة", "has 1 patron attached": "يوجد 1 مستخدم مرفق", "has 1 patron type attached": "يوجد 1 تصنيف مستخدم مرفق", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "URL مخفي", "illustrations": "الرسوم التوضيحية", "introductionPreface": "مقدمة/تمهيد", @@ -374,6 +395,7 @@ "monographic_set": "مجموعة رسالات علمية", "month": "الشهر", "multi_volume": "اصدارات متعددة", + "no data": "no data", "no location": "لا يوجد مكان", "no request to validate": "لا يوجد طلب للتدقيق", "noInfo": "لا يوجد معلومات", @@ -414,7 +436,6 @@ "titlePage": "صفحة العنوان", "to": "إلى", "tuesday": "الثلاثاء", - "unavailable": "غير متاح", "using": "بإستخدام", "vendors": "موردين", "versionOfResource": "إصدار المصدر", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/de.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/de.json index 401f9ac32..2c8a66c02 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/de.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/de.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Zugriff abgelehnt", "Accompanying material": "Accompanying material", "Account": "Konto", @@ -6,6 +7,7 @@ "Acquisitions": "Erwerbung", "Action": "Aktion", "Add": "Hinzufügen", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Adresse", "Address must be at least 4 characters long.": "Die Adresse muss mindestens 4 Zeichen lang sein.", @@ -78,6 +80,7 @@ "Debit card": "Debitkarte", "Delete": "Löschen", "Description": "Beschreibung", + "Detail": "Detail", "Details": "Details", "Developed by": "Entwickelt bei", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Ausnahmen (Feiertage, usw.)", "Exchange rate": "Wechselkurs", "Expected availability": "Erwartete Verfügbarkeit", + "Expected date": "Expected date", "Fees": "Gebühren", "First reminder days": "Anzahl von Tagen vor der ersten Erinnerung", "First reminder days is required.": "Anzahl von Tagen vor der ersten Erinnerung erforderlich.", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Hilfe", "History": "Historie", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identifikator", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Ist Voreinstellung", "Is online": "Is online", "Is pickup": "Ist Abholort", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Exemplar", "Item not found": "Exemplar nicht gefunden", "Item not found.": "Exemplar nicht gefunden.", "Item or patron not found!": "Exemplar oder Leser nicht gefunden!", "Item request": "Exemplarbestellung", "Item types": "Exemplartypen", + "Label": "Label", "Language": "Sprache", "Language of person": "Sprache der Person", "Level": "Ebene", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "Neue Bestelleung", "No": "No", "No fee history for this patron.": "Keine Gebühren für diesen Leser", @@ -170,6 +181,7 @@ "Number of days after due date": "Anzahl an Tagen nach dem Rückgabetermin", "Number of days before due date": "Anzahl an Tagen vor dem Rückgabetermin", "Number of renewals": "Anzahl von Verlängerungen", + "Numbering": "Numbering", "OK": "OK", "Online": "Online", "Online access": "Online Zugang", @@ -219,11 +231,17 @@ "Public interface": "Zur öffentlichen Ansicht wechseln", "Publication": "Publication", "Quantity": "Anzahl", + "Quick receive": "Quick receive", "RERO ILS administration": "RERO ILS Administration", "Reason": "Reason", "Reason of dispute": "Grund des Streits", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "Datensatz aktualisiert!", "Record created!": "Datensatz erstellt!", + "Regular issue": "Regular issue", "Related resource": "Verwandte Ressource", "Reminder fee amount": "Betrag der Erinnerungsgebühren", "Renew": "Verlängern", @@ -311,7 +329,6 @@ "approved": "genehmigt", "audio": "Audio", "author": "Autor", - "available": "verfügbar", "biographicalInformation": "Biographische Angaben", "bookplate": "Exlibris", "budgets": "Budgets", @@ -331,6 +348,7 @@ "educationalSheet": "Unterrichtsmaterial", "erratum": "Erratum", "exhibitionDocumentation": "Ausstellungsdokumentation", + "expected at": "expected at", "extract": "Auszug", "friday": "Freitag", "fullText": "Volltext", @@ -362,6 +380,9 @@ "has 1 organisation attached": "hat 1 Organisation angehängt", "has 1 patron attached": "hat 1 Leser angehängt", "has 1 patron type attached": "hat 1 Lesertyp angehängt", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "Versteckte URL", "illustrations": "Abbildungen", "introductionPreface": "Einführung/Vorwort", @@ -374,6 +395,7 @@ "monographic_set": "Monographisches Set", "month": "Monat", "multi_volume": "mehrbändig", + "no data": "no data", "no location": "kein Standort", "no request to validate": "keine Bestellung zur Validierung", "noInfo": "Keine Info", @@ -414,7 +436,6 @@ "titlePage": "Titelblatt", "to": "nach", "tuesday": "Dienstag", - "unavailable": "nicht verfügbar", "using": "unter Verwendung von", "vendors": "Lieferanten", "versionOfResource": "andere Version der Ressource", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/en.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/en.json index 5dba23c8a..f649410ea 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/en.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/en.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Access denied", "Accompanying material": "Accompanying material", "Account": "Account", @@ -6,6 +7,7 @@ "Acquisitions": "Acquisitions", "Action": "Action", "Add": "Add", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Address", "Address must be at least 4 characters long.": "Address must be at least 4 characters long.", @@ -78,6 +80,7 @@ "Debit card": "Debit card", "Delete": "Delete", "Description": "Description", + "Detail": "Detail", "Details": "Details", "Developed by": "Developed by", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Exceptions (holidays, etc.)", "Exchange rate": "Exchange rate", "Expected availability": "Expected availability", + "Expected date": "Expected date", "Fees": "Fees", "First reminder days": "First reminder days", "First reminder days is required.": "First reminder days is required.", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Help", "History": "History", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identifier", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Is default", "Is online": "Is online", "Is pickup": "Is pickup", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Item", "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 types": "Item types", + "Label": "Label", "Language": "Language", "Language of person": "Language of person", "Level": "Level", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "New request", "No": "No", "No fee history for this patron.": "No fee history for this patron.", @@ -170,6 +181,7 @@ "Number of days after due date": "Number of days after due date", "Number of days before due date": "Number of days before due date", "Number of renewals": "Number of renewals", + "Numbering": "Numbering", "OK": "OK", "Online": "Online", "Online access": "Online access", @@ -219,11 +231,17 @@ "Public interface": "Public interface", "Publication": "Publication", "Quantity": "Quantity", + "Quick receive": "Quick receive", "RERO ILS administration": "RERO ILS administration", "Reason": "Reason", "Reason of dispute": "Reason of dispute", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "Record Updated!", "Record created!": "Record created!", + "Regular issue": "Regular issue", "Related resource": "Related resource", "Reminder fee amount": "Reminder fee amount", "Renew": "Renew", @@ -311,7 +329,6 @@ "approved": "approved", "audio": "audio", "author": "author", - "available": "available", "biographicalInformation": "biographical information", "bookplate": "bookplate", "budgets": "budgets", @@ -331,6 +348,7 @@ "educationalSheet": "educational sheet", "erratum": "erratum", "exhibitionDocumentation": "exhibition documentation", + "expected at": "expected at", "extract": "extract", "friday": "Friday", "fullText": "full text", @@ -362,6 +380,9 @@ "has 1 organisation attached": "has 1 organisation attached", "has 1 patron attached": "has 1 patron attached", "has 1 patron type attached": "has 1 patron type attached", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "hidden URL", "illustrations": "illustrations", "introductionPreface": "introduction/preface", @@ -374,6 +395,7 @@ "monographic_set": "monographic set", "month": "month", "multi_volume": "multipart", + "no data": "no data", "no location": "no location", "no request to validate": "no request to validate", "noInfo": "no info", @@ -414,7 +436,6 @@ "titlePage": "title page", "to": "to", "tuesday": "Tuesday", - "unavailable": "unavailable", "using": "using", "vendors": "vendors", "versionOfResource": "other version of resource", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/en_US.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/en_US.json index c296359db..cbeea59cf 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/en_US.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/en_US.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Access denied", "Accompanying material": "Accompanying material", "Account": "Account", @@ -6,6 +7,7 @@ "Acquisitions": "Acquisitions", "Action": "Action", "Add": "Add", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Address", "Address must be at least 4 characters long.": "Address must be at least 4 characters long.", @@ -78,6 +80,7 @@ "Debit card": "Debit card", "Delete": "Delete", "Description": "Description", + "Detail": "Detail", "Details": "Details", "Developed by": "Developed by", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Exceptions (holidays, etc.)", "Exchange rate": "Exchange rate", "Expected availability": "Expected availability", + "Expected date": "Expected date", "Fees": "Fees", "First reminder days": "First reminder days", "First reminder days is required.": "First reminder days is required.", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Help", "History": "History", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identifier", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Is default", "Is online": "Is online", "Is pickup": "Is pickup", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Item", "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 types": "Item types", + "Label": "Label", "Language": "Language", "Language of person": "Language of person", "Level": "Level", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "New request", "No": "No", "No fee history for this patron.": "No fee history for this patron.", @@ -170,6 +181,7 @@ "Number of days after due date": "Number of days after due date", "Number of days before due date": "Number of days before due date", "Number of renewals": "Number of renewals", + "Numbering": "Numbering", "OK": "OK", "Online": "Online", "Online access": "Online access", @@ -219,11 +231,17 @@ "Public interface": "Public interface", "Publication": "Publication", "Quantity": "Quantity", + "Quick receive": "Quick receive", "RERO ILS administration": "RERO ILS administration", "Reason": "Reason", "Reason of dispute": "Reason of dispute", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "Record Updated!", "Record created!": "Record created!", + "Regular issue": "Regular issue", "Related resource": "Related resource", "Reminder fee amount": "Reminder fee amount", "Renew": "Renew", @@ -311,7 +329,6 @@ "approved": "approved", "audio": "audio", "author": "author", - "available": "available", "biographicalInformation": "biographicalInformation", "bookplate": "bookplate", "budgets": "budgets", @@ -331,6 +348,7 @@ "educationalSheet": "educationalSheet", "erratum": "erratum", "exhibitionDocumentation": "exhibitionDocumentation", + "expected at": "expected at", "extract": "extract", "friday": "friday", "fullText": "fullText", @@ -362,6 +380,9 @@ "has 1 organisation attached": "has 1 organisation attached", "has 1 patron attached": "has 1 patron attached", "has 1 patron type attached": "has 1 patron type attached", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "hiddenUrl", "illustrations": "illustrations", "introductionPreface": "introductionPreface", @@ -374,6 +395,7 @@ "monographic_set": "monographic_set", "month": "month", "multi_volume": "multi_volume", + "no data": "no data", "no location": "no location", "no request to validate": "no request to validate", "noInfo": "noInfo", @@ -414,7 +436,6 @@ "titlePage": "titlePage", "to": "to", "tuesday": "tuesday", - "unavailable": "unavailable", "using": "using", "vendors": "vendors", "versionOfResource": "versionOfResource", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/es.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/es.json index 0eed175a1..08eee69ea 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/es.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/es.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Acceso denegado", "Accompanying material": "Accompanying material", "Account": "Cuenta", @@ -6,6 +7,7 @@ "Acquisitions": "Adquisiciones", "Action": "Acción", "Add": "Añadir", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Dirección", "Address must be at least 4 characters long.": "La dirección tiene que comportar al menos 4 caracteres.", @@ -78,6 +80,7 @@ "Debit card": "Tarjeta de débito", "Delete": "Suprimir", "Description": "Descripción", + "Detail": "Detail", "Details": "Detalles", "Developed by": "Desarrollado por", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Excepciones (vacaciones etc.)", "Exchange rate": "Tasa", "Expected availability": "Disponibilidad prevista", + "Expected date": "Expected date", "Fees": "Tasas", "First reminder days": "Nombre de días para el primer aviso", "First reminder days is required.": "El nombre de días para el primer aviso es obligatorio.", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Ayuda", "History": "Histórico", + "Holdings": "Holdings", "Id": "Identificador", "Identifier": "Identificador", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Es el valor por defecto", "Is online": "Is online", "Is pickup": "Es un mostrador de préstamo", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Ejemplar", "Item not found": "Ejemplar no encontrado", "Item not found.": "Ejemplar no encontrado.", "Item or patron not found!": "¡ejemplar o usuario no encontrado!", "Item request": "Reservación del ejemplar", "Item types": "Typo de ejemplar", + "Label": "Label", "Language": "Idioma", "Language of person": "Idioma de una persona", "Level": "Nivel", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "Nueva reservación", "No": "No", "No fee history for this patron.": "No hay histórico de honorarios para este patrón.", @@ -170,6 +181,7 @@ "Number of days after due date": "Nombre de días después de la fecha de vencimiento", "Number of days before due date": "Nombre de días antes de la fecha de vencimiento", "Number of renewals": "Número máximo de renovaciones", + "Numbering": "Numbering", "OK": "OK", "Online": "En línea", "Online access": "Acceso en línea", @@ -219,11 +231,17 @@ "Public interface": "Cambiar a la vista pública", "Publication": "Publication", "Quantity": "Cantidad", + "Quick receive": "Quick receive", "RERO ILS administration": "Administración RERO ILS", "Reason": "Reason", "Reason of dispute": "Motivo del litigio", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "¡El recurso ha sido actualizado!", "Record created!": "¡El recurso ha sido creado!", + "Regular issue": "Regular issue", "Related resource": "Recurso relacionado", "Reminder fee amount": "El monto de la tasa del recordatorio", "Renew": "Renovar", @@ -311,7 +329,6 @@ "approved": "aprobado", "audio": "audio", "author": "autor", - "available": "disponible", "biographicalInformation": "Información biográfica", "bookplate": "placa de libro", "budgets": "presupuestos", @@ -331,6 +348,7 @@ "educationalSheet": "hoja educativa", "erratum": "erratum", "exhibitionDocumentation": "documentación de exposición", + "expected at": "expected at", "extract": "extracto", "friday": "Viernes", "fullText": "texto completo ", @@ -362,6 +380,9 @@ "has 1 organisation attached": "tiene 1 organización adjunta", "has 1 patron attached": "tiene un usuario adjunto", "has 1 patron type attached": "tiene 1 tipo de usuario adjunto", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "URL oculto", "illustrations": "ilustraciones", "introductionPreface": "Introducción/Prefacio", @@ -374,6 +395,7 @@ "monographic_set": "conjunto monográfico", "month": "mes", "multi_volume": "Monografía en multi-volúmen", + "no data": "no data", "no location": "ningún depósito", "no request to validate": "ninguna reservación a validar", "noInfo": "Ninguna inforrmación", @@ -414,7 +436,6 @@ "titlePage": " Página de título", "to": "en", "tuesday": "Martes", - "unavailable": "indisponible", "using": "con", "vendors": "proveedores", "versionOfResource": "versión del recurso", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/fr.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/fr.json index 9162c6255..d7c1c25b3 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/fr.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/fr.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Accès refusé", "Accompanying material": "Matériel d'accompagnement", "Account": "Compte", @@ -6,6 +7,7 @@ "Acquisitions": "Acquisitions", "Action": "Action", "Add": "Ajouter", + "Add irregular issue": "Add irregular issue", "Additional materials": "Matériel d'accompagnement", "Address": "Adresse", "Address must be at least 4 characters long.": "L'adresse doit comporter au moins 4 caractères.", @@ -78,6 +80,7 @@ "Debit card": "Carte de débit", "Delete": "Supprimer", "Description": "Description", + "Detail": "Detail", "Details": "Détails", "Developed by": "Réalisé par", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Exceptions (vacances, etc.)", "Exchange rate": "Taux", "Expected availability": "Disponibilité prévue", + "Expected date": "Expected date", "Fees": "Frais", "First reminder days": "Nombre de jours avant le premier rappel", "First reminder days is required.": "Le nombre de jours avant le premier rappel est obligatoire.", @@ -113,6 +117,7 @@ "Get": "Obtenir", "Help": "Aide", "History": "Historique", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identifiant", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Est la politique par défaut", "Is online": "Est en ligne", "Is pickup": "Est un bureau de prêt", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Exemplaire", "Item not found": "Exemplaire non trouvé", "Item not found.": "Exemplaire non trouvé.", "Item or patron not found!": "Exemplaire ou lecteur non trouvé!", "Item request": "Demande d'exemplaire", "Item types": "Types d'exemplaires", + "Label": "Label", "Language": "Langue", "Language of person": "Langue de la personne", "Level": "Niveau", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "Nouvelle demande", "No": "Non", "No fee history for this patron.": "Pas d'historique de frais pour ce lecteur.", @@ -170,6 +181,7 @@ "Number of days after due date": "Nombre de jours après l'échéance", "Number of days before due date": "Nombre de jours avant l'échéance", "Number of renewals": "Nombre de prolongations", + "Numbering": "Numbering", "OK": "OK", "Online": "En ligne", "Online access": "Accès en ligne", @@ -219,11 +231,17 @@ "Public interface": "Interface publique", "Publication": "Publication", "Quantity": "Quantité", + "Quick receive": "Quick receive", "RERO ILS administration": "Interface professionnelle de RERO ILS", "Reason": "Raison", "Reason of dispute": "Motif du litige", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "La ressource a été mise à jour!", "Record created!": "La ressource a été créée!", + "Regular issue": "Regular issue", "Related resource": "ressource en lien", "Reminder fee amount": "Montant des frais de rappel", "Renew": "Prolonger", @@ -311,7 +329,6 @@ "approved": "approuvé", "audio": "audio", "author": "auteur", - "available": "disponible", "biographicalInformation": "informations biographiques", "bookplate": "ex-libris", "budgets": "budgets", @@ -331,6 +348,7 @@ "educationalSheet": "fiche pédagogique", "erratum": "erratum", "exhibitionDocumentation": "documentation d'exposition", + "expected at": "expected at", "extract": "extrait", "friday": "vendredi", "fullText": "texte intégral", @@ -362,6 +380,9 @@ "has 1 organisation attached": "a 1 organisation attachée", "has 1 patron attached": "a 1 lecteur attaché", "has 1 patron type attached": "a 1 type de lecteur attaché", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "URL cachée", "illustrations": "illustrations", "introductionPreface": "introduction/préface", @@ -374,6 +395,7 @@ "monographic_set": "set monographique", "month": "mois", "multi_volume": "monographie en plusieurs parties", + "no data": "no data", "no location": "pas de localisation", "no request to validate": "aucune requête à valider", "noInfo": "pas d'information", @@ -414,7 +436,6 @@ "titlePage": "Page de titre", "to": "vers", "tuesday": "mardi", - "unavailable": "non disponible", "using": "avec", "vendors": "fournisseurs", "versionOfResource": "autre version de la ressource", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/it.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/it.json index dae2f0bcf..3896fce55 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/it.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/it.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Accesso negato", "Accompanying material": "Accompanying material", "Account": "Conto", @@ -6,6 +7,7 @@ "Acquisitions": "Acquisizioni", "Action": "Azione", "Add": "Aggiungere", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Indirizzo", "Address must be at least 4 characters long.": "L'indirizzo deve essere lungo almeno 4 caratteri.", @@ -78,6 +80,7 @@ "Debit card": "Carta di debito", "Delete": "Eliminare", "Description": "Descrizione", + "Detail": "Detail", "Details": "Dettagli", "Developed by": "Realizzato da", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Eccezioni (vacanze, ecc.)", "Exchange rate": "Tasso di cambio", "Expected availability": "Disponibilità prevista", + "Expected date": "Expected date", "Fees": "Fees", "First reminder days": "Numero di giorni per il primo richiamo", "First reminder days is required.": "Il numero di giorni per il primo richiamo è richiesto.", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Aiuto", "History": "Storico", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identificatore", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "È predefinito", "Is online": "Is online", "Is pickup": "È punto di ritiro", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Esemplare", "Item not found": "Esemplare non trovato!", "Item not found.": "Esemplare non trovato.", "Item or patron not found!": "Esemplare o lettore non trovato!", "Item request": "Richiesta di esemplare", "Item types": "Tipi di esemplari", + "Label": "Label", "Language": "Lingua", "Language of person": "Lingua della persona", "Level": "Livello", @@ -153,6 +162,8 @@ "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": "New", + "New issue created.": "New issue created.", "New request": "Nuova richiesta", "No": "No", "No fee history for this patron.": "Nessuno storico delle tasse per questo lettore.", @@ -170,6 +181,7 @@ "Number of days after due date": "Numero di giorni dopo la data di scadenza", "Number of days before due date": "Il numero di giorni prima della data di scadenza", "Number of renewals": "Numero di proroghe", + "Numbering": "Numbering", "OK": "OK", "Online": "Online", "Online access": "Accesso online", @@ -219,11 +231,17 @@ "Public interface": "Passare alla vista pubblica", "Publication": "Publication", "Quantity": "Quantità", + "Quick receive": "Quick receive", "RERO ILS administration": "Amministrazione RERO ILS", "Reason": "Reason", "Reason of dispute": "Motivo della controversia", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "Il record è stato aggiornato!", "Record created!": "Record creato!", + "Regular issue": "Regular issue", "Related resource": "Risorsa correlata", "Reminder fee amount": "Importo della tassa di richiamo", "Renew": "Prorogare", @@ -311,7 +329,6 @@ "approved": "approvato", "audio": "audio", "author": "autore", - "available": "disponibile", "biographicalInformation": "informazioni biogeografiche", "bookplate": "ex-libris", "budgets": "bilanci", @@ -331,6 +348,7 @@ "educationalSheet": "scheda pedagogica", "erratum": "erratum", "exhibitionDocumentation": "documentazione di mostra", + "expected at": "expected at", "extract": "estratto", "friday": "venerdì", "fullText": "testo integrale", @@ -362,6 +380,9 @@ "has 1 organisation attached": "ha 1 organizzazione allegata", "has 1 patron attached": "ha 1 lettore allegato", "has 1 patron type attached": "ha 1 tipo di lettore allegato", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "URL nascosta", "illustrations": "illustrazioni", "introductionPreface": "introduzione/prefazione", @@ -374,6 +395,7 @@ "monographic_set": "set monografico", "month": "mese", "multi_volume": "multiparte", + "no data": "no data", "no location": "nessuna localizzazione", "no request to validate": "nessuna richiesta da validare", "noInfo": "nessuna informazione", @@ -414,7 +436,6 @@ "titlePage": "frontespizio", "to": "verso", "tuesday": "martedì", - "unavailable": "indisponibile", "using": "utilizzando", "vendors": "fornitori", "versionOfResource": "altra versione della risorsa", diff --git a/projects/admin/src/assets/rero-ils-ui/admin/i18n/nl.json b/projects/admin/src/assets/rero-ils-ui/admin/i18n/nl.json index 7b6c9158f..f94b98fe7 100644 --- a/projects/admin/src/assets/rero-ils-ui/admin/i18n/nl.json +++ b/projects/admin/src/assets/rero-ils-ui/admin/i18n/nl.json @@ -1,4 +1,5 @@ { + "A regular issue cannot be deleted": "A regular issue cannot be deleted", "Access denied": "Toegang geweigerd", "Accompanying material": "Accompanying material", "Account": "Account", @@ -6,6 +7,7 @@ "Acquisitions": "Acquisitions", "Action": "Actie", "Add": "Toevoegen", + "Add irregular issue": "Add irregular issue", "Additional materials": "Additional materials", "Address": "Adres", "Address must be at least 4 characters long.": "Het adres moet ten minste 4 tekens lang zijn.", @@ -78,6 +80,7 @@ "Debit card": "Pinpas", "Delete": "Verwijderen", "Description": "Beschrijving", + "Detail": "Detail", "Details": "Details", "Developed by": "Ontwikkeld door", "Dimensions": "Dimensions", @@ -103,6 +106,7 @@ "Exceptions (holidays, etc.)": "Uitzonderingen (vakantie, enz.)", "Exchange rate": "Tarief", "Expected availability": "Verwachte beschikbaarheid", + "Expected date": "Expected date", "Fees": "Kosten", "First reminder days": "Aantal dagen voor de eerste herinnering", "First reminder days is required.": "Het aantal dagen voor de eerste herinnering is verplicht", @@ -113,6 +117,7 @@ "Get": "Get", "Help": "Hulp", "History": "Historiek", + "Holdings": "Holdings", "Id": "Id", "Identifier": "Identificatiecode", "Illustrations": "Illustrations", @@ -124,12 +129,16 @@ "Is default": "Is standaard", "Is online": "Is online", "Is pickup": "is een afhaallocatie", + "Issue creation failed!": "Issue creation failed!", + "Issue data": "Issue data", + "Issues": "Issues", "Item": "Exemplaar", "Item not found": "Exemplaar niet gevonden", "Item not found.": "Exemplaar niet gevonden.", "Item or patron not found!": "Exemplaar of lezer niet gevonden!", "Item request": "Exemplaar aanvragen", "Item types": "Type van exemplaar", + "Label": "Label", "Language": "Taal", "Language of person": "Taal van de persoon", "Level": "Niveau", @@ -153,6 +162,8 @@ "Name is required.": "Naam is verplicht.", "Name must be at least 2 characters long.": "De naam moet minstens 2 tekens lang zijn.", "Name must be at least 4 characters long.": "De naam moet ten minste 4 tekens lang zijn.", + "New": "New", + "New issue created.": "New issue created.", "New request": "New request", "No": "No", "No fee history for this patron.": "Geen kostenhistoriek voor deze lezer.", @@ -170,6 +181,7 @@ "Number of days after due date": "Aantal dagen na de uitleentermijn", "Number of days before due date": "Aantal dagen voor de uitleentermijn", "Number of renewals": "Aantal verlengingen", + "Numbering": "Numbering", "OK": "OK", "Online": "Online", "Online access": "Online toegang", @@ -219,11 +231,17 @@ "Public interface": "Overschakelen naar de publieke weergave", "Publication": "Publication", "Quantity": "Aantal", + "Quick receive": "Quick receive", "RERO ILS administration": "RERO ILS administratie", "Reason": "Reason", "Reason of dispute": "Reason of dispute", + "Receive an issue": "Receive an issue", + "Receive and edit this issue": "Receive and edit this issue", + "Received date": "Received date", + "Reception date": "Reception date", "Record Updated!": "Record bijgewerkt!", "Record created!": "Record gecreëerd!", + "Regular issue": "Regular issue", "Related resource": "Verbonden bron", "Reminder fee amount": "Herinneringskosten bedrag", "Renew": "Vernieuwen", @@ -311,7 +329,6 @@ "approved": "goedgekeurd", "audio": "audio", "author": "auteur", - "available": "beschikbaar", "biographicalInformation": "biografische informatie", "bookplate": "boekmerk", "budgets": "begrotingen", @@ -331,6 +348,7 @@ "educationalSheet": "onderwijsformulier", "erratum": "erratum", "exhibitionDocumentation": "tentoonstellingsdocumentatie", + "expected at": "expected at", "extract": "extract", "friday": "Vrijdag", "fullText": "integrale tekst", @@ -362,6 +380,9 @@ "has 1 organisation attached": "heeft 1 organisatie bijgevoegd", "has 1 patron attached": "heeft 1 lezer bijgevoegd", "has 1 patron type attached": "heeft 1 lezerstype bijgevoegd", + "hidden": "hidden", + "hidden issue": "hidden issue", + "hidden issues": "hidden issues", "hiddenUrl": "verborgen Url", "illustrations": "illustraties", "introductionPreface": "introductie/voorwoord", @@ -374,6 +395,7 @@ "monographic_set": "monografische set", "month": "maand", "multi_volume": "multivolume", + "no data": "no data", "no location": "Geen locaties", "no request to validate": "geen reservatie tot validatie", "noInfo": "geen info", @@ -414,7 +436,6 @@ "titlePage": "titelpagina", "to": "naar", "tuesday": "Dinsdag", - "unavailable": "onbeschikbaar ", "using": "via", "vendors": "verkopers", "versionOfResource": "versie van de bron", diff --git a/projects/public-search/src/app/person-brief/person-brief.component.spec.ts b/projects/public-search/src/app/person-brief/person-brief.component.spec.ts index b96f3970e..f4ac31bc0 100644 --- a/projects/public-search/src/app/person-brief/person-brief.component.spec.ts +++ b/projects/public-search/src/app/person-brief/person-brief.component.spec.ts @@ -15,17 +15,18 @@ * along with this program. If not, see . */ +import { DatePipe } from '@angular/common'; import { HttpClientModule } from '@angular/common/http'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { RecordModule } from '@rero/ng-core'; import { AppRoutingModule } from 'projects/admin/src/app/app-routing.module'; +import { FrontpageBoardComponent } from 'projects/admin/src/app/frontpage/frontpage-board/frontpage-board.component'; import { FrontpageComponent } from 'projects/admin/src/app/frontpage/frontpage.component'; -import { BioInformationsPipe } from './../pipes/bio-informations.pipe'; -import { BirthDatePipe } from './../pipes/birth-date.pipe'; -import { MefTitlePipe } from './../pipes/mef-title.pipe'; +import { BioInformationsPipe } from '../pipes/bio-informations.pipe'; +import { BirthDatePipe } from '../pipes/birth-date.pipe'; +import { MefTitlePipe } from '../pipes/mef-title.pipe'; import { PersonBriefComponent } from './person-brief.component'; -import { FrontpageBoardComponent } from 'projects/admin/src/app/frontpage/frontpage-board/frontpage-board.component'; describe('PersonBriefComponent', () => { @@ -48,7 +49,8 @@ describe('PersonBriefComponent', () => { HttpClientModule, TranslateModule.forRoot(), AppRoutingModule - ] + ], + providers: [DatePipe] }) .compileComponents(); }));