From 55a7c9df5dfc711709ffe9867f1e03f170f657b1 Mon Sep 17 00:00:00 2001 From: Lauren-D Date: Thu, 19 Dec 2019 08:21:28 +0100 Subject: [PATCH] acquisition: implement order views * Adds order and order line brief view. * Adds order and order line detail view. * Adds link to acquisition menu. * Updates vendor html templates to use translate directive instead pipe on title label. Co-Authored-by: Laurent Dubois --- package-lock.json | 6 +- package.json | 2 +- projects/admin/src/app/app.module.ts | 145 ++++++++------- projects/admin/src/app/menu/menu.component.ts | 4 + .../acquisition-order-brief-view.component.ts | 43 +++++ ...quisition-order-detail-view.component.html | 92 ++++++++++ ...acquisition-order-detail-view.component.ts | 87 +++++++++ .../acquisition-order-lines.component.html | 91 +++++++++ .../acquisition-order-lines.component.ts | 67 +++++++ ...tion-order-line-detail-view.component.html | 108 +++++++++++ ...sition-order-line-detail-view.component.ts | 52 ++++++ .../address-type/address-type.component.html | 126 +++++++------ .../vendor-detail-view.component.html | 30 ++- projects/admin/src/app/scss/styles.scss | 4 + .../record-permission-message.service.ts | 8 + .../src/app/service/record-routing.service.ts | 173 ++++++++++++++---- projects/admin/src/app/translate/i18n/de.json | 36 +++- projects/admin/src/app/translate/i18n/en.json | 36 +++- .../admin/src/app/translate/i18n/en_US.json | 36 +++- projects/admin/src/app/translate/i18n/fr.json | 36 +++- projects/admin/src/app/translate/i18n/it.json | 36 +++- projects/admin/src/manual_translations.ts | 17 ++ 22 files changed, 1060 insertions(+), 175 deletions(-) create mode 100644 projects/admin/src/app/record/brief-view/acquisition-order-brief-view.component.ts create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.html create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.ts create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.html create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.ts create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.html create mode 100644 projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.ts diff --git a/package-lock.json b/package-lock.json index 45367bfef..991c0d8a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6423,9 +6423,9 @@ "dev": true }, "ngx-bootstrap": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-5.2.0.tgz", - "integrity": "sha512-fh+OmaEdxCZnVLQFLqexdw4Xv0Lp2Ueq7un52gF26lTENhTAypGWgf2c92HXzbp4W/B0tnwIZ9mzQPwdDMH91w==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-5.3.2.tgz", + "integrity": "sha512-gSMf8EXYl99Q3gqkq4RVhoTNSTYHz2Or6Cig2BJRbLJyqk15ZQE5qcq/ldHS8zzx/wgCA3HQeI63t2j2mEU9PA==" }, "ngx-build-plus": { "version": "9.0.2", diff --git a/package.json b/package.json index d0c519cd8..a89766e31 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "jquery": "^3.4.1", "lodash-es": "4.17.14", "moment": "^2.24.0", - "ngx-bootstrap": "^5.2.0", + "ngx-bootstrap": "^5.3.2", "ngx-toastr": "^10.2.0", "ngx-toggle-switch": "^2.0.5", "rxjs": "~6.4.0", diff --git a/projects/admin/src/app/app.module.ts b/projects/admin/src/app/app.module.ts index 2359a87f4..a85a53eb9 100644 --- a/projects/admin/src/app/app.module.ts +++ b/projects/admin/src/app/app.module.ts @@ -15,70 +15,80 @@ * along with this program. If not, see . */ -import { BrowserModule } from '@angular/platform-browser'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { NgModule, LOCALE_ID } from '@angular/core'; +import {BrowserModule} from '@angular/platform-browser'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; +import {LOCALE_ID, NgModule} from '@angular/core'; +import {CoreConfigService, RecordModule, TranslateService} from '@rero/ng-core'; +import {UiSwitchModule} from 'ngx-toggle-switch'; +import {AppComponent} from './app.component'; +import {AppRoutingModule} from './app-routing.module'; +import {AppConfigService} from './service/app-config.service'; +import {MenuComponent} from './menu/menu.component'; +import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; import { - RecordModule, - CoreConfigService, - TranslateService -} from '@rero/ng-core'; -import { UiSwitchModule } from 'ngx-toggle-switch'; -import { AppComponent } from './app.component'; -import { AppRoutingModule } from './app-routing.module'; -import { AppConfigService } from './service/app-config.service'; -import { MenuComponent } from './menu/menu.component'; -import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; -import { CollapseModule, TabsModule, BsDatepickerModule, BsLocaleService, TypeaheadModule, TooltipModule } from 'ngx-bootstrap'; -import { FrontpageComponent } from './frontpage/frontpage.component'; -import { FormlyModule } from '@ngx-formly/core'; -import { ItemTypesBriefViewComponent } from './record/brief-view/item-types-brief-view.component'; -import { CircPoliciesBriefViewComponent } from './record/brief-view/circ-policies-brief-view.component'; -import { DocumentsBriefViewComponent } from './record/brief-view/documents-brief-view/documents-brief-view.component'; -import { LibrariesBriefViewComponent } from './record/brief-view/libraries-brief-view/libraries-brief-view.component'; -import { PatronTypesBriefViewComponent } from './record/brief-view/patron-types-brief-view.component'; -import { PatronTypesDetailViewComponent } from './record/detail-view/patron-types-detail-view.component'; -import { PatronsBriefViewComponent } from './record/brief-view/patrons-brief-view.component'; -import { PersonsBriefViewComponent } from './record/brief-view/persons-brief-view.component'; -import { PersonDetailViewComponent } from './record/detail-view/person-detail-view/person-detail-view.component'; -import { BioInformationsPipe } from './pipe/bio-informations.pipe'; -import { BirthDatePipe } from './pipe/birth-date.pipe'; -import { MefTitlePipe } from './pipe/mef-title.pipe'; -import { LibraryComponent } from './record/custom-editor/libraries/library.component'; -import { ReactiveFormsModule, FormsModule } from '@angular/forms'; -import { ExceptionDatesListComponent } from './record/custom-editor/libraries/exception-dates-list/exception-dates-list.component'; -import { ExceptionDatesEditComponent } from './record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component'; -import { CirculationPolicyComponent } from './record/custom-editor/circulation-settings/circulation-policy/circulation-policy.component'; + BsDatepickerModule, + BsLocaleService, + CollapseModule, + TabsModule, + TooltipModule, + TypeaheadModule +} from 'ngx-bootstrap'; +import {FrontpageComponent} from './frontpage/frontpage.component'; +import {FormlyModule} from '@ngx-formly/core'; +import {ItemTypesBriefViewComponent} from './record/brief-view/item-types-brief-view.component'; +import {CircPoliciesBriefViewComponent} from './record/brief-view/circ-policies-brief-view.component'; +import {DocumentsBriefViewComponent} from './record/brief-view/documents-brief-view/documents-brief-view.component'; +import {LibrariesBriefViewComponent} from './record/brief-view/libraries-brief-view/libraries-brief-view.component'; +import {PatronTypesBriefViewComponent} from './record/brief-view/patron-types-brief-view.component'; +import {PatronTypesDetailViewComponent} from './record/detail-view/patron-types-detail-view.component'; +import {PatronsBriefViewComponent} from './record/brief-view/patrons-brief-view.component'; +import {PersonsBriefViewComponent} from './record/brief-view/persons-brief-view.component'; +import {PersonDetailViewComponent} from './record/detail-view/person-detail-view/person-detail-view.component'; +import {BioInformationsPipe} from './pipe/bio-informations.pipe'; +import {BirthDatePipe} from './pipe/birth-date.pipe'; +import {MefTitlePipe} from './pipe/mef-title.pipe'; +import {LibraryComponent} from './record/custom-editor/libraries/library.component'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {ExceptionDatesListComponent} from './record/custom-editor/libraries/exception-dates-list/exception-dates-list.component'; +import {ExceptionDatesEditComponent} from './record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component'; +import {CirculationPolicyComponent} from './record/custom-editor/circulation-settings/circulation-policy/circulation-policy.component'; +import {TranslateLoader as BaseTranslateLoader, TranslateModule} from '@ngx-translate/core'; +import {TranslateLoader} from './translate/loader/translate-loader'; +import {ItemTypeDetailViewComponent} from './record/detail-view/item-type-detail-view.component'; +import {LibraryDetailViewComponent} from './record/detail-view/library-detail-view/library-detail-view.component'; +import {DayOpeningHoursComponent} from './record/detail-view/library-detail-view/day-opening-hours/day-opening-hours.component'; +import {ExceptionDateComponent} from './record/detail-view/library-detail-view/exception-date/exception-date.component'; +import {DocumentDetailViewComponent} from './record/detail-view/document-detail-view/document-detail-view.component'; +import {HoldingComponent} from './record/detail-view/document-detail-view/holding/holding.component'; +import {HoldingItemComponent} from './record/detail-view/document-detail-view/holding-item/holding-item.component'; +import {HoldingsComponent} from './record/detail-view/document-detail-view/holdings/holdings.component'; +import {CircPolicyDetailViewComponent} from './record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component'; +import {LocationDetailViewComponent} from './record/detail-view/location-detail-view/location-detail-view.component'; +import {LocationComponent} from './record/brief-view/libraries-brief-view/location/location.component'; +import {ItemDetailViewComponent} from './record/detail-view/item-detail-view/item-detail-view.component'; +import {ItemAvailabilityComponent} from './record/item-availability/item-availability.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'; +import {AuthorNameTranslatePipe} from './pipe/author-name-translate.pipe'; +import {PatronDetailViewComponent} from './record/detail-view/patron-detail-view/patron-detail-view.component'; +import {RefComponent} from './record/editor/ref/ref.component'; +import {RemoteAutocompleteInputTypeComponent} from './record/editor/remote-autocomplete/remote-autocomplete.component'; +import {NoCacheHeaderInterceptor} from './interceptor/no-cache-header.interceptor'; +import {InterfaceInfoComponent} from './interface-info/interface-info.component'; +import {DocumentEditorComponent} from './record/custom-editor/document-editor/document-editor.component'; +import {VendorDetailViewComponent} from './record/detail-view/vendor-detail-view/vendor-detail-view.component'; +import {VendorBriefViewComponent} from './record/brief-view/vendor-brief-view.component'; +import {AddressTypeComponent} from './record/detail-view/address-type/address-type.component'; +import {AcquisitionOrderBriefViewComponent} from './record/brief-view/acquisition-order-brief-view.component'; import { - TranslateModule, - TranslateLoader as BaseTranslateLoader -} from '@ngx-translate/core'; -import { TranslateLoader } from './translate/loader/translate-loader'; -import { ItemTypeDetailViewComponent } from './record/detail-view/item-type-detail-view.component'; -import { LibraryDetailViewComponent } from './record/detail-view/library-detail-view/library-detail-view.component'; -import { DayOpeningHoursComponent } from './record/detail-view/library-detail-view/day-opening-hours/day-opening-hours.component'; -import { ExceptionDateComponent } from './record/detail-view/library-detail-view/exception-date/exception-date.component'; -import { DocumentDetailViewComponent } from './record/detail-view/document-detail-view/document-detail-view.component'; -import { HoldingComponent } from './record/detail-view/document-detail-view/holding/holding.component'; -import { HoldingItemComponent } from './record/detail-view/document-detail-view/holding-item/holding-item.component'; -import { HoldingsComponent } from './record/detail-view/document-detail-view/holdings/holdings.component'; -import { CircPolicyDetailViewComponent } from './record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component'; -import { LocationDetailViewComponent } from './record/detail-view/location-detail-view/location-detail-view.component'; -import { LocationComponent } from './record/brief-view/libraries-brief-view/location/location.component'; -import { ItemDetailViewComponent } from './record/detail-view/item-detail-view/item-detail-view.component'; -import { ItemAvailabilityComponent } from './record/item-availability/item-availability.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'; -import { AuthorNameTranslatePipe } from './pipe/author-name-translate.pipe'; -import { PatronDetailViewComponent } from './record/detail-view/patron-detail-view/patron-detail-view.component'; -import { RefComponent } from './record/editor/ref/ref.component'; -import { RemoteAutocompleteInputTypeComponent } from './record/editor/remote-autocomplete/remote-autocomplete.component'; -import { NoCacheHeaderInterceptor } from './interceptor/no-cache-header.interceptor'; -import { InterfaceInfoComponent } from './interface-info/interface-info.component'; -import { DocumentEditorComponent } from './record/custom-editor/document-editor/document-editor.component'; -import { VendorDetailViewComponent } from './record/detail-view/vendor-detail-view/vendor-detail-view.component'; -import { VendorBriefViewComponent } from './record/brief-view/vendor-brief-view.component'; -import { AddressTypeComponent } from './record/detail-view/address-type/address-type.component'; + AcquisitionOrderDetailViewComponent +} from './record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component'; +import { + AcquisitionOrderLineDetailViewComponent +} from './record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component'; +import { + AcquisitionOrderLinesComponent +} from './record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component'; @NgModule({ declarations: [ @@ -133,7 +143,11 @@ import { AddressTypeComponent } from './record/detail-view/address-type/address- InterfaceInfoComponent, VendorDetailViewComponent, VendorBriefViewComponent, - AddressTypeComponent + AddressTypeComponent, + AcquisitionOrderDetailViewComponent, + AcquisitionOrderBriefViewComponent, + AcquisitionOrderLineDetailViewComponent, + AcquisitionOrderLinesComponent ], imports: [ AppRoutingModule, @@ -211,7 +225,10 @@ import { AddressTypeComponent } from './record/detail-view/address-type/address- RefComponent, RemoteAutocompleteInputTypeComponent, VendorDetailViewComponent, - VendorBriefViewComponent + VendorBriefViewComponent, + AcquisitionOrderDetailViewComponent, + AcquisitionOrderBriefViewComponent, + AcquisitionOrderLineDetailViewComponent ], bootstrap: [AppComponent] }) diff --git a/projects/admin/src/app/menu/menu.component.ts b/projects/admin/src/app/menu/menu.component.ts index 4353bd803..c58f18169 100644 --- a/projects/admin/src/app/menu/menu.component.ts +++ b/projects/admin/src/app/menu/menu.component.ts @@ -180,6 +180,10 @@ export class MenuComponent implements OnInit { name: this.translateService.instant('Vendors'), routerLink: '/records/vendors', iconCssClass: 'fa fa-briefcase' + }, { + name: this.translateService.instant('Orders'), + routerLink: '/records/acq_orders', + iconCssClass: 'fa fa-shopping-cart' }] }, { name: this.translateService.instant('Admin & Monitoring'), diff --git a/projects/admin/src/app/record/brief-view/acquisition-order-brief-view.component.ts b/projects/admin/src/app/record/brief-view/acquisition-order-brief-view.component.ts new file mode 100644 index 000000000..e2ecd187e --- /dev/null +++ b/projects/admin/src/app/record/brief-view/acquisition-order-brief-view.component.ts @@ -0,0 +1,43 @@ +/* + * 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 } from '@angular/core'; +import { ResultItem } from '@rero/ng-core'; + +@Component({ + selector: 'admin-acquisition-order-brief-view', + template: ` +
+ + {{ record.metadata.order_number }} + +
+ `, + styleUrls: [] +}) +export class AcquisitionOrderBriefViewComponent implements ResultItem { + + @Input() + record: any; + + @Input() + type: string; + + @Input() + detailUrl: { link: string, external: boolean }; + +} diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.html b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.html new file mode 100644 index 000000000..5c1801e9c --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.html @@ -0,0 +1,92 @@ + + +

{{ record.metadata.order_number }}

+
+
+
+ + +
+ Vendor +
+
+ {{ record.metadata.vendor.pid | getRecord: 'vendors' : 'field' : 'name' | async }} +
+
+ + +
+ Order date +
+
+ {{ record.metadata.order_date | dateTranslate :'shortDate' }} +
+
+ + +
+ Order type +
+
+ {{ record.metadata.order_type | translate }} +
+
+ + +
+ Order status +
+
+ {{ record.metadata.order_status | translate }} +
+
+ + +
+ Description +
+
+ {{ record.metadata.description }} +
+
+ + +
+ Currency +
+
+ {{ record.metadata.currency }} +
+
+ + +
+ Total amount +
+
+ {{ totalAmount | currency:record.metadata.currency:'symbol' }} +
+
+
+
+
+ + + + +
diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.ts b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.ts new file mode 100644 index 000000000..26bd30f2a --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.ts @@ -0,0 +1,87 @@ +/* + * 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, OnInit } from '@angular/core'; +import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; +import { Observable } from 'rxjs'; +import { switchMap, map } from 'rxjs/operators'; +import { RecordService, RecordUiService} from '@rero/ng-core'; + +@Component({ + selector: 'admin-acquisition-order-detail-view', + templateUrl: './acquisition-order-detail-view.component.html' +}) +export class AcquisitionOrderDetailViewComponent implements OnInit, DetailRecord { + + /** Observable resolving record data */ + record$: Observable; + + /** Resource type */ + type: string; + + /** Acquisition Order total amount observable */ + totalAmount$: Observable; + + /** Acquisition order Line observable */ + orderLines$: Observable>; + + /** + * Constructor + */ + constructor( + private _recordService: RecordService, + private _recordUiService: RecordUiService, + ) { } + + /** + * On init hook + */ + ngOnInit() { + // init total amount + this.totalAmount$ = this.record$.pipe( + map(record => record.metadata.total_amount) + ); + // retrieve all order lines linked + this.orderLines$ = this.record$.pipe( + switchMap(record => { + const query = `acq_order.pid:${record.metadata.pid}`; + return this._recordService.getRecords( + 'acq_order_lines', query, 1, RecordService.MAX_REST_RESULTS_SIZE, + undefined, undefined, undefined, 'pid' + ).pipe( + map(result => result.hits.hits) + ); + }) + ); + } + + /** + * Delete order line event + * @param orderLinePid - Order PID + */ + deleteOrderLine(orderLinePid: string) { + this._recordUiService.deleteRecord('acq_order_lines', orderLinePid).subscribe((success: any) => { + if (success) { + this.orderLines$ = this.orderLines$.pipe( + map(orderLines => + orderLines.filter((orderLine: any) => orderLinePid !== orderLine.metadata.pid) + ) + ); + this.totalAmount$ = this.record$.pipe(map(record => record.metadata.total_amount)); + } + }); + } +} diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.html b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.html new file mode 100644 index 000000000..abd093778 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.html @@ -0,0 +1,91 @@ + +

Order lines

+ + +
+ +
+
#
+
Description
+
Amount
+
Quantity
+
Discount amount
+
Total amount
+
+
+ +
+ +
+ {{ i + 1 }} +
+ + + +
+ {{ orderLine.metadata.amount | currency:order.metadata.currency:'symbol' }} +
+ +
+ {{ orderLine.metadata.quantity }} +
+ +
+ {{ orderLine.metadata.discount_amount | currency:order.metadata.currency:'symbol' }} +
+ +
+ {{ orderLine.metadata.total_amount | currency:order.metadata.currency:'symbol' }} +
+ +
+ + + + + + +
+
+
+
+
+ + + {{ 'There is no order line to be collected.' | translate }} + diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.ts b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.ts new file mode 100644 index 000000000..0654cbe35 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-detail-view/order-lines/acquisition-order-lines.component.ts @@ -0,0 +1,67 @@ +/* + * 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, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { RecordService, RecordUiService } from '@rero/ng-core'; +import { RecordPermissionMessageService } from '../../../../service/record-permission-message.service'; +import { Observable } from 'rxjs'; + +@Component({ + selector: 'admin-acquisition-order-lines', + templateUrl: './acquisition-order-lines.component.html' +}) +export class AcquisitionOrderLinesComponent { + + /** Acquisition order pid */ + @Input() order: any; + + /** Event for delete order line */ + @Output() + deleteOrderLine = new EventEmitter(); + + /** Acquisition order Line observable */ + @Input() + orderLines$: Observable>; + + /** + * Constructor + * @param recordService - RecordService + * @param recordUiService - RecordUiService + * @param recordPermissionMessage - RecordPermissionMessageService + */ + constructor( + private _recordService: RecordService, + private _recordUiService: RecordUiService, + private _recordPermissionMessage: RecordPermissionMessageService + ) { } + + /** + * Delete order line + * @param orderLinePid - AcqOrderLine pid + */ + delete(orderLinePid: string) { + this.deleteOrderLine.emit(orderLinePid); + } + + /** + * Display message if the record cannot be deleted + * @param orderLine - AcqOrderLine record + */ + public showDeleteMessage(orderLine: object) { + const message = this._recordPermissionMessage.generateMessage(orderLine); + this._recordUiService.showDeleteMessage(message); + } +} diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.html b/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.html new file mode 100644 index 000000000..a668e9df0 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.html @@ -0,0 +1,108 @@ + + + +

{{ record.metadata.description }}

+
+
+
+ + +
+ Order +
+
+ {{ order.metadata.order_number }} +
+
+ + +
+ Account +
+
+ {{ record.metadata.acq_account.pid | getRecord: 'acq_accounts' : 'field' : 'name' | async }} +
+
+ + +
+ Status +
+
+ {{ record.metadata.order_line_status | translate }} +
+
+ + +
+ Quantity +
+
+ {{ record.metadata.quantity }} +
+
+ + +
+ Amount +
+
+ {{ record.metadata.amount | currency:order.metadata.currency:'symbol' }} +
+
+ + +
+ Discount amount +
+
+ {{ record.metadata.discount_amount | currency:order.metadata.currency:'symbol' }} +
+
+ + +
+ Rate +
+
+ {{ record.metadata.rate }} +
+
+ + +
+ Total amount +
+
+ {{ record.metadata.total_amount | currency:order.metadata.currency:'symbol' }} +
+
+ + +
+ Note +
+
+ {{ record.metadata.note }} +
+
+
+
+
+
+
diff --git a/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.ts b/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.ts new file mode 100644 index 000000000..d0ec212e1 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component.ts @@ -0,0 +1,52 @@ +/* + * 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, OnInit } from '@angular/core'; +import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; +import { RecordService } from '@rero/ng-core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +@Component({ + selector: 'admin-acquisition-order-line-detail-view', + templateUrl: './acquisition-order-line-detail-view.component.html' +}) +export class AcquisitionOrderLineDetailViewComponent implements OnInit, DetailRecord { + + /** Observable resolving record data */ + record$: Observable; + + /** Resource type */ + type: string; + + /** Observable resolving Acquisition order record */ + order$: Observable; + + /** + * Constructor + * @param recordService RecordService + */ + constructor(private _recordService: RecordService) { } + + /** On init hook */ + ngOnInit() { + this.record$.subscribe(record => { + // get order record + this.order$ = this._recordService.getRecord('acq_orders', record.metadata.acq_order.pid).pipe( + map(order => order)); + }); + } +} diff --git a/projects/admin/src/app/record/detail-view/address-type/address-type.component.html b/projects/admin/src/app/record/detail-view/address-type/address-type.component.html index 826422908..dc0fe9cdb 100644 --- a/projects/admin/src/app/record/detail-view/address-type/address-type.component.html +++ b/projects/admin/src/app/record/detail-view/address-type/address-type.component.html @@ -17,70 +17,74 @@
- -
-
- {{ 'Contact person' | translate }}: -
-
- {{ addressType.contact_person }} -
-
- -
-
- {{ 'Street' | translate }}: -
-
- {{ addressType.street }} -
-
- -
-
- {{ 'Postal code' | translate }}: -
-
- {{ addressType.postal_code }} -
-
- -
-
- {{ 'City' | translate }}: -
-
- {{ addressType.city }} -
-
- -
-
- {{ 'Country' | translate }}: -
-
- {{ addressType.country }} -
+
+ + +
+ Contact person +
+
+ {{ addressType.contact_person }} +
+
+ + +
+ Street +
+
+ {{ addressType.street }} +
+
+ + +
+ Postal code +
+
+ {{ addressType.postal_code }} +
+
+ + +
+ City +
+
+ {{ addressType.city }} +
+
+ + +
+ Country +
+
+ {{ addressType.country }} +
+
- -
-
- {{ 'Phone' | translate }}: -
-
- {{ addressType.phone }} -
-
- -
-
- {{ 'Email' | translate }}: -
-
- {{ addressType.email }} -
+
+ + +
+ Phone +
+
+ {{ addressType.phone }} +
+
+ + +
+ Email +
+
+ {{ addressType.email }} +
+
diff --git a/projects/admin/src/app/record/detail-view/vendor-detail-view/vendor-detail-view.component.html b/projects/admin/src/app/record/detail-view/vendor-detail-view/vendor-detail-view.component.html index 28b6a090a..eda825498 100644 --- a/projects/admin/src/app/record/detail-view/vendor-detail-view/vendor-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/vendor-detail-view/vendor-detail-view.component.html @@ -20,8 +20,8 @@

{{ record.metadata.name }}

-
- {{ 'Website' | translate }}: +
+ Website
{{ record.metadata.website }} @@ -30,18 +30,36 @@

{{ record.metadata.name }}

-
- {{ 'Communication language' | translate }}: +
+ Communication language
{{ record.metadata.communication_language | translateLanguage:currentLanguage }}
+ +
+
+ Currency +
+
+ {{ record.metadata.currency }} +
+
+ +
+
+ TVA rate +
+
+ {{ record.metadata.tva_rate }} +
+
-
- {{ 'Note' | translate }}: +
+ Note
{{ record.metadata.note }} diff --git a/projects/admin/src/app/scss/styles.scss b/projects/admin/src/app/scss/styles.scss index fc5023746..5e8b26f5f 100644 --- a/projects/admin/src/app/scss/styles.scss +++ b/projects/admin/src/app/scss/styles.scss @@ -33,6 +33,10 @@ header { position: relative; } +.label-title:after { + content: "\202F:" +} + .rero-ils-logo { max-height: $navbar-brand-height; margin: 7px 0; diff --git a/projects/admin/src/app/service/record-permission-message.service.ts b/projects/admin/src/app/service/record-permission-message.service.ts index 518d767ad..2ea9de303 100644 --- a/projects/admin/src/app/service/record-permission-message.service.ts +++ b/projects/admin/src/app/service/record-permission-message.service.ts @@ -74,6 +74,14 @@ export class RecordPermissionMessageService { private plurialLinksMessages() { return { + acq_order_lines: { + '=1': this.translateService.instant('has 1 acquisition order line attached'), + other: this.translateService.instant('has # acquisition order lines attached') + }, + acq_orders: { + '=1': this.translateService.instant('has 1 acquisition orders attached'), + other: this.translateService.instant('has # acquisition orders attached') + }, circ_policies: { '=1': this.translateService.instant('has 1 circulation policy attached'), other: this.translateService.instant('has # circulation policies attached') diff --git a/projects/admin/src/app/service/record-routing.service.ts b/projects/admin/src/app/service/record-routing.service.ts index 6b9e339a5..7ceec37e5 100644 --- a/projects/admin/src/app/service/record-routing.service.ts +++ b/projects/admin/src/app/service/record-routing.service.ts @@ -14,42 +14,46 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { Injectable } from '@angular/core'; -import { Router, UrlSegment, ActivatedRoute } from '@angular/router'; -import { of, Observable, Subscriber } from 'rxjs'; +import {Injectable} from '@angular/core'; +import {ActivatedRoute, Router, UrlSegment} from '@angular/router'; +import {Observable, of, Subscriber} from 'rxjs'; -import { TranslateService } from '@ngx-translate/core'; -import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import {TranslateService} from '@ngx-translate/core'; +import {marker as _} from '@biesbjerg/ngx-translate-extract-marker'; +import {ActionStatus, ApiService, DetailComponent, EditorComponent, RecordSearchComponent} from '@rero/ng-core'; import { - RecordSearchComponent, - DetailComponent, - EditorComponent, - ActionStatus, - ApiService -} from '@rero/ng-core'; -import { CirculationPolicyComponent } from '../record/custom-editor/circulation-settings/circulation-policy/circulation-policy.component'; -import { CircPoliciesBriefViewComponent } from '../record/brief-view/circ-policies-brief-view.component'; -import { DocumentsBriefViewComponent } from '../record/brief-view/documents-brief-view/documents-brief-view.component'; -import { DocumentDetailViewComponent } from '../record/detail-view/document-detail-view/document-detail-view.component'; -import { LibraryComponent } from '../record/custom-editor/libraries/library.component'; -import { LibrariesBriefViewComponent } from '../record/brief-view/libraries-brief-view/libraries-brief-view.component'; -import { PatronsBriefViewComponent } from '../record/brief-view/patrons-brief-view.component'; -import { PersonsBriefViewComponent } from '../record/brief-view/persons-brief-view.component'; -import { PersonDetailViewComponent } from '../record/detail-view/person-detail-view/person-detail-view.component'; -import { ItemTypesBriefViewComponent } from '../record/brief-view/item-types-brief-view.component'; -import { ItemTypeDetailViewComponent } from '../record/detail-view/item-type-detail-view.component'; -import { PatronTypesBriefViewComponent } from '../record/brief-view/patron-types-brief-view.component'; -import { PatronTypesDetailViewComponent } from '../record/detail-view/patron-types-detail-view.component'; -import { LibraryDetailViewComponent } from '../record/detail-view/library-detail-view/library-detail-view.component'; -import { RecordPermissionMessageService } from './record-permission-message.service'; -import { CircPolicyDetailViewComponent } from '../record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component'; -import { LocationDetailViewComponent } from '../record/detail-view/location-detail-view/location-detail-view.component'; -import { ItemDetailViewComponent } from '../record/detail-view/item-detail-view/item-detail-view.component'; -import { UserService } from './user.service'; -import { PatronDetailViewComponent } from '../record/detail-view/patron-detail-view/patron-detail-view.component'; -import { DocumentEditorComponent } from '../record/custom-editor/document-editor/document-editor.component'; -import { VendorDetailViewComponent } from '../record/detail-view/vendor-detail-view/vendor-detail-view.component'; -import { VendorBriefViewComponent } from '../record/brief-view/vendor-brief-view.component'; + AcquisitionOrderBriefViewComponent +} from '../record/brief-view/acquisition-order-brief-view.component'; +import { + AcquisitionOrderDetailViewComponent +} from '../record/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component'; +import { + AcquisitionOrderLineDetailViewComponent +} from '../record/detail-view/acquisition-order-line-detail-view/acquisition-order-line-detail-view.component'; +import {CirculationPolicyComponent} from '../record/custom-editor/circulation-settings/circulation-policy/circulation-policy.component'; +import {CircPoliciesBriefViewComponent} from '../record/brief-view/circ-policies-brief-view.component'; +import {DocumentsBriefViewComponent} from '../record/brief-view/documents-brief-view/documents-brief-view.component'; +import {DocumentDetailViewComponent} from '../record/detail-view/document-detail-view/document-detail-view.component'; +import {formatDate} from '@angular/common'; +import {LibraryComponent} from '../record/custom-editor/libraries/library.component'; +import {LibrariesBriefViewComponent} from '../record/brief-view/libraries-brief-view/libraries-brief-view.component'; +import {PatronsBriefViewComponent} from '../record/brief-view/patrons-brief-view.component'; +import {PersonsBriefViewComponent} from '../record/brief-view/persons-brief-view.component'; +import {PersonDetailViewComponent} from '../record/detail-view/person-detail-view/person-detail-view.component'; +import {ItemTypesBriefViewComponent} from '../record/brief-view/item-types-brief-view.component'; +import {ItemTypeDetailViewComponent} from '../record/detail-view/item-type-detail-view.component'; +import {PatronTypesBriefViewComponent} from '../record/brief-view/patron-types-brief-view.component'; +import {PatronTypesDetailViewComponent} from '../record/detail-view/patron-types-detail-view.component'; +import {LibraryDetailViewComponent} from '../record/detail-view/library-detail-view/library-detail-view.component'; +import {RecordPermissionMessageService} from './record-permission-message.service'; +import {CircPolicyDetailViewComponent} from '../record/detail-view/circ-policy-detail-view/circ-policy-detail-view.component'; +import {LocationDetailViewComponent} from '../record/detail-view/location-detail-view/location-detail-view.component'; +import {ItemDetailViewComponent} from '../record/detail-view/item-detail-view/item-detail-view.component'; +import {UserService} from './user.service'; +import {PatronDetailViewComponent} from '../record/detail-view/patron-detail-view/patron-detail-view.component'; +import {DocumentEditorComponent} from '../record/custom-editor/document-editor/document-editor.component'; +import {VendorDetailViewComponent} from '../record/detail-view/vendor-detail-view/vendor-detail-view.component'; +import {VendorBriefViewComponent} from '../record/brief-view/vendor-brief-view.component'; @Injectable({ providedIn: 'root' @@ -322,6 +326,61 @@ export class RecordRoutingService { } ] } + }, + { + matcher: (url) => this.routeMatcher(url, 'acq_orders'), + children: [ + { path: '', component: RecordSearchComponent }, + { path: 'detail/:pid', component: DetailComponent }, + { path: 'edit/:pid', component: EditorComponent }, + { path: 'new', component: EditorComponent } + ], + data: { + linkPrefix: 'records', + types: [ + { + key: _('acq_orders'), + label: _('Orders'), + component: AcquisitionOrderBriefViewComponent, + detailComponent: AcquisitionOrderDetailViewComponent, + canUpdate: (record: any) => this.canUpdate(record), + canDelete: (record: any) => this.canDelete(record), + preprocessRecordEditor: (data: any) => this.preprocessAcquisitionOrder(data), + aggregations: (aggregations: any) => this.filter(aggregations), + aggregationsExpand: ['library'], + aggregationsOrder: [ + _('library'), + _('status') + ], + aggregationsBucketSize: 10, + listHeaders: { + Accept: 'application/rero+json' + } + } + ] + } + }, + { + matcher: (url) => this.routeMatcher(url, 'acq_order_lines'), + children: [ + { path: 'detail/:pid', component: DetailComponent }, + { path: 'edit/:pid', component: EditorComponent }, + { path: 'new', component: EditorComponent } + ], + data: { + linkPrefix: 'records', + types: [ + { + key: _('acq_order_lines'), + label: _('Order lines'), + detailComponent: AcquisitionOrderLineDetailViewComponent, + canAdd: () => this.canAddPatronType(), + canUpdate: (record: any) => this.canUpdate(record), + canDelete: (record: any) => this.canDelete(record), + preprocessRecordEditor: (data: any) => this.preprocessAcquisitionOrderLine(data) + } + ] + } } ); } @@ -377,7 +436,25 @@ export class RecordRoutingService { } /** - * Adds the $ref of the document to the item data and removes dynamic fields. + * Adds the $ref of the librarian organisation and current library to the data + * @param data - object, record data before edition + * @returns object, the modified record data + */ + private addLibrarianLibraryAndOrganisation(data: any) { + const user = this.userService.getCurrentUser(); + const orgPid = user.library.organisation.pid; + const libPid = user.currentLibrary; + if (orgPid != null && data.organisation == null) { + data.organisation = { $ref: this.apiService.getRefEndpoint('organisations', orgPid) }; + } + if (libPid != null && data.library == null) { + data.library = { $ref: this.apiService.getRefEndpoint('libraries', libPid) }; + } + return data; + } + + /** + * Adds the $ref of the document to the item data * @param data - object, item data before edition * @returns object, the modified record data */ @@ -414,6 +491,32 @@ export class RecordRoutingService { return locationData; } + /** + * Adds the $ref of the librarian organisation to the data + * Adds default order date to the data + * @param orderData - object, record data before edition + * @returns object, the modified record data + */ + private preprocessAcquisitionOrder(orderData: any) { + if (orderData.order_date == null) { + orderData.order_date = formatDate(new Date(), 'yyyy-MM-dd', this.translateService.currentLang); + } + return this.addLibrarianLibraryAndOrganisation(orderData); + } + + /** + * Adds the $ref of the library and order to the Acquisition order line + * @param data - object, AcqOrderLine data before edition + * @returns object, the modified record data + */ + private preprocessAcquisitionOrderLine(orderLineData: any) { + const orderPid = this.route.snapshot.queryParams.order; + if (orderLineData.pid == null && orderPid != null && orderLineData.acq_order == null) { + orderLineData.acq_order = {$ref: this.apiService.getRefEndpoint('acq_orders', orderPid) }; + } + return orderLineData; + } + private matchedUrl(url: UrlSegment[]) { const segments = [ new UrlSegment(url[0].path, {}), diff --git a/projects/admin/src/app/translate/i18n/de.json b/projects/admin/src/app/translate/i18n/de.json index 5088b9cee..83ca961d1 100644 --- a/projects/admin/src/app/translate/i18n/de.json +++ b/projects/admin/src/app/translate/i18n/de.json @@ -1,5 +1,6 @@ { "Abstract": "Abstrakts", + "Account": "Account", "Acquisitions": "Acquisitions", "Action": "Aktion", "Action done": "Aktion durchgeführt", @@ -10,6 +11,7 @@ "Admin & Monitoring": "Admin & Monitoring", "Allow checkout": "Allow checkout", "Allow requests": "Allow requests", + "Amount": "Amount", "An error occured on the server: ": "Ein Fehler ist beim Server aufgetreten: ", "Application": "Application", "Applies to patron types": "Gilt für Lesertypen", @@ -51,6 +53,7 @@ "Copyright date": "Copyright-Datum", "Country": "Country", "Create a bibliographic record": "Create a bibliographic record", + "Currency": "Currency", "Current library": "Current library", "Date": "Datum", "Date is invalid.": "Das Datum ist ungültig.", @@ -65,6 +68,7 @@ "Delete": "Löschen", "Description": "Beschreibung", "Developed by": "Entwickelt bei", + "Discount amount": "Discount amount", "Document": "Dokument", "Documents": "Documents", "Due date": "Fälligkeit", @@ -138,6 +142,12 @@ "Online Access": "Online Zugang", "Open": "Offen", "Opening Hours": "Öffnungszeiten", + "Order": "Order", + "Order date": "Order date", + "Order lines": "Order lines", + "Order status": "Order status", + "Order type": "Order type", + "Orders": "Orders", "Organisation": "Organisation", "Overdue amount is required.": "Betrag der Erinnerungsgebühr ist erforderlich.", "Overdue amount must be great than 0.": "Betrag der Erinnerungsgebühr muss grösser als 0 sein.", @@ -159,7 +169,9 @@ "Please insert a name": "Bitte erfassen Sie einen Namen", "Please insert a title": "Bitte geben Sie einen Titel ein", "Postal code": "Postal code", + "Quantity": "Quantity", "RERO ILS administration": "RERO ILS administration", + "Rate": "Rate", "Record Updated!": "Datensatz aktualisiert!", "Record created!": "Datensatz erstellt!", "Record deleted": "Datensatz gelöscht", @@ -189,6 +201,7 @@ "Submit": "Speichern", "Switch libraries": "Switch libraries", "Switch to public view": "Switch to public view", + "TVA rate": "TVA rate", "The default record cannot be deleted": "Der Standardsatz kann nicht gelöscht werden", "The item contains requests": "Das Exemplar hat Bestellungen", "The item has been returned from missing": "das fehlende Exemplar ist jetzt wieder verfügbar", @@ -197,19 +210,25 @@ "The record contains settings": "Der Datensatz enthält Einstellungen", "The record has been harvested": "Der Datensatz wurde gesammelt", "The two periods are overlapping.": "Die Zeiträume überlappen sich.", + "There is no order line to be collected.": "There is no order line to be collected.", "This action is not allowed for this item": "This action is not allowed for this item", "Title": "Titel", "Title is required.": "Titel ist erforderlich.", + "Total amount": "Total amount", "Type": "Typ", "Uniform title": "Einheitstitel", "User services": "User services", "Validating…": "Validierung…", "Variant name": "Abweichender Name", + "Vendor": "Vendor", "Vendors": "Vendors", "Website": "Website", "You cannot delete the record for the following reason:": "Aus folgendem Grund können Sie den Datensatz nicht löschen:", "You cannot delete the record for the following reasons:": "Aus folgenden Gründen können Sie den Datensatz nicht löschen:", "You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page", + "acq_order_lines": "acq_order_lines", + "acq_orders": "acq_orders", + "approved": "approved", "article": "Artikel", "at_desk": "an der Ausleihe", "author": "Autoren", @@ -223,6 +242,7 @@ "bf:Production": "Entstehung", "bf:Publication": "Veröffentlichung", "book": "Buch", + "canceled": "canceled", "checkout": "Ausleihe", "circ_policies": "Ausleihpolitiken", "create": "create", @@ -233,6 +253,8 @@ "ebook": "e-book", "excluded": "ausgeschlossen", "friday": "Freitag", + "has # acquisition order lines attached": "has # acquisition order lines attached", + "has # acquisition orders attached": "has # acquisition orders attached", "has # circulation policies attached": "hat # Ausleihpolitiken angefügt", "has # documents attached": "hat # Dokumente angefügt", "has # item types attached": "hat # Exemplartypen angefügt", @@ -243,6 +265,8 @@ "has # organisations attached": "hat # Organisationen angefügt", "has # patron types attached": "hat # Lesertypen angefügt", "has # patrons attached": "hat # Leser angefügt", + "has 1 acquisition order line attached": "has 1 acquisition order line attached", + "has 1 acquisition orders attached": "has 1 acquisition orders attached", "has 1 circulation policy attached": "hat 1 Ausleihpolitik angefügt", "has 1 document attached": "hat 1 Dokument angefügt", "has 1 item attached": "hat 1 Exemplar angefügt", @@ -265,24 +289,34 @@ "locations": "Standorte", "missing": "fehlend", "monday": "Montag", + "monograph": "monograph", + "monographic_set": "monographic_set", "month": "Monat", + "multi_volume": "multi_volume", "no location": "kein Standort", "no request to validate": "keine Bestellug zur Validierung", "on_loan": "ausgeliehen", "on_shelf": "im Regal", + "ordered": "ordered", "organisation": "Organisation", "other": "anderes", "patron": "Benutzer", "patron_types": "Lesertypen", "patrons": "Leser", + "pending": "pending", "period": "Zeitraum", "persons": "Personen", + "planned_order": "planned_order", + "received": "received", "renewals": "Verlängerungen", "request": "Bestellung", + "requested": "requested", "requests": "Bestellungen", "saturday": "Samstag", "score": "Partitur", + "serial": "serial", "sound": "Ton", + "standing_order": "standing_order", "status": "Status", "subject": "Schlagwort", "sunday": "Sonntag", @@ -297,4 +331,4 @@ "wednesday": "Mittwoch", "week": "Woche", "year": "Jahr" -} +} \ No newline at end of file diff --git a/projects/admin/src/app/translate/i18n/en.json b/projects/admin/src/app/translate/i18n/en.json index 73a1275d2..18bd5f384 100644 --- a/projects/admin/src/app/translate/i18n/en.json +++ b/projects/admin/src/app/translate/i18n/en.json @@ -1,5 +1,6 @@ { "Abstract": "Abstract", + "Account": "Account", "Acquisitions": "Acquisitions", "Action": "Action", "Action done": "Action done", @@ -10,6 +11,7 @@ "Admin & Monitoring": "Admin & Monitoring", "Allow checkout": "Allow checkout", "Allow requests": "Allow requests", + "Amount": "Amount", "An error occured on the server: ": "An error occured on the server: ", "Application": "Application", "Applies to patron types": "Apply to patron types", @@ -51,6 +53,7 @@ "Copyright date": "Copyright date", "Country": "Country", "Create a bibliographic record": "Create a bibliographic record", + "Currency": "Currency", "Current library": "Current library", "Date": "Date", "Date is invalid.": "Date is invalid.", @@ -65,6 +68,7 @@ "Delete": "Delete", "Description": "Description", "Developed by": "Developed by", + "Discount amount": "Discount amount", "Document": "Document", "Documents": "Documents", "Due date": "Due date", @@ -138,6 +142,12 @@ "Online Access": "Online Access", "Open": "Open", "Opening Hours": "Opening Hours", + "Order": "Order", + "Order date": "Order date", + "Order lines": "Order lines", + "Order status": "Order status", + "Order type": "Order type", + "Orders": "Orders", "Organisation": "Organisation", "Overdue amount is required.": "Overdue amount is required.", "Overdue amount must be great than 0.": "Overdue amount must be great than 0.", @@ -159,7 +169,9 @@ "Please insert a name": "Please insert a name", "Please insert a title": "Please insert a title", "Postal code": "Postal code", + "Quantity": "Quantity", "RERO ILS administration": "RERO ILS administration", + "Rate": "Rate", "Record Updated!": "Record Updated!", "Record created!": "Record created!", "Record deleted": "Record deleted", @@ -189,6 +201,7 @@ "Submit": "Save", "Switch libraries": "Switch library", "Switch to public view": "Switch to public view", + "TVA rate": "TVA rate", "The default record cannot be deleted": "The default record cannot be deleted", "The item contains requests": "The item contains requests", "The item has been returned from missing": "The item has been returned from missing", @@ -197,19 +210,25 @@ "The record contains settings": "The record contains settings", "The record has been harvested": "The record has been harvested", "The two periods are overlapping.": "The two periods are overlapping.", + "There is no order line to be collected.": "There is no order line to be collected.", "This action is not allowed for this item": "This action is not allowed for this item", "Title": "Title", "Title is required.": "Title is required.", + "Total amount": "Total amount", "Type": "Type", "Uniform title": "Uniform title", "User services": "User services", "Validating…": "Validating…", "Variant name": "Variant name", + "Vendor": "Vendor", "Vendors": "Vendors", "Website": "Website", "You cannot delete the record for the following reason:": "You cannot delete the record for the following reason:", "You cannot delete the record for the following reasons:": "You cannot delete the record for the following reasons:", "You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page", + "acq_order_lines": "acq_order_lines", + "acq_orders": "acq_orders", + "approved": "approved", "article": "article", "at_desk": "at desk", "author": "author", @@ -223,6 +242,7 @@ "bf:Production": "Production", "bf:Publication": "Publication", "book": "book", + "canceled": "canceled", "checkout": "checkout", "circ_policies": "circulation policies", "create": "create", @@ -233,6 +253,8 @@ "ebook": "ebook", "excluded": "excluded", "friday": "Friday", + "has # acquisition order lines attached": "has # acquisition order lines attached", + "has # acquisition orders attached": "has # acquisition orders attached", "has # circulation policies attached": "has # circulation policies attached", "has # documents attached": "has # documents attached", "has # item types attached": "has # item types attached", @@ -243,6 +265,8 @@ "has # organisations attached": "has # organisations attached", "has # patron types attached": "has # patron types attached", "has # patrons attached": "has # patrons attached", + "has 1 acquisition order line attached": "has 1 acquisition order line attached", + "has 1 acquisition orders attached": "has 1 acquisition orders attached", "has 1 circulation policy attached": "has 1 circulation policy attached", "has 1 document attached": "has 1 document attached", "has 1 item attached": "has 1 item attached", @@ -265,24 +289,34 @@ "locations": "locations", "missing": "missing", "monday": "Monday", + "monograph": "monograph", + "monographic_set": "monographic_set", "month": "month", + "multi_volume": "multi_volume", "no location": "no location", "no request to validate": "no request to validate", "on_loan": "on loan", "on_shelf": "on shelf", + "ordered": "ordered", "organisation": "organisation", "other": "other", "patron": "Patron", "patron_types": "Patron types", "patrons": "Patrons", + "pending": "pending", "period": "period", "persons": "Persons", + "planned_order": "planned_order", + "received": "received", "renewals": "renewals", "request": "request", + "requested": "requested", "requests": "requests", "saturday": "Saturday", "score": "score", + "serial": "serial", "sound": "sound", + "standing_order": "standing_order", "status": "status", "subject": "subject", "sunday": "Sunday", @@ -297,4 +331,4 @@ "wednesday": "Wednesday", "week": "week", "year": "year" -} +} \ No newline at end of file diff --git a/projects/admin/src/app/translate/i18n/en_US.json b/projects/admin/src/app/translate/i18n/en_US.json index 31fbf8ed3..982f02fef 100644 --- a/projects/admin/src/app/translate/i18n/en_US.json +++ b/projects/admin/src/app/translate/i18n/en_US.json @@ -1,5 +1,6 @@ { "Abstract": "Abstract", + "Account": "Account", "Acquisitions": "Acquisitions", "Action": "Action", "Action done": "Action done", @@ -10,6 +11,7 @@ "Admin & Monitoring": "Admin & Monitoring", "Allow checkout": "Allow checkout", "Allow requests": "Allow requests", + "Amount": "Amount", "An error occured on the server: ": "An error occured on the server: ", "Application": "Application", "Applies to patron types": "Applies to patron types", @@ -51,6 +53,7 @@ "Copyright date": "Copyright date", "Country": "Country", "Create a bibliographic record": "Create a bibliographic record", + "Currency": "Currency", "Current library": "Current library", "Date": "Date", "Date is invalid.": "Date is invalid.", @@ -65,6 +68,7 @@ "Delete": "Delete", "Description": "Description", "Developed by": "Developed by", + "Discount amount": "Discount amount", "Document": "Document", "Documents": "Documents", "Due date": "Due date", @@ -138,6 +142,12 @@ "Online Access": "Online Access", "Open": "Open", "Opening Hours": "Opening Hours", + "Order": "Order", + "Order date": "Order date", + "Order lines": "Order lines", + "Order status": "Order status", + "Order type": "Order type", + "Orders": "Orders", "Organisation": "Organisation", "Overdue amount is required.": "Overdue amount is required.", "Overdue amount must be great than 0.": "Overdue amount must be great than 0.", @@ -159,7 +169,9 @@ "Please insert a name": "Please insert a name", "Please insert a title": "Please insert a title", "Postal code": "Postal code", + "Quantity": "Quantity", "RERO ILS administration": "RERO ILS administration", + "Rate": "Rate", "Record Updated!": "Record Updated!", "Record created!": "Record created!", "Record deleted": "Record deleted", @@ -189,6 +201,7 @@ "Submit": "Submit", "Switch libraries": "Switch libraries", "Switch to public view": "Switch to public view", + "TVA rate": "TVA rate", "The default record cannot be deleted": "The default record cannot be deleted", "The item contains requests": "The item contains requests", "The item has been returned from missing": "The item has been returned from missing", @@ -197,19 +210,25 @@ "The record contains settings": "The record contains settings", "The record has been harvested": "The record has been harvested", "The two periods are overlapping.": "The two periods are overlapping.", + "There is no order line to be collected.": "There is no order line to be collected.", "This action is not allowed for this item": "This action is not allowed for this item", "Title": "Title", "Title is required.": "Title is required.", + "Total amount": "Total amount", "Type": "Type", "Uniform title": "Uniform title", "User services": "User services", "Validating…": "Validating…", "Variant name": "Variant name", + "Vendor": "Vendor", "Vendors": "Vendors", "Website": "Website", "You cannot delete the record for the following reason:": "You cannot delete the record for the following reason:", "You cannot delete the record for the following reasons:": "You cannot delete the record for the following reasons:", "You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page", + "acq_order_lines": "acq_order_lines", + "acq_orders": "acq_orders", + "approved": "approved", "article": "article", "at_desk": "at_desk", "author": "author", @@ -223,6 +242,7 @@ "bf:Production": "Production", "bf:Publication": "Publication", "book": "book", + "canceled": "canceled", "checkout": "checkout", "circ_policies": "circ_policies", "create": "create", @@ -233,6 +253,8 @@ "ebook": "ebook", "excluded": "excluded", "friday": "friday", + "has # acquisition order lines attached": "has # acquisition order lines attached", + "has # acquisition orders attached": "has # acquisition orders attached", "has # circulation policies attached": "has # circulation policies attached", "has # documents attached": "has # documents attached", "has # item types attached": "has # item types attached", @@ -243,6 +265,8 @@ "has # organisations attached": "has # organisations attached", "has # patron types attached": "has # patron types attached", "has # patrons attached": "has # patrons attached", + "has 1 acquisition order line attached": "has 1 acquisition order line attached", + "has 1 acquisition orders attached": "has 1 acquisition orders attached", "has 1 circulation policy attached": "has 1 circulation policy attached", "has 1 document attached": "has 1 document attached", "has 1 item attached": "has 1 item attached", @@ -265,24 +289,34 @@ "locations": "locations", "missing": "missing", "monday": "monday", + "monograph": "monograph", + "monographic_set": "monographic_set", "month": "month", + "multi_volume": "multi_volume", "no location": "no location", "no request to validate": "no request to validate", "on_loan": "on_loan", "on_shelf": "on_shelf", + "ordered": "ordered", "organisation": "organisation", "other": "other", "patron": "patron", "patron_types": "patron_types", "patrons": "patrons", + "pending": "pending", "period": "period", "persons": "persons", + "planned_order": "planned_order", + "received": "received", "renewals": "renewals", "request": "request", + "requested": "requested", "requests": "requests", "saturday": "saturday", "score": "score", + "serial": "serial", "sound": "sound", + "standing_order": "standing_order", "status": "status", "subject": "subject", "sunday": "sunday", @@ -297,4 +331,4 @@ "wednesday": "wednesday", "week": "week", "year": "year" -} +} \ No newline at end of file diff --git a/projects/admin/src/app/translate/i18n/fr.json b/projects/admin/src/app/translate/i18n/fr.json index 00c4116b5..a3063dc99 100644 --- a/projects/admin/src/app/translate/i18n/fr.json +++ b/projects/admin/src/app/translate/i18n/fr.json @@ -1,5 +1,6 @@ { "Abstract": "Résumés", + "Account": "Account", "Acquisitions": "Acquisitions", "Action": "Action", "Action done": "Action réalisée", @@ -10,6 +11,7 @@ "Admin & Monitoring": "Administration et statistiques", "Allow checkout": "Permettre le prêt", "Allow requests": "Permettre les demandes", + "Amount": "Amount", "An error occured on the server: ": "Une erreur est survenue sur le serveur :", "Application": "Application", "Applies to patron types": "Appliquer aux types de lecteur", @@ -51,6 +53,7 @@ "Copyright date": "Date de copyright", "Country": "Country", "Create a bibliographic record": "Créer une notice bibliographique", + "Currency": "Currency", "Current library": "Votre bibliothèque", "Date": "Date", "Date is invalid.": "La date est incorrecte.", @@ -65,6 +68,7 @@ "Delete": "Supprimer", "Description": "Description", "Developed by": "Réalisé par", + "Discount amount": "Discount amount", "Document": "Document", "Documents": "Documents", "Due date": "Date de retour", @@ -138,6 +142,12 @@ "Online Access": "Accès en ligne", "Open": "Ouvert", "Opening Hours": "Heures d'ouverture", + "Order": "Order", + "Order date": "Order date", + "Order lines": "Order lines", + "Order status": "Order status", + "Order type": "Order type", + "Orders": "Orders", "Organisation": "Organisation", "Overdue amount is required.": "Le montant des frais de rappel est obligatoire.", "Overdue amount must be great than 0.": "Le montant des frais de rappel doit être supérieur à 0.", @@ -159,7 +169,9 @@ "Please insert a name": "Veuillez introduire un nom", "Please insert a title": "Veuillez introduire un titre", "Postal code": "Postal code", + "Quantity": "Quantity", "RERO ILS administration": "Interface professionnelle de RERO ILS", + "Rate": "Rate", "Record Updated!": "La ressource a été mise à jour!", "Record created!": "La ressource a été créée!", "Record deleted": "Enregistrement supprimé", @@ -189,6 +201,7 @@ "Submit": "Enregistrer", "Switch libraries": "Changer de bibliothèque", "Switch to public view": "Interface publique", + "TVA rate": "TVA rate", "The default record cannot be deleted": "L'enregistrement par défaut ne peut pas être supprimé", "The item contains requests": "L'exemplaire contient des demandes", "The item has been returned from missing": "L'exemplaire manquant est à nouveau disponible", @@ -197,19 +210,25 @@ "The record contains settings": "L'enregistrement contient des paramètres", "The record has been harvested": "L'enregistrement a été importé", "The two periods are overlapping.": "Les deux périodes se chevauchent.", + "There is no order line to be collected.": "There is no order line to be collected.", "This action is not allowed for this item": "Cette action n'est pas autorisée sur cet exemplaire", "Title": "Titre", "Title is required.": "Le titre est obligatoire.", + "Total amount": "Total amount", "Type": "Type", "Uniform title": "Titre uniforme", "User services": "Services aux utilisateurs", "Validating…": "Validation en cours…", "Variant name": "Variante de nom", + "Vendor": "Vendor", "Vendors": "Vendors", "Website": "Website", "You cannot delete the record for the following reason:": "Vous ne pouvez pas supprimer l'enregistrement pour la raison suivante : ", "You cannot delete the record for the following reasons:": "Vous ne pouvez pas supprimer l'enregistrement pour les raisons suivantes : ", "You do not have sufficient permissions to view this page": "Vous n'avez pas suffisamment de permissions pour voir cette page", + "acq_order_lines": "acq_order_lines", + "acq_orders": "acq_orders", + "approved": "approved", "article": "article", "at_desk": "au bureau de prêt", "author": "auteur", @@ -223,6 +242,7 @@ "bf:Production": "Production", "bf:Publication": "Publication", "book": "livre", + "canceled": "canceled", "checkout": "prêt", "circ_policies": "politiques de prêt", "create": "Ajouter un auteur", @@ -233,6 +253,8 @@ "ebook": "e-book", "excluded": "exclu", "friday": "vendredi", + "has # acquisition order lines attached": "has # acquisition order lines attached", + "has # acquisition orders attached": "has # acquisition orders attached", "has # circulation policies attached": "a # politiques de prêt attachées", "has # documents attached": "a # documents attachés", "has # item types attached": "a # types d'exemplaire attachés", @@ -243,6 +265,8 @@ "has # organisations attached": "a # organisations attachées", "has # patron types attached": "a # types de lecteur attachés", "has # patrons attached": "a # lecteurs attachés", + "has 1 acquisition order line attached": "has 1 acquisition order line attached", + "has 1 acquisition orders attached": "has 1 acquisition orders attached", "has 1 circulation policy attached": "a 1 politique de prêt attachée", "has 1 document attached": "a 1 document attaché", "has 1 item attached": "a 1 exemplaire attaché", @@ -265,24 +289,34 @@ "locations": "localisations", "missing": "manquant", "monday": "lundi", + "monograph": "monograph", + "monographic_set": "monographic_set", "month": "mois", + "multi_volume": "multi_volume", "no location": "pas de localisation", "no request to validate": "aucune requête à valider", "on_loan": "en prêt", "on_shelf": "en rayon", + "ordered": "ordered", "organisation": "organisation", "other": "autre", "patron": "lecteur", "patron_types": "types de lecteur", "patrons": "lecteurs", + "pending": "pending", "period": "période", "persons": "personnes", + "planned_order": "planned_order", + "received": "received", "renewals": "prolongations", "request": "demande", + "requested": "requested", "requests": "demandes", "saturday": "samedi", "score": "partition", + "serial": "serial", "sound": "son", + "standing_order": "standing_order", "status": "statut", "subject": "sujet", "sunday": "dimanche", @@ -297,4 +331,4 @@ "wednesday": "mercredi", "week": "semaine", "year": "année" -} +} \ No newline at end of file diff --git a/projects/admin/src/app/translate/i18n/it.json b/projects/admin/src/app/translate/i18n/it.json index 70e443d61..e4b787017 100644 --- a/projects/admin/src/app/translate/i18n/it.json +++ b/projects/admin/src/app/translate/i18n/it.json @@ -1,5 +1,6 @@ { "Abstract": "Riassunto", + "Account": "Account", "Acquisitions": "Acquisitions", "Action": "Azione", "Action done": "Azione realizzata", @@ -10,6 +11,7 @@ "Admin & Monitoring": "Admin & Monitoring", "Allow checkout": "Allow checkout", "Allow requests": "Allow requests", + "Amount": "Amount", "An error occured on the server: ": "Si è verificato un errore sul server: ", "Application": "Application", "Applies to patron types": "Si applica ai tipi di lettori", @@ -51,6 +53,7 @@ "Copyright date": "Data di copyright", "Country": "Country", "Create a bibliographic record": "Create a bibliographic record", + "Currency": "Currency", "Current library": "Current library", "Date": "Data", "Date is invalid.": "La data non è valida.", @@ -65,6 +68,7 @@ "Delete": "Elimina", "Description": "Descrizione", "Developed by": "Realizzato da", + "Discount amount": "Discount amount", "Document": "Documento", "Documents": "Documenti", "Due date": "Data di scadenza", @@ -138,6 +142,12 @@ "Online Access": "accesso online", "Open": "Aperto", "Opening Hours": "Orari di apertura", + "Order": "Order", + "Order date": "Order date", + "Order lines": "Order lines", + "Order status": "Order status", + "Order type": "Order type", + "Orders": "Orders", "Organisation": "Organizzazione", "Overdue amount is required.": "Importo della tassa di richiamo è richiesto.", "Overdue amount must be great than 0.": "Importo della tassa di richiamo deve essere superiore a 0.", @@ -159,7 +169,9 @@ "Please insert a name": "Si prega di inserire un nome", "Please insert a title": "Si prega di inserire un titolo", "Postal code": "Postal code", + "Quantity": "Quantity", "RERO ILS administration": "RERO ILS administration", + "Rate": "Rate", "Record Updated!": "Il record è stato aggiornato!", "Record created!": "Record creato!", "Record deleted": "Record eliminato", @@ -189,6 +201,7 @@ "Submit": "Salva", "Switch libraries": "Switch libraries", "Switch to public view": "Switch to public view", + "TVA rate": "TVA rate", "The default record cannot be deleted": "Il record predefinito non può essere eliminato", "The item contains requests": "L'esemplare ha delle richieste", "The item has been returned from missing": "L'esemplare mancante è di nuovo disponibile", @@ -197,19 +210,25 @@ "The record contains settings": "Il record contiene le impostazioni", "The record has been harvested": "Il record è stato raccolto", "The two periods are overlapping.": "I due periodi si sovrappongono.", + "There is no order line to be collected.": "There is no order line to be collected.", "This action is not allowed for this item": "This action is not allowed for this item", "Title": "Titolo", "Title is required.": "Il titolo è richiesto.", + "Total amount": "Total amount", "Type": "Typo", "Uniform title": "Titolo uniforme", "User services": "User services", "Validating…": "Validazione...", "Variant name": "Variant name", + "Vendor": "Vendor", "Vendors": "Vendors", "Website": "Website", "You cannot delete the record for the following reason:": "Non è possibile eliminare il record per il seguente motivo:", "You cannot delete the record for the following reasons:": "Non è possibile eliminare il record per il seguente motivo:", "You do not have sufficient permissions to view this page": "You do not have sufficient permissions to view this page", + "acq_order_lines": "acq_order_lines", + "acq_orders": "acq_orders", + "approved": "approved", "article": "articolo", "at_desk": "al banco prestiti", "author": "autore", @@ -223,6 +242,7 @@ "bf:Production": "Produzione", "bf:Publication": "Pubblicazione", "book": "libro", + "canceled": "canceled", "checkout": "prestare", "circ_policies": "politiche di prestito", "create": "create", @@ -233,6 +253,8 @@ "ebook": "e-book", "excluded": "excluded", "friday": "venerdì", + "has # acquisition order lines attached": "has # acquisition order lines attached", + "has # acquisition orders attached": "has # acquisition orders attached", "has # circulation policies attached": "ha # politiche di prestito allegate", "has # documents attached": "ha # documenti allegati", "has # item types attached": "ha # tipi di esemplari allegati", @@ -243,6 +265,8 @@ "has # organisations attached": "ha # organizzazioni allegate", "has # patron types attached": "ha # tipi di lettori allegati", "has # patrons attached": "ha # lettori allegati", + "has 1 acquisition order line attached": "has 1 acquisition order line attached", + "has 1 acquisition orders attached": "has 1 acquisition orders attached", "has 1 circulation policy attached": "has 1 politica di prestito allegato", "has 1 document attached": "ha 1 documento allegato", "has 1 item attached": "ha 1 esemplare allegato", @@ -265,24 +289,34 @@ "locations": "localizzazioni", "missing": "mancante", "monday": "lunedì", + "monograph": "monograph", + "monographic_set": "monographic_set", "month": "mese", + "multi_volume": "multi_volume", "no location": "nessuna localizzazione", "no request to validate": "nessuna richiesta da validare", "on_loan": "in prestito", "on_shelf": "su scaffale", + "ordered": "ordered", "organisation": "Ente", "other": "altro", "patron": "Lettore", "patron_types": "Tipi di lettore", "patrons": "Lettore", + "pending": "pending", "period": "periodo", "persons": "Persone", + "planned_order": "planned_order", + "received": "received", "renewals": "proroghe", "request": "richiesta", + "requested": "requested", "requests": "richiesti", "saturday": "sabato", "score": "partitura", + "serial": "serial", "sound": "audio", + "standing_order": "standing_order", "status": "Stato", "subject": "Oggetti", "sunday": "domenica", @@ -297,4 +331,4 @@ "wednesday": "mercoledì", "week": "settimana", "year": "anno" -} +} \ No newline at end of file diff --git a/projects/admin/src/manual_translations.ts b/projects/admin/src/manual_translations.ts index 8662cba69..62c2d6ab8 100644 --- a/projects/admin/src/manual_translations.ts +++ b/projects/admin/src/manual_translations.ts @@ -68,3 +68,20 @@ _('bf:Production'); _('librarian'); _('patron'); _('system_librarian'); + +// Order type +_('serial'); +_('monograph'); +_('standing_order'); +_('monographic_set'); +_('planned_order'); +_('multi_volume'); + +// Order status & Order line status +_('approved'); +_('canceled'); +_('ordered'); +_('requested'); +_('pending'); +_('received'); +