diff --git a/projects/admin/src/app/acquisition/acquisition.module.ts b/projects/admin/src/app/acquisition/acquisition.module.ts index be4270078..48c1ef238 100644 --- a/projects/admin/src/app/acquisition/acquisition.module.ts +++ b/projects/admin/src/app/acquisition/acquisition.module.ts @@ -25,7 +25,6 @@ import { TranslateService } from '@ngx-translate/core'; import { ApiService, CoreModule, RecordModule } from '@rero/ng-core'; import { SharedModule } from '@rero/shared'; import { PreviewEmailModule } from '../shared/preview-email/preview-email.module'; -import { PrimengImportModule } from '../shared/primeng-import/primeng-import.module'; import { AcquisitionRoutingModule } from './acquisition-routing.module'; import { AcqAccountApiService } from './api/acq-account-api.service'; import { AcqOrderApiService } from './api/acq-order-api.service'; @@ -42,7 +41,6 @@ import { OrderLineComponent } from './components/order/order-detail-view/order-l import { OrderLinesComponent } from './components/order/order-detail-view/order-lines/order-lines.component'; import { OrderEmailFormComponent } from './components/order/order-email-form/order-email-form.component'; import { OrderSummaryComponent } from './components/order/order-summary/order-summary.component'; -import { ReceiptDetailViewComponent } from './components/receipt/receipt-detail-view/receipt-detail-view.component'; import { OrderReceipt } from './components/receipt/receipt-form/order-receipt'; import { OrderReceiptForm } from './components/receipt/receipt-form/order-receipt-form'; import { OrderReceiptViewComponent } from './components/receipt/receipt-form/order-receipt-view.component'; @@ -59,6 +57,9 @@ import { NoteBadgeColorPipe } from './pipes/note-badge-color.pipe'; import { PreviewContentPipe } from './pipes/preview-content.pipe'; import { ReceiptLineTotalAmountPipe } from './pipes/receipt-line-total-amount.pipe'; import { ReceptionDatesPipe } from './pipes/reception-dates.pipe'; +import { ChipsModule } from 'primeng/chips'; +import { PrimengImportModule } from '../shared/primeng-import/primeng-import.module'; +import { NotesComponent } from './components/notes/notes.component'; @NgModule({ declarations: [ @@ -82,13 +83,13 @@ import { ReceptionDatesPipe } from './pipes/reception-dates.pipe'; SelectAccountEditorWidgetComponent, ReceiptListComponent, ReceiptSummaryComponent, - ReceiptDetailViewComponent, NoteBadgeColorPipe, AccountAvailableAmountPipe, ReceptionDatesPipe, PreviewContentPipe, ReceiptLineTotalAmountPipe, - OrderEmailFormComponent + OrderEmailFormComponent, + NotesComponent ], imports: [ CommonModule, diff --git a/projects/admin/src/app/acquisition/api/acq-order-api.service.ts b/projects/admin/src/app/acquisition/api/acq-order-api.service.ts index 1e53074f0..cc0cbba6c 100644 --- a/projects/admin/src/app/acquisition/api/acq-order-api.service.ts +++ b/projects/admin/src/app/acquisition/api/acq-order-api.service.ts @@ -28,7 +28,6 @@ import { AcqOrderHistoryVersionResponseInterface, AcqOrderLineStatus, AcqOrderStatus, - AcqOrderType, IAcqOrder, IAcqOrderLine } from '../classes/order'; @@ -47,7 +46,6 @@ export class AcqOrderApiService extends BaseApi { /** Default values */ public readonly orderDefaultData = { priority: 0, - type: AcqOrderType.MONOGRAPH, status: AcqOrderStatus.PENDING, notes: [] }; @@ -58,7 +56,6 @@ export class AcqOrderApiService extends BaseApi { received_quantity: 0, amount: 0, total_amount: 0, - exchange_rate: 0, notes: [] }; @@ -79,8 +76,8 @@ export class AcqOrderApiService extends BaseApi { * @param orderPid: the order pid * @return: the corresponding AcqOrder */ - getOrder(orderPid: string): Observable { - return this.recordService.getRecord('acq_orders', orderPid, 0, BaseApi.reroJsonheaders).pipe( + getOrder(orderPid: string, resolve=0): Observable { + return this.recordService.getRecord('acq_orders', orderPid, resolve, BaseApi.reroJsonheaders).pipe( map(data => ({...this.orderDefaultData, ...data.metadata}) ) ); } diff --git a/projects/admin/src/app/acquisition/api/acq-receipt-api.service.ts b/projects/admin/src/app/acquisition/api/acq-receipt-api.service.ts index 671f3de7f..997b69a2f 100644 --- a/projects/admin/src/app/acquisition/api/acq-receipt-api.service.ts +++ b/projects/admin/src/app/acquisition/api/acq-receipt-api.service.ts @@ -41,7 +41,6 @@ export class AcqReceiptApiService { /** Default value for an AcqReceipt */ public readonly receiptDefaultData = { - exchange_rate: 0, amount_adjustments: [], quantity: 0, total_amount: 0, diff --git a/projects/admin/src/app/acquisition/classes/order.ts b/projects/admin/src/app/acquisition/classes/order.ts index fee577dfb..05d7d3b49 100644 --- a/projects/admin/src/app/acquisition/classes/order.ts +++ b/projects/admin/src/app/acquisition/classes/order.ts @@ -37,16 +37,6 @@ export enum AcqOrderStatus { RECEIVED = 'received', } -/** Enumeration about order type */ -export enum AcqOrderType { - MONOGRAPH = 'monograph', - SERIAL = 'serial', - STANDING_ORDER = 'standing_order', - MONOGRAPHIC_SET = 'monographic_set', - PLANNED_ORDER = 'planned_order', - MULTI_VOLUME = 'multi_volume' -} - /** interface to describe an accounting information section for an AcqOrder */ export interface IAcqOrderAccountingInformation { total_amount: number; @@ -57,7 +47,6 @@ export interface IAcqOrderAccountingInformation { export interface IAcqOrder extends IAcqBaseResource, IAcqResourceWithNotes { reference: string; priority: number; - type: AcqOrderType; status: AcqOrderStatus; currency: string; order_date: Date; @@ -65,10 +54,7 @@ export interface IAcqOrder extends IAcqBaseResource, IAcqResourceWithNotes { provisional: IAcqOrderAccountingInformation, expenditure: IAcqOrderAccountingInformation } - order_lines?: { - order_date: Date, - receipt_date: Date, - }[]; + order_lines?: {}[]; vendor: IObjectReference; is_current_budget: boolean; } @@ -92,9 +78,6 @@ export interface IAcqOrderLine extends IAcqBaseResource, IAcqResourceWithNotes { amount: number; discount_amount: number; total_amount: number; - exchange_rate: number; - order_date: Date; - receipt_date: Date; acq_account: IObjectReference; acq_order: IObjectReference; document: IObjectReference|{ diff --git a/projects/admin/src/app/acquisition/classes/receipt.ts b/projects/admin/src/app/acquisition/classes/receipt.ts index b2d5ebc7f..c3c6bd194 100644 --- a/projects/admin/src/app/acquisition/classes/receipt.ts +++ b/projects/admin/src/app/acquisition/classes/receipt.ts @@ -32,7 +32,6 @@ export class AcqReceiptAmountAdjustment { export interface IAcqReceipt extends IAcqBaseResource, IAcqResourceWithNotes { acq_order: IObjectReference; reference?: string; - exchange_rate: number; amount_adjustments: AcqReceiptAmountAdjustment[]; currency?: string; quantity?: number; diff --git a/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.html b/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.html index e24f7f6b4..9287ae2c4 100644 --- a/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.html +++ b/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.html @@ -17,7 +17,6 @@ --> . - */ - -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; - -.dropdown-toggle.btn { - border: $input-border-width solid $input-border-color; -} -.number { - font-size: $font-size-sm; - font-weight: bold; - color: $secondary; - text-align: right; - &:before { - content: '['; - } - &:after { - content: ']'; - } -} -.amount { - min-width: 10rem; - font-family: Arial; -} - -.is_invalid { - border: $border-width solid $danger !important; - color: $danger; -} diff --git a/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.ts b/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.ts index 38e0a8a6a..2ff985d59 100644 --- a/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.ts +++ b/projects/admin/src/app/acquisition/components/editor/widget/select-account-editor-widget/select-account-editor-widget.component.ts @@ -29,7 +29,6 @@ import { orderAccountsAsTree } from '../../../../utils/account'; @Component({ selector: 'admin-select-account-editor-widget', templateUrl: './select-account-editor-widget.component.html', - styleUrls: ['../../../../acquisition.scss', './select-account-editor-widget.component.scss'], changeDetection: ChangeDetectionStrategy.Default, }) export class SelectAccountEditorWidgetComponent extends FieldType implements OnInit { diff --git a/projects/admin/src/app/acquisition/components/notes/notes.component.html b/projects/admin/src/app/acquisition/components/notes/notes.component.html new file mode 100644 index 000000000..a8ea12b5d --- /dev/null +++ b/projects/admin/src/app/acquisition/components/notes/notes.component.html @@ -0,0 +1,13 @@ + diff --git a/projects/admin/src/app/acquisition/components/notes/notes.component.ts b/projects/admin/src/app/acquisition/components/notes/notes.component.ts new file mode 100644 index 000000000..c16f59052 --- /dev/null +++ b/projects/admin/src/app/acquisition/components/notes/notes.component.ts @@ -0,0 +1,10 @@ +import { Component, input } from '@angular/core'; + +@Component({ + selector: 'admin-notes', + templateUrl: './notes.component.html' +}) +export class NotesComponent { + + notes = input<[{type, content}]>(); +} diff --git a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.html b/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.html index 14f4f9766..2c7640da5 100644 --- a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.html +++ b/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.html @@ -16,19 +16,20 @@ along with this program. If not, see . --> @if (order) { -
-
-
{{ order.reference }}
+
+
+
{{ order.reference }}
@if (notes.length > 0) { -
+
}
- + ] +
-
+
@if (displayProvisionalAccountingData) { -
- - {{ order.account_statement.provisional.quantity }} +
+ +  {{ order.account_statement.provisional.quantity }}
} @if (displayExpenditureAccountingData) { -
- - {{ order.account_statement.expenditure.quantity }} +
+ +  {{ order.account_statement.expenditure.quantity }}
}
diff --git a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.scss b/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.scss deleted file mode 100644 index 95b4fb5d9..000000000 --- a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.scss +++ /dev/null @@ -1,100 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * Copyright (C) 2021 UCLouvain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import '../../../../scss/variables'; - -.order-brief-view { - - .description { - font-style: italic; - margin-left: map-get($spacers, 4); // related to .metadata margin - } - - .metadata { - font-size: small; - color: $secondary; - font-weight: bold; - margin-left: map-get($spacers, 4); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - - &:before { - content: '['; - } - &:after { - content: ']'; - } - } - - .ordinal-infos { - background-color: $light; - border: $border-width solid $border-color; - border-radius: $border-radius; - padding: 0; - display: flex; - align-items: center; - flex-direction: column; - - .accounting-infos + .accounting-infos { - border-top: $border-width solid $border-color; - } - .accounting-infos { - width: 100%; - height: 100%; - display: flex; - align-items: center; - - * { - height: 100%; - display: flex; - align-items: center; - justify-content: center; - } - - label { - margin: 0; - font-weight: bold; - width: 100%; - padding-left: map-get($spacers, 2); - } - .counter { - color: $secondary; - padding-left: map-get($spacers, 2); - padding-right: map-get($spacers, 2); - font-size: $small-font-size; - background-color: #F3F3F3; - min-width: 3.5rem; - &.ordered-counter::before{ - font-family: 'FontAwesome'; - font-weight: 100; - content: " \f07a"; - padding-right: map-get($spacers, 1); - } - &.received-counter::before{ - font-family: 'FontAwesome'; - font-weight: 100; - content: " \f090"; - padding-right: map-get($spacers, 1); - } - } - } - } -} diff --git a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.ts b/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.ts index b8110ebd4..2a9ebfcd8 100644 --- a/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-brief-view/order-brief-view.component.ts @@ -24,8 +24,7 @@ import { AcqOrderStatus, IAcqOrder } from '../../../classes/order'; @Component({ selector: 'admin-acquisition-order-brief-view', - templateUrl: './order-brief-view.component.html', - styleUrls: ['./order-brief-view.component.scss'] + templateUrl: './order-brief-view.component.html' }) export class OrderBriefViewComponent implements ResultItem, OnInit { @@ -46,16 +45,7 @@ export class OrderBriefViewComponent implements ResultItem, OnInit { /** order note type reference */ noteType = AcqNoteType; - // GETTER & SETTER ========================================================== - /** get order date (based on orderLine order date) */ - get orderDate(): string | null { - return this.order.order_lines - .filter(line => line.hasOwnProperty('order_date')) - .map(line => line.order_date.toString()) - .shift(); - } - - /** get reception date (based on orderLine reception date) */ + /** get reception date (based on receiptLine reception date) */ get receptionDate(): string | null { return this.record.metadata.receipts .filter(line => line.hasOwnProperty('receipt_date') && Array.isArray(line.receipt_date) && line.receipt_date.length > 0) diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.html b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.html index d566d9896..0087fad86 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.html +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.html @@ -15,104 +15,119 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - -@if (order?.is_current_budget && order?.pid) { -
- @if (recordPermissions && recordPermissions.update.can && order.status === acqOrderStatus.PENDING) { - - - {{ 'Place order' | translate }} - - } -
-} @if (order && order.pid) { -
- - @if (!order.is_current_budget) { - + + @if (!order.is_current_budget) { + + } + + +
+

{{ order.reference }}

+ @if (order?.is_current_budget && order?.pid) { @if (recordPermissions && + recordPermissions.update.can && order.status === acqOrderStatus.PENDING) { +
+ +
+ } } +
+ + + @if (order.notes && order.notes.length > 0) { +
Notes
+
+ @for (note of order.notes; track note) { + + {{ + note.type | translate + }} + + } +
} +
-

{{ order.reference }}

- - - @if (order.notes && order.notes.length > 0) { -
Notes
-
- @for (note of order.notes; track note) { - - {{ note.type | translate }} - + + + @if(orderPanel.selected) { +
+ + @if (isPermissionsLoaded) { + } -
- } -
- - - - - @if (isPermissionsLoaded) { - - } - - @if (order.notes && order.notes.length > 0) { -
- -
-
+ + @if (order.notes && order.notes.length > 0) { + + +
+
- - {{ order.notes.length | i18nPlural: {'=1': 'Note', 'other': 'Notes'} | translate }} - @if (notesCollapsed) { - {{ order.notes.length }} - } + {{ + order.notes.length + | i18nPlural : { "=1": "Note", other: "Notes" } + | translate + }}  +
- @if (!notesCollapsed) { -
- @for (note of order.notes; track note) { -
-
{{ note.type | translate }}
-
-
- } -
- } -
-
- } - - - @if (isPermissionsLoaded) { - - } - - @if (historyVersions && historyVersions.length > 1) { - - - -
-
- - {{ event.label }} - {{ event.description }} -
-
+ + @if (!notesCollapsed) { + + } + + } +
} -
-
+ + + @if (receiptPanel.selected && isPermissionsLoaded) { + + } + + @if (historyVersions && historyVersions.length > 1) { + + + +
+
+ + {{ + event.label + }} + {{ event.description }} + +
+
+ } + +
} diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.scss b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.scss deleted file mode 100644 index b49671c8c..000000000 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.scss +++ /dev/null @@ -1,84 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * Copyright (C) 2021 UCLouvain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'projects/admin/src/app/scss/variables'; - -$gutter: calc($grid-gutter-width / 2); - -.btn-additional-action { - z-index: 2; - position: relative; -} - -::ng-deep .nav-tabs { - margin-bottom: map-get($spacers, 3); - margin-left: -$gutter; - margin-right: -$gutter; -} - -.notes { - - .card-header .btn-show-more { - border-color: $card-border-color; - margin-right: .5rem; - } - - .note { - margin-bottom: map-get($spacers, 2); - } - blockquote { - padding-left: map-get($spacers, 3); - border-left: 2px solid $border-color; - } -} - -:host ::ng-deep .p-timeline { - - .p-timeline-event-opposite { - display: none; - } - .p-timeline-event { - min-height: 2rem; - } - .p-timeline-event-marker { - border-color: $secondary; - width: .75rem; - height: .75rem; - } - .p-timeline-event-marker-current { - border-color: $primary; - background-color: theme-color-level('primary', -10); - } - .p-timeline-event-content { - line-height: 1rem; - margin-bottom: map-get($spacers, 3); - a { - display: block; - margin: 0; - } - small { - margin-left: map-get($spacers, 2); - color: $secondary; - font-style: italic; - font-size: .75rem; - } - } -} - diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.ts b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.ts index 9c1c4d7e9..88c5ba274 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-detail-view.component.ts @@ -15,12 +15,14 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { ViewportScroller } from '@angular/common'; +import { APP_BASE_HREF, Location, ViewportScroller } from '@angular/common'; import { Component, inject, OnDestroy, OnInit } from '@angular/core'; +import { ActivatedRoute, Router, UrlSegment } from '@angular/router'; import { AcqOrderApiService } from '@app/admin/acquisition/api/acq-order-api.service'; import { RecordPermissions } from '@app/admin/classes/permissions'; import { RecordPermissionService } from '@app/admin/service/record-permission.service'; import { CurrentLibraryPermissionValidator } from '@app/admin/utils/permissions'; +import { TranslateService } from '@ngx-translate/core'; import { extractIdOnRef } from '@rero/ng-core'; import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog'; @@ -28,12 +30,10 @@ import { Observable, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; import { AcqOrderHistoryVersion, AcqOrderHistoryVersionResponseInterface, AcqOrderStatus, IAcqOrder } from '../../../classes/order'; import { OrderEmailFormComponent } from '../order-email-form/order-email-form.component'; -import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'admin-acquisition-order-detail-view', - templateUrl: './order-detail-view.component.html', - styleUrls: ['../../../acquisition.scss', './order-detail-view.component.scss'] + templateUrl: './order-detail-view.component.html' }) export class OrderDetailViewComponent implements DetailRecord, OnInit, OnDestroy { @@ -43,6 +43,10 @@ export class OrderDetailViewComponent implements DetailRecord, OnInit, OnDestroy private acqOrderService: AcqOrderApiService = inject(AcqOrderApiService); private permissionValidator: CurrentLibraryPermissionValidator = inject(CurrentLibraryPermissionValidator); private translateService: TranslateService = inject(TranslateService); + private route: ActivatedRoute = inject(ActivatedRoute); + private location: Location = inject(Location); + private baseHref = inject(APP_BASE_HREF); + // COMPONENT ATTRIBUTES ===================================================== /** Observable resolving record data */ @@ -67,6 +71,8 @@ export class OrderDetailViewComponent implements DetailRecord, OnInit, OnDestroy modalRef: DynamicDialogRef | undefined; + tabActiveIndex = 0; + // GETTER & SETTER ========================================================== /** Determine if the order could be "placed/ordered" */ get canPlaceOrder(): boolean { @@ -78,8 +84,13 @@ export class OrderDetailViewComponent implements DetailRecord, OnInit, OnDestroy return this.order.status !== AcqOrderStatus.PENDING; } + addTabToUrl(event) { + this.location.replaceState(location.pathname.replace(this.baseHref, ""), `tab=${event}`); + } + /** OnInit hook */ ngOnInit(): void { + this.tabActiveIndex = +this.route.snapshot.queryParamMap.get('tab') || 0; this.subscriptions.add(this.record$.subscribe( (record: any) => { this.order = record.metadata; diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.html b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.html index 65db901f9..015b394fc 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.html +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.html @@ -15,96 +15,70 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
+
@if (orderLine && account) { -
- -
-
+
+ -
+
+
+
@if (orderLine.document.pid | getRecord: 'documents' | async; as document) { - + }
- @if (orderLine.notes.length > 0 && isCollapsed) { - + @if (orderLine.notes.length > 0) { +
@for (note of orderLine.notes; track note) { - + } - +
}
- -
-
-
Account
-
+
{{ account.metadata.number }}
+
+ + +
- @if (orderLine.priority > 0) { -
- }
-
-
{{ orderLine.total_amount | currency:order.currency:'symbol' }}
-
- ({{ orderLine.quantity}} x {{ orderLine.amount | currency:order.currency:'symbol' }} +
+
{{ orderLine.total_amount | currency:order.currency:'symbol' }}
+
+ {{ orderLine.quantity}} x {{ orderLine.amount | currency:order.currency:'symbol' }} @if (orderLine.discount_amount > 0) { - {{ orderLine.discount_amount | currency:order.currency:'symbol' }} - }) + }
-
+
@if (recordPermissions) { - } @else { -   }
} @else { diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.scss b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.scss deleted file mode 100644 index f47d00a73..000000000 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.scss +++ /dev/null @@ -1,98 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * Copyright (C) 2021 UCLouvain - * - * 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 'font-awesome/scss/font-awesome'; -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'projects/admin/src/app/scss/variables'; - - -.order-line { - - border-bottom: $border-width solid $border-color; - - &:hover { - background-color: $light; - } - - *[class^="col-"] { - padding-top: map-get($spacers, 2); - padding-bottom: map-get($spacers, 2); - } - - .account-number{ - font-size: small; - color: $secondary; - font-weight: bold; - - &:before { - content: '['; - } - &:after { - content: ']'; - } - } - - dl > * { - padding: 0; - margin: 0; - } - - .order-cancelled a { - text-decoration: line-through !important; - color: $danger !important; - } - - .note-content { - border-left: 2px solid $border-color; - padding-left: map-get($spacers, 2) !important; - margin-top: map-get($spacers, 1) !important; - font-style: italic; - font-size: 0.8rem; - } - - .note-spacer { - margin-top: map-get($spacers, 3) !important; - } - - /* AMOUNT ================================================================ */ - .amount { - border-left: $border-width solid $border-color; - border-right: $border-width solid $border-color; - background-color: $light; - text-align: right; - padding: map-get($spacers, 1) map-get($spacers, 2); - - .total-amount { - font-weight: bold; - } - .computation { - font-size: small; - color: $secondary; - } - } - - .status { - min-width: map-get($spacers, 4); - padding: map-get($spacers, 1) 0; - } - - .order-line-content { - margin-left: map-get($spacers, 4); // to be align with .status width - } -} diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.ts b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.ts index b3da7f3e3..65c49ecc9 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-line/order-line.component.ts @@ -28,8 +28,7 @@ import { AcqOrderLineStatus, IAcqOrderLine } from '../../../../classes/order'; @Component({ selector: 'admin-order-line', - templateUrl: './order-line.component.html', - styleUrls: ['../../../../acquisition.scss', './order-line.component.scss'] + templateUrl: './order-line.component.html' }) export class OrderLineComponent implements OnInit, OnDestroy { diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.html b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.html index 30b41d38c..a325a815f 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.html +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.html @@ -15,12 +15,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
-
-
Order lines
-
- @if (recordPermissions) { - @if (recordPermissions.update.can) { + + +
+
Order lines
+ @if (recordPermissions?.update?.can) { Order lines [routerLink]="['/', 'records', 'acq_order_lines', 'new']" [queryParams]="{ order: order.pid }" /> - } @else { - - - - - } - } @else { -   }
-
-
+ + @defer (when orderLines) { @if (orderLines.length > 0) { @for (orderLine of orderLines; track orderLine) { +
+ /> +
} } @else { -
No order lines
+
No order lines
} } @placeholder { - +  {{ 'Loading in progress…' | translate }} } -
-
+ diff --git a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.ts b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.ts index ea863ee14..cd8bd65a6 100644 --- a/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-detail-view/order-lines/order-lines.component.ts @@ -42,15 +42,6 @@ export class OrderLinesComponent implements OnInit, OnChanges, OnDestroy { /** all component subscription */ private subscriptions = new Subscription(); - // GETTER & SETTER ========================================================== - /** - * Get a message containing the reasons why the order line cannot be deleted - * @return the message to display into the tooltip box - */ - get createInfoMessage(): string { - return this.recordPermissionService.generateTooltipMessage(this.recordPermissions.update.reasons, 'create'); - } - /** OnInit hook */ ngOnInit(): void { this.loadOrderLines(); diff --git a/projects/admin/src/app/acquisition/components/order/order-email-form/order-email-form.component.ts b/projects/admin/src/app/acquisition/components/order/order-email-form/order-email-form.component.ts index 78a5ad407..5c7becd43 100644 --- a/projects/admin/src/app/acquisition/components/order/order-email-form/order-email-form.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-email-form/order-email-form.component.ts @@ -99,7 +99,7 @@ export class OrderEmailFormComponent implements OnInit, OnDestroy { }); } this.acqOrderApiService - .getOrder(this.order.pid) + .getOrder(this.order.pid, 1) .subscribe((order: IAcqOrder) => this.closeDialog(order)); }, error: (error: any) => { diff --git a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.html b/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.html index 4081d298e..b999f0c5d 100644 --- a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.html +++ b/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.html @@ -16,47 +16,73 @@ along with this program. If not, see . --> @if (order) { -
-
-
- - @if (order.vendor) { -
Vendor
-
{{ order.vendor.pid | getRecord: 'vendors' : 'field' : 'name' | async }}
- } - -
Order type
-
{{ order.type | translate }}
- -
Order status
-
{{ order.status | translate }}
- - @if (order.order_date) { -
Order date
-
{{ order.order_date | dateTranslate :'shortDate' }}
- } - - -
-
- -
-
- {{ order.account_statement.provisional.quantity }} -
- {{ order.account_statement.provisional.total_amount | currency:order.currency:'symbol' }} - -
-
- @if (order.account_statement.expenditure.quantity > 0) { -
- {{ order.account_statement.expenditure.quantity }} -
- {{ order.account_statement.expenditure.total_amount | currency:order.currency:'symbol' }} - -
-
+
+
+
-
+ +
Order status
+
{{ order.status | translate }}
+ + @if (order.order_date) { +
Order date
+
{{ order.order_date | dateTranslate : "shortDate" }}
+ } + + + +
+ +
+ + @if (order.account_statement.expenditure.quantity > 0) { + + } +
+
} + +
+
+  {{ quantity }} +
+
+ {{ + total | currency : order.currency : "symbol" + }} + +
+
+
diff --git a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.scss b/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.scss deleted file mode 100644 index 239ccbacd..000000000 --- a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.scss +++ /dev/null @@ -1,83 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * Copyright (C) 2021 UCLouvain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'projects/admin/src/app/scss/variables'; - -.accounting-infos { - - border: $border-width solid $border-color; - border-radius: $border-radius; - background-color: $light; - height: 100%; - position: relative; - align-items: center; - display: flex; - justify-content: center; - padding: map-get($spacers, 2); - - // add a spacing between siblings - & + & { - margin-top: map-get($spacers, 2); - } - - span.amount { - display: block; - width: 100%; - text-align: center; - color: $dark; - font-size: 1.5rem; - text-shadow: 1px 1px 1px $secondary; - } - - label { - display: block; - color: $secondary; - font-size: 0.75rem; - text-align: center; - margin: 0; - } - - .counter { - position: absolute; - top: 0; - right: 0; - border-left: $border-width solid $border-color; - border-bottom: $border-width solid $border-color; - border-bottom-left-radius: $border-radius-lg; - color: $gray-600; - text-shadow: 1px 1px 1px $gray-300; - font-size: $small-font-size; - padding: map-get($spacers, 1) map-get($spacers, 3); - background-color: #F3F3F3; - - &.ordered-counter::before{ - font-family: 'FontAwesome'; - font-weight: 100; - content: " \f07a"; - padding-right: map-get($spacers, 3); - } - &.received-counter::before{ - font-family: 'FontAwesome'; - font-weight: 100; - content: " \f090"; - padding-right: map-get($spacers, 3); - } - } -} diff --git a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.ts b/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.ts index 00e03bd7e..1398575ae 100644 --- a/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.ts +++ b/projects/admin/src/app/acquisition/components/order/order-summary/order-summary.component.ts @@ -25,8 +25,7 @@ import { IAcqReceipt } from '../../../classes/receipt'; @Component({ selector: 'admin-order-summary', - templateUrl: './order-summary.component.html', - styleUrls: ['./order-summary.component.scss'] + templateUrl: './order-summary.component.html' }) export class OrderSummaryComponent implements OnInit, OnDestroy { diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.html b/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.html deleted file mode 100644 index 433fbfa1c..000000000 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.html +++ /dev/null @@ -1,121 +0,0 @@ - -@if (receipt && receipt.pid && permissions) { -
-

{{ receipt.reference }}

- @for (note of receipt.notes; track note) { -
-
- {{ note.type | translate }} -
-

-
- } -
- -
Receipt lines
-
- @for (line of receiptLines; track line) { -
- @if (line && permissions) { -
- {{ line.quantity }} -
-
-
- @if (line.document.pid | getRecord: 'documents' | async; as document) { - - } -
- {{ line.receipt_date | dateTranslate: 'shortDate' }} -
- @if ($any(line).acq_account.pid | getRecord: 'acq_accounts' | async; as account) { - - } -
- @for (note of line.notes; track note) { -
- {{ note.type | translate }} - -
- } -
-
- {{ line | receiptLineTotalAmount | currency: receipt.currency: 'symbol' }}
- {{ line.quantity }} x {{ line.amount | currency: receipt.currency: 'symbol' }} - @if (line.vat_rate) { - + {{ line.vat_rate }} % - } - -
-
- @if (permissions) { - - - } -
- } @else { - - } -
- } -
- - @if (receipt.amount_adjustments.length > 0) { -
Amount adjustments
-
- @for (adjustment of receipt.amount_adjustments; track adjustment) { -
-
- - - -
-
- {{ adjustment.amount | currency: receipt.currency: 'symbol' }} -
-
- } -
- } - -
-
-
Total amount
-
{{ receipt.total_amount | currency: receipt.currency: 'symbol' }}
-
-
-
-
-} diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.scss b/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.scss deleted file mode 100644 index aee9c6c65..000000000 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.scss +++ /dev/null @@ -1,115 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021-2023 RERO - * Copyright (C) 2021-2023 UCLouvain - * - * 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 'font-awesome/scss/font-awesome'; -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'projects/admin/src/app/scss/variables'; - -$line-shift: map-get($spacers, 5); - -.receipt { - - // CARD ===================================================================== - // Special rules about `div.card` panel - .card-header { - font-weight: bold; - &.total-amount { - line-height: 2.5rem; - padding: 0; - } - } - .card-body { - padding: 0; - } - - // LINES ==================================================================== - // Rules about style present into receipt detail line - .line + .line { - border-top: $border-width solid $border-color; - } - .line { - *[class^="col-"] { - padding-top: map-get($spacers, 2); - padding-bottom: map-get($spacers, 2); - } - &:hover { - background-color: $light; - } - label { - margin-bottom: 0; - } - .quantity { - font-weight: bold; - &::after { - content : 'x'; - padding-left: map-get($spacers, 2); - padding-right: map-get($spacers, 2); - } - } - .fixed-width{ - min-width: $line-shift; - } - .reception_date { - font-style: italic; - font-size: $small-font-size; - color: $secondary; - } - .left-offset { - margin-left: $line-shift; - } - .note-content { - border-left: 2px solid $border-color; - margin-top: map-get($spacers, 1);; - font-style: italic; - font-size: $small-font-size; - } - } - - // AMOUNT RULES ============================================================= - .amount { - border-left: $border-width solid $border-color; - border-right: $border-width solid $border-color; - background-color: $light; - text-align: right; - font-weight: bold; - padding-left: map-get($spacers, 2); - padding-right: map-get($spacers, 2); - - .detail { - font-size: $font-size-sm; - font-weight: normal; - color: $secondary; - &:before { - content:'('; - } - &:after { - content: ')'; - } - } - - &.discount-amount { - color: $success; - } - } - .total-amount .amount { - font-size: 1.5rem; - } - - -} diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.ts b/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.ts deleted file mode 100644 index 5335e6d6d..000000000 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-detail-view/receipt-detail-view.component.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021-2024 RERO - * Copyright (C) 2021 UCLouvain - * - * 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, inject, OnDestroy, OnInit } from '@angular/core'; -import { DetailRecord } from '@rero/ng-core/lib/record/detail/view/detail-record'; -import { forkJoin, Observable, Subscription } from 'rxjs'; -import { RecordPermissions } from '../../../../classes/permissions'; -import { RecordPermissionService } from '../../../../service/record-permission.service'; -import { CurrentLibraryPermissionValidator } from '../../../../utils/permissions'; -import { AcqReceiptApiService } from '../../../api/acq-receipt-api.service'; -import { IAcqReceipt, IAcqReceiptLine } from '../../../classes/receipt'; - -@Component({ - selector: 'admin-receipt-detail-view', - templateUrl: './receipt-detail-view.component.html', - styleUrls: ['../../../acquisition.scss', './receipt-detail-view.component.scss'] -}) -export class ReceiptDetailViewComponent implements OnInit, OnDestroy, DetailRecord { - - private acqReceiptApiService: AcqReceiptApiService = inject(AcqReceiptApiService); - private recordPermissionService: RecordPermissionService = inject(RecordPermissionService); - private currentLibraryPermissionValidator: CurrentLibraryPermissionValidator = inject(CurrentLibraryPermissionValidator); - - // COMPONENT ATTRIBUTES ===================================================== - /** Observable resolving record data */ - record$: Observable; - /** Resource type */ - type: string; - /** the receipt corresponding to the record */ - receipt: IAcqReceipt; - /** record permissions */ - permissions: RecordPermissions; - /** receipt lines related to this receipt */ - receiptLines: IAcqReceiptLine[] = []; - - /** all component subscription */ - private subscriptions = new Subscription(); - - - // GETTER & SETTER ========================================================== - /** - * Get a message containing the reasons why the order line cannot be deleted - * @return the message to display into the tooltip box - */ - get deleteInfoMessage(): string|null { - if (!this.permissions.delete.can) { - return this.recordPermissionService.generateDeleteMessage(this.permissions.delete.reasons); - } - } - get editInfoMessage(): string|null { - if (!this.permissions.update.can) { - return this.recordPermissionService.generateTooltipMessage(this.permissions.update.reasons, 'update'); - } - } - - /** OnInit hook */ - ngOnInit() { - this.record$.subscribe((record: any) => { - this.receipt = {...this.acqReceiptApiService.receiptDefaultData, ...record.metadata}; - const receiptLines$ = this.acqReceiptApiService.getReceiptLines(this.receipt.pid); - const permissions$ = this.recordPermissionService.getPermission(this.type, this.receipt.pid); - forkJoin([receiptLines$, permissions$]) - .subscribe(([receiptLines, permissions]) => { - this.receiptLines = receiptLines; - this.permissions = this.currentLibraryPermissionValidator.validate(permissions, this.receipt.library.pid); - }); - }); - this.subscriptions.add( - this.acqReceiptApiService.deletedReceiptLineSubject$ - .subscribe((receiptLine) => this.receipt.receipt_lines = this.receipt.receipt_lines.filter(line => line.pid !== receiptLine.pid)) - ); - } - - /** OnDestroy hook */ - ngOnDestroy() { - this.subscriptions.unsubscribe(); - } - - // COMPONENTS FUNCTIONS ===================================================== - /** - * Allow to delete an receipt line - * @param line - the receipt line to delete. - */ - deleteReceiptLine(line: IAcqReceiptLine): void { - this.acqReceiptApiService.deleteReceiptLine(line); - } -} diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-form.ts b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-form.ts index deb1ed907..78bbabdf1 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-form.ts +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-form.ts @@ -162,8 +162,8 @@ export class OrderReceiptForm { record.notes = []; } // Update the record with model data - record.amount_adjustments = [...record.amount_adjustments, ...this.orderReceipt.processAdjustments(model)]; - record.notes = [...record.notes, ...model.notes || []]; + record.amount_adjustments = [...this.orderReceipt.processAdjustments(model) || []]; + record.notes = [...model.notes || []]; if (model.reference && model.reference.length > 0) { record.reference = model.reference; } @@ -192,17 +192,11 @@ export class OrderReceiptForm { required: true } }, - { - key: 'exchangeRate', - type: 'input', - defaultValue: 1, - hideExpression: true - }, { key: 'receiveLines', type: 'repeat', props: { - className: 'pl-0 my-0 font-weight-bold', + className: 'font-bold', label: _('Order line(s)'), addButton: false, trashButton: false, @@ -210,7 +204,7 @@ export class OrderReceiptForm { minLength: 0 }, fieldArray: { - fieldGroupClassName: 'row', + fieldGroupClassName: 'grid', validators: { validation: [ { name: 'receiveQuantityMax', options: { errorPath: 'quantity' } } @@ -229,7 +223,7 @@ export class OrderReceiptForm { wrappers: ['input-no-label'], props: { hideLabel: true, - headerClassName: 'col-1 font-weight-bold mb-2', + headerClassName: 'col-1', } }, { @@ -238,7 +232,7 @@ export class OrderReceiptForm { className: 'col-5', wrappers: ['input-no-label'], props: { - headerClassName: 'col-5 font-weight-bold mb-2', + headerClassName: 'col-5 font-bold', label: _('Document'), resource: 'documents', resourceKey: 'document', @@ -260,7 +254,8 @@ export class OrderReceiptForm { className: 'col-2', wrappers: ['input-no-label'], props: { - headerClassName: 'col-2 font-weight-bold mb-2', + headerClassName: 'col-2 font-bold', + styleClass: "w-full", type: 'number', label: _('Qty'), required: true, @@ -273,7 +268,7 @@ export class OrderReceiptForm { className: 'col-2', wrappers: ['input-no-label'], props: { - headerClassName: 'col-2 font-weight-bold mb-2', + headerClassName: 'col-2 font-bold', type: 'number', label: _('Amount'), required: true, @@ -286,7 +281,7 @@ export class OrderReceiptForm { className: 'col-2', wrappers: ['input-no-label'], props: { - headerClassName: 'col-2 font-weight-bold mb-2', + headerClassName: 'col-2 font-bold', type: 'number', label: _('Vat Rate'), min: 0, @@ -303,7 +298,7 @@ export class OrderReceiptForm { key: 'amountAdjustments', type: 'repeat', props: { - className: 'pl-0 my-0 font-weight-bold', + className: 'pl-0 my-0 font-bold', label: _('Fees, discounts and other adjustments'), addButton: true, trashButton: true @@ -338,7 +333,8 @@ export class OrderReceiptForm { placeholder: _('Select an account'), label: _('Account'), required: true, - options: [] + options: [ + ] } } ] @@ -348,7 +344,7 @@ export class OrderReceiptForm { key: 'notes', type: 'repeat', props: { - className: 'pl-0 my-0 font-weight-bold', + className: 'pl-0 my-0 font-bold', label: _('Notes'), addButton: true, trashButton: true diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.html b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.html index 54a60962b..847bfeb6f 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.html +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.html @@ -15,53 +15,55 @@ along with this program. If not, see . --> @if (loaded) { -
+ + +
+

Receipt of an order

+
+ + +
+
- -
-

Receipt of an order

-
- - -
-
+ + +
+ + @if (receiptRecord) { + + + + } +
+
- -
-
- -
Order overview
-
-
- - @if (receiptRecord) { -
-
Already in this receipt
-
- - -
-
- } -
-
- - -
-
-
Receipt new data
-
- -
-
+ + +
+ +
+
+ } diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.ts b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.ts index 17e0a6976..9f879a588 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.ts +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt-view.component.ts @@ -19,18 +19,17 @@ import { UntypedFormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { TranslateService } from '@ngx-translate/core'; -import { CONFIG } from '@rero/ng-core'; +import { ApiService, CONFIG } from '@rero/ng-core'; import { MessageService } from 'primeng/api'; import { finalize, tap } from 'rxjs/operators'; import { AcqReceiptApiService } from '../../../api/acq-receipt-api.service'; -import { IAcqReceipt } from '../../../classes/receipt'; +import { AcqReceiptAmountAdjustment, IAcqReceipt } from '../../../classes/receipt'; import { IAcqReceiptModel, ICreateLineMessage, OrderReceipt } from './order-receipt'; import { OrderReceiptForm } from './order-receipt-form'; @Component({ selector: 'admin-order-receipt-view', - templateUrl: './order-receipt-view.component.html', - styleUrls: ['../../../acquisition.scss'] + templateUrl: './order-receipt-view.component.html' }) export class OrderReceiptViewComponent implements OnInit { @@ -41,6 +40,7 @@ export class OrderReceiptViewComponent implements OnInit { private translateService: TranslateService = inject(TranslateService); private orderReceiptForm: OrderReceiptForm = inject(OrderReceiptForm); private messageService = inject(MessageService); + private apiService:ApiService = inject(ApiService); // COMPONENTS ATTRIBUTES ==================================================== /** order pid */ @@ -128,6 +128,17 @@ export class OrderReceiptViewComponent implements OnInit { this.receiptRecord = receipt; this.model.pid = receiptPid; this.model.reference = receipt.reference; + this.model.notes = receipt.notes; + if (receipt.amount_adjustments) { + this.model.amountAdjustments = + receipt.amount_adjustments.map((adj:AcqReceiptAmountAdjustment) => { + return { + label: adj.label, + amount: adj.amount, + acqAccount: this.apiService.getRefEndpoint('acq_accounts', adj.acq_account.pid) + }; + }); + } }); } this.orderReceiptForm @@ -183,7 +194,7 @@ export class OrderReceiptViewComponent implements OnInit { } /** Redirect to order detail view */ - private redirectToOrder(): void { - this.router.navigate(['/', 'records', 'acq_orders', 'detail', this.orderPid]); + redirectToOrder(): void { + this.router.navigate(['/', 'records', 'acq_orders', 'detail', this.orderPid], { queryParams: {tab: 1}}); } } diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt.ts b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt.ts index 80364f282..41f5b0910 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt.ts +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-form/order-receipt.ts @@ -29,7 +29,6 @@ export interface IAcqReceiptModel { organisationRef: string; receiptDate: string; reference: string; - exchangeRate: number; amountAdjustments: Array<{ label: string; amount: number; @@ -83,7 +82,6 @@ export class OrderReceipt { libraryRef: null, organisationRef: null, receiptDate: DateTime.now().toISODate(), - exchangeRate: 1, reference: null, amountAdjustments: [], notes: [], @@ -107,7 +105,6 @@ export class OrderReceipt { organisation: { $ref: model.organisationRef }, - exchange_rate: model.exchangeRate, amount_adjustments: [], notes: [] }; @@ -121,7 +118,6 @@ export class OrderReceipt { library: { $ref: this.apiService.getRefEndpoint('libraries', record.library.pid) }, organisation: { $ref: this.apiService.getRefEndpoint('organisation', record.organisation.pid) }, reference: record.reference, - exchange_rate: record.exchange_rate, amount_adjustments: record.amount_adjustments, notes: record.notes }; diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-list/receipt-list.component.html b/projects/admin/src/app/acquisition/components/receipt/receipt-list/receipt-list.component.html index 797ecd2a4..fecf782fc 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-list/receipt-list.component.html +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-list/receipt-list.component.html @@ -15,53 +15,39 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
-
-
- {{ numberOfReceipt | i18nPlural: {'=1': 'Receipt', 'other': 'Receipts'} | translate }} - {{ numberOfReceipt }} -
-
- @if (recordPermissions) { - @if (recordPermissions.create.can) { - - } @else { - - - - - } - } @else { -   + + +
+
+ {{ + numberOfReceipt + | i18nPlural : { "=1": "Receipt", other: "Receipts" } + | translate + }} + +
+ @if (recordPermissions?.create?.can) { + }
-
-
- @if (receipts) { - @if (receipts.length > 0) { - @for (receipt of receipts; track receipt) { - - } - } @else { -
No receipt
- } - } @else { - + + @if (receipts) { @if (receipts.length > 0) { @for (receipt of receipts; + track receipt) { + + } } @else { +
No receipt
+ } } @else { +  {{ + "Loading in progress…" | translate + }} } -
-
+ diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.html b/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.html index 16651da53..243b7ae0e 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.html +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.html @@ -15,118 +15,98 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
+
@if (receipt) { -
-
+
+
-
+
@if (collapsable) { - + } +
@if (receipt.notes.length > 0 && isCollapsed) { - + @for (note of receipt.notes; track note) { - + } } +
@if (receipt.quantity) { -
-
- + +   {{ receipt.quantity }} {{ receipt.quantity | i18nPlural: {'=1': 'item', 'other': 'items'} | translate }} -
-
+ }
-
-
{{ receipt.total_amount | currency:receipt.currency:'symbol' }}
+
+ {{ receipt.total_amount | currency:receipt.currency:'symbol' }}
- @if (!isCollapsed) { + @if (!collapsable || !isCollapsed) { - @for (line of receipt.receipt_lines; track line; let first = $first) { -
- {{ line.quantity }}x + @for (line of receipt.receipt_lines; track line) { +
+ {{ line.quantity }} x
@if (line.document.pid | getRecord: 'documents' | async; as document) { - + } @if ($any(line).acq_account.pid | getRecord: 'acq_accounts' | async; as account) { - + [{{ $any(account).metadata.number }}] }
-
-
- ({{ line.quantity }} x {{ line.amount | currency:receipt.currency:'symbol' }} +
+
{{ line | receiptLineTotalAmount | currency:receipt.currency:'symbol' }}
+
+ {{ line.quantity }} x {{ line.amount | currency:receipt.currency:'symbol' }} @if (line.vat_rate) { + {{ line.vat_rate }}% - }) + }
-
{{ line | receiptLineTotalAmount | currency:receipt.currency:'symbol' }}
} @for (adjustment of receipt.amount_adjustments; track adjustment) { -
+
{{ adjustment.label }}
-
-
{{ adjustment.amount | currency:receipt.currency:'symbol' }}
+
+
+ {{ adjustment.amount | currency:receipt.currency:'symbol' }} +
} - @for (note of receipt.notes; track note) { -
- {{ note.type | translate }} - -
-
 
- } +
+ +
+
 
}
@if (recordPermissions && allowActions) { -
+
- } } @else { - +  {{ 'Loading in progress…' | translate }} }
diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.scss b/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.scss deleted file mode 100644 index 23cc22604..000000000 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.scss +++ /dev/null @@ -1,79 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * Copyright (C) 2021 UCLouvain - * - * 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 'font-awesome/scss/font-awesome'; -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'projects/admin/src/app/scss/variables'; - -:host { - display: block; -} -.receipt { - border-bottom: $border-width solid $border-color; - &:hover { - background-color: $light; - } - label { - span.reception-dates { - font-style: italic; - font-size: $small-font-size; - padding-left: map-get($spacers, 2); - } - - } - *[class^="col-"] { - padding-top: map-get($spacers, 2); - padding-bottom: map-get($spacers, 2); - } - - /* DETAILS ROWS ========================================================== */ - *.detail { - padding-top: 0 !important; - padding-bottom: map-get($spacers, 1) !important; - - &.label{ - padding-left: 8.333333%; // Same as offset-1 class but without pixel mismatch - } - - &.separator { - border-top: 1px dashed $border-color; - } - } - - /* AMOUNT COLUMN ========================================================= */ - .amount { - border-left: $border-width solid $border-color; - background-color: $light; - text-align: right; - padding: map-get($spacers, 1) map-get($spacers, 2); - - .total-amount { - font-weight: bold; - } - .computation { - font-size: small; - color: $secondary; - } - } - - /* ACTIONS BUTTONS ======================================================= */ - .actions-column { - border-left: $border-width solid $border-color; - } -} diff --git a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.ts b/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.ts index 0cf6ee51d..46e30e66d 100644 --- a/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.ts +++ b/projects/admin/src/app/acquisition/components/receipt/receipt-summary/receipt-summary.component.ts @@ -27,8 +27,7 @@ import { ReceivedOrderPermissionValidator } from '../../../utils/permissions'; @Component({ selector: 'admin-receipt-summary', - templateUrl: './receipt-summary.component.html', - styleUrls: ['../../../acquisition.scss', './receipt-summary.component.scss'] + templateUrl: './receipt-summary.component.html' }) export class ReceiptSummaryComponent implements OnInit { @@ -66,11 +65,6 @@ export class ReceiptSummaryComponent implements OnInit { ? this.recordPermissionService.generateTooltipMessage(this.recordPermissions.update.reasons, 'update') : ''; } - get resumeInfoMessage(): string { - return (!this.recordPermissions.create.can) - ? this.recordPermissionService.generateTooltipMessage(this.recordPermissions.create.reasons, 'resume') - : ''; - } /** OnInit hook */ ngOnInit(): void { diff --git a/projects/admin/src/app/acquisition/formly/type/repeat-section.type.ts b/projects/admin/src/app/acquisition/formly/type/repeat-section.type.ts index c44184c87..54f984f76 100644 --- a/projects/admin/src/app/acquisition/formly/type/repeat-section.type.ts +++ b/projects/admin/src/app/acquisition/formly/type/repeat-section.type.ts @@ -20,39 +20,40 @@ import { FieldArrayType } from '@ngx-formly/core'; @Component({ selector: 'admin-formly-repeat-section', template: ` - + @if (field.props.label || field.props.addButton) { - + } @if (field.fieldGroup.length > 0) { -
-
-
-
+
+
+
@for (field of field.fieldGroup[0].fieldGroup; track field) { @if (field.className) {
@@ -65,97 +66,28 @@ import { FieldArrayType } from '@ngx-formly/core'; }
-
- @for (f of field.fieldGroup; track f; let i = $index) { -
+ @for (f of field.fieldGroup; track f; let i = $index) { @if (f.fieldGroup.length > 0) { - + @if (field.props.trashButton) { -
+
@if (showTrash) { - + } @else {   }
} } -
- } -
- } - - + ` }) export class RepeatTypeComponent extends FieldArrayType { diff --git a/projects/admin/src/app/acquisition/routes/order-lines-route.ts b/projects/admin/src/app/acquisition/routes/order-lines-route.ts index f4a790be6..f2f97bb8f 100644 --- a/projects/admin/src/app/acquisition/routes/order-lines-route.ts +++ b/projects/admin/src/app/acquisition/routes/order-lines-route.ts @@ -49,9 +49,6 @@ export class OrderLinesRoute extends BaseRoute implements RouteInterface { { key: this.name, label: _('Order lines'), - editorSettings: { - longMode: true, - }, canAdd: () => of({ can: this.routeToolService.permissionsService.canAccess(PERMISSIONS.ACOL_CREATE) }), permissions: (record: any) => this.routeToolService.permissions(record, this.recordType, true), preCreateRecord: (data: any) => this._addDefaultInformation(data), diff --git a/projects/admin/src/app/acquisition/routes/orders-route.ts b/projects/admin/src/app/acquisition/routes/orders-route.ts index a94b06e93..2f58d9544 100644 --- a/projects/admin/src/app/acquisition/routes/orders-route.ts +++ b/projects/admin/src/app/acquisition/routes/orders-route.ts @@ -84,28 +84,34 @@ export class OrdersRoute extends BaseRoute implements RouteInterface { { label: _('Relevance'), value: 'bestmatch', - defaultQuery: true + defaultQuery: true, + icon: 'fa fa-sort-amount-desc' }, { label: _('Receipt date (newest)'), value: 'receipt_date', + icon: 'fa fa-sort-amount-desc' }, { label: _('Reference (asc)'), value: 'reference_asc', + icon: 'fa fa-sort-alpha-asc' }, { label: _('Reference (desc)'), - value: 'reference_desc' + value: 'reference_desc', + icon: 'fa fa-sort-alpha-desc' }, { label: _('Order date (newest)'), - value: 'order_date_new' + value: 'order_date_new', + icon: 'fa fa-sort-amount-desc' }, { label: _('Order date (oldest)'), value: 'order_date_old', + icon: 'fa fa-sort-amount-asc' } ], exportFormats: [ @@ -146,7 +152,7 @@ export class OrdersRoute extends BaseRoute implements RouteInterface { */ private _cleanRecord(data: any): any { // remove dynamic fields - const fieldsToRemoved = ['is_current_budget', 'status', 'order_date', 'account_statement']; + const fieldsToRemoved = ['is_current_budget', 'status', 'account_statement']; return this.fieldsToRemoved(data, fieldsToRemoved); } } diff --git a/projects/admin/src/app/acquisition/routes/receipt-lines-route.ts b/projects/admin/src/app/acquisition/routes/receipt-lines-route.ts deleted file mode 100644 index d1a0b29ca..000000000 --- a/projects/admin/src/app/acquisition/routes/receipt-lines-route.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021-2024 RERO - * Copyright (C) 2021-2023 UCLouvain - * - * 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 { getCurrencySymbol } from '@angular/common'; -import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; -import { FormlyFieldConfig } from '@ngx-formly/core'; -import { ComponentCanDeactivateGuard, EditorComponent, JSONSchema7, RouteInterface } from '@rero/ng-core'; -import { PERMISSIONS } from '@rero/shared'; -import { of } from 'rxjs'; -import { CAN_ACCESS_ACTIONS, CanAccessGuard } from '../../guard/can-access.guard'; -import { BaseRoute } from '../../routes/base-route'; -import { OrganisationService } from '../../service/organisation.service'; -import { IsBudgetActiveGuard } from './guards/is-budget-active.guard'; - -export class ReceiptLinesRoute extends BaseRoute implements RouteInterface { - - /** Route name */ - readonly name = 'acq_receipt_lines'; - /** Record type */ - readonly recordType = 'acq_receipt_lines'; - - /** Get route configuration */ - getConfiguration() { - return { - matcher: (url: any) => this.routeMatcher(url, this.name), - children: [ - { path: 'edit/:pid', component: EditorComponent, canActivate: [ CanAccessGuard, IsBudgetActiveGuard ], canDeactivate: [ ComponentCanDeactivateGuard ], data: { action: CAN_ACCESS_ACTIONS.UPDATE } } - ], - data: { - types: [ - { - key: this.name, - label: _('Receipt lines'), - editorSettings: { - longMode: true, - }, - canAdd: () => of({ can: this.routeToolService.permissionsService.canAccess(PERMISSIONS.ACRL_CREATE) }), - preUpdateRecord: (data: any) => this.fieldsToRemoved(data, ['is_current_budget']), - permissions: (record: any) => this.routeToolService.permissions(record, this.recordType, true), - redirectUrl: (record: any) => this.redirectUrl(record.metadata.acq_receipt, '/records/acq_receipts/detail'), - formFieldMap: (field: FormlyFieldConfig, jsonSchema: JSONSchema7): FormlyFieldConfig => { - const formWidget = jsonSchema.widget; - if (formWidget?.formlyConfig?.props?.fieldMap === 'amount') { - return this._amountSymbol(field); - } - return field; - } - } - ] - } - }; - } - - - /** - * Make currency symbol before input - * @param field - FormlyFieldConfig - * @return FormlyFieldConfig - */ - private _amountSymbol(field: FormlyFieldConfig): FormlyFieldConfig { - // TODO :: This isn't the organisation currency that we need to use, it's the order related vendor currency - // But how to retrieve the order from here ??? and how get quickly currency to use into - const service = this.routeToolService.getInjectorToken(OrganisationService); - field.props.addonLeft = [ - getCurrencySymbol(service.organisation.default_currency, 'wide') - ]; - return field; - } -} diff --git a/projects/admin/src/app/interceptor/no-cache-header.interceptor.ts b/projects/admin/src/app/interceptor/no-cache-header.interceptor.ts index fd4d479d9..2f1ec3d4f 100644 --- a/projects/admin/src/app/interceptor/no-cache-header.interceptor.ts +++ b/projects/admin/src/app/interceptor/no-cache-header.interceptor.ts @@ -74,7 +74,7 @@ export class NoCacheHeaderInterceptor implements HttpInterceptor { // Prevent caching in IE, in particular IE11. // See: https://support.microsoft.com/en-us/help/234067/how-to-prevent-caching-in-internet-explorer setHeaders: { - 'Cache-Control': 'no-cache', + 'Cache-Control': 'no-store', Pragma: 'no-cache' } }); diff --git a/projects/admin/src/app/record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component.ts b/projects/admin/src/app/record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component.ts index ea96779a6..8cc7da42c 100644 --- a/projects/admin/src/app/record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component.ts +++ b/projects/admin/src/app/record/custom-editor/libraries/exception-dates-edit/exception-dates-edit.component.ts @@ -94,7 +94,6 @@ export class ExceptionDatesEditComponent implements OnInit, OnDestroy { Validators.pattern('^[0-9]*$') ]); this.form.period.setValue('yearly'); - console.log(this.form.period); } else { this.form.interval.clearValidators(); this.form.interval.setValue(null); diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html index 3ceda37fb..35a62edff 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/document-detail-view.component.html @@ -259,13 +259,15 @@

{{ altgr_title }}

@if (record.metadata.pid) { - +  {{ "Get" | translate }} -
- -
+ @if(tabGet.selected) { +
+ +
+ }
} 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 c15a19ece..38cd423a6 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 @@ -45,11 +45,11 @@ Who do you want to send the message to? (Drag and drop)
-
+
@for (email of emails; track email) { } @@ -51,7 +51,7 @@
Who do you want to send the message to?
-
+
@for (type of emailTypes; track type) {
{{ ('email_' + type) | translate }} : diff --git a/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts b/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts index 3515cd7f2..4345fbf6f 100644 --- a/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts +++ b/projects/admin/src/app/shared/primeng-import/primeng-import.module.ts @@ -21,6 +21,7 @@ import { NgCoreFormlyRemoteAutocompleteModule } from '@rero/ng-core'; import { AccordionModule } from 'primeng/accordion'; import { AutoCompleteModule } from 'primeng/autocomplete'; import { ChipsModule } from 'primeng/chips'; +import { ChipModule } from 'primeng/chip'; import { DividerModule } from 'primeng/divider'; import { DragDropModule } from 'primeng/dragdrop'; import { DropdownModule } from 'primeng/dropdown'; @@ -40,12 +41,16 @@ import { CardModule } from 'primeng/card'; import { TableModule } from 'primeng/table'; import { FieldsetModule } from 'primeng/fieldset'; import { ChartModule } from 'primeng/chart'; +import { AvatarModule } from 'primeng/avatar'; + @NgModule({ exports: [ AutoCompleteModule, AccordionModule, + AvatarModule, ChipsModule, + ChipModule, DividerModule, DragDropModule, DropdownModule, diff --git a/projects/public-search/src/app/interceptor/custom-request.interceptor.ts b/projects/public-search/src/app/interceptor/custom-request.interceptor.ts index 476232274..8a4306fb6 100644 --- a/projects/public-search/src/app/interceptor/custom-request.interceptor.ts +++ b/projects/public-search/src/app/interceptor/custom-request.interceptor.ts @@ -61,7 +61,7 @@ export class CustomRequestInterceptor implements HttpInterceptor { // Prevent caching in IE, in particular IE11. // See: https://support.microsoft.com/en-us/help/234067/how-to-prevent-caching-in-internet-explorer setHeaders: { - 'Cache-Control': 'no-cache', + 'Cache-Control': 'no-store', Pragma: 'no-cache' } }); diff --git a/projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component.html b/projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component.html index e66f112e8..d36e24ac8 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component.html +++ b/projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component.html @@ -30,7 +30,7 @@
- +